<div dir="ltr">The subject is of interest to me as well.<div><br></div><div>Topology is Kamailio acting as an edge proxy to a farm of Asterisk boxes, proxy handles far-end NAT traversal, transport conversion from UDP/TCP/TLS on the WAN to UDP only on the LAN towards Asterisk. Keep-alive for endpoints on the Internet is achieved using Asterisk's quality OPTIONS messages.</div><div><br></div><div>The TCP error shows up rarely in the logs, at which time Asterisk's quality OPTIONS messages stop being delivered to the far endpoint, shortly after the peer goes OFFLINE. What's weird, say there's 60 IP desk phones under the same far NAT, only occasionally (1-3 times a day) some will experience the problem. </div><div><br></div><div>What can be done to mitigate this problem? Tuning OS/Kamailio TCP settings, lower UAC register times?</div><div><br></div><div>Current TCP settings:</div><div>tcp_connection_lifetime=3605<br></div><div>tcp_send_timeout=3<br></div><div>tcp_connect_timeout=5<br></div><div>tcp_max_connections=4096<br></div><div><br></div><div>Thanks.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Mar 17, 2018 at 5:45 AM, Kjeld Flarup <span dir="ltr"><<a href="mailto:kjeld.flarup@liberalismen.dk" target="_blank">kjeld.flarup@liberalismen.dk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">We are developing an app with a pjsip client.<br>
<br>
I see this error when trying to send an invite from kamailio.<br>
<br>
Mar 17 00:29:46 raspberrypi /usr/sbin/kamailio[18720]: ERROR: <core> [tcp_main.c:4258]: tcpconn_main_timeout(): connect <a href="http://62.44.134.85:43829" rel="noreferrer" target="_blank">62.44.134.85:43829</a> failed (timeout)<br>
<br>
A few seconds before <a href="http://62.44.134.85:43829" rel="noreferrer" target="_blank">62.44.134.85:43829</a> did a register.<br>
<br>
I can understand that either the TCP connection was close by the other end or no one is listening.<br>
<br>
How much can I see in a pcap from this scenario? I cannot see the invite, but somehow there must be some TCP communication to show what is failing.<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
<br>
-- <br>
-------------------- Med Liberalistiske Hilsner ----------------------<br>
   Civilingeniør, Kjeld Flarup - Mit sind er mere åbent end min tegnebog<br>
   <a href="https://maps.google.com/?q=Sofienlundvej+6B&entry=gmail&source=g">Sofienlundvej 6B</a>, 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>
______________________________<wbr>_________________<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<wbr>-bin/mailman/listinfo/sr-users</a><br>
</font></span></blockquote></div><br></div>