SourceForge has been redesigned. Learn more.
Close

#660 nathelper: wrong Via and Call-ID header for NAT ping OPTIONS when binding to private IP advertised as public

1.9.x
closed-fixed
None
5
2013-05-23
2013-05-21
Ovidiu Sas
No

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.

1 Attachments

Discussion

  • Bogdan-Andrei Iancu

    • status: open --> open-fixed
    • assigned_to: Bogdan-Andrei Iancu
     
  • Bogdan-Andrei Iancu

    Hi Ovidiu,

    Please test the attached patch.

    Regards,
    Bogdan

     
  • Ovidiu Sas

    Ovidiu Sas - 2013-05-22

    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

     
  • Bogdan-Andrei Iancu

    • status: open-fixed --> closed-fixed
     
  • Bogdan-Andrei Iancu

    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

     

Log in to post a comment.