[Freeswitch-users] Need to set and get Global vairables from dialplan
Varsha Agarwal
vagarwal at vertical.com
Wed Mar 23 08:46:42 MSK 2016
Hi,
I have created a variable in var.xml, current_node. I am trying to use it in dialplan as below, is this something I can do?
<extension name="balance_load">
<condition field="destination_number" expression="^5050$">
<action application="set" data="continue_on_fail=true"/>
<action application="set" data="hangup_after_bridge=true"/>
<action application="log" data="INFO *********LOG LEVEL******** [${current_node}]"/>
<condition field="current_node" expression="^1$">
<action="set_global" data="current_node=2"/>
<action application="log" data="INFO *********LOG LEVEL******** [${current_node}]"/>
<action application="bridge" data="loopback/5000"/>
</condition>
<condition field="current_node" expression="^2$">
<action="set_global" data="current_node=2"/>
<action application="log" data="INFO *********LOG LEVEL******** [${current_node}]"/>
<action application="bridge" data="sofia/external/5000 at 172.18.19.72"/>
</condition>
<action="set_global" data="current_node=2"/>
<action application="log" data="INFO *********LOG LEVEL AFTER******** [${current_node}]"/>
<action application="bridge" data="loopback/5000"/>
</condition>
</extension>
Currently log always print current_node = 1 which is the value set in vars.xml.
Thanks,
Varsha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20160323/739badd2/attachment-0001.html
Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users
mailing list