<!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>
<html><head><meta http-equiv="Content-Type" content="text/html;charset=us-ascii">
<style>BODY{font:10pt Tahoma, Verdana, sans-serif}</style></head><body>
<DIV>Andrew,</DIV>
<DIV>&nbsp;</DIV>
<DIV>There are a bunch of things wrong with your example for what you're trying to do. The first has nothing to do w/ mod_managed, which is that you are trying to set variables on the a_leg, that are used by the bridge application, after the b_leg is up.</DIV>
<DIV>&nbsp;</DIV>
<DIV>The media variables that you set on the a_leg, are arguments to the dial plan app "bridge". Since you are never using it to place the outbound call for the b_leg, they're not going to work.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Another problem is that mod_managed doesen't really work right to place an outbound call with the "new ManagedSession". That is left over from old days. What's wrong with doing a "Session.Execute("bridge","sofia/gateway...")"? If you do this then any flags that are used as parameters by the bridge applicaiton will work, since you are just calling it as you would from the dialplan.</DIV>
<DIV>&nbsp;</DIV>
<DIV>--Dave</DIV><BR>
<BLOCKQUOTE style="BORDER-LEFT: #0000ff 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
<HR>
<B>From:</B> Andrew Cassidy [mailto:andrew@cassidywebservices.co.uk]<BR><B>To:</B> FreeSWITCH Users Help [mailto:freeswitch-users@lists.freeswitch.org]<BR><B>Sent:</B> Sat, 21 Jul 2012 10:12:06 -0700<BR><B>Subject:</B> Re: [Freeswitch-users] No reINVITE when bridging two sessions from mod_managed with bypass_media_after_bridge=true<BR><BR>Try using uuid_media after the bridge instaed, see if that helps?&nbsp;
<DIV><BR></DIV>
<DIV><A href="http://wiki.freeswitch.org/wiki/Mod_commands#uuid_media">http://wiki.freeswitch.org/wiki/Mod_commands#uuid_media</A>&nbsp;<BR><BR>
<DIV class=gmail_quote>On 20 July 2012 21:30, Srini K <SPAN>&lt;<A href="mailto:aksrini@hotmail.com">aksrini@hotmail.com</A>&gt;</SPAN> wrote:<BR>
<BLOCKQUOTE style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class=gmail_quote>
<DIV>
<DIV>Hi,<BR>Iam trying to bypass media from FS after two call legs are bridged using mod_managed.<BR>The code looks like<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public void Run(AppContext context)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var fsApi = new FreeSWITCH.Native.Api();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var aLegSession = context.Session;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Answer the incoming call<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; aLegSession.Answer();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Play the prompt<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; aLegSession.StreamFile("ivr/ThankYou.wav", 0);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Create outBound session<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var bLegSession = new ManagedSession("sofia/gateway/95/4151230000");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Bypass Media<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; aLegSession.SetVariable("bypass_media_after_bridge", "true");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bLegSession.SetVariable("bypass_media_after_bridge", "true");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fsApi.ExecuteString(string.Format("uuid_bridge {0} {1}", aLegSession.GetUuid(), bLegSession.GetUuid()));<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;<BR>I don't see FreeSWITCH sending re-Invite after the call is bridged.<BR>What I've already tried and did not succeed: <BR>1) set bypass_media=true, on A leg only, on B leg only, on both legs <BR>2) set bypass_media_after_bridge=true, on A leg only, on B leg only, on both legs <BR>&nbsp;<BR>When I tried without using mod_managed using only dialplan, FS sends re-Invite.<BR>&nbsp;&lt;action application="answer"/&gt;<BR>&nbsp;&lt;action application="sleep" data="1500"/&gt;&nbsp;<BR>&nbsp;&lt;action application="set" data="bypass_media_after_bridge=true"/&gt; <BR>&nbsp;&lt;action application="playback" data="ivr/ThankYou.wav"/&gt;<BR>&nbsp;&lt;action application="bridge" data="sofia/gateway/95/4151230000"/&gt; <BR>&nbsp;<BR>Whether Iam doing anything stupid in mod_managed? <BR>&nbsp;<BR>Regards<SPAN class=HOEnZb><FONT color=#888888><BR>Srini<BR><BR></FONT></SPAN></DIV></DIV><BR>_________________________________________________________________________<BR>Professional FreeSWITCH Consulting Services:<BR><A href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</A><BR><A href="http://www.freeswitchsolutions.com/">http://www.freeswitchsolutions.com</A><BR><BR>FreeSWITCH-powered IP PBX: The CudaTel Communication Server<BR><A href="http://www.cudatel.com/">http://www.cudatel.com</A><BR><BR>Official FreeSWITCH Sites<BR><A href="http://www.freeswitch.org/">http://www.freeswitch.org</A><BR><A href="http://wiki.freeswitch.org/">http://wiki.freeswitch.org</A><BR><A href="http://www.cluecon.com/">http://www.cluecon.com</A><BR><BR>Join Us At ClueCon - Aug 7-9, 2012<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">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</A><BR>UNSUBSCRIBE:<A href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</A><BR><A href="http://www.freeswitch.org/">http://www.freeswitch.org</A><BR><BR></BLOCKQUOTE></DIV><BR><BR clear=all>
<DIV><BR></DIV>-- <BR><B>Andrew Cassidy BSc (Hons) MBCS SSCA</B>
<DIV>Managing Director
<DIV>
<DIV><BR></DIV>
<DIV><BR>
<DIV><B style="FONT-FAMILY: sans-serif; COLOR: rgb(51,135,171); TEXT-DECORATION: none"><A style="FONT-FAMILY: sans-serif; COLOR: rgb(51,135,171); TEXT-DECORATION: none" href="mailto:info@cassidywebservices.co.uk">T</A>&nbsp;</B>03300 100 960&nbsp; <B style="FONT-FAMILY: sans-serif; COLOR: rgb(51,135,171); TEXT-DECORATION: none"><A style="FONT-FAMILY: sans-serif; COLOR: rgb(51,135,171); TEXT-DECORATION: none" href="mailto:info@cassidywebservices.co.uk">F</A>&nbsp;</B>03300 100 961</DIV>
<DIV><B style="FONT-FAMILY: sans-serif; TEXT-DECORATION: none"><A style="FONT-FAMILY: sans-serif; COLOR: rgb(51,135,171); TEXT-DECORATION: none" href="mailto:info@cassidywebservices.co.uk">E</A>&nbsp;</B><A href="mailto:andrew@cassidywebservices.co.uk">andrew@cassidywebservices.co.uk</A></DIV>
<DIV><B style="FONT-FAMILY: sans-serif; TEXT-DECORATION: none"><A style="FONT-FAMILY: sans-serif; COLOR: rgb(51,135,171); TEXT-DECORATION: none" href="mailto:info@cassidywebservices.co.uk">W</A>&nbsp;</B><A href="http://www.cassidywebservices.co.uk/">www.cassidywebservices.co.uk</A></DIV></DIV></DIV></DIV><BR></DIV></BLOCKQUOTE>
<STYLE>
</STYLE>

<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV></body></html>