<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<tt>Hi Artem,<br>
<br>
Do not confuse TCP connection <u>lifetime & keepalives</u>
with <u>fragmented SIP messages over TCP</u>. There is no
connection between them.<br>
<br>
Lifetime & keepalives<br>
---------------------<br>
Here you have <i>tcp_connection_lifetime</i> [1] and <i>tcp_keepalive</i>
[2]. Pinging is done at kernel level, with 4-byte pings which look
like "\0\0\0\0". If these TCP pings do not reach your UACs (e.g.
due to some firewall), the nathelper module may perform its own
OPTIONS pinging at SIP level if you enable <i>natping_tcp</i> [3]
(a bit slower, but gets the job done, as you may have already
realised!)<br>
<br>
SIP fragmentation<br>
-----------------<br>
By default, OpenSIPS has built-in resilience against fragmented
SIP messages over TCP. If the TCP core reads only a chunk of a SIP
message, the connection will be closed unless the whole message is
delivered within <i>tcp_max_msg_time</i> [4] seconds since the
first </tt><tt><tt>chunk</tt>, in order to prevent abuse.<br>
<br>
[1]:
<a class="moz-txt-link-freetext" href="http://opensips.org/Documentation/Script-CoreParameters-2-2#toc93">http://opensips.org/Documentation/Script-CoreParameters-2-2#toc93</a></tt><br>
<tt><tt>[2]:
<a class="moz-txt-link-freetext" href="http://opensips.org/Documentation/Script-CoreParameters-2-2#toc98">http://opensips.org/Documentation/Script-CoreParameters-2-2#toc98</a></tt></tt><br>
<tt><tt><tt>[3]:
<a class="moz-txt-link-freetext" href="http://www.opensips.org/html/docs/modules/2.2.x/nathelper.html#id293844">http://www.opensips.org/html/docs/modules/2.2.x/nathelper.html#id293844</a><br>
</tt></tt></tt><tt><tt><tt><tt>[4]:
<a class="moz-txt-link-freetext" href="http://www.opensips.org/Documentation/Script-CoreParameters-2-2#toc95">http://www.opensips.org/Documentation/Script-CoreParameters-2-2#toc95</a><br>
<br>
</tt></tt></tt>Best regards,<br>
</tt>
<pre class="moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
<div class="moz-cite-prefix">On 01.12.2015 12:56, Чалков Артём
wrote:<br>
</div>
<blockquote cite="mid:188711448967385@web16j.yandex.ru" type="cite">
<div>
<p>I use opensips v2.1.1 and cant clearly understand how to use
tcp_max_msg_time better with high amount of sip-users behind
NAT. I dont want to use natping_tcp, only TCP-keepalives, but
opensips ends all TCP connections after tcp_max_msg_time
number of seconds despite the fact that i use TCP-keepalives
and i have to use natping_tcp to hold ongoing TCP-connections.</p>
<p>Maybe you can provide me with some recomendations about how
to tune tcp_max_msg_time value for my tasks?</p>
</div>
<div> </div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>