how about no script and 1 command<br><br>originate ignore_early_media=true,hangup_after_bridge=false}user/<a href="mailto:12610@domainname.com" target="_blank">12610@domainname.com</a> intercept:cafc3449-9000-47bc-8b28-257748d7ec40 inline<br>
<br>(Providing that uuid is of a channel that is ready to bridge)<br><br><br><br><div class="gmail_quote">On Mon, Mar 22, 2010 at 4:47 PM, Fraser Redmond <span dir="ltr"><<a href="mailto:fraserredmond@gmail.com">fraserredmond@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">I want to call an extn, then when they pick up connect them to another existing channel - later I'll run this via event_socket, but for now I'm doing it in javascript (I want to do database updates before and after attempting the connection.)<br>
<br>As far as I can see, I have two options, and I'm interested in which is better, and more importantly - how to get either of them working!<br><br><br>1) Create the new session, then intercept the existing channel:<br>
<br>
var NewSession = new
Session('{ignore_early_media=true,hangup_after_bridge=false}user/<a href="mailto:12610@domainname.com" target="_blank">12610@domainname.com</a>');<br>NewSession.execute('intercept', 'cafc3449-9000-47bc-8b28-257748d7ec40');<br>
<br>The newSession phone rings and on pickup both channels get hung up. The ExistingChannel gives a call status in the CLI of [DESTINATION_OUT_OF_ORDER]<br><br><br>2) Create the new session, and create a session object for the existing session and bridge them:<br>
<br>
var NewSession = new Session('{ignore_early_media=true,hangup_after_bridge=false}user/<a href="mailto:12610@domainname.com" target="_blank">12610@domainname.com</a>');<br>var ExistingSession = new Session('cafc3449-9000-47bc-8b28-257748d7ec40');<br>
bridge(ExistingSession, NewSession);<br><br>(This has a debug message saying "BRIDGE THREAD DONE", but not much else that seems unusual.)<br><br>The sound files that are playing in ExistingSession continue, and after about 10sec A notice appears in the CLI indicating a session.hungup event has fired, but both phones remain on the hook and hanging up either doesn't affect the other.<br>
<br><br clear="all">Cheers,<br><font color="#888888">Fraser<br><br><br>
</font><br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>
Twitter: <a href="http://twitter.com/FreeSWITCH_wire">http://twitter.com/FreeSWITCH_wire</a><br><br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br><a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>
pstn:+19193869900<br>