If opensips is running behind NAT, OPTIONS NAT ping SIP packets are still using the private IP in it's headers instead of public IP.
listen=udp:PRIVATE_IP as PUBLIC_IP
The OPTIONS sent out looks like:
OPTIONS sip:ADDRESS_TO_PING:PORT SIP/2.0.
Via: SIP/2.0/UDP PRIVATE_IP:5060;branch=0.
From: sip:DOMAIN;tag=cdc83d02.
To: sip:ADDRESS_TO_PING:PORT.
Call-ID: d893d913-564a69a6-82@PRIVATE_IP.
CSeq: 1 OPTIONS.
Max-Forwards: 70.
Content-Length: 0.
.
There should be no reference to PRIVATE_IP in the OPTIONS.
Hi Ovidiu,
Please test the attached patch.
Regards,
Bogdan
The Via IP address was correct now.
The IP in CallID was still the private one.
Please check the attached patch tested against 1.9.
Regards,
Ovidiu Sas
Hi Ovidiu,
Thanks for testing. I also fixed your patch :) - you also had to change the len of callid string (when overall len is computed).
The fix is on GIT now, closing this.
Regards,
Bogdan