<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">10 nov. 2021 kl. 18:21 skrev Ross McKillop <<a href="mailto:ross@rsmck.co.uk" class="">ross@rsmck.co.uk</a>>:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi,<div class=""><br class=""></div><div class="">Thanks, I was almost certain that is set but it seems it may not be so will double check that, thank you :) </div><div class=""><br class=""></div><div class="">Now to solve the other issue…. </div></div></div></blockquote>Just a nit-picking note: All these are non-standard fixes. The standard based way is to use the outbound module, it’s the way to allow the sip server to use an inbound TCP connection for outbound requests. This applies to client2server connections.</div><div><br class=""></div><div>For server2server connections there is a requirement of mutual TLS auth in order to be able to reuse the connection in both directions.</div><div><br class=""></div><div>Cheers,</div><div>/O<br class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><br class=""></div><div class="">Ross</div><div class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On 10 Nov 2021, at 17:14, Federico Cabiddu <<a href="mailto:federico.cabiddu@gmail.com" class="">federico.cabiddu@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi, <div class="">to force kamailio to use, for outbound connections, a specific tcp port (define in a "listen" directive), you have to set the reuse_tcp_port parameter (<a href="https://www.kamailio.org/wiki/cookbooks/5.5.x/core#tcp_reuse_port" class="">https://www.kamailio.org/wiki/cookbooks/5.5.x/core#tcp_reuse_port</a>).</div><div class=""><br class=""></div><div class="">Cheers,</div><div class=""><br class=""></div><div class="">Federico</div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Nov 10, 2021 at 4:36 PM Ross McKillop <<a href="mailto:ross@rsmck.co.uk" class="">ross@rsmck.co.uk</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi All,<br class="">
<br class="">
Try as I may I cannot force an outbound TCP request to use a non-ephemeral source port.<br class="">
<br class="">
Looking at the documentation it seems that as long as I have a line like <br class="">
<br class="">
        listen=tcp:<a href="http://10.30.0.55:3339/" rel="noreferrer" target="_blank" class="">10.30.0.55:3339</a><br class="">
<br class="">
I should be able to force an outbound connection to originate from that host and port, i.e. to establish a persistent connection from a specific socket to a remote host, but having tried to set it via $fs and set_send_socket() it always uses an ephemeral port.<br class="">
<br class="">
Ideally I would like kamailio to use a specific source port for contacting a specific remote host and keep the TCP socket established, and it seems like it should be simple enough to do but it's not working as expected. <br class="">
<br class="">
Best,<br class="">
Ross<br class="">
<br class="">
<br class="">
__________________________________________________________<br class="">
Kamailio - Users Mailing List - Non Commercial Discussions<br class="">
  * <a href="mailto:sr-users@lists.kamailio.org" target="_blank" class="">sr-users@lists.kamailio.org</a><br class="">
Important: keep the mailing list in the recipients, do not reply only to the sender!<br class="">
Edit mailing list options or unsubscribe:<br class="">
  * <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank" class="">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br class="">
</blockquote></div>
__________________________________________________________<br class="">Kamailio - Users Mailing List - Non Commercial Discussions<br class="">  * <a href="mailto:sr-users@lists.kamailio.org" class="">sr-users@lists.kamailio.org</a><br class="">Important: keep the mailing list in the recipients, do not reply only to the sender!<br class="">Edit mailing list options or unsubscribe:<br class="">  * <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" class="">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br class=""></div></blockquote></div><br class=""></div></div>__________________________________________________________<br class="">Kamailio - Users Mailing List - Non Commercial Discussions<br class="">  * <a href="mailto:sr-users@lists.kamailio.org" class="">sr-users@lists.kamailio.org</a><br class="">Important: keep the mailing list in the recipients, do not reply only to the sender!<br class="">Edit mailing list options or unsubscribe:<br class="">  * <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" class="">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br class=""></div></blockquote></div><br class=""></body></html>