[Freeswitch-users] help required regarding Bridge application

Faheem faheem_imt at yahoo.com
Sun Dec 25 20:19:20 MSK 2011


Hi all, I am new in this list and this is my first email to this group. 
I need help regarding Bridge application using Lua script.
I want to set the auto hangup for a bridge call in lua script. my script originate leg-A to local extension and then originate leg-b to a carrier and then bridge two legs. I want to hangup the leg-b after some seconds say 20 seconds.
I did the available option, but nothing worked for me. Please help me. 

Here is my lua code.

----------------------------------------------------------------------------------------------------------------
originate_str1 = "{origination_caller_id_number=".. caller.. ",effective_caller_id_number=".. caller ..",originate_timeout=45,ignore_early_media=true}sofia/internal/".. caller .."%" ..domain .."";

originate_str2 = "{origination_caller_id_number=".. callee.. ",effective_caller_id_number=".. callee ..",originate_timeout=60,sched_hangup=20,ignore_early_media=true}sofia/internal/".. carrier_dial_prefix1 .. callee .."%" ..carrier_gateway1 .."";


session1 = freeswitch.Session(originate_str1);

session2 = freeswitch.Session(originate_str2);
freeswitch.bridge(session1, session2);

Thanks! 

Faheem Muhammad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20111225/1c421be5/attachment-0001.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list