<!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> </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> </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> </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> </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?
<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> <BR><BR>
<DIV class=gmail_quote>On 20 July 2012 21:30, Srini K <SPAN><<A href="mailto:aksrini@hotmail.com">aksrini@hotmail.com</A>></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> public void Run(AppContext context)<BR> {<BR> var fsApi = new FreeSWITCH.Native.Api();<BR> var aLegSession = context.Session;<BR> // Answer the incoming call<BR> aLegSession.Answer();<BR> // Play the prompt<BR> aLegSession.StreamFile("ivr/ThankYou.wav", 0);<BR> // Create outBound session<BR> var bLegSession = new ManagedSession("sofia/gateway/95/4151230000");<BR> <BR> // Bypass Media<BR> aLegSession.SetVariable("bypass_media_after_bridge", "true");<BR> bLegSession.SetVariable("bypass_media_after_bridge", "true");<BR> fsApi.ExecuteString(string.Format("uuid_bridge {0} {1}", aLegSession.GetUuid(), bLegSession.GetUuid()));<BR> }<BR> <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> <BR>When I tried without using mod_managed using only dialplan, FS sends re-Invite.<BR> <action application="answer"/><BR> <action application="sleep" data="1500"/> <BR> <action application="set" data="bypass_media_after_bridge=true"/> <BR> <action application="playback" data="ivr/ThankYou.wav"/><BR> <action application="bridge" data="sofia/gateway/95/4151230000"/> <BR> <BR>Whether Iam doing anything stupid in mod_managed? <BR> <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> </B>03300 100 960 <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> </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> </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> </B><A href="http://www.cassidywebservices.co.uk/">www.cassidywebservices.co.uk</A></DIV></DIV></DIV></DIV><BR></DIV></BLOCKQUOTE>
<STYLE>
</STYLE>
<DIV> </DIV>
<DIV> </DIV></body></html>