<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>With netstat I can see that there is an active tcp connection,
while I get the tcpconn_main_timeout<br>
</p>
<p>netstat | grep 192.168.2.9:5070<br>
tcp 0 0 192.168.2.9:5070
0x3e2c8655.mobile:34355 ESTABLISHED<br>
</p>
<p>Does this mean that Kamailio doesn't reuse this connection, and
instead tries to establish a new one. <br>
</p>
<p>And is it possible to have two concurrent connections, especially
when it is trying to send an invite to a client behind NAT.<br>
</p>
<br>
<pre class="moz-signature" cols="72">-------------------- Med Liberalistiske Hilsner ----------------------
Civilingeniør, Kjeld Flarup - Mit sind er mere åbent end min tegnebog
Sofienlundvej 6B, 7560 Hjerm, Tlf: 40 29 41 49
Den ikke akademiske hjemmeside for liberalismen - <a class="moz-txt-link-abbreviated" href="http://www.liberalismen.dk">www.liberalismen.dk</a>
</pre>
<div class="moz-cite-prefix">On 03/18/2018 04:13 AM, Sergiu Pojoga
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAJZsGCn-Nmd5uP-mjv+9hng_YO4WU_kOYqinz2=3Zh5+yGSStQ@mail.gmail.com">
<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"
moz-do-not-send="true">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" moz-do-not-send="true">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" moz-do-not-send="true">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"
moz-do-not-send="true">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" moz-do-not-send="true">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" moz-do-not-send="true">sr-users@lists.kamailio.org</a><br>
<a
href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users"
rel="noreferrer" target="_blank"
moz-do-not-send="true">https://lists.kamailio.org/cgi<wbr>-bin/mailman/listinfo/sr-users</a><br>
</font></span></blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
</body>
</html>