<HTML dir=ltr><HEAD><TITLE>Re: [OpenSIPS-Users] NAT and ACK (private IP/domain)</TITLE>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.6001.18148" name=GENERATOR></HEAD>
<BODY>
<P><FONT face=Verdana size=2>Right, in the "200 OK" request the Contact as the private IP address.</FONT></P>
<P><FONT face=Verdana size=2>I register with a domain name so I guess the same domain name as to be set in Contact so I was expecting :<BR>- &gt; Contact: &lt;sip:778@10.0.1.71:33802;rinstance=8572c408a8cc28e3&gt;.<BR>should be replaced by :<BR>- &gt; Contact: &lt;sip:778@osip.dev.com:33802;rinstance=8572c408a8cc28e3&gt;.</FONT></P><FONT face=Verdana size=2>
<P><BR>I have fix_nated_contact(); both in ROUTE and in REPLY_ROUTE the make sure it is always executed, I understand it correctly<BR>1.6.1. fix_nated_contact :&nbsp; "Rewrites Contact HF to contain request's source address:port"&nbsp; </P>
<P>In my case Opensips will need a domain name to find that the target is registered localy,&nbsp;how should I handle this, register with an IP&nbsp;?</P>
<P><BR>#<BR>U 10.0.4.201:5060 -&gt; 74.56.45.88:5060<BR>SIP/2.0 200 OK.<BR>Via: SIP/2.0/UDP 192.168.1.125:5060;received=74.56.45.88;rport=5060;branch=z9hG4bKPjSEGMUzJy5GjV8YCUETnWMdjV-gfyCn86.<BR>Record-Route: &lt;sip:10.0.4.201;lr;nat=yes&gt;.<BR>Contact: &lt;sip:778@10.0.1.71:33802;rinstance=8572c408a8cc28e3&gt;.<BR>To: &lt;sip:778@osip.dev.com&gt;;tag=f9353e15.<BR>From: &lt;sip:julien@osip.dev.com&gt;;tag=mpq.p-Mu98E8HBomB7Kh5SvmPzJisbwq.<BR>Call-ID: eaFGOPK1Ah4PL8s0dQd2aDotzsaJTuHg.<BR>CSeq: 2972 INVITE.<BR>Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO.<BR>Record-Route: &lt;sip:10.0.4.201;lr=on;nat=yes&gt;.<BR>Via: SIP/2.0/UDP 10.0.4.201;branch=z9hG4bK0135.5e99e0d.2.<BR>Via: SIP/2.0/UDP 192.168.1.125:5060;received=74.56.45.88;rport=5060;branch=z9hG4bKPj2eYMnj8kZr0p7CSrA5rIIXRPI.uVmAQp.<BR>Max-Forwards: 69.<BR>From: sip:julien@osip.dev.com;tag=mpq.p-Mu98E8HBomB7Kh5SvmPzJisbwq.<BR>To: sip:778@osip.dev.com;tag=f9353e15.<BR>Call-ID: eaFGOPK1Ah4PL8s0dQd2aDotzsaJTuHg.<BR>CSeq: 2972 ACK.<BR>Content-Length:&nbsp; 0.<BR>P-hint: Route[6]: mediaproxy .<BR>.<BR>#<BR>U 10.0.1.71:33802 -&gt; 10.0.4.201:5060<BR>SIP/2.0 200 OK.<BR>Via: SIP/2.0/UDP 10.0.4.201;branch=z9hG4bK0135.5e99e0d.0.<BR>Via: SIP/2.0/UDP 192.168.1.125:5060;received=74.56.45.88;rport=5060;branch=z9hG4bKPjSEGMUzJy5GjV8YCUETnWMdjV-gfyCn86.<BR>Record-Route: &lt;sip:10.0.4.201;lr;nat=yes&gt;.<BR>Contact: &lt;sip:778@10.0.1.71:33802;rinstance=8572c408a8cc28e3&gt;.<BR>To: &lt;sip:778@osip.dev.com&gt;;tag=f9353e15.<BR>From: &lt;sip:julien@osip.dev.com&gt;;tag=mpq.p-Mu98E8HBomB7Kh5SvmPzJisbwq.<BR>Call-ID: eaFGOPK1Ah4PL8s0dQd2aDotzsaJTuHg.<BR>CSeq: 2972 INVITE.<BR>Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO.<BR>Content-Type: application/sdp.<BR>User-Agent: X-Lite release 1100l stamp 47546.<BR>Content-Length: 181.<BR>.<BR>v=0.<BR>o=- 4 2 IN IP4 10.0.1.71.<BR>s=CounterPath X-Lite 3.0.<BR>c=IN IP4 10.0.1.71.<BR>t=0 0.<BR>m=audio 48428 RTP/AVP 3 0 8 101.<BR>a=fmtp:101 0-15.<BR>a=rtpmap:101 telephone-event/8000.<BR>a=sendrecv.</FONT></P>
<DIV id=idOWAReplyText80344 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>
<DIV id=idOWAReplyText64372 dir=ltr>
<DIV dir=ltr><FONT face=Verdana color=#000000 size=2></FONT>&nbsp;</DIV></DIV></FONT></DIV></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Bogdan-Andrei Iancu [mailto:bogdan@voice-system.ro]<BR><B>Sent:</B> Thu 23/04/2009 5:50 PM<BR><B>To:</B> Julien Chavanton<BR><B>Cc:</B> users@lists.opensips.org<BR><B>Subject:</B> Re: [OpenSIPS-Users] NAT and ACK (private IP/domain)<BR></FONT><BR></DIV>
<DIV>
<P><FONT size=2>HI Julian,<BR><BR>The ACK will be routed based on Route + RURI info. Route hdr made the<BR>ACK to get to .201 and the RURI will continue to .71. The RURI from ACK<BR>is taken from the Contact hdr of the 200 OK reply.<BR><BR>AMybe posting the whole stuff (INVITE+200 OK + ACK) will make things easier.<BR><BR>Regards,<BR>Bogdan<BR><BR>Julien Chavanton wrote:<BR>&gt;<BR>&gt; I have a signaling problem, after connection "200 OK" the "ACK" is not<BR>&gt; sent correctly and the rest of the signaling as well.<BR>&gt;<BR>&gt; Opensips is using the IP in the ACK line instead of the "To:", I am<BR>&gt; wandering how I should handle this&nbsp; ?<BR>&gt;<BR>&gt; I-phone (Siphone) : julien@osip.dev.com &lt;<A href="mailto:julien@osip.dev.com">mailto:julien@osip.dev.com</A>&gt;<BR>&gt; X-lite : 778@osip.dev.com &lt;<A href="mailto:778@osip.dev.com">mailto:778@osip.dev.com</A>&gt;<BR>&gt;<BR>&gt; Logging of ACK reception, where the problem start<BR>&gt; Apr 23 13:51:09 osip /sbin/opensips[5446]:<BR>&gt; *****************signaling*****************<BR>&gt; Apr 23 13:51:09 osip /sbin/opensips[5446]: 5 route[ACK][0]<BR>&gt; sip:julien@osip.dev.com -&gt;<BR>&gt; sip:778@10.0.1.71:33802;rinstance=8572c408a8cc28e3 START PROCESSING<BR>&gt; MESSAGE<BR>&gt; Apr 23 13:51:09 osip /sbin/opensips[5446]: *** RECORD ROUTE ***<BR>&gt; Apr 23 13:51:09 osip /sbin/opensips[5446]: *** HOST NOT LOCAL ***&nbsp;<BR>&gt; is_uri_host_local() !<BR>&gt;<BR>&gt; I think this is my problem where the IP apear in the ACK line ?<BR>&gt;<BR>&gt; "ACK sip:778@10.0.1.71:33802;rinstance=8572c408a8cc28e3 SIP/2.0."<BR>&gt;<BR>&gt; #<BR>&gt; U 74.56.45.88:5060 -&gt; 10.0.4.201:5060<BR>&gt; ACK sip:778@10.0.1.71:33802;rinstance=8572c408a8cc28e3 SIP/2.0.<BR>&gt; Via: SIP/2.0/UDP<BR>&gt; 192.168.1.125:5060;rport;branch=z9hG4bKPjTSq-5uCDumvhdYNtigsDJwPrKvhqMM-C.<BR>&gt; Max-Forwards: 70.<BR>&gt; From: sip:julien@osip.dev.com;tag=3FDO5jkip5p8pkCLNr.3TSz2gNrWxCy..<BR>&gt; To: sip:778@osip.dev.com;tag=207ac245.<BR>&gt; Call-ID: lywQ33yIAPEOG77lN93EbyXiHxji.FK-.<BR>&gt; CSeq: 31501 ACK.<BR>&gt; Route: &lt;sip:10.0.4.201;lr;nat=yes&gt;.<BR>&gt; Content-Length:&nbsp; 0.<BR>&gt; .<BR>&gt;<BR>&gt; ------------------------------------------------------------------------<BR>&gt;<BR>&gt; _______________________________________________<BR>&gt; Users mailing list<BR>&gt; Users@lists.opensips.org<BR>&gt; <A href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</A><BR>&gt;&nbsp;&nbsp;<BR><BR></FONT></P></DIV></BODY></HTML>