hi

u need a list of the country dialing codes, and then you do a longest prefix match. i.e. the longest prefix in your country list that matches the leftmost digits of the destination msisdn. How to do this, well there are many algorithms.

nisan
At 08:45 PM 12/27/02 +0200, 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..

:)




> I think the 3 digits codes you mention are actually US area codes, not
> international prefixes... So they'll be prefixed by 1 (north american
> zone code).
> As far as I could tell no 3 digits codes conflict with a 2 digits code
> (ie albania is 355 but 35 alone is not affected)
>
> Stefan
>
> On Fri, 2002-12-27 at 14:15, George C wrote:
> > Was wondering what logic can be used to lookup what country sms is
> > being sent to..
> >
> > Hope u can help me out..  its something that is done usually by
> > providers.. and i need to implement this logic..
> >
> > Wish to find a way to be able to tell from a International mobile
> > number i.e +8684444xxxx
> > that this number is a gsm in xyz country.
> >
> > Then I will be able to add a charge my clients based on the numbers
> > and country of destination since each country is different to send
> > sms.. in terms of charges..   when I have picked the country code that
> > sms has been sent to.. I can deduct then the sms credits from that
> > account..
> >
> > How or what algorith or logic can i use for this..
> >
> > If all the country codes would be similar to +30 and +40, it would be
> > easy. But some countries
> >  have 3 digits, and for some, the first 2 digits are identical to a
> > country with 2 digits. For instance:
> > Spain - 34
> > U.S. Virgin Islands - 340
> >
> > China - 86
> > Trinidad and Tobago - 868
> > St Kitts and Nevis - 869
> >
> >
> > hmmm  how or do u have any methods how I can approach this.??
> >
> > much appreciate any info or docs.
> > :)
> >
> > /george
> >
> --
> Stefan Praszalowicz <[EMAIL PROTECTED]>
> Avedya
>
>

Reply via email to