[Freeswitch-dev] Originated session callback.

Mohammed Habib habib at alexcoder.com
Mon Apr 18 13:52:34 MSD 2011


I need help getting events from originated session.

This is my lua script:

function onInput_MainSession(s, type, obj)
   -- This one is working fine.
   freeswitch.consoleLog("info", "Callback with type " .. type .. "\n");
end

function onInput_NewSession(s, type, obj)
   -- This one is never called.
   freeswitch.consoleLog("info", "Callback with type " .. type .. "\n");
end

session:answer();
session:setInputCallback("onInput_MainSession");
session:sleep(200);
session:execute("detect_speech", "unimrcp testgrammer trestgrammer");

newsession = freeswitch.Session("user/1002");
newsession:setInputCallback("onInput_NewSession");
newsession:sleep(200);
newsession:execute("detect_speech", "unimrcp testgrammer trestgrammer");

while ((session:ready() == true) ) and (newsession:ready() == true) do
    -- Loop
    sleep(200);
end

I am unable to capture any of the new session events or dtmf.

Please help.

Thank you,
Mohammed Habib
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20110418/9974ade9/attachment.html 


More information about the FreeSWITCH-dev mailing list