no problem<br><br><br><div class="gmail_quote">On Thu, Jul 2, 2009 at 12:27 PM, Phillip Jones <span dir="ltr"><<a href="mailto:pjintheusa@gmail.com">pjintheusa@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>Used:</div>
<div> </div>
<div>session.execute("set","bypass_media_after_bridge=true");<br></div>
<div>in the confirm.js script and that works perfectly! </div>
<div> </div>
<div>Thank you for you help!<br></div><div><div></div><div class="h5">
<div class="gmail_quote">On Thu, Jul 2, 2009 at 1:05 PM, Anthony Minessale <span dir="ltr"><<a href="mailto:anthony.minessale@gmail.com" target="_blank">anthony.minessale@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">try setting bypass_media_after_bridge=true on the session in your confirm script
<div>
<div></div>
<div><br><br><br>
<div class="gmail_quote">On Thu, Jul 2, 2009 at 11:53 AM, Phillip Jones <span dir="ltr"><<a href="mailto:pjintheusa@gmail.com" target="_blank">pjintheusa@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><span lang="EN">
<div>Thanks for responding and for your help.</div>
<div> </div>
<div>The xml and confirm.js are attached below. Basically trying to bypass_media after the leg B presses 1 to accept the call. I tried, using bypass_media_after_bridge=true, but the re-invite appears to be done before the confirm.js, So the media is successfully rerouted, but BEFORE the leg b never gets hear a prompt or gets the opportunity to press 1. </div>
<div> </div>
<div>To get round this I am trying to manually bypass_media in the confirm.js script with apiExecute("uuid_media", "off " + session.uuid);. However only the B leg is reinvited (and media is routed correctly). I don't see the A leg reinvite, and then a BYE is issueed on both legs.</div>
<div> </div>
<div><extension name="public_did"></div>
<div><condition field="destination_number" expression="^(12125553666)$"></div>
<div> </div>
<div><action application="set" data="domain_name=$${domain}"/></div>
<div><font face="Times New Roman"><action application="set" data="call_timeout=60"/></font></div>
<div><font face="Times New Roman"><action application="set" data="group_confirm_key=exec"/></font></div>
<div><font face="Times New Roman"><action application="set" data="group_confirm_file=javascript confirm.js"/><</font></div>
<div><font face="Times New Roman"><action application="bridge" data="[leg_confirm=y]<font size="2">sofia/gateway/broadvox/6095553828</font>"/> </font></div><font size="2">
<div> </div>
<div></condition></div>
<div></extension></div>
<div></include></div></font></span>
<div> </div>
<div>This is the confirm.js:</div>
<div> </div>
<div>// confirm.js - FreeSwitch call confirmation script<br>// (c) 2009 - St‚phane Alnet<br>// License: GPL2 or above</div>
<div>console_log("info", "Destination: "+ session.destination + "\n");<br>if(!session.getVariable('leg_confirm'))<br>{<br>console_log("info", "No need to confirm, connect the call!\n");<br>
exit();<br>}</div>
<div>var confirmed = false;<br>var confirmation_digit = "1";<br>var try_count = 6;<br>var prompt_file = "prompts/ToAcceptThisCallPress1.wav";</div>
<div>function onInput( session, type, data, arg ) {<br>if ( type == "dtmf" ) {<br>console_log( "info", "Got digit " + data.digit + "\n" );<br>if ( data.digit == confirmation_digit ) {<br>
confirmed = true;<br>console_log( "info", "Confirming session..\n" );<br>return(false);<br>}<br>}<br>return(true);<br>}</div>
<div>if ( session.ready() ) <br>{<br>session.answer();<br>session.flushDigits();<br>console_log("info", "Starting confirmation\n");<br>var count = try_count;<br>while( session.ready() && ! confirmed && count-- > 0 )<br>
{<br>session.execute("sleep","200");<br>session.streamFile( prompt_file, onInput );<br>}</div>
<div><br>if( ! confirmed )<br>{</div>
<div>console_log("info", "Not confirmed\n");<br>session.hangup();</div>
<div>}<br>else<br>{</div>
<div>
<div><b>apiExecute("uuid_media", "off " + session.uuid);</b><br></div>console_log("info", "Confirmed\n");</div>
<div>}<br>}<br>else<br>{<br>console_log("info", "Session is not ready.\n");<br>}</div>
<div>
<div></div>
<div>
<div> </div>
<div><br><br> </div>
<div class="gmail_quote">On Thu, Jul 2, 2009 at 12:19 PM, Anthony Minessale <span dir="ltr"><<a href="mailto:anthony.minessale@gmail.com" target="_blank">anthony.minessale@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">I would need to know more details about what you are doing.<br><br>you could set the variable bypass_media_after_bridge=true on the a leg before you call the b leg and use the group_confirm feature to get the caller<br>
to press the key.
<div>
<div></div>
<div><br><br><br>
<div class="gmail_quote">On Thu, Jul 2, 2009 at 10:41 AM, Phillip Jones <span dir="ltr"><<a href="mailto:pjintheusa@gmail.com" target="_blank">pjintheusa@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>Thanks for that.</div>
<div> </div>
<div>That seems to successfully re-invite and re-route the the B leg - but does not reinvite the A leg and then immediately issues a "bye" on both legs.</div>
<div> </div>
<div>Do I have to do something to reinvite that A leg?<br><br></div>
<div>
<div></div>
<div>
<div class="gmail_quote">On Wed, Jul 1, 2009 at 7:06 PM, Anthony Minessale <span dir="ltr"><<a href="mailto:anthony.minessale@gmail.com" target="_blank">anthony.minessale@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">
<div>try<br>apiExecute("uuid_media", "off " + session.uuid);</div>
<div> </div><br><br>
<div class="gmail_quote">
<div>
<div></div>
<div>On Wed, Jul 1, 2009 at 3:22 PM, Phillip Jones <span dir="ltr"><<a href="mailto:pjintheusa@gmail.com" target="_blank">pjintheusa@gmail.com</a>></span> wrote:<br></div></div>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<div></div>
<div>
<div>Hi there,</div>
<div> </div>
<div>I was wondering whether it is possible to have FreeSwitch go into bypass_media mode on demand?</div>
<div> </div>
<div>For instance, leg a bridges to leg b - leg b is invited to accept the call by pressing 1. I want to go to bypass_media (do a SIP reinvite to reroute the media) after the one is pressed.</div>
<div> </div>
<div>Currently I am issuing the following from my js script that prompts for the 1:</div>
<div> </div>
<div>session.apiExecute("uuid_media",session.uuid);</div>
<div> </div>
<div>Not working however. </div>
<div> </div>
<div>Any help to get me going would be appreciated.</div>
<div> </div>
<div>Thanks</div>
<div> </div><font color="#888888">
<div>Phillip Jones.</div></font><br></div></div>_______________________________________________<br>Freeswitch-users mailing list<br><a href="mailto:Freeswitch-users@lists.freeswitch.org" target="_blank">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/" target="_blank">http://www.freeswitch.org/</a><br>
ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br><br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com" target="_blank">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com" target="_blank">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net/" target="_blank">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org" target="_blank">sip:888@conference.freeswitch.org</a><br>
<a href="http://iax:guest@conference.freeswitch.org/888" target="_blank">iax:guest@conference.freeswitch.org/888</a><br><a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org" target="_blank">googletalk:conf+888@conference.freeswitch.org</a><br>
pstn:213-799-1400<br><br>_______________________________________________<br>Freeswitch-users mailing list<br><a href="mailto:Freeswitch-users@lists.freeswitch.org" target="_blank">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></div></div><br>_______________________________________________<br>Freeswitch-users mailing list<br><a href="mailto:Freeswitch-users@lists.freeswitch.org" target="_blank">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/" target="_blank">http://www.freeswitch.org/</a><br>
ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br><br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com" target="_blank">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com" target="_blank">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net/" target="_blank">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org" target="_blank">sip:888@conference.freeswitch.org</a><br>
<a href="http://iax:guest@conference.freeswitch.org/888" target="_blank">iax:guest@conference.freeswitch.org/888</a><br><a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org" target="_blank">googletalk:conf+888@conference.freeswitch.org</a><br>
pstn:213-799-1400<br></div></div><br>_______________________________________________<br>Freeswitch-users mailing list<br><a href="mailto:Freeswitch-users@lists.freeswitch.org" target="_blank">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></div></div><br>_______________________________________________<br>Freeswitch-users mailing list<br><a href="mailto:Freeswitch-users@lists.freeswitch.org" target="_blank">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/" target="_blank">http://www.freeswitch.org/</a><br>
ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br><br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com" target="_blank">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com" target="_blank">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net/" target="_blank">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org" target="_blank">sip:888@conference.freeswitch.org</a><br>
<a href="http://iax:guest@conference.freeswitch.org/888" target="_blank">iax:guest@conference.freeswitch.org/888</a><br><a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org" target="_blank">googletalk:conf+888@conference.freeswitch.org</a><br>
pstn:213-799-1400<br></div></div><br>_______________________________________________<br>Freeswitch-users mailing list<br><a href="mailto:Freeswitch-users@lists.freeswitch.org" target="_blank">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>
</div></div><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>
<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="http://iax:guest@conference.freeswitch.org/888">iax:guest@conference.freeswitch.org/888</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>pstn:213-799-1400<br>