[Asterisk-Users] How do you perform a Variable Substitution In
Asterisk
Shad Mortazavi
Shad.Mortazavi at nexusmgmt.com
Fri Mar 31 04:24:14 MST 2006
Dear Group;
I have a requirement to pass the ${SIPDOMAIN} variable from Server A to
Server B over IAX2. Basically Server A is an Internal (*) and Server B
is an External (*) in the DMZ.
On Server A I do the following;
[SIPOUT]
exten => _6.,1,SetVar(DS=${EXTEN}%${SIPDOMAIN})
exten => _6.,2,Dial(IAX2/bxxxxxx:xxxxxx at 192.xxx.xxx.xxx/${DS})
On the CLI I get;
-- Executing Dial("SIP/phone6-bd3d",
"IAX2//bxxxxxx:xxxxxx at 192.xxx.xxx.xxx "/6shad%xxx.xxxx.com) in new stack
This comes through over IAX2 and I can strip the 6 and send the call out
via SIP to my SIP proxy.
The only item missing is to substitute the % with @. Can this be done
natively in Asterisk? My production version is Asterisk CVS-v1-0-07.
I have read through
http://www.voip-info.org/wiki/view/Asterisk+variables and could see no
obvious method for this.
Many Thanks
Shad Mortazavi
-----------------------------
Nexus Group Technical Manager
n|m Nexus Management Inc
More information about the asterisk-users
mailing list