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