<div dir="ltr">Hi,<div><br></div><div>I think you are searching for this parameter:</div><div><br></div><div><a href="http://www.kamailio.org/wiki/cookbooks/devel/core#tcp_reuse_port">http://www.kamailio.org/wiki/cookbooks/devel/core#tcp_reuse_port</a><br></div><div><br></div><div>It basically tells the kernel not to choose a new port at random for a new connection, but it will try to reuse the existing port (in your case 5071).</div><div><br></div><div>Thanks,</div><div>Carsten</div><div><br></div><div><br clear="all"><div><div dir="ltr" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr">--</div><div dir="ltr">Carsten Bock I CTO & Founder</div><div dir="ltr"><br><p style="margin:0cm 0cm 0.0001pt;background-image:initial;background-position:initial;background-repeat:initial"><span lang="EN-US" style="color:black">ng-voice GmbH</span><span lang="EN-US" style="color:rgb(0,112,192)"><u></u><u></u></span></p><p style="margin-right:0cm;margin-bottom:12pt;margin-left:0cm;background-image:initial;background-position:initial;background-repeat:initial"><span lang="EN-US" style="color:black">Trostbrücke 1 I 20457 Hamburg I Germany<br>T +49 40 524 75 93-40 | M +49 179 2021244 I <a href="http://www.ng-voice.com/" style="color:rgb(17,85,204)" target="_blank"><span style="color:black">www.ng-voice.com</span></a><u></u><u></u></span></p><p style="margin:0cm 0cm 0.0001pt;background-image:initial;background-position:initial;background-repeat:initial"><span lang="EN-US" style="color:black">Registry Office at Local Court Hamburg, HRB 120189<br>Managing Directors: Dr. David Bachmann, Carsten Bock</span></p></div></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Am Mi., 4. Nov. 2020 um 12:07 Uhr schrieb Kjeld Flarup <<a href="mailto:kjeld.flarup@liberalismen.dk" target="_blank">kjeld.flarup@liberalismen.dk</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">Hello<br>
<br>
I have a Kamailio running behind NAT, which sends calls to a VOIP <br>
service provider.<br>
<br>
I have setup the Kamalio to listen on port 5071, and also setup a port <br>
forward in the router.<br>
<br>
Now the problem is that with TCP, 5071 is not used for the dialog, but a <br>
new port is chosen everytime. This means that when the mobile phone <br>
called hands up, I never sees the BYE, because BYE is a new dialog.<br>
<br>
<br>
To which port is the server supposed to send the BYE, and what field <br>
tells the server this.<br>
<br>
<br>
-- <br>
-------------------- Med Liberalistiske Hilsner ----------------------<br>
    Civilingeniør, Kjeld Flarup - Mit sind er mere åbent end min tegnebog<br>
    Sofienlundvej 6B, 7560 Hjerm, Tlf: 40 29 41 49<br>
    Den ikke akademiske hjemmeside for liberalismen - <a href="http://www.liberalismen.dk" rel="noreferrer" target="_blank">www.liberalismen.dk</a><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>