Actually you can force the TCP socket (e.g. sending from the same socket you are listening on) if the kernel has support for SO_REUSEPORT (linux > 3.9, FreeBSD, OSX) and you enable tcp_reuse_port in kamailio configuration ( https://www.kamailio.org/wiki/cookbooks/5.2.x/core#tcp_reuse_port).
Best,
Federico
On Thu, Jul 4, 2019 at 10:27 AM Daniel Tryba d.tryba@pocos.nl wrote:
On Wed, Jul 03, 2019 at 06:38:28PM +0200, Karsten Horsmann wrote:
any one here that can imagine why force sendsocket generates an udp
packet
if the target accept only tcp? And without fs it generates an tcp packet. For uac registrations outbound?
Reading the cookbook documentation of force_send_socket raises questions: Force to send the message from the specified socket (it _must_ be one of the sockets specified with the listen directive). If the protocol doesn't match (e.g. UDP message forced to a TCP socket) the closest socket of the same protocol is used.
It relates to the listen directive, but if you are listening on a TCP port/socket you can't use that port/socket to create new outbound connections (to the best of my knowledge).
You already tried $fs but without proto and port:
https://www.kamailio.org/wiki/cookbooks/5.2.x/pseudovariables#fs_-_forced_so... proto is taken from $du if missing and I guess port is 5060 if missing. So if you are listening on 5060 tcp that can't be used for the outbound message, 5060 from udp is the closed match perhaps.
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users