How to answer after bridge in a dialplan+lua environment
Hi All, I need some advise from you on how to answer after bridge in a dialplan + lua environment. My goal is, (1) dial destination number (OB) on receiving incoming call (IB), (2) bridge the 2 sessions on early media received, and then (3) send answer to IB when OB answers. Currently all the above are done in my lua script. The script blocks on bridge. From the previous discussions, I find a way to circumvent script blocking is to use "execute_on_answer=lua ob_answer.lua". This sounds a good solution. However, I wonder if I have the access to the 2 session objects, session and ob_session, in the new script "ob_answer.lua". In a lua script, the IB call is answered using "session:answer()". Or if there exists other solutions/alternatives to achieve the above goal in a dialplan + lua environment. Please kindly advise. Thanks, D.Ma -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/How-to-answer-after-bridge-in-... Sent from the freeswitch-users mailing list archive at Nabble.com.
On Tue, Feb 14, 2012 at 6:30 PM, dma <mays.david@gmail.com> wrote:
Hi All,
I need some advise from you on how to answer after bridge in a dialplan + lua environment.
My goal is,
(1) dial destination number (OB) on receiving incoming call (IB), (2) bridge the 2 sessions on early media received, and then (3) send answer to IB when OB answers.
Just curious, but how is this different from just using the bridge application? -MC
Currently all the above are done in my lua script. The script blocks on bridge. From the previous discussions, I find a way to circumvent script blocking is to use "execute_on_answer=lua ob_answer.lua". This sounds a good solution. However, I wonder if I have the access to the 2 session objects, session and ob_session, in the new script "ob_answer.lua". In a lua script, the IB call is answered using "session:answer()".
Or if there exists other solutions/alternatives to achieve the above goal in a dialplan + lua environment.
Please kindly advise.
Thanks, D.Ma
-- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/How-to-answer-after-bridge-in-... Sent from the freeswitch-users mailing list archive at Nabble.com.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.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
Hi Michael, Thanks for the response! My understanding to your message is that what I need to do is just to bridge the call while FS will send answer (SIP 200 OK) to the inbound channel when the called party answers the call. Is my above understanding correct? Thanks again, D.Ma -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/How-to-answer-after-bridge-in-... Sent from the freeswitch-users mailing list archive at Nabble.com.
Hi Michael, Yes, I just proved it in test. FS automatically sends the 200 OK to the inbound channel when outbound is answered in a bridged call. Sorry for asking such a trivial question. Cheers, D.Ma -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/How-to-answer-after-bridge-in-... Sent from the freeswitch-users mailing list archive at Nabble.com.
participants (2)
-
dma
-
Michael Collins