So you want one script to control two different calls? I strongly recommend that you use event socket and not a dialplan script. <div>-MC<br><br><div class="gmail_quote">On Tue, Apr 19, 2011 at 3:07 AM, Mohammed Habib <span dir="ltr"><<a href="mailto:habib@alexcoder.com">habib@alexcoder.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">I was hoping to make a scenario like this:<br>User 1 calls and uses ASR to set some information (like the pizza demo), then User 2 is called and confirms User 1 using ASR too.<br>
So, I need to have both both sessions at the same time and both working with ASR and TTS.<br>
<br>Thank you,<br>Mohammed Habib<br><br><div class="gmail_quote">On Mon, Apr 18, 2011 at 11:03 PM, Michael Collins <span dir="ltr"><<a href="mailto:msc@freeswitch.org" target="_blank">msc@freeswitch.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
What are you trying to accomplish with this script? Why are you creating a new session right in the middle of handling an existing session? I am curious to know what problem you are attempting to solve.<div><br></div><div>
-MC<br><br><div class="gmail_quote"><div><div></div><div>On Mon, Apr 18, 2011 at 5:35 AM, Mohammed Habib <span dir="ltr"><<a href="mailto:habib@alexcoder.com" target="_blank">habib@alexcoder.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div>
<div dir="ltr"><div class="gmail_quote"><div><div><div dir="ltr">I need help getting events from originated session.<br><div class="gmail_quote"><div dir="ltr"><br>This is my lua script:<br><br>function onInput_MainSession(s, type, obj)<br>
-- This one is working fine.<br>
freeswitch.consoleLog("info", "Callback with type " .. type .. "\n");<br>
end<br><br>function onInput_NewSession(s, type, obj)<br> -- This one is never called.<br> freeswitch.consoleLog("info", "Callback with type " .. type .. "\n");<br>end<br><br>session:answer();<br>
session:setInputCallback("onInput_MainSession");<br>session:sleep(200);<br>session:execute("detect_speech", "unimrcp testgrammer trestgrammer");<br><br>newsession = freeswitch.Session("user/1002");<br>
newsession:setInputCallback("onInput_NewSession");<br>newsession:sleep(200);<br>
newsession:execute("detect_speech", "unimrcp testgrammer trestgrammer");<br><br>while ((session:ready() == true) ) and (newsession:ready() == true) do<br> -- Loop<br> sleep(200);<br>end<br><br>I am unable to capture any of the new session events or dtmf.<br>
<br>Please help.<br><br>Thank you,<br>Mohammed Habib<br></div>
</div><br></div>
</div></div></div><br></div>
<br></div></div>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">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>
<br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">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>
<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>