How to cannonicate numbers in international form

Joachim Breitner mail at
Thu Jul 17 17:22:47 CEST 2008


Am Donnerstag, den 17.07.2008, 16:35 +0200 schrieb Tilman Baumann:
> Number normalisation is really no big magic.

Right, my question was rather asking how and where we want to implement

>          my $PAPrefix = publicAccessPrefix;  # No PBX. But usually 0
>          my $IDPrefix = internationalPrefix; # 00
>          my $LDPrefix = longDistancePrefix;  # 0
>          my $Country = countryCode; # 49
>          my $Area    = areaCode;    # 761
>          my $PBX     = pbxCode;     # external number of your PBX

Hmm, I didn’t think of the areaCode, because, as far as I know, everyone
here always add the areaCode when using a cell phone. Is that different
in other places?

> I make some assumptions. Please correct me if they are not true.
> - GSM works with international numbers. If a call comes in it will be 
> always formatted in international form.
> - The user uses only one dial plan. (Anything else would be a usability 
> disaster but doable)

I’m not sure about the second part: What happens when I use my regular
proprietary German phone in France, and dial 0172/12345? Will that get a
+49 (for Germany) or a +33 (for France) prepended? And is this done by
the phone or or by the GSM provider? What do users expect?

> First usage:
> Calls comes in. Try to match it against our telephone book.
> Just transform every number before matching.
> Second usage:
> Transform every number after user put it in his phone book. Only save 
> internationalized numbers if possible.
> This would condition the user to use international form and acknowledge 
> its existence and significance.
> This should be done in some user visible way. So he sees what happens 
> with his number.

I oppose the second way: The user should be free to type in good looking
phone numbers such as 0172/123 456 in his address book, and no automatic
mangling of these entries should happen. I’d also think that such
mangling would cause problems with syncronization tools. Therefore I’ll
see if I can implement the „First Usage“ consistently for
openmoko-dialer and openmoko-messages.

> If we find no location based or SIM based approach that works, we could 
> ask the user on first entry of any number after his local dialing habits.
> If a user is not capable of answering this question we just ignore 
> number transformation. This would not screw usability too much. The user 
> would just not be able to have the benefit of a seamless usage of phone 
> numbers.

Hmm, it would be good if we would not have to do that. Not everyone
knows his own international prefix, and some users, who never use
numbers outside their country, will not want to bother. And as long as
we do not try to modify numbers, but only compare them smartly (ok,
indeed not fuzzily), the code does not need to know the international


Joachim Breitner
  e-Mail: mail at
  ICQ#: 74513189
  Jabber-ID: nomeata at
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : 

More information about the devel mailing list