<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hello,<br>
<br>
When the register succeeds store the To-URI in a hash-table indexed
on $si:$sp.<br>
<br>
Make sure the entries in the hash-table do not automatically expire
and use the sht_rm_name_re() function to remove the entry after you
have called unregister.<br>
<br>
Be careful using unregister() as unless you provide it the ruid for
the exact location entry it will remove all contacts for that URI,
not just the one relating to that connection. unregister() with
ruid is only available in Git master. There is currently no way to
find out what the ruid allocated after a save() is (but you could
add this easily enough). Note: none of this is a problem if you are
permitting only one contact binding per subscriber.<br>
<br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<a
href="http://kamailio.org/docs/modules/devel/modules/registrar.html#idp126168">http://kamailio.org/docs/modules/devel/modules/registrar.html#idp126168</a><br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<a
href="http://kamailio.org/docs/modules/devel/modules/registrar.html#idp1681984">http://kamailio.org/docs/modules/devel/modules/registrar.html#idp1681984</a><br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<a href="http://kamailio.org/docs/modules/devel/modules/htable.html">http://kamailio.org/docs/modules/devel/modules/htable.html</a><br>
<br>
Regards,<br>
<br>
Peter<br>
<br>
<div class="moz-cite-prefix">On 02/05/13 00:01, אורן אברהם wrote:<br>
</div>
<blockquote
cite="mid:CAHgMfJPhG8f1dgW4-ZE5SFoeYQ5HY_ooCFxmX4Occy3ONs2Wtw@mail.gmail.com"
type="cite">
<div dir="rtl">
<div dir="ltr" style="">Dear List.</div>
<div dir="ltr" style=""><br>
</div>
<div dir="ltr" style="">I'm trying to issue an automatic
unregister() (of a registration) when a websocket connection
is closed. it is useful when the browser is closed without
issuing REGISTER with expires=0.</div>
<div dir="ltr" style=""><br>
</div>
<div dir="ltr" style="">i've tried implementing this using the
event_route[websocket:closed] but i don't know how to find the
registration uri from the $si:$sp. (that is needed for the
unregister() function from the registrar module)</div>
<div dir="ltr" style=""><br>
</div>
<div dir="ltr" style="">thanks for all replies in advance....</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
</body>
</html>