[SR-Users] Find if client is connected.

Daniel-Constantin Mierla miconda at gmail.com
Fri May 22 14:40:50 CEST 2015



On 21/05/15 20:27, Juha Heinanen wrote:
> Daniel-Constantin Mierla writes:
>
>> On the other hand, usrloc has option to remove the location record when
>> the tcp connection is detected to be closed. This might give you pretty
>> much what you need.
> Just to make sure, does handle_lost_tcp now work also in DB-Only mode?
>
IIRC, the intitial implementation  was based on iterating through the
records in memory and checking if the associated connection still
exists. It is in the same iteration to detect expired records. So I
don't think it was extended for db only as I have not noticed any update
on it. With current approach will required loading all records in memory
to check. A different approach to act when connection has been closed
and the query the database for its id might be better.

A recent addition was to close the tcp connection if the associated
usrloc record has expired.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com




More information about the sr-users mailing list