[SR-Users] kamailio as UAC and NAPTR / sendsocket question

Federico Cabiddu federico.cabiddu at gmail.com
Thu Jul 4 10:48:02 CEST 2019


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 at 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_socket
> 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 at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20190704/b1a89390/attachment.html>


More information about the sr-users mailing list