[SR-Users] TCP keepalive on server and client

Daniel-Constantin Mierla miconda at gmail.com
Mon Feb 13 16:43:45 CET 2012


Hello,

tcp_keepalive is setting SO_KEEPALIVE which means sending keeplive by 
kamailio. You can watch network traffic with ngrep/tcpdump/wireshark...

The tcp parameters are documented on wiki:

  http://www.kamailio.org/wiki/cookbooks/devel/core#tcp_keepalive

Cheers,
Daniel

On 2/3/12 11:33 AM, Yufei Tao wrote:
> Hi
>
> I want to use TCP keepalive to detect dead connections between Kamailio
> and my SIP clients. I've got some questions about this:
>
> 1. If I enable it on Kamailio by setting for example:
>
> tcp_crlf_ping = yes
> tcp_keepalive = yes
> tcp_keepidle = 60
> tcp_keepintvl = 10
> tcp_keepcnt = 3
>
>  From what I read by gooling, that means Kamailio only responds to the
> crlfcrlf sent by the client, but can't be configured to send the
> crlfcrlf. Is this right?
>
> 2. On my client, if I use setsockopt to set the corresponding values:
>
>    SO_KEEPALIVE
>    TCP_KEEPCNT
>    TCP_KEEPIDLE
>    TCP_KEEPINTVL
>
> would it make the client send crlfcrlf?
>
> The reason I'm confused is, with these settings, if Kamailio can only
> respond to crlfcrlf, but not send, then would the client only respond
> too, as in 1. and 2., they seem to configure the same set of parameters?
> Please help me clarify this. Thanks very much!
>
> Yufei
>
> --
> Yufei Tao
> Red Embedded
>
> This E-mail and any attachments hereto are strictly confidential and intended solely for the addressee. If you are not the intended addressee please notify the sender by return and delete the message.
>
> You must not disclose, forward or copy this E-mail or attachments to any third party without the prior consent of the sender.
>
> Red Embedded Design, Company Number 06688253 Registered in England: The Waterfront, Salts Mill Rd, Saltaire, BD17 7EZ
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla -- http://www.asipto.com
http://linkedin.com/in/miconda -- http://twitter.com/miconda




More information about the sr-users mailing list