[OpenSIPS-Users] [Blog] How to Eliminate Zombie Registrations in OpenSIPS

Bogdan-Andrei Iancu bogdan at opensips.org
Wed Oct 9 06:21:29 UTC 2024


Hi Federico,

That's a very good point. And the only way to do this would be by some 
extension in the remove_ip_port() to skip certain contacts, maybe based 
on some branch flag (bflag).....Currently there is no way to do this 
kind of skipping with the existing code.

Maybe a crazy idea here....to use 2 usrloc domains/tables, like 
"location" for regular contacts and "location-pn" for the push 
notification contacts. You do (based on E_CORE_TCP_DISCONNECT) removal 
only from "location"...and when you do lookup, you do from both ..  
Again, crazy idea :)

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   https://www.opensips-solutions.com
   https://www.siphub.com

On 08.10.2024 14:09, Federico Edorna wrote:
> Thanks Bogan, very useful information. Regarding the 
> E_CORE_TCP_DISCONNECT event, I wonder if it is possible to avoid 
> removing the contact for Push Notification user agents. Because the 
> TCP connection may go down, but we must keep the contact in usrloc. Do 
> you think it is possible to detect this special case in some way?
> Best regards
>
> On Thu, Oct 3, 2024 at 11:49 AM Bogdan-Andrei Iancu 
> <bogdan at opensips.org> wrote:
>
>     Sure, it will do it!
>
>     Regards,
>
>     Bogdan-Andrei Iancu
>
>     OpenSIPS Founder and Developer
>        https://www.opensips-solutions.com
>        https://www.siphub.com
>
>     On 03.10.2024 17:26, M S wrote:
>>     What if I add a header (in local_route) to locally generated
>>     unregister messages from midregistrar opensips to tell the main
>>     registrar that it is a special message, and in the main registrar
>>     just call save("location") for these messages without any
>>     www_authorize?
>>
>>     On Thu, Oct 3, 2024 at 4:00 PM Bogdan-Andrei Iancu
>>     <bogdan at opensips.org> wrote:
>>
>>         Well, good question. The mechanism will perfectly work
>>         between the mid_registrar and the end-devices. But if the
>>         mid_registrar detects and remove a zombie contact, it may
>>         have to preform a de-registration (depending on the mid
>>         registrar mode) with the main registrar. That means an
>>         REGISTER generated by mid-registrar OpenSIPS - and if you do
>>         digest auth on the main registrar, this will fail :(
>>
>>         Regards,
>>
>>         Bogdan-Andrei Iancu
>>
>>         OpenSIPS Founder and Developer
>>            https://www.opensips-solutions.com
>>            https://www.siphub.com
>>
>>         On 03.10.2024 16:20, M S wrote:
>>>         Hi Bogdan,
>>>         Thank you for your post and explanation, does this work the
>>>         same with mid_registrar too, i.e. if a contact is marked
>>>         with RTO is it discarded from mid_registrar location if it
>>>         is zombie?
>>>
>>>         Thank you!
>>>
>>>         On Thu, Oct 3, 2024 at 1:04 PM Bogdan-Andrei Iancu
>>>         <bogdan at opensips.org> wrote:
>>>
>>>
>>>             Here is a short post on how to improve your OpenSIPS
>>>             registrar
>>>             performance and also your user's experience in the same
>>>             time.... by
>>>             fighting the zombies.... the zombie registrations 🙂
>>>
>>>             https://blog.opensips.org/2024/10/03/how-to-eliminate-zombie-registrations-in-opensips/
>>>
>>>             Enjoy,
>>>
>>>             -- 
>>>             Bogdan-Andrei Iancu
>>>
>>>             OpenSIPS Founder and Developer
>>>             https://www.opensips-solutions.com
>>>             https://www.siphub.com
>>>
>>>
>>>             _______________________________________________
>>>             Users mailing list
>>>             Users at lists.opensips.org
>>>             http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>>
>>>         _______________________________________________
>>>         Users mailing list
>>>         Users at lists.opensips.org
>>>         http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>
>     _______________________________________________
>     Users mailing list
>     Users at lists.opensips.org
>     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20241009/379c8843/attachment.html>


More information about the Users mailing list