Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opensips 1.8.3, wrong IP and Port combination while sending the response. #737

Closed
suryaveerc opened this issue Dec 25, 2015 · 2 comments
Closed

Comments

@suryaveerc
Copy link

I am trying to run OpenSips presence server on kubernetes but it's not working. The reason for it is what I found is the wrong IP - Port combination choosen by OpensSips to send the response 200.

Below is the tcpdump.

tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes 
04:34:30.117024 IP (tos 0x0, ttl 63, id 10208, offset 0, flags [DF], proto UDP (17), length 999) 
    **10.244.24.0.40351 > 10.244.7.11.5060**: SIP, length: 971
        PUBLISH sip:service-1@opensipstest.org SIP/2.0 
        Via: SIP/2.0/UDP **192.168.144.10:32569**;branch=z9hG4bK-6324-1-0 
        Max-Forwards: 20 
        From: <sip:service-1@opensipstest.org>;tag=1 
        To: <sip:service-1@opensipstest.org>
        Call-ID: 1-6324@192.168.144.10 
        CSeq: 1 PUBLISH 
        Expires: 3600 
        Event: presence 
        Content-Length:   607 
        User-Agent: Sipp v1.1-TLS, version 20061124 
<Removed presence xml>

04:34:30.118455 IP (tos 0x10, ttl 64, id 28000, offset 0, flags [DF], proto UDP (17), length 417) 
    **10.244.7.11.5060 > 10.244.24.0.32569**: SIP, length: 389
        SIP/2.0 200 OK 
        Via: SIP/2.0/UDP **192.168.144.10:32569**;received=10.244.24.0;branch=z9hG4bK-6324-1-0 
        From: <sip:service-1@opensipstest.org>;tag=1 
        To: <sip:service-1@opensipstest.org>;tag=6c8cd3bc7eb4fe86b153056f4d236d23-ba2c 
        Call-ID: 1-6324@192.168.144.10 
        CSeq: 1 PUBLISH 
        Expires: 3600 
        SIP-ETag: a.1450922669.38.2.0 
        Server: OpenSIPS (1.8.4-notls (x86_64/linux)) 
        Content-Length: 0 

As you can see in the dump the IP address where the reply is being sent is the one from which it received the request i.e. 10.244.24.0 while the port is 32569, which is the actual client port. instead it should have been 40351.

Please correct me if I made some wrong observation.

Thanks,
Suryaveer

@razvancrainea
Copy link
Member

Hi, Suryaveer!

Are you calling force_rport() on the PUBLISH message? If not, OpenSIPS will send the reply to the port advertised in the Via header (as I can see in your trace), instead of the real port.

Best regards,
Răzvan

@suryaveerc
Copy link
Author

@razvancrainea

Thanks a lot for response. I was not aware of this option. Now, I am using this and every thing is fine.
Closing.

Regards,
Suryaveer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants