Hi brian, I think I agree, we found this post (<a href="http://www.mail-archive.com/users@lists.opensips.org/msg03093.html">http://www.mail-archive.com/users@lists.opensips.org/msg03093.html</a>) which mentions that failure route and branch route will be called on a failure.  I suspect that mech underneath engage_media_proxy is modifying SDP c= in failure and branch.  <br>

I may switch to using use/end mediaproxy, but if that is the case, I figure it may be easy enough to fix in the module itself.  So I will look there first and see if I can&#39;t make up a patch. <br><br>Charles<br><br><div class="gmail_quote">

On Fri, Feb 10, 2012 at 4:33 PM, Brian ipt <span dir="ltr">&lt;<a href="mailto:voiplists@iptel.co">voiplists@iptel.co</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br><br><div class="gmail_quote"><div class="im">On Fri, Feb 10, 2012 at 10:01 PM, Charles Solar <span dir="ltr">&lt;<a href="mailto:charlessolar@gmail.com" target="_blank">charlessolar@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Definitely not - I know there was a lengthy discussion about calling use_media_proxy twice and that function a while ago.  The only thing I do with a natted invite is this:<br><br># NAT test<br>        if( is_method(&quot;INVITE&quot;) &amp;&amp; !has_totag() )<br>





        {<br>                $avp(can_uri) = $ru;<br><br>                setflag(3); # flag for NAT<br>                force_rport();<br>                fix_contact();<br>                append_hf(&quot;P-hint: NAT\r\n&quot;);<br>





                xlog( &quot;L_INFO&quot;, &quot;Engaging media proxy&quot; );<br>                engage_media_proxy();<br>        }<span><font color="#888888"><br><br>Charles</font></span><div>
<div><br></div></div></blockquote><div><br></div></div><div>Sorry not to be more helpful and you as you say in your mail it does look like a bug, engage_media_proxy is using dialog and when you failover mediaproxy module is modifying SDP incorrectly for the second time..</div>


<div><br></div><div>use use_media_proxy and end_media_sessions to get around this for the moment.</div><div><div class="h5"><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div>
<div><br><div class="gmail_quote">On Fri, Feb 10, 2012 at 3:54 PM, Brian ipt <span dir="ltr">&lt;<a href="mailto:voiplists@iptel.co" target="_blank">voiplists@iptel.co</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br><br><div class="gmail_quote"><div><div>On Fri, Feb 10, 2012 at 9:21 PM, Charles Solar <span dir="ltr">&lt;<a href="mailto:charlessolar@gmail.com" target="_blank">charlessolar@gmail.com</a>&gt;</span> wrote:<br>





<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I have been using engage_media_proxy in my script, but it seems to cause problems when I failover in the dynamic routing module.  <br>This is the scenario:<br><br>1. Incoming call<br>2. Engage media proxy<br>3. Try first GW (which is down)<br>








4. Failure route<br>5. Try next GW<br>6. Next GW sends Session progress &amp; invite<br>7. Media proxy module &#39;fixes&#39; my SDP contact twice<br><br>My SIP message end up with duplicated SDP contact info.  For example:<a name="1356966f3e28ff31_135696058411793a_135694a262214eb1_13569431a4825d64_13569252baca8add_#top"><font color="#cc6600"> c=IN IP4 33.66.22.1133.66.22.11<br>








<br></font>If the first gateway works, this does not happen.  In fact it works perfectly.  But I guess engage_media_proxy or the dialog module is having an issue with a failure scenario?<br><br>My failure route is pretty simple:<br>








<br>failure_route[4] {<br>        xlog(&quot;L_INFO&quot;, &quot;Failure Route: $rm,  $fu,  $ru\n&quot;);<br><br>        if (use_next_gw()) {<br>                xlog(&quot;L_INFO&quot;, &quot;Trying next gateway&quot; );<br>








                t_relay();<br>                exit;<br>        } else {<br>                xlog( &quot;L_INFO&quot;, &quot;Exhausted gateway list&quot; );<br>                t_reply (&quot;503&quot;, &quot;Service not available&quot;);<br>








                exit;<br>        }<br>}<br><br>Should I switch to use_media_proxy/end_media_session if I want to expect failovers?  Or could I be doing something wrong?<br><br>Thanks guys<span><font color="#888888"><br>
Charles<br></font></span></a></blockquote><div><br></div><div><br></div><div><br></div></div></div><div>Hi Charles,</div><div><br></div><div>Are you using fix_nated_sdp anywhere in your scripts or using anything else that modifies the SDP?</div>






<div><br></div><div>Brian</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><a name="1356966f3e28ff31_135696058411793a_135694a262214eb1_13569431a4825d64_13569252baca8add_#top"><span><font color="#888888"><font color="#cc6600"></font></font></span></a>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br>
</div></div><br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div></div></div><br>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br>