[OpenSIPS-Users] Question on mid_registrar de-registrations

Liviu Chircu liviu at opensips.org
Tue Jan 17 15:57:34 UTC 2023

On 17.01.2023 17:09, Daren FERREIRA wrote:
> My understanding was opensips should do the cleaning, as mentioned on 
> the documentation.
> /A common occurence is for some SIP User Agents to lose their network 
> connection (especially when dealing with mobile devices), hence they 
> do not properly de-register from the mid-registrar. In this case, in 
> order to avoid stale registrations on the main registrar (which 
> contains SIP contacts with greatly extended lifetimes!), the 
> mid-registrar will appropriately generate De-REGISTER requests and 
> remove these contacts from the main registrar's location service as 
> soon as it considers them to have expired. /
> Have I misunderstood?
> If not, what can explain the un-register to never been sent by OpenSIPS?
You understood it perfectly.  My suggestion would be to skim through the 
code of mid_reg_aor_event() 
internal callback (it's pretty straight-forward), to get an idea of the 
DEBUG logging it can do, as well as "OK" code paths and "NOT OK" code paths.

Once you know what to look for, try to put OpenSIPS in debug mode 
("opensips-cli -x mi log_level 4") and follow with the DEBUG logs when 
the AoR is deleted by the timer process.  Let's see what it prints!  Of 
course, you should put it back to normal logging ASAP afterwards.

Best regards,

Liviu Chircu
www.twitter.com/liviuchircu  |www.opensips-solutions.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20230117/38e72952/attachment.html>

More information about the Users mailing list