How to force Asterisk International numbers

Hello,

My problem is :

  • If a call come, i want to load a extension depending of the Country of the caller.
  1. But, if a call come from our country, there are no 0033, it is possible to know the “international number” in every case ?
  2. Otherwise, there is a plugin/function to know the “country code” ?

Can you help me please?

My extensions.conf

[code][OVH-0033372390168-FIXE] ; if come from 03 (france region)
exten => s,1,Playback(are-you-still-there)

[OVH-0033372390168-AUTRE] ; if anonymous call, or unknow
exten => s,1,Playback(you-entered)

[OVH-0033372390168]
exten => s,1,Noop(${CALLERID(number ):0:2})
exten => s,n,GotoIf($["${CALLERID(num)}" = “anonymous”]?anonymous)
exten => s,n,GotoIf($["${CALLERID(num):0:2}" = “03”]?france3)
exten => s,n(anonymous),Goto(OVH-0033372390168-AUTRE,s,1)
exten => s,n(france3),Goto(OVH-0033372390168-FIXE,s,1)[/code]

The format of the CLID numbers is chosen by your PSTN access supplier. However, I’d guess that they are in standard dialled number format, so anything beginning with a single 0 is France and everything not beginning with 0 needs the area code and 0 pre-pending.