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

Daniel Tryba d.tryba at pocos.nl
Thu Jul 4 10:25:32 CEST 2019


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.
 



More information about the sr-users mailing list