On 30.07.2021 13:59, John Quick wrote:
I found the problem: In the usrloc module I had "contact_refresh_timer" set to 
true. When I change it to false, lookup returns 2.
I had not understood the relationship between the two mechanisms - should I use 
either one or the other, not both?

Quite unexpected, indeed.  Disabling this setting would only have an effect if you've gone the entire way of setting up the E_UL_CONTACT_REFRESH route + the full Push Notification generation logic, per your PN provider.  But if that's in place in your opensips.cfg and PNs are properly getting triggered, assuming the WebRTC device registers with a small expiration interval (say 60 seconds), then PNs would be continuously generated for it, as I notice you have not customized the "pn_trigger_interval" [1], which defaults to raising an event with 120s prior to contact expiration.  Here's how it would work:

* 0s: contact registers for 60s, detected as PN-enabled
* 1s: refresh timer runs, sees contact has only 60s before expiry, raises E_UL_CONTACT_REFRESH (for a reg refresh)
* 1s: PN gets sent
* 2s: WebRTC device re-registers for 60s, detected as PN-enabled
* 3s: refresh timer runs, sees contact has only 60s before expiry, raises E_UL_CONTACT_REFRESH (for a reg refresh)
* 3s: PN gets sent
* ...

And because of your custom "pn_skip_pn_interval" [2] setting, the device temporarily does not need a PN on an incoming INVITE, since it's freshly registered (within the 6s window you configured).

Again: this is what I ASSUME to be happening, let me know if it resembles your setup.  As a recommendation, I would configure the WebRTC phone to use a LARGE expiration interval (1 week?  1 month?), so we can awake it at any time.

By the way, the Contact header is very large and exceeds the varchar(255) field in the 
DB. I've set the usrloc working mode preset to "single-instance-no-db" as a 
workaround.
I'm not sure if the WebRTC app being tested here is exceptional or if this 
could be a more widespread ongoing problem that other people will encounter.
Yes, you are right!  I had this extension at some point on the TODO list during development, but it slip between the cracks.  I will push a fix for this on 3.3, maybe even backport it to 3.2.

[1]: https://opensips.org/docs/modules/3.2.x/mid_registrar.html#param_pn_trigger_interval [2]: https://opensips.org/docs/modules/3.2.x/mid_registrar.html#param_pn_skip_pn_interval

Best Regards,

--
Liviu Chircu
www.twitter.com/liviuchircu | www.opensips-solutions.com
OpenSIPS Summit 2021 Distributed | www.opensips.org/events


_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to