[Asterisk-Users] want to set a var in sip.conf
Duane
digium at aus-biz.com
Tue May 18 21:10:31 MST 2004
Randy Bush wrote:
> i have extensions in locations across a number of telco area codes.
> when someone in seattle picks up and dials 91234567, it would be
> nice to transform it to 92061234567. i would prefer not to have
> an extension context per area code. it would be cool to be able
> to set a variable in the sip.conf bit for each phone with it's
> geographic default area code.
>
> or other folk may have a better hack. please clue me. the wiki
> did not help. thanks.
You set their context as the area, so based on your example...
in sip.conf/iax.conf
[1234567]
username=whatever
secret=whatever
context=seattle
then in extensions.conf
[seattle]
exten => 1NXXNXXXXXX,1,goto(mail,${EXTEN},1)
exten => NXXNXXXXXX,1,goto(main,1${EXTEN},1)
exten => NXXXXXX,1,goto(main,1920${EXTEN},1)
[newyork]
exten => 1NXXNXXXXXX,1,goto(mail,${EXTEN},1)
exten => NXXNXXXXXX,1,goto(main,1${EXTEN},1)
exten => NXXXXXX,1,goto(main,1212${EXTEN},1)
then just have whatever under the main context...
--
Best regards,
Duane
http://www.cacert.org - Free Security Certificates
http://www.nodedb.com - Think globally, network locally
http://www.sydneywireless.com - Telecommunications Freedom
http://happysnapper.com.au - Sell your photos over the net!
http://e164.org - Using Enum.164 to interconnect asterisk servers
More information about the asterisk-users
mailing list