<div>Hi Inaki,</div>
<div> </div>
<div>Thank you for your kindness in helping me out. </div>
<div>I think your diagnosis of the problem is exactly what I am facing right now. </div>
<div>I tried to solve it by putting in :</div>
<div> </div>
<div> if (nat_uac_test("19")) { <br> xlog("nat client detected\n"); <br> if (method=="REGISTER") { <br> fix_nated_register(); <br> } else { <br>
fix_nated_contact(); <br> }; <br> setflag(5); <br> };<br> </div>
<div> if(!is_method("REGISTER")){<br> if(nat_uac_test("19")){<br> xlog("record route with nat = yes\n");<br> record_route(";nat=yes");<br> } else {<br>
xlog("normal record route\n");<br> record_route();<br> };<br> };</div>
<div> </div>
<div> </div>
<div>But it is still not working. My opensips and B2BUA are within on NAT and my xlite is within another NAT, is this going to work?</div>
<div> </div>
<div>Thanks,</div>
<div>JB<br><br></div>
<div class="gmail_quote">On Thu, Nov 27, 2008 at 9:20 PM, Iñaki Baz Castillo <span dir="ltr"><<a href="mailto:ibc@aliax.net">ibc@aliax.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">El Jueves, 27 de Noviembre de 2008, Juan Backson escribió:<br>
<div class="Ih2E3d">> In the 200OK received by the nated client, the Contact is :Contact:<br>> <<a href="http://sip:1000@192.168.1.100:33756" target="_blank">sip:1000@192.168.1.100:33756</a>><br><br>> Opensips did not add the Record-Route even<br>
> though I did specify fix_nated_contact in on_reply_route.<br><br></div>Perhaps you don't understand the meaning of adding Record-Route, it has<br>*nothing* to do with fix_nated_contact.<br><br>Adding Record-Route means that in-dialog requests (as the ACK for the 200 OK)<br>
will pass through the proxy, so the ACK will contain a Route header and a<br>RURI with the value of the Contact received in the 200 OK:<br><br> ACK <a href="http://sip:1000@192.168.1.100:33756" target="_blank">sip:1000@192.168.1.100:33756</a><br>
From: zzzzzzz<br> To: zzzz<br> Route: <sip:ip_proxy><br><br>This ACK will arrive to the proxy (it has a Route so the device/phone MUST<br>send the request there), but whe this ACK arrives to the proxy it will remove<br>
the Route header and route it based on the RURI, this is: the proxy will<br>forward this ACK to IP <a href="http://192.168.1.100:33756/" target="_blank">192.168.1.100:33756</a>.<br>Do you understand the problem? Most probably, the proxy is in a different<br>
network (hopefully with public IP) so it cannot reach that private IP.<br><br>To solve it, the proxy must run "fix_nated_contact" in on_reply_route. This<br>will replace the IP in the Contact of the 200 OK with the received public IP.<br>
<br>In your case, this last point is not working since the UAS receives a Contact<br>with a private IP. Verify it.<br><font color="#888888"><br><br>--<br></font>
<div>
<div></div>
<div class="Wj3C7c">Iñaki Baz Castillo<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>