[Freeswitch-users] Originated session callback.

Michael Collins msc at freeswitch.org
Tue Apr 19 20:40:46 MSD 2011


So you want one script to control two different calls? I strongly recommend
that you use event socket and not a dialplan script.
-MC

On Tue, Apr 19, 2011 at 3:07 AM, Mohammed Habib <habib at alexcoder.com> wrote:

> I was hoping to make a scenario like this:
> 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.
> So, I need to have both both sessions at the same time and both working
> with ASR and TTS.
>
> Thank you,
> Mohammed Habib
>
> On Mon, Apr 18, 2011 at 11:03 PM, Michael Collins <msc at freeswitch.org>wrote:
>
>> 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.
>>
>> -MC
>>
>> On Mon, Apr 18, 2011 at 5:35 AM, Mohammed Habib <habib at alexcoder.com>wrote:
>>
>>> 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
>>>
>>>
>>>
>>> _______________________________________________
>>> FreeSWITCH-users mailing list
>>> FreeSWITCH-users at lists.freeswitch.org
>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>>> http://www.freeswitch.org
>>>
>>>
>>
>> _______________________________________________
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>>
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110419/5e086bbd/attachment.html 


More information about the FreeSWITCH-users mailing list