How do you like to read a phone number?

Michele Renda michele.renda at
Mon Dec 29 17:22:25 CET 2008


thank you for your complete email!

My idea in about these points:

a) Who now has a freerunner is someone that is a bit an advanced user. 
And I think a lot of people don't like all these ambiguities on phone 
number. I think a phone number must to be as unique is possible (in must 
not be different if I have to be called from a person that live near to 
me or from my uncle that live in Japan). So I'd like to force (ok... not 
really forced, but encourage) people to dial the number with 
international prefix. (but with some ticks to don't press too much buttons)

b) Internally all the number are registered on this format, that I think 
is the most correct: +XXXXXXXXXXXXXX, then every phone number is rended 
according some rules very easy with spaces, dash, etc.

c) Because I think it can interest someone else, if I have success to 
manage it, I would like to separate the "Parse logic" from the main 
program logic. In this way it could be used by other programs (If 
someone is interested can contact to me). It is for now a Python class.

d) I'd like to avoid to use a specific class for every coutry. For now 
(until I will not find some very big problems) I would like to have a 
simple big text file with all the configuration. I did for Italy and 
seem to be pretty fast.

e) In every moment everyone can remove this formatting funcion and to 
fall back on +XXXXXXXXXXXXXX format.

f) I'd like to don't add only formatting information, but also some 
other info as country, town, type (fix/mobile) and whatever you want.

Best regards
Michele Renda

Il 29/12/2008 15:16, Carsten Haitzler (The Rasterman) ha scritto:
> 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 :)

More information about the community mailing list