Hi Daniel
Thanks very much for your response! Now I can see that there may not be
any relation between a stream connection and user availability - I was
assuming a user is registered using one device only, which may not
always be the case in fact.
Yufei
On 10/02/12 14:16, Daniel-Constantin Mierla wrote:
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
--
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