<div dir="ltr"><div>yeah inline is the workout, just need to have the lua application written as below:</div><div><action inline="true" application="lua" data="setvar.lua" /></div><div><br>
</div><div>but seems there comes another issue, session:streamFile() is no longer working, playback the same file in the xml dialplan is fine.</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
2014-05-16 19:10 GMT+08:00 <span dir="ltr"><<a href="mailto:covici@ccs.covici.com" target="_blank">covici@ccs.covici.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
You would have to do inline="true" on your lua statement, but I am not<br>
sure you can even do that -- inline is only good for a few things like<br>
set, but maybe Brian or someone could let us know if you can do that<br>
with a lua script.<br>
<div><div class="h5"><br>
Vincent Xia <<a href="mailto:gmangudai@gmail.com">gmangudai@gmail.com</a>> wrote:<br>
<br>
> the dialpan is as follow:<br>
> <extension name="Test_Extension"><br>
> <condition field="destination_number"<br>
> expression="^\b(10[0-1][0-9])\b$" break="never"><br>
> <action application="set" data="continue_on_fail=true" /><br>
> <action application="lua" data="setvar.lua" /><br>
> <action application="log" data="INFO my_lua_var=${my_lua_var}" /><br>
> </condition><br>
> <condition field="${my_lua_var}" expression="1"><br>
> <action application="sleep" data="1000" /><br>
> </condition><br>
> </extension><br>
><br>
> the the xml dialplan i have a variable set inside a lua<br>
> script(session:setVariable("my_lua_var", "1");), but its value is<br>
> always "undefined" during the parsing stage. i need the variable to be<br>
> a condition field so how can i capture it?<br>
><br>
</div></div>> _________________________________________________________________________<br>
> Professional FreeSWITCH Consulting Services:<br>
> <a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
> <a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
><br>
> FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
> <a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
><br>
> Official FreeSWITCH Sites<br>
> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
> <a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
> <a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
><br>
> FreeSWITCH-users mailing list<br>
> <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br>
--<br>
Your life is like a penny. You're going to lose it. The question is:<br>
How do<br>
you spend it?<br>
<br>
John Covici<br>
<a href="mailto:covici@ccs.covici.com">covici@ccs.covici.com</a><br>
<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</blockquote></div><br></div>