I think this moment not well documented.
And also something wrong there.
If I have timer_interval 60 with hash_size 5 then for registration with
expires=120 we have
rec->registration_timeout = now + 120 - 60 = now + 60
So, we will update every 60 seconds. It's not good.
Maybe this logic will be better?
rec->registration_timeout = now + 120 - 120*0.8 (80% of expires)
rec->registration_timeout = now + rec->expires - rec->expires*0.8;
instead of
rec->registration_timeout = now + rec->expires - timer_interval;
When you have many registrants and database with many different intervals, you
will have many inaccuracies with re-register intervals.
Or we should better document this moment. For example, we should recommend
using as small timer_interval as user can.
---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/issues/217#issuecomment-43670320
_______________________________________________
Devel mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel