Thanks Carlo, that fixed it! It was strange, since I have other devices that don't set rport either, and they don't have the same problem.<br><br>I had actually tried fix_nated_register and fix_nated_contact, they both had the same results, and I'm not sure I'm exactly clear on the specific difference between then.<br>
<br>-dg<br><br><br>On Thu, Nov 5, 2009 at 2:20 AM, AsteriskGuide <<a href="mailto:flavio@asteriskguide.com">flavio@asteriskguide.com</a>> wrote:<br>><br>> Hi Daniel,<br>><br>> <br>><br>> For REGISTER you should use fix_nated_register instead of fix_nated_contact. The Contact header for REGISTER should not be changed. Try using force_rport before handling the NAT. What really matters for replies is the Via Header.<br>
><br>> <br>><br>> Regards,<br>><br>> <br>><br>> Flavio E. Goncalves<br>><br>> <br>><br>> De: <a href="mailto:users-bounces@lists.opensips.org">users-bounces@lists.opensips.org</a> [mailto:<a href="mailto:users-bounces@lists.opensips.org">users-bounces@lists.opensips.org</a>] Em nome de Daniel Goepp<br>
> Enviada em: Thursday, November 05, 2009 5:11 AM<br>> Para: <a href="mailto:users@lists.opensips.org">users@lists.opensips.org</a><br>> Assunto: [OpenSIPS-Users] Register response going to wrong port<br>><br>
> <br>><br>> Really banging my head here, so any help is much appreciated. I am doing some interop work on various devices, and one is causing some problems, and I can't seem to tell why. The problem is that the 401 is going back to 5060, not the port the device is coming through NAT from.<br>
><br>> U <a href="http://76.102.118.209:1296">76.102.118.209:1296</a> -> <a href="http://10.251.27.180:5060">10.251.27.180:5060</a><br>> REGISTER sip:<a href="http://vidtel.com:5060">vidtel.com:5060</a> SIP/2.0.<br>
> To: "Daniel Goepp" <<a href="mailto:sip%3A2007@vidtel.com">sip:2007@vidtel.com</a>>.<br>> From: "Daniel Goepp" <<a href="mailto:sip%3A2007@vidtel.com">sip:2007@vidtel.com</a>>;tag=868361b7108d.<br>
> Contact: "Daniel Goepp" <<a href="http://sip:2007@192.168.1.115:5060">sip:2007@192.168.1.115:5060</a>>.<br>> Call-ID: <a href="mailto:c6fe66a3a272-4a136765ae26@192.168.1.115">c6fe66a3a272-4a136765ae26@192.168.1.115</a>.<br>
> CSeq: 27 REGISTER.<br>> User-Agent: AVSR-C3-ME/1.0.1.ME.149.<br>> Via: SIP/2.0/UDP 192.168.1.115:5060;branch=z9hG4bK-828683511-102.<br>> Max-Forwards: 70.<br>> Expires: 3600.<br>> Content-Length: 0.<br>
><br>> U <a href="http://10.251.27.180:5060">10.251.27.180:5060</a> -> <a href="http://76.102.118.209:5060">76.102.118.209:5060</a><br>> SIP/2.0 401 Unauthorized.<br>> To: "Daniel Goepp" <<a href="mailto:sip%3A2007@vidtel.com">sip:2007@vidtel.com</a>>;tag=c97b4d1cb1f3d0da549e06a8d482ef63.7365.<br>
> From: "Daniel Goepp" <<a href="mailto:sip%3A2007@vidtel.com">sip:2007@vidtel.com</a>>;tag=868361b7108d.<br>> Call-ID: <a href="mailto:c6fe66a3a272-4a136765ae26@192.168.1.115">c6fe66a3a272-4a136765ae26@192.168.1.115</a>.<br>
> CSeq: 27 REGISTER.<br>> Via: SIP/2.0/UDP 192.168.1.115:5060;branch=z9hG4bK-828683511-102;received=76.102.118.209.<br>> WWW-Authenticate: Digest realm="<a href="http://vidtel.com">vidtel.com</a>", nonce="4af0cca800000047afe210458683fcb29c42c67bbfd52f53".<br>
> Server: OpenSIPS (1.6.0-notls (i386/linux)).<br>> Content-Length: 0.<br>><br>> I'm fixing contact info in my config:<br>><br>> if (nat_uac_test("3")) {<br>> setbflag(6); # Mark as NATed<br>
> if (is_method("REGISTER")) {<br>> fix_nated_contact();<br>> }<br>> }<br>><br>> I'm interested in any input on how the destination port of the response is being figured here. I have several different devices hitting this server with very similar signaling, coming from behind NAT, that don't have this problem.<br>
><br>> Thanks<br>><br>> -dg<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">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
><br><br>