[SR-Users] Issue with Socket selection on Forwarding ACK message

Евгений Голей goley_ev_sp at mail.ru
Fri Jan 26 15:43:32 CET 2018


Hi

Could it be because of Bob happend to use 5060 as local port?
Yes, the port and the address in the ACK are indicated by what the value in Contact was in reply 200 Ok. Look at the message 200 Ok


>Четверг, 25 января 2018, 13:00 +03:00 от Thomas Carvello <thomas.carvello at ives.fr>:
>
>
>Hello,
>i have an issue with my Kamailio 4.1.9 configuration.
>This configuration is multi-homed, we have two network interfaces, one on a private network and on the public Internet.
>        Kamailio is configured to listen on port 5060 and 5066 on both
>        interfaces. We register two users Alice and Bob on the  public
>        Internet using port 5066.  Both users are behind a NAT and we
>        capture the SIP exchange on the proxy server.
>We have set the parameter mhomed=1
>When Alice calls Bob, we have 
>Alice			Proxy				Bob
>src=5063		dst=5066
>INVITE ------------------>
>
>                        src=5066
>                        ------  INVITE ---------------> dst=5060
>
>                        dst=5066  
>                        <------- 200 OK -------------- src=5060
>
>
>dst=5063 
><------- 200 OK --------- src=5066
>
>src=5063		dst=5066
>-------- ACK ----------->
>
>                        src=5060      (blocked by NAT)
>                        ------  ACK-----x            dst=5060
>
>
>
>The ACK packet gets relayed with the wrong source port. Then
>        the NAT rejects the packet and the call cannot be established.
>For some reason, when Bob calls Alice, the call is correctly
>        established. Could it be because Bob happend to use 5060 as
>        local port?
>Also, if we set nhomed=0 it works BUT we are not sure that
>        multi homed is handled correctly. I was wondering if you have encounter this issue before?
>I have investigated the code for selection socket and what is
>        the logic of this selection ?
>How does kamailo knows that it should choose 5066 as src
>            port if the user is registered using port 5066 instead of
>            5066?
>Thank you for your time.
>Thomas
>
>
>_______________________________________________
>Kamailio (SER) - Users Mailing List
>sr-users at lists.kamailio.org
>https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Best 
Evgeniy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180126/886c59c1/attachment.html>


More information about the sr-users mailing list