I recently updated my 1.6.0.5 install to 1.6.1.2 and when I copied the configs over it seemed that variables weren’t working correctly in certain areas. For example my outbound trunk variable has all the channels that are used on our t1 to send outbound calls as follows:
TRUNK = DAHDI/23&DAHDI/22&DAHDI/21&DAHDI/20&DAHDI/19&DAHDI/18
When a person dials out it goes out the following context to establish a call:
exten => _NXXXXXX,n,ChanIsAvail(${TRUNK})
exten => _NXXXXXX,n,Dial(${AVAILORIGCHAN}/210${EXTEN},45,tT)
exten => _NXXXXXX,n,Congestion( )
exten => _NXXXXXX,n,Hangup()
In 1.6.0.5 this worked great, but when we upgraded to 1.6.1.2, multiple areas of my extensions.conf stopped working. This example was just happened to be the first I noticed.
When someone tried calling out the dialplan would try to dial out Zap/g2 with the ${TRUNK} variable in place. If I took out the variable and plugged in exactly what I had in the TRUNK variable the system dials out fine, I also noticed other areas where variables were used in macros and they stopped working as well. Is anyone else experiencing issues like this or know the cause of why its acting the way it is? I noticed 1.6.1.4 is out as of 8/11 so I’m thinking about updating to it, but I’m not sure if its acting the same way as well.
Updated to 1.6.1.4 and I’m still receiving the same behavior. If anyone has an update on this I would appreciate it.
Thanks
I’m stuck, does anyone have an idea as to whats causing this?
Possibly an entirely red herring but my understanding is that global variables should be defined without spaces around the ‘=’. If you’ve copy’n’pasted your line
TRUNK = DAHDI/23&DAHDI/22&DAHDI/21&DAHDI/20&DAHDI/19&DAHDI/18
directly from extensions.conf, perhaps try changing it to
TRUNK=DAHDI/23&DAHDI/22&DAHDI/21&DAHDI/20&DAHDI/19&DAHDI/18
Further, you could try putting in some Verbose() statements in the dialplan and looking at the debug output to see whether the global variable(s) really do contain what you think.
I’m using 1.6.1.1 on a production system and have had no problems with global variables.
Giles.
Thanks for the reply, it got me thinking… I’m guessing that “trunk” is now defined somewhere in asterisk? the reason I say this is because I haven’t encountered this problem with versions previous of 1.6.0.5, I renamed the variable “TRUNK=” to “outbound=” and it works now…
With the “TRUNK=DAHDI/23&DAHDI/22&DAHDI/21&DAHDI/20&DAHDI/19&DAHDI/18” variable in place I get the following in the output:
Executing [79@internal:1] NoOp(“SIP/Nathan-b710b010”, “Zap/g2”) in new stack
And with the “outbound=DAHDI/23&DAHDI/22&DAHDI/21&DAHDI/20&DAHDI/19&DAHDI/18” I get:
Executing [79@internal:1] NoOp(“SIP/Nathan-b7d91188”, “DAHDI/23&DAHDI/22&DAHDI/21&DAHDI/20&DAHDI/19&DAHDI/18”) in new stack