[SR-Users] Unregister with Multiple Contacts
Charles Phillips
charles at rustybike.com
Fri Feb 19 15:43:05 CET 2021
Happy Friday!
To clean up contacts that have sent requests to unregister (Expires: 0) I am executing the following after a 200 OK response from the upstream server:
reg_fetch_contacts("location", "$fu", "un_reg");
xlog("L_INFO", "Removing unregistered contact From: $si To: $tu Ruid: $ulc(un_reg=>ruid)\n");
unregister("location", "$fu", "$ulc(un_reg=>ruid)”);
This produces the desired result when there is only one contact per AoR, but when multiple contacts are present, it seems to delete the first ruid (which makes sense as I am only providing the $fu).
So, the question, can I select the contact by call-id or some other unique identifier specific to the desired contact that I can grab from the transaction? Reading the reg_fetch_contact and unregister docs, they do not seem to provide for selection beyond uri.
- Charles
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20210219/47e66363/attachment.htm>
More information about the sr-users
mailing list