[Freeswitch-users] Same peace of code works with Javascript and not LUA

Anthony Minessale anthony.minessale at gmail.com
Fri Jul 15 19:23:28 MSD 2011


Try harder..
On Jul 15, 2011 4:43 AM, "Boris Kovalenko" <boris at tagnet.ru> wrote:
> Hello!
>
> I tried, no success.
>
>> after you create it
>>
>> session:setAutoHangup(0)
>>
>> or it will hangup when the script exits
>>
>> On Thu, Jul 14, 2011 at 1:11 PM, Boris Kovalenko<boris at tagnet.ru> wrote:
>>> Hello!
>>>
>>> Here it is http://pastebin.freeswitch.org/16809
>>> Hope somebody help
>>>
>>> get a console log w/ siptrace of that scenario and put it on pastebin.
the
>>> gang here will take a look.
>>> -MC
>>>
>>> On Thu, Jul 14, 2011 at 10:39 AM, Boris Kovalenko<boris at tagnet.ru>
wrote:
>>>> And another problem found. If the remote party answers immediately all
>>>> is ok. But if remote waits more then 8-10 seconds before answer - the
>>>> call is dropped when answered. Can't understand where to look for a
>>>> problem.
>>>>> Hello!
>>>>>
>>>>> I found a problem. originate_session must not to be local.
>>>>>> Hello!
>>>>>>
>>>>>> I'm trying to migrate DISA from Javascript to LUA. This peace of
>>>>>> code works fine in Javascript:
>>>>>>
>>>>>> ostr = "{ignore_early_media=true" +
>>>>>> ",origination_caller_id_number=" +
>>>>>> session.getVariable("caller_id_number") +
>>>>>> "}sofia/ipbx/50004#" + digits +
>>>>>> "@192.168.1.1:5060";
>>>>>> osession = new Session( ostr );
>>>>>> bridge(session, osession);
>>>>>> osession.hangup();
>>>>>>
>>>>>> With LUA not:
>>>>>> originate_string =
>>>>>> "{ignore_early_media=true" ..
>>>>>> ",origination_caller_id_number=" ..
>>>>>> session:getVariable("caller_id_number") ..
>>>>>> "}" ..
>>>>>> "sofia/ipbx/50004#" ..
>>>>>> digits .. "@192.168.1.1:5060";
>>>>>> originate_session = freeswitch.Session( originate_string );
>>>>>> freeswitch.bridge(session, originate_session);
>>>>>> originate_session:hangup();
>>>>>>
>>>>>> The call is droped when remote answers. There is an error in log:
>>>>>> bridge: session not ready. I tried to use
>>>>>> if( originate_session:ready() ) then
>>>>>> freeswitch.bridge(session, originate_session);
>>>>>> originate_session:hangup();
>>>>>> end
>>>>>>
>>>>>> with no luck :(. Please, help me. What am I doing wrong?
>>>>>>
>>>>
>>>> --
>>>> Regards,
>>>> Boris
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Join us at ClueCon 2011, Aug 9-11, Chicago
>>>> http://www.cluecon.com 877-7-4ACLUE
>>>>
>>>> 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
>>>
>>>
>>> _______________________________________________
>>> Join us at ClueCon 2011, Aug 9-11, Chicago
>>> http://www.cluecon.com 877-7-4ACLUE
>>>
>>> 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
>>>
>>>
>>> --
>>> Regards,
>>> Boris
>>>
>>>
>>> _______________________________________________
>>> Join us at ClueCon 2011, Aug 9-11, Chicago
>>> http://www.cluecon.com 877-7-4ACLUE
>>>
>>> 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
>>>
>>>
>>
>>
>
>
> --
> Regards,
> Boris
>
>
>
> _______________________________________________
> Join us at ClueCon 2011, Aug 9-11, Chicago
> http://www.cluecon.com 877-7-4ACLUE
>
> 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/20110715/e598505d/attachment-0001.html 


More information about the FreeSWITCH-users mailing list