<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
<div><div id="SkyDrivePlaceholder">Thanks Dave, for pointing out mistakes. It did help and I can bypass media.<br>The issue with Session.Execute("bridge","sofia/gateway...") is not getting a finer control over outbound leg before bridge.<br>For eg, I need to play a prompt on bLeg(outbound) before bridging. How do I do it? Is there a way? I tried Session.Execute("bridge","{bypass_media_after_bridge=true, group_confirm_file=/path/to/prompt.wav}sofia/gateway/...") and also <br>Session.Execute("bridge","{bypass_media_after_bridge=true, playback=/path/to/prompt.wav}sofia/gateway/...") without any success.</div><div> </div><div>I was able to do it with ease using new ManagedSession.</div><div> </div><div>-Srini</div><hr id="stopSpelling">From: drk@drkngs.net<br>To: freeswitch-users@lists.freeswitch.org<br>Date: Sat, 21 Jul 2012 11:15:14 -0700<br>Subject: Re: [Freeswitch-users] No reINVITE when bridging two sessions from mod_managed with bypass_media_after_bridge=true<br><br>
<style><!--
.ExternalClass
{font:10pt Tahoma, Verdana, sans-serif;}
--></style>
<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="padding-left: 5px; margin-right: 0px; margin-left: 5px; border-left-color: rgb(0, 0, 255); border-left-width: 2px; border-left-style: solid;">
<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" target="_blank">http://wiki.freeswitch.org/wiki/Mod_commands#uuid_media</a> <br><br>
<div class="ecxgmail_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="padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;" class="ecxgmail_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="ecxHOEnZb"><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/" target="_blank">http://www.freeswitchsolutions.com</a><br><br>FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br><a href="http://www.cudatel.com/" target="_blank">http://www.cudatel.com</a><br><br>Official FreeSWITCH Sites<br><a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br><a href="http://wiki.freeswitch.org/" target="_blank">http://wiki.freeswitch.org</a><br><a href="http://www.cluecon.com/" target="_blank">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" 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">
<div><br></div>-- <br><b>Andrew Cassidy BSc (Hons) MBCS SSCA</b>
<div>Managing Director
<div>
<div><br></div>
<div><br>
<div><b style="color: rgb(51, 135, 171); font-family: sans-serif; text-decoration: none;"><a style="color: rgb(51, 135, 171); font-family: sans-serif; text-decoration: none;" href="mailto:info@cassidywebservices.co.uk">T</a> </b>03300 100 960 <b style="color: rgb(51, 135, 171); font-family: sans-serif; text-decoration: none;"><a style="color: rgb(51, 135, 171); font-family: sans-serif; 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="color: rgb(51, 135, 171); font-family: sans-serif; 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="color: rgb(51, 135, 171); font-family: sans-serif; text-decoration: none;" href="mailto:info@cassidywebservices.co.uk">W</a> </b><a href="http://www.cassidywebservices.co.uk/" target="_blank">www.cassidywebservices.co.uk</a></div></div></div></div><br></div></blockquote>
<style><!--
--></style>
<div> </div>
<div> </div><br>_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org</div>                                            </div></body>
</html>