[SR-Users] Doing automatic unregister when a WEBSOCKET connection is closed.

Peter Dunkley peter.dunkley at crocodile-rcs.com
Mon May 13 00:47:43 CEST 2013


The usrloc function that locates a record by ruid takes in an aorhash
value as an argument (and to get the aorhash value you need the AoR).

I suppose an alternative function that just needs ruid could be written -
but it would be much less efficient as it would have to linearly search
all records (unless an additional hash on ruid is added - and a DB index
on it too).

Regards,

Peter


I suppose you could write a new function that just

> Peter Dunkley writes:
>
>> 3) Use a hash-table to store $ruid, $tU, and $td indexed on $si:$sp
>> 4) Then when event_route[websocket:closed] is called you can retrieve
>> the
>> information from the hash table and call unregister().  Use the $tU and
>> $td you have cached to construct the unregister() URI parameter.
>
> why does unregister need $tU and $td params, because $ruid alone
> uniquely identifies the contact to be unregistered?
>
> -- juha
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>


-- 
Peter Dunkley
Technical Director
Crocodile RCS Ltd




More information about the sr-users mailing list