[sr-dev] [kamailio/kamailio] t_relay() sending packets from the wrong TCP socket (#1532)

Daniel-Constantin Mierla notifications at github.com
Fri Jun 22 11:29:28 CEST 2018


Vadim Lebedev - you are chasing the wrong direction here. If you look at the docs, there is a global parameter tcp_reuse_port for this purpose, setting SO_REUSEPORT if available in the OS. However, the discussion here is in the context of a collision of ports as mentioned again by @Forty-Tw0  in the comment:

  * https://github.com/kamailio/kamailio/issues/1532#issuecomment-399254671

So to conclude:

  * kamailio is reusing the connection from REGISTER to send back traffic to the device, it is no other way if the device is behind a non-port forwarding NAT (e.g., symmetric NAT)
  * if it doesn't, then the pcap should help to see if the INVITE created some other connection or uses a different Contact address so the REGISTER connection is not matching anymore

The reason I closed here is because this seems like a specific use case issue that can be discussed on sr-users once we see pcaps, rather than an issue in the code. Based on conclusion there, we can chase futher the code or config options. We do not use issue tracker as a discussion forum to decide if it is a bug or not, the issue here have to be opened when it is clear a bug in the code (or a feature request).

@Forty-Tw0 - as suggested, let's discuss this use case scenario on sr-users mailing list. Again, there are many aspects that might not use a clear terminology, like `Device A receives a SIP message with a contact telling them to respond to Kamailio on 5062, which causes it to create a new TCP connection` -- what to respond on 5062? The SIP response or follow up requests? These are either Via or Record-Route or Contact headers ... so a lot to clarify and can be just config things that needs to be tuned, sr-users is the right place to discuss and get to a conclusion of how it can be fixed.



-- 
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1532#issuecomment-399382420
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20180622/7ca55855/attachment.html>


More information about the sr-dev mailing list