How do you like to read a phone number?

Carsten Haitzler (The Rasterman) raster at
Mon Dec 29 15:16:15 CET 2008

On Mon, 29 Dec 2008 14:11:28 +0100 Michele Renda <michele.renda at>

> Il 29/12/2008 13:38, William Kenworthy ha scritto:
> > Not really an issue,
> > except for using a "+" like you do will totally confuse people here ...
> >
> >    
> I am trying to make some ideas :) In this moment I am writing a dialer, 
> and I am implementing a intelligent
>   formatting functionality.

frankl;y - i did some research into this. the number of ways you can write just
a SINGLE number (just thinking of a few):

+61 413 123 456 (full intl from anywhere + is supported - until recently
japan didn't support + as a intl dial prefix)
0011 61 413 123 456 (including specific intl call prefix instead of +  from .au)
0018 61 413 123 456 (specifically use a different intl call provider from .au)
001 61 413 123 456 (call from japan using kddi telco)
0041 61 413 123 456 (call same number using japan telecom telco) 
0413 123 456 (call number from within .au)

thats a mobile number and for 1 country only. i covered just some options on
calling it from 1 other country too - now look at all countries. now a local
number adds a few levels:

+61 2 1234 5678 (full intl)
0011 61 2 1234 5678
0018 61 2 1234 5678
001 61 2 1234 5678
0041 61 2 1234 5678
02 1234 5678 (call from anywhere in .au to the number)
1234 5678 (call from the 02 area code - i.e. NSW only)

note the last one adds a call "from inside area code".

look at:

for some of the insanity that is just intl dialling codes - not to mention
within-country area codes - and hell, even per telco.

in reality after looking at this a bit i got to the conclusion "crap - this is
just going to need a filter plugin system where someone writes a formatting
blob of code AND a number canonicaliser (to canonicalise ALL numbers to a
single explicit/unique format - eg +61413123456 for example). the plugin would
nee as input the current telco and country (get it from the gsm modem) and then
the number - output would be either a canonicalised number so it can always
match numbers for caller-id etc. correctly OR a "formatted number" which may
add spaces, +'s or -'s in it as per user preferences (and don't forget it may
want to color-code it... or even replace the +61 with a country flag (a .au
flag for example) much like skype does. if you call within a telco on a mobile
in .au - depending on telco. sometimes the calls are "free" within the telco
(japan has this too for softbank last i checked). sometimes rates are just
lower within a telco - so being able to also throw in some icon for the telco
might be nice - or something to indicate it will be long distance, or a
freecall, or high-charge (phone sex numbers?) etc. etc.

sop once you expand the problem to its wider scope of basically not just being
able to convert some shorthand phone number into a uniquely matchable numeric
string but also being able to "interpret it" (format it, etc.) you really want
to just make a plugin arch. then just write a plugin for a country you know
well (your own) and have others write ones for theirs - make sure you have the
ability to call the right plugin in the right circumstance. now you have split
the problem up and let people solve it for every bizarre situation out there
without you needing to do all the work :)

> About the first "+" yes, I am afraid people will be confused. So what I 
> am implementing, will be easily deactivable. ( or better, deactivated by 
> default).
> All is done by a config file (a very long csv) and this will implement 
> two killer feature: feature, and number type recnowneldge.
> > I think that if you try and implement a global one size suits everyone,
> > you can only separate numbers with spaces (say every 3 or 4 digits) - to
> > do anything more complicated you will need to look into
> > internationalisation (or possibly user selectable from a number of
> > choices) as everybodies ideas are different :(
> >
> > Ive seen some discussions on the asterisk list about how telephone
> > numbers are allocated and designed across the world and its basicly an
> > anarchic nightmare :)
> >    
> I like nightmare :) No, really, I want to try to make it cleared
> > Try googling - there is enough detail to keep you happy for a long long
> > while ...
> >    
> Thank you for your help!
> Michele Renda
> _______________________________________________
> Openmoko community mailing list
> community at

------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    raster at

More information about the community mailing list