[Freeswitch-users] how to capture variables from lua script in xml dialplan?

Vincent Xia gmangudai at gmail.com
Fri May 16 14:23:29 MSD 2014


the dialpan is as follow:
        <extension name="Test_Extension">
		<condition field="destination_number"
expression="^\b(10[0-1][0-9])\b$" break="never">
			<action application="set" data="continue_on_fail=true" />
			<action application="lua" data="setvar.lua" />
			<action application="log" data="INFO my_lua_var=${my_lua_var}" />
		</condition>
		<condition field="${my_lua_var}" expression="1">
			<action application="sleep" data="1000" />
		</condition>
        </extension>

the the xml dialplan i have a variable set inside a lua
script(session:setVariable("my_lua_var", "1");), but its value is
always "undefined" during the parsing stage. i need the variable to be
a condition field so how can i capture it?



Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-users mailing list