<div dir="ltr">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 (<a href="https://www.kamailio.org/wiki/cookbooks/5.2.x/core#tcp_reuse_port">https://www.kamailio.org/wiki/cookbooks/5.2.x/core#tcp_reuse_port</a>).<div><br></div><div>Best,</div><div><br></div><div>Federico</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 4, 2019 at 10:27 AM Daniel Tryba <<a href="mailto:d.tryba@pocos.nl">d.tryba@pocos.nl</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed, Jul 03, 2019 at 06:38:28PM +0200, Karsten Horsmann wrote:<br>
> any one here that can imagine why force sendsocket generates an udp packet<br>
> if the target accept only tcp? And without fs it generates an tcp packet.<br>
> For uac registrations outbound?<br>
<br>
Reading the cookbook documentation of force_send_socket raises<br>
questions:<br>
 Force to send the message from the specified socket (it _must_ be one<br>
 of the sockets specified with the listen directive). If the<br>
 protocol doesn't match (e.g. UDP message forced to a TCP<br>
 socket) the closest socket of the same protocol is used. <br>
<br>
It relates to the listen directive, but if you are listening on a TCP<br>
port/socket you can't use that port/socket to create new outbound<br>
connections (to the best of my knowledge).<br>
<br>
You already tried $fs but without proto and port:<br>
<a href="https://www.kamailio.org/wiki/cookbooks/5.2.x/pseudovariables#fs_-_forced_socket" rel="noreferrer" target="_blank">https://www.kamailio.org/wiki/cookbooks/5.2.x/pseudovariables#fs_-_forced_socket</a><br>
proto is taken from $du if missing and I guess port is 5060 if missing.<br>
So if you are listening on 5060 tcp that can't be used for the outbound<br>
message, 5060 from udp is the closed match perhaps.<br>
<br>
<br>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div>