That sounds more like a segfault, a bug. What is the FS version you're running?

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.

-Steve





On 12 June 2013 01:48, Vincent Xia <gmangudai@gmail.com> wrote:

i have an extension in the dialplan\default.xml

        <extension name="test_lua" continue="false">
            <condition field="destination_number" expression="^(9\d{3})$">
                <action application="answer" />
                <action application="lua" data="test.lua" />
                <action application="sleep" data="1000" />
            </condition>
        </extension>

the test.lua is something like:

if session:ready() then
    freeswitch.consoleLog("info", "a leg is ready.\n" )
else
    freeswitch.consoleLog("info", "a leg is not ready.\n" )
end

this works fine and info "a leg is ready." will be shown on the console.

when im trying to swap the sequence of the dialplan as

                <action application="lua" data="test.lua" />
                <action application="answer" />

the freeswitch gets down, with a windows message box prompting to debug or close the program. (a bug?)
does this mean in a lua script, "session" is only available after "answer"?


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org