Peter wrote:
The number is not in the SIM card. It is associated with the SIM ID by the network.
I am not exactly sure how it’s done, but my Android tablet displayed the phone number of every SIM card I stuck in it. It does not necessarily mean it’s true for every SIM card in the world, but it’s at least a popular optional feature.
It could be trivially done by the device sending an SMS to some number which it knows, or can obtain via some protocol embeded in the Android O/S. The system receiving the SMS grabs the CLI and returns it to the device, via SMS or the internet.
At the device vendor level, there is a special SMS type called something like “network message”, which can be hidden from the user. For example a non-jailbroken Ipad has its SMS functionality blocked from the user interface by Apple, but it can receive and display (and act on, if required) these special SMSs – examples. Old Nokia phones could transmit such SMSs, though I think that needed a cable and some PC software.
There are also “flash messages” which are SMSs that pop up without being stored in the Inbox. I have a program at work which can generate them, over an RS232 (DLR-3P) connection to a 6130i
So anything is possible
Emojis are Unicode