[asterisk-users] breaking DNID into country code, area code, and local code

mark morreny markmorreny at gmail.com
Sun Mar 30 03:56:19 CDT 2008


Dear friends,

I am wondering if there is any efficient way of extract the country code,
area code, and local code into 3 different variables from one DNID that can
look like 001630233-4333 or 0086213345333?

International code can be 011, or 00.
National code can be 0 or 1
Country code can have 2 or 3 digits
Area code can have 2 or 3 digits
Local num can be 7-10 digits

Is there anyway to break this down efficiently in the dialplan or AGI?

Any comment will be greatly appreciated.

Thanks,
Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080330/2efcd5f3/attachment.htm 


More information about the asterisk-users mailing list