That sounds more like a segfault, a bug. What is the FS version you're running?<div><br></div><div>Upgrade to the latest git HEAD (either v1.2.stable branch or master for 1.5) and reproduce it there, file a jira if it still happens.</div>
<div><br></div><div>-Steve</div><div><br></div><div><br></div><div><br></div><div><br><br><div class="gmail_quote">On 12 June 2013 01:48, Vincent Xia <span dir="ltr"><<a href="mailto:gmangudai@gmail.com" target="_blank">gmangudai@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>i have an extension in the dialplan\default.xml</div><div><br></div><div> <extension name="test_lua" continue="false"></div>
<div> <condition field="destination_number" expression="^(9\d{3})$"></div>
<div> <action application="answer" /></div><div> <action application="lua" data="test.lua" /></div><div> <action application="sleep" data="1000" /></div>
<div> </condition></div><div> </extension></div><div><br></div><div>the test.lua is something like:</div><div><br></div><div>if session:ready() then</div><div> freeswitch.consoleLog("info", "a leg is ready.\n" )</div>
<div>else</div><div> freeswitch.consoleLog("info", "a leg is not ready.\n" )</div><div>end</div><div><br></div><div>this works fine and info "a leg is ready." will be shown on the console.</div>
<div><br></div><div>when im trying to swap the sequence of the dialplan as</div><div><br></div><div> <action application="lua" data="test.lua" /></div><div> <action application="answer" /></div>
<div><br></div><div>the freeswitch gets down, with a windows message box prompting to debug or close the program. (a bug?)</div><div>does this mean in a lua script, "session" is only available after "answer"?</div>
<div><br></div></div>
<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>
<br></blockquote></div><br></div>