[Freeswitch-users] non-blocking bridge in Lua
Mi Ke
mi.ke at null.net
Fri Jul 15 02:31:23 MSD 2011
Hi all !
I want to make a Lua app which will start with Leg A, collect input, initiate outbound Leg B and when it answers, periodically play decreasing series of beeps to Leg A depending on how many minutes left to disconnect (remaining time queried via odbc).
My initial idea was to issue a non-blocking bridge command after Leg B session originate returns ring-ready and then to do the rest in while loop, but the bridge called by api:executeString("bgapi bridge legB_session legA_session") just returns Job UUID without actually bridging sessions. A usual freeswitch.bridge call blocks further script execution until unbridged, disallowing me to check Leg B states when it's active.
Is there any elegant way to acheive my goals using Lua/Dialplan apps ? To create an app starting with Leg A and constantly watching for Leg B existense/states, playing corresponding feedback messages to Leg A ?
Thanks in advance for yours hints/responses
Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110714/4bd4195a/attachment.html
More information about the FreeSWITCH-users
mailing list