linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Linphone-developers] SIP-TLS TCP keepalive


From: hrubi
Subject: [Linphone-developers] SIP-TLS TCP keepalive
Date: Thu, 06 Oct 2011 21:38:30 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20111001 Thunderbird/7.0.1

Hi, I'm trying to use the new SIP-TLS feature from the git head for Linux.

For the reference I'm connecting to Asterisk PBX on outside network.

As I'm behind NAT, I noticed that on long inactivity the TCP connection gets eventually wiped from the NAT table. There's nothing I can do about the NAT settings.

I finally resolved/workarounded this with this tiny library http://libkeepalive.sourceforge.net/ which sets TCP keepalive on opened TCP sockets.

Firstly I was trying to resolve this by various options in .linphonerc: setting keepalive_period (that's only for UDP), setting small reg_expires time, setting ping_with_options..

None of which did help.

It's possible that setting TCP keepalive is delegated to the sip libraries and linphone has no control over it. But if it was possible it would be nice option to have for specific scenarios.



For the record, here's how to use the libkeepalive:
1) Download and compile libkeepalive http://libkeepalive.sourceforge.net/
2) Create and run the startup script for linphone:
#!/bin/bash

LIBKEEPALIVE=/home/hrubi/linphone/lib/libkeepalive.so
LINPHONE=/home/hrubi/linphone/bin/linphone

LD_PRELOAD="$LIBKEEPALIVE" KEEPIDLE=60 KEEPINTVL=60 KEEPCNT=5 "$LINPHONE" $@



Regards,
hrubi



reply via email to

[Prev in Thread] Current Thread [Next in Thread]