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.
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. -dg On Thu, Nov 5, 2009 at 2:20 AM, AsteriskGuide <[email protected]> wrote: > > Hi Daniel, > > > > 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. > > > > Regards, > > > > Flavio E. Goncalves > > > > De: [email protected] [mailto: [email protected]] Em nome de Daniel Goepp > Enviada em: Thursday, November 05, 2009 5:11 AM > Para: [email protected] > Assunto: [OpenSIPS-Users] Register response going to wrong port > > > > 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. > > U 76.102.118.209:1296 -> 10.251.27.180:5060 > REGISTER sip:vidtel.com:5060 SIP/2.0. > To: "Daniel Goepp" <sip:[email protected] <sip%[email protected]>>. > From: "Daniel Goepp" <sip:[email protected] <sip%[email protected]> >;tag=868361b7108d. > Contact: "Daniel Goepp" <sip:[email protected]:5060>. > Call-ID: [email protected]. > CSeq: 27 REGISTER. > User-Agent: AVSR-C3-ME/1.0.1.ME.149. > Via: SIP/2.0/UDP 192.168.1.115:5060;branch=z9hG4bK-828683511-102. > Max-Forwards: 70. > Expires: 3600. > Content-Length: 0. > > U 10.251.27.180:5060 -> 76.102.118.209:5060 > SIP/2.0 401 Unauthorized. > To: "Daniel Goepp" <sip:[email protected] <sip%[email protected]> >;tag=c97b4d1cb1f3d0da549e06a8d482ef63.7365. > From: "Daniel Goepp" <sip:[email protected] <sip%[email protected]> >;tag=868361b7108d. > Call-ID: [email protected]. > CSeq: 27 REGISTER. > Via: SIP/2.0/UDP 192.168.1.115:5060 ;branch=z9hG4bK-828683511-102;received=76.102.118.209. > WWW-Authenticate: Digest realm="vidtel.com", nonce="4af0cca800000047afe210458683fcb29c42c67bbfd52f53". > Server: OpenSIPS (1.6.0-notls (i386/linux)). > Content-Length: 0. > > I'm fixing contact info in my config: > > if (nat_uac_test("3")) { > setbflag(6); # Mark as NATed > if (is_method("REGISTER")) { > fix_nated_contact(); > } > } > > 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. > > Thanks > > -dg > > _______________________________________________ > Users mailing list > [email protected] > http://lists.opensips.org/cgi-bin/mailman/listinfo/users >
_______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
