[asterisk-dev] Subscription behavior when an incoming registration goes away?
Joshua Colp
jcolp at digium.com
Thu Dec 22 10:22:49 CST 2016
On Thu, Dec 22, 2016, at 12:14 PM, Matthew Jordan wrote:
<snip>
> If an AoR only has dynamic contacts, and those dynamic contacts are no
> longer valid (or the AoR no longer has any contacts), then at the very
> least I would think we wouldn't want to send the NOTIFY requests until
> the
> AoR has valid contacts. There's certainly no reason to use memory/CPU
> cycles on something that will never succeed.
An AoR is only consulted for unsolicited NOTIFY messages, right now
those wouldn't happen without any contacts. Subscriptions themselves
don't consult the AOR as they already have a target in them.
>
> You may or may not want to actually remove the underlying subscription. I
> could see a scenario in which a phone's REGISTER request goes "missing",
> and so the registration drops - maybe for just a short period of time.
> When
> the new REGISTER request does succeed, the phone may or may not send a
> new
> SUBSCRIBE request (which may have a very different timer). If we
> auto-deleted the underlying subscription, we could have a situation where
> the phone is re-registered but no longer receives state updates.
>
> I'll grant the above scenario is pretty unlikely, but it is plausible.
Agreed. On the client side each are usually considered separate and only
upon initial startup does everything occur (registration/subscriptions).
The fact that a re-registration has occurred doesn't itself trigger new
subscriptions or refreshes. It may "work" if we still send a NOTIFY
saying the subscription is terminated (which you're trying to avoid I
believe), the device might then start a new subscription... but we're
into client side behavior here.
--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org
More information about the asterisk-dev
mailing list