I should add... A better option is just to use an outbound edge proxy
and remove the contact when you get a 430 response back from the edge
proxy. This is the correct way to handle such things.
There are example configurations in the latest Git master (in the
/examples directory).
On 02/05/13 14:02, Peter Dunkley wrote:
Hello,
When the register succeeds store the To-URI in a hash-table indexed on
$si:$sp.
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.
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.
http://kamailio.org/docs/modules/devel/modules/registrar.html#idp126168
http://kamailio.org/docs/modules/devel/modules/registrar.html#idp1681984
http://kamailio.org/docs/modules/devel/modules/htable.html
Regards,
Peter
On 02/05/13 00:01, ???? ????? wrote:
Dear List.
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.
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)
thanks for all replies in advance....
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users