[OpenSIPS-Users] tcp_max_msg_time question

Liviu Chircu liviu at opensips.org
Wed Dec 2 11:15:21 CET 2015


Hi Artem,

Do not confuse TCP connection _lifetime & keepalives_ with _fragmented 
SIP messages over TCP_. There is no connection between them.

Lifetime & keepalives
---------------------
Here you have /tcp_connection_lifetime/ [1] and /tcp_keepalive/ [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 /natping_tcp/ [3] (a bit slower, but gets the 
job done, as you may have already realised!)

SIP fragmentation
-----------------
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 /tcp_max_msg_time/ [4] seconds since the first chunk, in order to 
prevent abuse.

[1]: http://opensips.org/Documentation/Script-CoreParameters-2-2#toc93
[2]: http://opensips.org/Documentation/Script-CoreParameters-2-2#toc98
[3]: http://www.opensips.org/html/docs/modules/2.2.x/nathelper.html#id293844
[4]: http://www.opensips.org/Documentation/Script-CoreParameters-2-2#toc95

Best regards,

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

On 01.12.2015 12:56, Чалков Артём wrote:
>
> 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.
>
> Maybe you can provide me with some recomendations about how to tune 
> tcp_max_msg_time value for my tasks?
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20151202/74117b9e/attachment-0001.htm>


More information about the Users mailing list