Damn, I&#39;m sorry, I completely missed that example in the doc...my bad...it shows exactly how to switch the offer/answer based on an sdp in the original invite or not, then branching to different reply routes and testing for sdp in the 200 and ACK.  Thanks for pointing that out!<br>
<br>-dg<br>
<br><br><div class="gmail_quote">On Wed, Apr 28, 2010 at 2:51 AM, Bogdan-Andrei Iancu <span dir="ltr">&lt;<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
For such cases (SDP negotiation via 200OK + ACK), see the &quot;s&quot; flag in<br>
the force_rtp_proxy() function:<br>
     <a href="http://www.opensips.org/html/docs/modules/1.6.x/nathelper.html#id271384" target="_blank">http://www.opensips.org/html/docs/modules/1.6.x/nathelper.html#id271384</a><br>
<br>
Also, you are saying that has_body(sdp) does not work on the ACK ? can<br>
you post the ACK request you test?<br>
<div class="im"><br>
Regards,<br>
Bogdan<br>
<br>
Daniel Goepp wrote:<br>
</div><div class="im">&gt; One follow up on this...and this pains me...I have a gateway that<br>
&gt; calls us with no SDP on the INVITE, then we send back a 200 OK w/SDP,<br>
&gt; and it then sends back an ACK with SDP.  Now I believe that although<br>
&gt; very uncommon, does not violate the spec.  However in this case, I see<br>
&gt; that the rtpproxy_answer is set on the 200 OK reply, but the<br>
&gt; if(has_body(&quot;application/sdp&quot;)) has no affect on the ACK.  I&#39;m sure<br>
&gt; I&#39;m missing something here so any thoughts on the matter are greatly<br>
&gt; appreciated.<br>
&gt;<br>
&gt; Thanks<br>
&gt;<br>
&gt; -dg<br>
&gt;<br>
&gt;<br>
&gt; On Tue, Apr 27, 2010 at 2:56 PM, Daniel Goepp &lt;<a href="mailto:dan@goepp.net">dan@goepp.net</a><br>
</div><div class="im">&gt; &lt;mailto:<a href="mailto:dan@goepp.net">dan@goepp.net</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt;     And just after replying regarding my success (I have been running<br>
&gt;     this for many months now without problems), I do have a very<br>
&gt;     specific issue related to UPDATE messages.<br>
&gt;<br>
&gt;     I have added some logging and for the following call, I get:<br>
&gt;<br>
&gt;     Apr 27 14:45:49 ip-10-250-14-133 /usr/local/sbin/opensips[21903]:<br>
&gt;     Request UPDATE: sip:2021@&lt;home_public_ip&gt;:5069 -<br>
&gt;     sip:6502734101@192.168.1.110:5060;transport=tcp<br>
&gt;     Apr 27 14:45:49 ip-10-250-14-133 /usr/local/sbin/opensips[21903]:<br>
&gt;     Route 1<br>
&gt;     Apr 27 14:45:49 ip-10-250-14-133 /usr/local/sbin/opensips[21903]:<br>
&gt;     Setting rtpproxy_offer - Route 1<br>
&gt;     Apr 27 14:45:49 ip-10-250-14-133 /usr/local/sbin/opensips[21903]:<br>
&gt;     Fixing Contact - Route 1<br>
&gt;     Apr 27 14:45:49 ip-10-250-14-133 /usr/local/sbin/opensips[21903]:<br>
&gt;     Relay message<br>
&gt;     Apr 27 14:45:49 ip-10-250-14-133 /usr/local/sbin/opensips[21903]:<br>
&gt;     new branch route 1 at sip:2021@&lt;home_public_ip&gt;:5069  -<br>
&gt;     sip:6502734101@&lt;home_public_ip&gt;:33774;transport=tcp<br>
&gt;     Apr 27 14:45:49 ip-10-250-14-133 /usr/local/sbin/opensips[21896]:<br>
&gt;     incoming reply route 1 - &lt;null&gt; - <a href="http://sip:2021@192.168.1.101:5069" target="_blank">sip:2021@192.168.1.101:5069</a><br>
</div>&gt;     &lt;<a href="http://sip:2021@192.168.1.101:5069" target="_blank">http://sip:2021@192.168.1.101:5069</a>&gt;<br>
<div class="im">&gt;     Apr 27 14:45:49 ip-10-250-14-133 /usr/local/sbin/opensips[21896]:<br>
&gt;     Found a response from a private address! -<br>
</div>&gt;     <a href="http://sip:2021@192.168.1.101:5069" target="_blank">sip:2021@192.168.1.101:5069</a> &lt;<a href="http://sip:2021@192.168.1.101:5069" target="_blank">http://sip:2021@192.168.1.101:5069</a>&gt;<br>
<div><div></div><div class="h5">&gt;     Apr 27 14:45:49 ip-10-250-14-133 /usr/local/sbin/opensips[21896]:<br>
&gt;     Setting rtpproxy_answer - Reply 1<br>
&gt;     Apr 27 14:45:49 ip-10-250-14-133 rtpproxy[20092]:<br>
&gt;     INFO:handle_command: lookup on ports 30882/29328, session timer<br>
&gt;     restarted<br>
&gt;     Apr 27 14:45:49 ip-10-250-14-133 rtpproxy[20092]:<br>
&gt;     INFO:handle_command: lookup on ports 31198/28836, session timer<br>
&gt;     restarted<br>
&gt;<br>
&gt;     Which to me looks like it is identifying that it needs to fix the<br>
&gt;     SDP, but then in the outbound UPDATE the connection IP is still<br>
&gt;     the private address.  See trace below.  The signaling seems okay<br>
&gt;     otherwise, and the experience that I get is that the endpoint<br>
&gt;     being called to (2021) can no longer see the calling party (we are<br>
&gt;     testing video).  The 200 OK coming back does not have this<br>
&gt;     problem, it&#39;s connection IPs in the SDP are rewritten fine, making<br>
&gt;     me think perhaps it&#39;s something related to just UPDATE message,<br>
&gt;     but I don&#39;t know enough about the inner workings of OpenSIPS.<br>
&gt;     Thoughts?<br>
&gt;<br>
&gt;     Thanks<br>
&gt;<br>
&gt;     -dg<br>
&gt;<br>
&gt;     ========================<br>
&gt;     2010-04-27 14:45:49<br>
&gt;     tcp:&lt;home_public_ip&gt;:33774 -&gt; tcp:&lt;opensips_ip&gt;:5060<br>
&gt;<br>
&gt;     UPDATE sip:2021@&lt;home_public_ip&gt;:5069 SIP/2.0<br>
&gt;     Via: SIP/2.0/TCP<br>
&gt;     192.168.1.110:5060;branch=z9hG4bKc5744895b5e0bbaaff08043324b99dc5.1;rport<br>
&gt;     Call-ID: <a href="mailto:4fdbf3351f21733c@192.168.1.110">4fdbf3351f21733c@192.168.1.110</a><br>
</div></div>&gt;     &lt;mailto:<a href="mailto:4fdbf3351f21733c@192.168.1.110">4fdbf3351f21733c@192.168.1.110</a>&gt;<br>
<div class="im">&gt;     CSeq: 104 UPDATE<br>
&gt;     Contact: &lt;sip:6502734101@192.168.1.110:5060;transport=tcp&gt;<br>
&gt;     From: &lt;<a href="mailto:sip%3A6502734101@mydomain.com">sip:6502734101@mydomain.com</a><br>
</div>&gt;     &lt;mailto:<a href="mailto:sip%253A6502734101@mydomain.com">sip%3A6502734101@mydomain.com</a>&gt;&gt;;tag=7ad977f50f0f9d94<br>
<div class="im">&gt;     To: &quot;Daniel Goepp&quot; &lt;<a href="mailto:sip%3A2021@mydomain.com">sip:2021@mydomain.com</a><br>
</div>&gt;     &lt;mailto:<a href="mailto:sip%253A2021@mydomain.com">sip%3A2021@mydomain.com</a>&gt;&gt;;tag=DC151CA5-80A23EC4<br>
<div class="im">&gt;     Max-Forwards: 70<br>
&gt;     Route: &lt;sip:&lt;opensips_ip&gt;;lr;transport=tcp;transport=tcp&gt;<br>
&gt;     Allow: INVITE,ACK,CANCEL,BYE,UPDATE,INFO,OPTIONS,REFER,NOTIFY<br>
&gt;     User-Agent: TANDBERG/257 (TE2.2.0.213935Beta5)<br>
&gt;     Proxy-Authorization: Digest nonce=&quot;*****&quot;, realm=&quot;<a href="http://mydomain.com" target="_blank">mydomain.com</a><br>
</div>&gt;     &lt;<a href="http://mydomain.com" target="_blank">http://mydomain.com</a>&gt;&quot;, username=&quot;6502734101&quot;,<br>
&gt;     uri=&quot;sip:<a href="http://mydomain.com" target="_blank">mydomain.com</a> &lt;<a href="http://mydomain.com" target="_blank">http://mydomain.com</a>&gt;&quot;, response=&quot;*******&quot;,<br>
<div><div></div><div class="h5">&gt;     algorithm=MD5<br>
&gt;     Supported: replaces,100rel,timer,gruu,path,outbound<br>
&gt;     Session-Expires: 500;refresher=uac<br>
&gt;     Min-SE: 90<br>
&gt;     Content-Type: application/sdp<br>
&gt;     Content-Length: 455<br>
&gt;<br>
&gt;     v=0<br>
&gt;     o=tandberg 17 2 IN IP4 192.168.1.110<br>
&gt;     s=-<br>
&gt;     c=IN IP4 192.168.1.110<br>
&gt;     b=CT:768<br>
&gt;     t=0 0<br>
&gt;     m=audio 2354 RTP/AVP 100 102<br>
&gt;     c=IN IP4 192.168.1.110<br>
&gt;     b=TIAS:64000<br>
&gt;     a=rtpmap:100 G7221/16000<br>
&gt;     a=fmtp:100 bitrate=32000<br>
&gt;     a=rtpmap:102 telephone-event/8000<br>
&gt;     a=fmtp:102 0-15<br>
&gt;     a=sendrecv<br>
&gt;     m=video 2356 RTP/AVP 97<br>
&gt;     b=TIAS:768000<br>
&gt;     a=rtpmap:97 H264/90000<br>
&gt;     a=fmtp:97<br>
&gt;     profile-level-id=42800d;max-mbps=40500;max-fs=1344;max-smbps=40500<br>
&gt;     a=sendrecv<br>
&gt;     a=content:main<br>
&gt;     a=label:11<br>
&gt;<br>
&gt;     ========================<br>
&gt;     2010-04-27 14:45:49<br>
&gt;     udp:&lt;opensips_ip&gt;:5060 -&gt; udp:&lt;home_public_ip&gt;:5069<br>
&gt;<br>
&gt;     UPDATE sip:2021@&lt;home_public_ip&gt;:5069 SIP/2.0<br>
&gt;     Record-Route: &lt;sip:&lt;opensips_ip&gt;;lr;transport=tcp&gt;<br>
&gt;     Via: SIP/2.0/UDP &lt;opensips_ip&gt;;branch=z9hG4bK7e7f.ef3c6013.0;i=9<br>
&gt;     Via: SIP/2.0/TCP<br>
&gt;     192.168.1.110:5060;received=&lt;home_public_ip&gt;;branch=z9hG4bKc5744895b5e0bbaaff08043324b99dc5.1;rport=33774<br>
&gt;     Call-ID: <a href="mailto:4fdbf3351f21733c@192.168.1.110">4fdbf3351f21733c@192.168.1.110</a><br>
</div></div>&gt;     &lt;mailto:<a href="mailto:4fdbf3351f21733c@192.168.1.110">4fdbf3351f21733c@192.168.1.110</a>&gt;<br>
<div class="im">&gt;     CSeq: 104 UPDATE<br>
&gt;     Contact: &lt;sip:6502734101@&lt;home_public_ip&gt;:33774;transport=tcp&gt;<br>
&gt;     From: &lt;<a href="mailto:sip%3A6502734101@mydomain.com">sip:6502734101@mydomain.com</a><br>
</div>&gt;     &lt;mailto:<a href="mailto:sip%253A6502734101@mydomain.com">sip%3A6502734101@mydomain.com</a>&gt;&gt;;tag=7ad977f50f0f9d94<br>
<div class="im">&gt;     To: &quot;Daniel Goepp&quot; &lt;<a href="mailto:sip%3A2021@mydomain.com">sip:2021@mydomain.com</a><br>
</div>&gt;     &lt;mailto:<a href="mailto:sip%253A2021@mydomain.com">sip%3A2021@mydomain.com</a>&gt;&gt;;tag=DC151CA5-80A23EC4<br>
<div class="im">&gt;     Max-Forwards: 69<br>
&gt;     Allow: INVITE,ACK,CANCEL,BYE,UPDATE,INFO,OPTIONS,REFER,NOTIFY<br>
&gt;     User-Agent: TANDBERG/257 (TE2.2.0.213935Beta5)<br>
&gt;     Proxy-Authorization: Digest nonce=&quot;*****&quot;, realm=&quot;<a href="http://mydomain.com" target="_blank">mydomain.com</a><br>
</div>&gt;     &lt;<a href="http://mydomain.com" target="_blank">http://mydomain.com</a>&gt;&quot;, username=&quot;6502734101&quot;,<br>
&gt;     uri=&quot;sip:<a href="http://mydomain.com" target="_blank">mydomain.com</a> &lt;<a href="http://mydomain.com" target="_blank">http://mydomain.com</a>&gt;&quot;, response=&quot;****&quot;,<br>
<div><div></div><div class="h5">&gt;     algorithm=MD5<br>
&gt;     Supported: replaces,100rel,timer,gruu,path,outbound<br>
&gt;     Session-Expires: 500;refresher=uac<br>
&gt;     Min-SE: 90<br>
&gt;     Content-Type: application/sdp<br>
&gt;     Content-Length: 455<br>
&gt;<br>
&gt;     v=0<br>
&gt;     o=tandberg 17 2 IN IP4 192.168.1.110<br>
&gt;     s=-<br>
&gt;     c=IN IP4 192.168.1.110<br>
&gt;     b=CT:768<br>
&gt;     t=0 0<br>
&gt;     m=audio 2354 RTP/AVP 100 102<br>
&gt;     c=IN IP4 192.168.1.110<br>
&gt;     b=TIAS:64000<br>
&gt;     a=rtpmap:100 G7221/16000<br>
&gt;     a=fmtp:100 bitrate=32000<br>
&gt;     a=rtpmap:102 telephone-event/8000<br>
&gt;     a=fmtp:102 0-15<br>
&gt;     a=sendrecv<br>
&gt;     m=video 2356 RTP/AVP 97<br>
&gt;     b=TIAS:768000<br>
&gt;     a=rtpmap:97 H264/90000<br>
&gt;     a=fmtp:97<br>
&gt;     profile-level-id=42800d;max-mbps=40500;max-fs=1344;max-smbps=40500<br>
&gt;     a=sendrecv<br>
&gt;     a=content:main<br>
&gt;     a=label:11<br>
&gt;<br>
&gt;     -dg<br>
&gt;<br>
&gt;<br>
</div></div><div><div></div><div class="h5">&gt; ------------------------------------------------------------------------<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Users mailing list<br>
&gt; <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
&gt; <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
&gt;<br>
<br>
<br>
--<br>
Bogdan-Andrei Iancu<br>
<a href="http://www.voice-system.ro" target="_blank">www.voice-system.ro</a><br>
<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>
</div></div></blockquote></div><br>