#43 Phone Format example?


Do you have a phone format example for me

All phone formats are currently empty resulting in a
huge number of digits not separated by space,
dash or something else.

In Germany we have phone numbers like:
+49 (0)40 1234567-8910 but also
+49 (0)43210 123-45
and anything inbetween...

What would be (any) definition for this?
(Sorry to ask here but I could not find some
information about it.)




  • Brian Peterson

    Brian Peterson - 2005-06-17

    Logged In: YES

    Could you describe the phone numbering rules in Germany more

    The XRMS development team is aware that there are some
    issues with phone format in some countries... I'd like some
    more input so that we can come up with a solution that works
    for everyone...

    For a little background, phone formatting is useful (if we
    can make it work) so that phone number searches and CTI can
    search consistent data. For example, in the United States
    and Canada, fone numbers may be written:
    (111) 222-3333

    That kind of variation makes searching for phone numbers
    very difficult.

    If you are using CTI (as with Asterisk or Cisco phone
    systems), then the CTI system must be able to search for
    numbers as well for inbound screen 'pop' or outbound dial.

    So, that is why the phone_format function exists. We are
    aware that there can be issues with this function, and I'd
    be happy to work with you to find a solution, but I need
    more information.


    - Brian

  • tda

    tda - 2005-06-17

    Logged In: YES

    Thanks again for your quick answer Brian!

    In Europe the phone number rules are extremely
    simple: country city local

    usually 00 followed by the real country code which is 1
    for the US, 49 for germany, has more than 3 digits for
    some other countries.
    001 US
    0049 Germany
    Usually the 00 is written as +, so +49 stands for

    usually 0 followed by at least two digits, sometimes
    written as (0) as you may not dial the leading zero if you
    are calling from a foreign country but you must dial the
    leading 0 if you are dialing from within the country.
    040 Hamburg -> (0)40
    089 Munich -> (0)89
    04562 somewhere -> (0)4562

    any number from 3-12?? digits, maybe more due to

    +49 (0)40 12345678 -12345
    +49: country
    (0)40: dial 40 from US, dial 040 from inside Germany
    12345678 as it is, sometimes grouped for better
    readability: 123 456 78 or 12 345 5678 or whatever
    -12345 extension, better not try to dial a dash :-)

    So the system is very simple: nearly no fixed rules
    except the order and dropping the first 0 in the city
    when calling outside your own country.

    No, really: Hard stuff to put into fixed rules.

    So the rule of thumb is that most people use spaces to
    format the local part, some do use (0) instead of plain
    0, some have no clue what these brackets are about,
    esp. the elderly people... And nobody really cares
    about number format ;-)

    Nevertheless: The current version is dropping all
    spaces, making it nearly impossible to correctly dial
    manually as the phone number is not at all readable
    any more.

    I will be happy to help you on this concept. Just give me
    a note.

  • Brian Peterson

    Brian Peterson - 2005-10-09

    Logged In: YES

    New discussion on needed changes to the phone_format
    function here:


    I think we're getting close to something that we could
    actually write and deliver that will meet people's needs.
    I'd love your feedback on the forum thread linked above.

  • Brian Peterson

    Brian Peterson - 2005-10-09
    • priority: 5 --> 7
    • assigned_to: nobody --> gpowers
  • Brian Peterson

    Brian Peterson - 2006-04-25
    • status: open --> closed

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks