Fwd: Country Table Lookup

Andreas Fink <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
On Freitag, Dezember 27, 2002, at 07:45  Uhr, George C wrote:

> no they are 3 digit country codes.. quite a few..
> cyprus +357
>
> ok. this number.. how do i know its china or trinidad..
> +8681234567
> ok its trinidad cause it has the 3rd digit 8
> but how u code this and the logic..
> 1st sms get sent..
> then i neeed to appoint a charge to it..
> by looking up what coutry it belongs to.. and then addint the charge to
> it...
>
> hmmm...   im still baffled..
>
> :)

Country codes are defined by the ITU and they are listed there. Their 
length do vary. Most are 2-3 digits. USA and Canada share the +1 
country code. However charges are not related to countries often but to 
carriers inside those countries. And even worse, you can often not 
determine what carrier a number is.

Example:

Switzerland is +41

There are 5 operators which have numbers in the mobile area. 3 of them 
have customers with GSM phones. Those numbers are:

+41 79 Swisscom
+41 78 Orange
+41 76 Sunrise

However, number portability applies so a lot of +41 79 numbers are now 
moved on to Orange and Sunrise and a few in the other direction.
Also +41 79 9... contains some blocks of the two other virtual GSM 
operators (Togewa net and our Global Networks Inc) which do GSM/Mobile 
special services. So there's no way of knowing exactly to which 
operator a mobile is belonging. This situation also applies to many 
other countries where number portability is fully implemented (UK, 
Hongkong for example). There's a way to know exactly by looking it up 
in SS7 because when you do a SS7 number lookup, the answer will be a 
IMSI number and those are going to contain MCC (mobile country code) 
and MNC (mobile network code) which will give you the definitive answer 
to whom a specific SIM card belongs.

We once where thinking of offering such a lookup service over HTTP to 
offer it to kannel users but there was no interest so we postponed the 
project.

Andreas Fink
Global Networks Switzerland AG

------------------------------------------------------------------
Tel: +41-61-6666333  Fax: +41-61-6666334   Mobile: +41-79-2457333
Global Networks, Inc. Clarastrasse 3, 4058 Basel, Switzerland
Web: http://www.global-networks.ch/      [email protected]
------------------------------------------------------------------
Member of the GSM Association


Andreas Fink
Global Networks Switzerland AG

------------------------------------------------------------------
Tel: +41-61-6666333  Fax: +41-61-6666334   Mobile: +41-79-2457333
Global Networks, Inc. Clarastrasse 3, 4058 Basel, Switzerland
Web: http://www.global-networks.ch/      [email protected]
------------------------------------------------------------------
Member of the GSM Association
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.