<div dir="auto">Hi Mailinglist,<div dir="auto"><br></div><div dir="auto">for my future me and anybody that had the same issue, the new uac parameter default_socket + tcp_reuse_port fixed the issue for me. </div><div dir="auto"><br></div><div dir="auto"><a href="https://github.com/kamailio/kamailio/commit/27b6f0aba06796f0c52e32fad809d3781b17ce6b">https://github.com/kamailio/kamailio/commit/27b6f0aba06796f0c52e32fad809d3781b17ce6b</a></div><div dir="auto"><br></div><div dir="auto">Thanks to Henning. </div><div dir="auto"><br></div><div dir="auto">Cheers </div><div dir="auto">Karsten Horsmann </div><br><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">Karsten Horsmann <<a href="mailto:khorsmann@gmail.com">khorsmann@gmail.com</a>> schrieb am Do., 4. Juli 2019, 15:58:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div dir="ltr">Hi Frederico and Daniel.<div><br></div><div>Today i found also the "tcp_reuse_port" documentation. Thanks Federico for the hint. </div><div>With that paramenter to yes - i have still the issue that kamailio generates on force_send_socket or $fs (which is the same IMHO at the end) generates UDP.</div><div>It forced the right IP but the transport is wrong. Without tcp_reuse_port it was the same stuff.<br><br>I also tried a new listen param like "listen tcp:212.zz.xx.ab:8000" and point it to that direction.</div><div>$fs and force_send_socket seems to be working with ip in that case. At the bottom I xlogged the du prameter. </div><div dir="auto"><br></div><div dir="auto">It feels like an special special corner case with naptr overwrite, uac and empty du tcp. <br><br>$fs="212.zz.xx.ab"<br><br>13:07:35.839094 IP (tos 0x10, ttl 64, id 62416, offset 0, flags [none], proto UDP (17), length 472)<br>    212.zz.xx.ab.sip > 217.0.26.67.sip: [bad udp cksum 0x9796 -> 0x68cb!] SIP, length: 444<br>        REGISTER sip:<a href="http://sip-trunk.telekom.de" rel="noreferrer noreferrer" target="_blank">sip-trunk.telekom.de</a> SIP/2.0<br>        Via: SIP/2.0/UDP 212.zz.xx.ab;branch=z9hG4bKc689.5afe94c5000000000000000000000000.0;i=0<br>        To: <<a href="mailto:sip%3A%2B49xxxxxxxx@sip-trunk.telekom.de" rel="noreferrer noreferrer" target="_blank">sip:+49xxxxxxxx@sip-trunk.telekom.de</a>><br>        From: <<a href="mailto:sip%3A%2B49xxxxxxxx@sip-trunk.telekom.de" rel="noreferrer noreferrer" target="_blank">sip:+49xxxxxxxx@sip-trunk.telekom.de</a>>;tag=0e37b8f111de3a41f982d1e82cae2fe3-b388<br>        CSeq: 10 REGISTER<br>        Call-ID: 547d384144e9b23e-7166@212.zz.xx.ab<br>        Max-Forwards: 70<br>        Content-Length: 0<br>        User-Agent: SBC-OS<br>        Contact: <sip:49xxxxxxxx@212.zz.xx.ab><br>        Expires: 360<br>        <br><br>Jul  4 13:10:01 siptrunk1 /usr/sbin/kamailio[9380]: INFO: <script>: [tm:local-request] request rm:[REGISTER] from fu:[<a href="mailto:sip%3A%2B49xxxxxxxx@sip-trunk.telekom.de" rel="noreferrer noreferrer" target="_blank">sip:+49xxxxxxxx@sip-trunk.telekom.de</a>] to ru:[sip:<a href="http://sip-trunk.telekom.de" rel="noreferrer noreferrer" target="_blank">sip-trunk.telekom.de</a>] rP:[UDP] sut:[sip:212.zz.xx.ab:5060;transport=tcp] du:[sip:<a href="http://reg.sip-trunk.telekom.de" rel="noreferrer noreferrer" target="_blank">reg.sip-trunk.telekom.de</a>] dP:[UDP]<br>Jul  4 13:10:01 siptrunk1 /usr/sbin/kamailio[9380]: ERROR: <script>: its [REGISTER] [sip:<a href="http://sip-trunk.telekom.de" rel="noreferrer noreferrer" target="_blank">sip-trunk.telekom.de</a>]<br>Jul  4 13:10:11 siptrunk1 /usr/sbin/kamailio[9380]: INFO: <script>: [tm:local-request] request rm:[REGISTER] from fu:[<a href="mailto:sip%3A%2B49xxxxxxxx@sip-trunk.telekom.de" rel="noreferrer noreferrer" target="_blank">sip:+49xxxxxxxx@sip-trunk.telekom.de</a>] to ru:[sip:<a href="http://sip-trunk.telekom.de" rel="noreferrer noreferrer" target="_blank">sip-trunk.telekom.de</a>] rP:[UDP] sut:[sip:212.zz.xx.ab:5060;transport=tcp] du:[sip:<a href="http://reg.sip-trunk.telekom.de" rel="noreferrer noreferrer" target="_blank">reg.sip-trunk.telekom.de</a>] dP:[UDP]<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Am Do., 4. Juli 2019 um 10:50 Uhr schrieb Federico Cabiddu <<a href="mailto:federico.cabiddu@gmail.com" rel="noreferrer noreferrer" target="_blank">federico.cabiddu@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><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" rel="noreferrer noreferrer" target="_blank">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" rel="noreferrer noreferrer" target="_blank">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 noreferrer 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" rel="noreferrer noreferrer" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer noreferrer noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" rel="noreferrer noreferrer" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer noreferrer noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="m_-6669213807552670795m_2008142922573968153gmail_signature">Mit freundlichen Grüßen<br>*Karsten Horsmann*<br></div></div>
</blockquote></div></div>