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