[SR-Users] Detection of broken TCP connections to clients
Daniel-Constantin Mierla
miconda at gmail.com
Fri Feb 10 15:16:45 CET 2012
Hello,
On 2/9/12 3:51 PM, Yufei Tao wrote:
> Hi
>
> When clients register to Kamailio over TCP/TLS, if I set
> tcp_connection_lifetime to be quite small, like 30 seconds, and let
> clients send refreshes every 20 seconds, for example. When client
> crashes or have network problems, the TCP connection with Kamailio will
> be closed by the server after 30 seconds of being idle.
>
> My question is, is there a way of letting Kamailio tell which user the
> broken TCP connection belongs to, and then remove the user from the
> location table and update presence information etc?
>
> The reason I want this is, if a user publishes its status of being
> online with expiring time of 1 hour, but then crashed, then the location
> table entry and presence information of this user would be wrong for the
> rest of the hour. How do I get around this? I assume server can send
> periodic OPTION messages but that would be a bit expensive.
for the moment, no, there is no auto-unregistration when a stream
connection is closed.
In SIP is no relation between a stream connection and user availability.
The server can connect back to the client, if no active connection can
be reused. Of course, this has problems with nat, the reason for having
the cfg functions set_forward_no_connect() and set_reply_no_connect().
Also, a presence state is not related to registration state, they can be
handled by different instances, via different connection.
The connection id is available at registration time, but not stored in
location table. If one wants to implement such feature, probably would
not be complex at all.
Cheers,
Daniel
--
Daniel-Constantin Mierla -- http://www.asipto.com
http://linkedin.com/in/miconda -- http://twitter.com/miconda
More information about the sr-users
mailing list