[Freeswitch-users] Creating session object using uuid in Lua

Siri MM sirimmfs at gmail.com
Mon Aug 25 03:07:33 MSD 2014


Thanks for clarifying Anthony, I will try out the uuid_transfer way.


On Mon, Aug 25, 2014 at 2:01 AM, Anthony Minessale <
anthony.minessale at gmail.com> wrote:

> You cannot execute blocking calls on a session that is already doing
> something from an outside script.
>
> Transfer the uuid to execute the script instead.
>
> uuid_transfer <uuid> lua:script.lua:arg1:arg2:arg3 inline
>
> Or transfer it to park to put it in a passive state.
>
> uuid_transfer <uuid> park inline
> On Aug 21, 2014 2:40 AM, "Siri MM" <sirimmfs at gmail.com> wrote:
>
>> Ok, now I understand that getting a session object using uuid can be done
>> as follows:
>> session = freeswitch.Session(uuid);
>>
>> However, I am a bit confused..
>>
>> My lua script accepts 3 arguments - uuid, multicast ip & port, and then
>> does the following - create a session using freeswitch, and then execute
>> esf_page_group with the passed multicast and port
>>
>> What works is:
>> - Place an incoming call to FIFO queue with an orbit exten and timeout
>> - In the orbit exten, call lua script with uuid, multicast address and
>> port
>> After a timeout, it works like a charm - caller can make PA to the
>> listening parties
>>
>> Now, what doesn't work is:
>> - Modify lua script to pop out the call from fifo by using
>> execute("fifo","pa_q1 out wait"); and then call esf_page_group
>> - Place an incoming call to FIFO queue with an orbit exten and large
>> timeout
>> - Before the timeout occurs, call the lua script from CLI using luarun,
>> pass the required arguments
>>
>> In this case, the caller is unable to send the stream to multicast
>> address - instead, there seems to be a loopback, caller hears his own
>> audio. I think this is because of the way I am popping out I guess.
>> However, if I don't pop out, the caller seems remain in the queue
>>
>>
>> I am just wondering how do I retrieve a call in a fifo queue and play
>> around with it within a lua script?
>>
>>
>> On Thu, Aug 21, 2014 at 9:22 AM, Siri MM <sirimmfs at gmail.com> wrote:
>>
>>> Hi Brian
>>>
>>> Thanks for the reply. My aim is to unpark the call, playback a message
>>> to the caller, and then redirect the caller to a multicast paging
>>> group(esf_page_group), so that he could do a PA. From what I understand,
>>> intercept allows you to bridge to another call, am unsure if my requirement
>>> is achievable using this app.
>>>
>>>
>>> On Thu, Aug 21, 2014 at 1:47 AM, Brian West <brian at freeswitch.org>
>>> wrote:
>>>
>>>> If you have the UUID of the session you wish to unpark why not just
>>>> execute the intercept app?
>>>>
>>>>
>>>> On Wed, Aug 20, 2014 at 1:05 AM, Siri MM <sirimmfs at gmail.com> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> Is there a way I could create a session using an existing uuid in Lua?
>>>>> I see that this is possible in Javascript, but couldn't get the same to
>>>>> work in Lua.
>>>>>
>>>>> I am trying to retrieve the session of a parked call, so that I could
>>>>> unpark the same in the lua script (as fifo doesn't seem to work when not in
>>>>> a call context)
>>>>>
>>>>>
>>>>> _________________________________________________________________________
>>>>> Professional FreeSWITCH Consulting Services:
>>>>> consulting at freeswitch.org
>>>>> http://www.freeswitchsolutions.com
>>>>>
>>>>> Official FreeSWITCH Sites
>>>>> http://www.freeswitch.org
>>>>> http://confluence.freeswitch.org
>>>>> http://www.cluecon.com
>>>>>
>>>>> 
>>>>> 
>>>>>
>>>>> 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
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> *Brian West*
>>>> brian at freeswitch.org
>>>>
>>>>
>>>> *Twitter: @FreeSWITCH , @briankwest*
>>>> http://www.freeswitchbook.com
>>>> http://www.freeswitchcookbook.com
>>>>
>>>> *T:*+19184209001 | *F:*+19184209002 | *M:*+1918424WEST (9378)
>>>> *iNUM:*+883 5100 1420 9001 | *ISN:*410*543 | *Skype:*briankwest
>>>>
>>>>
>>>> _________________________________________________________________________
>>>> Professional FreeSWITCH Consulting Services:
>>>> consulting at freeswitch.org
>>>> http://www.freeswitchsolutions.com
>>>>
>>>> Official FreeSWITCH Sites
>>>> http://www.freeswitch.org
>>>> http://confluence.freeswitch.org
>>>> http://www.cluecon.com
>>>>
>>>> 
>>>> 
>>>>
>>>> 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
>>>>
>>>
>>>
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://confluence.freeswitch.org
>> http://www.cluecon.com
>>
>> 
>> 
>>
>> 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
>>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
>
> 
> 
>
> 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/20140825/c76b701e/attachment.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list