<div dir="ltr">Well, in websocket module you have the event route that's triggered when a connection is lost [1].<div><br></div><div>You wouldn't be able to use the unregister function of the registrar module, because a faked SIP message is used to trigger the event, but you can always write a custom SQL to delete the record of the location table using the socket information, to which you do have access:  $si, $sp. <br><div><br></div><div>[1] <a href="http://kamailio.org/docs/modules/stable/modules/websocket.html#websocket.e.closed">http://kamailio.org/docs/modules/stable/modules/websocket.html#websocket.e.closed</a></div></div><div><br></div><div>Regards,</div><div>Carlos</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 22, 2014 at 8:08 AM, Camille Oudot <span dir="ltr"><<a href="mailto:camille.oudot@orange.com" target="_blank">camille.oudot@orange.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I'm looking for a mechanism to unregister clients when the corresponding<br>
TCP connection is closed, but had no success so far.<br>
<br>
I've tried the handle_lost_tcp parameter of usrloc, but it didn't work:<br>
the user was not unregistered, whereas the connection was seen as<br>
closed by kamailio. Is it still a relevant option?<br>
<br>
Otherwise, is there any mechanism that would trigger some kind of<br>
event_route whenever a connection (TCP, TLS, WS, WSS) is lost or<br>
closed?<br>
<br>
Cheers,<br>
<span class="HOEnZb"><font color="#888888">--<br>
Camille<br>
<br>
_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Carlos<div><a href="http://caruizdiaz.com" target="_blank">http://caruizdiaz.com</a></div></div>
</div>