[maemo-developers] How do I get my own phone number?

From: Geordie Millar gm at stackunderflow.com
Date: Wed Mar 17 12:40:47 EET 2010
Yeah, just tested that CUSD code here in Australia on '3', and it doesn't work.

Also some SIMs have multiple incoming numbers. I've never personally owned one, but I've seen it done, and the GSM standard allows for it. I don't actually think the phone knows it's own number. I'm pretty sure only the IMSI is on the SIM card most of the time. The MSISDN (read: phone number) is sometimes on the card, but I think doesn't have to be present. Also, if you have a ported number from another carrier, the stored MSISDN would be wrong as the sim card isn't reprogrammed when you do this.

I can say though that on the iPhone, the call to get the phone number actually returns the value given to iTunes when it's activated, and is not guaranteed.

Also, apologies for assuming the IMEI was what you really wanted - I took "theft protection" to mean "anti-piracy" rather than theft of the device.

On 17/03/2010, at 8:26 PM, Martin Grimme wrote:

> You can retrieve the phone number via a CUSD request *135#.
> /usr/bin/pnatd provides a tool for sending CUSD requests and AT
> commands in general. This may not be supported by all operators,
> though.
> 
> 
> Regards,
> Martin
> 
> 
> 2010/3/17, Cláudio Sampaio <patola at gmail.com>:
>> 2010/3/17 Frédéric Ledain <frederic.ledain at onmobile.com>
>> 
>>> 
>>>> Is this a software or hardware limitation? My previous mobile phones
>>> showed me the number correctly when I inserted a new chip.
>>> 
>>> AFAIK, no API gives the SIM phone number, as this is an information
>>> which belongs to the mobile operator.
>>> Actually, the correspondance IMSI <-> SIM phone number is made at mobile
>>> operator side.
>>> 
>>> I think that anti-theft mecanism can securely be based on IMSI swap
>>> detection.
>>> Phone number doesn't add any valuable information in this context.
>>> 
>> 
>> Agreed, but try not to think as much as a software engineer and think as a
>> simple user. Some people just forget their number - and it's useful if they
>> can see it on the mobile, for telling other people. Some people carry a few
>> SIMs around, and this information - the phone number - is useful to them.
>> 
>> It might be that regular mobile phones use some kind of workaround to get
>> this information - like, say, getting the destination number when they get a
>> call - but nevertheless it is useful information that can be show to the
>> user.
>> 
>> So, really, no way to get it from the OS data?
>> 
>> Best regards,
>> --
>> Cláudio "Patola" Sampaio
>> IRC: ptl  - Yahoo: patolaaa
>> Campinas, SP - Brazil.
>> 
> _______________________________________________
> maemo-developers mailing list
> maemo-developers at maemo.org
> https://lists.maemo.org/mailman/listinfo/maemo-developers

More information about the maemo-developers mailing list