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@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 portAfter a timeout, it works like a charm - caller can make PA to the listening partiesNow, 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 argumentsIn 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 queueI 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@gmail.com> wrote:
Hi BrianThanks 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@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@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@freeswitch.org
http://www.freeswitchsolutions.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
FreeSWITCH-users mailing list
FreeSWITCH-users@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@freeswitch.org
Twitter: @FreeSWITCH , @briankwest
http://www.freeswitchbook.com
http://www.freeswitchcookbook.comT:+19184209001 | F:+19184209002 | M:+1918424WEST (9378)
iNUM:+883 5100 1420 9001 | ISN:410*543 | Skype:briankwest
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
FreeSWITCH-users mailing list
FreeSWITCH-users@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@freeswitch.org
http://www.freeswitchsolutions.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
FreeSWITCH-users mailing list
FreeSWITCH-users@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@freeswitch.org
http://www.freeswitchsolutions.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org