Some country codes are three digits long. Some are two. e.g. UK 44 , Bermuda 441 Does anyone know a formula for determining which part of a dialled number is the country code and city code ? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20050303/facb2a2d/attachment.htm
To my knowledge, there is no such formula. However, you can obtain a database of the entire ITU E164 numbering plan at http://www.numberingplans.com <http://www.numberingplans.com/> , which have an updated database of all that information. Nir S _____ From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of VoIP Services Sent: Thursday, March 03, 2005 4:25 PM To: asterisk-users@lists.digium.com Subject: [Asterisk-Users] country/city codes Some country codes are three digits long. Some are two. e.g. UK 44 , Bermuda 441 Does anyone know a formula for determining which part of a dialled number is the country code and city code ? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20050303/833b92ac/attachment.htm
VoIP Services <kurtz@lightspeed.ca> wrote: [...]> Some country codes are three digits long. Some are two. > e.g. UK 44 , Bermuda 441I think you'll find that the country code for Bermuda is not 441. I'd have to find a telephone directory to check, but I bet the country code is actually 1, and 441 is the area code.> Does anyone know a formula for determining which part of a dialled > number is the country code and city code ?There's no formula - you need to use a look-up table. -- She's the kind of girl who climbed the ladder of success wrong by wrong. - Mae West
On Thu, Mar 03, 2005 at 06:25:09AM -0800, VoIP Services wrote:> Some country codes are three digits long. Some are two. > e.g. UK 44 , Bermuda 441 > Does anyone know a formula for determining which part of a dialled number is the country code and city code ? >There is no formula, you need to make a list. There are lists around the place, telling you what each prefix means. It also changes over time, as countries change their numbering to deal with growth of population and services. http://www.wtng.info has a lot of useful information... Hope this helps, -- Martijn van Oosterhout Ecomtel Pty Ltd
VoIP Services wrote:> Some country codes are three digits long. Some are two. > e.g. UK 44 , Bermuda 441And some country codes are one digit, like "1" for US
Aren't country codes 1 or 2 digits? Area codes are 3 digits: 44 is a country code, 441 is an area code... the country code for Bermuda is '1', same as Canada, US, and most of the Carribean nations. Check this out for the solution you need: http://lists.digium.com/pipermail/asterisk-dev/2004-May/004151.html On Thu, 3 Mar 2005 06:25:09 -0800, VoIP Services <kurtz@lightspeed.ca> wrote:> > Some country codes are three digits long. Some are two. > e.g. UK 44 , Bermuda 441 > Does anyone know a formula for determining which part of a dialled number is > the country code and city code ? > > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users > >