Inbound route based on Country Code CID


I want to route inbound calls between extensions based on their country coeds.
for example :

Malaysia => from 60 to ext./Ring Group 2222
North America => from 1 to ext/Ring Group 2223
General => Any CID to ext./Ring Group 0000

what I did:

  • I created the routes and set CID inside based on considered countries and another route from 'Any CID ’ .
  • when I set complete number, route matches and it works, but when I set country coed only (example : 60) it matches on the General route.

please help me how can I fix this issue.

Thank You

Search for “Asterisk DID Wildcard Inbound Routes” in Google. You should find, among other good links, a rather lengthy discussion we had here about 8 months ago about all the different things you can do with inbound route wildcards.


I will search and will post here if I could find any solution.

Thank You

If you are trying to pattern match you will need to prepend the pattern with _, for example



Are you in Singapore?

Hello Dicko


I tried the Malaysia pattern as you sent me, but didn’t work. I attached call logs maybe it helps (Digits are changed for privacy reason). receiving inbound calls in following format.

Mobile: 60 [10-19] XXXXXXX. => _60ZXXXXXXX.

Fixed Line : 60 [3-4] XXXXXXXX => _60NXXXXXXX.

the above pattern doesn’t work either.

Are you in Singapore?

Im in Malaysia.

Thank You