[Asterisk-Dev] context variables
Goldenear
goldenear at free.fr
Sun Jul 10 06:11:57 MST 2005
Hi,
I'm facing an anoying problem with my dialplan: I want to provide my
users a gateway to FWD. Some users have an FWD accound, others don't. In
my extensions.conf I have several entries/extensions to FWD :
[FWD]
exten => _**393.,1,SetCallerID,${FWDCIDNAME}
exten =>
_**393.,2,Dial,IAX2/${FWDNUMBER}:${FWDPASSWORD}@iax2.fwdnet.net/*${EXTEN:5},60,r)
[tollfree]
;
; terminate toll-free no.'s via fwdnet
;
;
; US toll free access
;
; +1-800
exten => _*1800.,1,SetCallerID,${FWDCIDNAME}
exten =>
_*1800.,2,Dial,IAX2/${FWDNUMBER}:${FWDPASSWORD}@iax2.fwdnet.net/*${EXTEN},60,r)
exten => _*1800.,3,Playback(invalid)
exten => _*1800.,4,Hangup
exten => _*1800.,103,Busy
; +1-866
exten => _*1866.,1,SetCallerID,${FWDCIDNAME}
exten =>
_*1866.,2,Dial,IAX2/${FWDNUMBER}:${FWDPASSWORD}@iax2.fwdnet.net/*${EXTEN},60,r)
exten => _*1866.,3,Playback(invalid)
exten => _*1866.,4,Hangup
exten => _*1866.,103,Busy
; +1-877
exten => _*1877.,1,SetCallerID,${FWDCIDNAME}
exten =>
_*1877.,2,Dial,IAX2/${FWDNUMBER}:${FWDPASSWORD}@iax2.fwdnet.net/*${EXTEN},60,r)
exten => _*1877.,3,Playback(invalid)
exten => _*1877.,4,Hangup
exten => _*1877.,103,Busy
; +1-888
exten => _*1888.,1,SetCallerID,${FWDCIDNAME}
exten =>
_*1888.,2,Dial,IAX2/${FWDNUMBER}:${FWDPASSWORD}@iax2.fwdnet.net/*${EXTEN},60,r)
exten => _*1888.,3,Playback(invalid)
exten => _*1888.,4,Hangup
exten => _*1888.,103,Busy
;
; Netherlands toll free access
;
exten => _*31800.,1,SetCallerID,${FWDCIDNAME}
exten =>
_*31800.,2,Dial,IAX2/${FWDNUMBER}:${FWDPASSWORD}@iax2.fwdnet.net/*${EXTEN},60,r)
exten => _*31800.,3,Playback(invalid)
exten => _*31800.,4,Hangup
exten => _*31800.,103,Busy
;
and other tollfree to UK, France, Germany, etc ...
Users use the [default] context, except users with an IAX accound that
have their own context [user1] [user2] etc ...
In [globals] in have:
FWDCIDNAME="Guest"
FWDNUMBER=guest
FWDPASSWORD=""
so that users without an FWD accound can call FWD numbers as guests
Now I would like to redefine these variables for each user with an FWD
account. But I really would like to avoid adding an entry (with a
SetVar) for each FWD extension is the users context.
I've tried this :
[user1]
FWDCIDNAME="fwduser1"
FWDNUMBER=12345
FWDPASSWORD="passwd"
include => default
But it doesn't work :(
More information about the asterisk-dev
mailing list