<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 8, 2017 at 6:56 AM, Joshua Colp <span dir="ltr"><<a href="mailto:jcolp@digium.com" target="_blank">jcolp@digium.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Tue, Feb 7, 2017, at 03:16 PM, George Joseph wrote:<br>
> Greetings All,<br>
><br>
> I've been working on the (many) issues with recreating inbound<br>
> subscriptions after an asterisk restart. I have an approach that works<br>
> but<br>
> has a drawback: We can recreate the subscription on startup from the<br>
> data<br>
> we persist and can even send a NOTIFY to each subscriber BUT with the<br>
> current version of pjproject, we can't actually set the expiration timer.<br>
> I have a pjproject patch ready that allows us to set tie timer but the<br>
> drawback is that this approach will only work with bundled pjproject or a<br>
> patched version of your own.<br>
><br>
> There's an alternative though... When asterisk restarts, instead of<br>
> sending 'active' NOTIFYs to each subscriber, we could send<br>
> 'terminate,probation' instead. The RFCs say that a "client SHOULD retry<br>
> at<br>
> some later time". While this approach will work with any version of<br>
> pjproject there are issues here as well. The first issue is the word<br>
> 'SHOULD'. There's no guarantee that the client will actually<br>
> resubscribe.<br>
> The second issue is the extra SUBSCRIBE/OK/NOTIFY/OK exchange between<br>
> asterisk and the client at startup. We can tell the client to retry not<br>
> before a random interval similar to how we stagger sending OPTIONS<br>
> messages<br>
> at startup but it's still an extra 4 packets per subscription.<br>
<br>
</div></div>I don't trust clients enough to expect that this behavior will work for<br>
everything. If we can do the work ourselves in a way that guarantees it<br>
works for all clients I usually opt for doing that.<br></blockquote><div><br></div><div>Yeah after further investigation, "some manufacturer"''s phones don't resubscribe on a deactivated or probation reason. Also discovered another bug in pjproject that prevents the use of the 'retry-after' parameter with probation.</div><div><br></div><div>I think the approach will have to be that if we detect that patched pjproject is in use, we use the pjproject timer and if not, we start our own timer.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
--<br>
Joshua Colp<br>
Digium, Inc. | Senior Software Developer<br>
<div class="HOEnZb"><div class="h5">445 Jan Davis Drive NW - Huntsville, AL 35806 - US<br>
Check us out at: <a href="http://www.digium.com" rel="noreferrer" target="_blank">www.digium.com</a> & <a href="http://www.asterisk.org" rel="noreferrer" target="_blank">www.asterisk.org</a><br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
______________________________<wbr>______________________________<wbr>_________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
<br>
asterisk-dev mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" rel="noreferrer" target="_blank">http://lists.digium.com/<wbr>mailman/listinfo/asterisk-dev</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><span style="font-size:12.8px">George Joseph</span><br style="font-size:12.8px"><span style="font-size:12.8px">Digium, Inc. | Software Developer</span><span style="font-size:12.8px"><br>445 Jan Davis Drive NW - Huntsville, AL 35806 - US<br></span><span style="font-size:12.8px">Check us out at: </span><a href="http://www.digium.com/" rel="noreferrer" style="color:rgb(17,85,204);font-size:12.8px" target="_blank">www.digium.com</a><span style="font-size:12.8px"> & </span><a href="http://www.asterisk.org/" rel="noreferrer" style="color:rgb(17,85,204);font-size:12.8px" target="_blank">www.asterisk.org</a><br><div><br></div></div></div>
</div></div>