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