<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Oct 25, 2021 at 1:32 AM Nikša Baldun <<a href="mailto:it@voxdiversa.hr">it@voxdiversa.hr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<p>According to the RFC, yes:</p>
<p>
</p><blockquote type="cite">
<pre> In addition to being a request to unsubscribe, a SUBSCRIBE message
with "Expires" of 0 also causes a fetch of state; see section
3.3.6.
</pre>
</blockquote>
I'll report a bug. Thanks for your reply.<br></div></blockquote><div><br></div><div>Just FYI... The code snippet quoted is in pubsub_on_rx_subscribe_request() which only gets called on new dialogs. We do erroneously treat the expires=0 as a failure when we should send a NOTIFY but not create a persistent subscription. We handle expires=0 on *in-dialog* SUBSCRIBE termination requests correctly in pubsub_on_rx_refresh().<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>
<p></p>
<div>On 25. 10. 2021. 09:25, Olle E.
Johansson wrote:<br>
</div>
<blockquote type="cite">
A subscription with expire:0 should get at least ONE notify,
right? I’ve just that to check the status without setting up a
dialog.
<div><br>
</div>
<div>It is not invalid. Report this as a bug.</div>
<div><br>
</div>
<div>/O<br>
<div><br>
<blockquote type="cite">
<div>25 okt. 2021 kl. 09:22 skrev Nikša Baldun <<a href="mailto:it@voxdiversa.hr" target="_blank">it@voxdiversa.hr</a>>:</div>
<br>
<div>
<div>
<p>Hello,</p>
<p>I see the following in res_pjsip_pubsub.c:<br>
</p>
<p> if (expires_header->ivalue == 0)
{<br>
ast_debug(1, "Subscription request from
endpoint %s rejected. Expiration of 0 is invalid\n",<br>
ast_sorcery_object_get_id(endpoint));<br>
pjsip_endpt_respond_stateless(ast_sip_get_pjsip_endpoint(),
rdata, 400, NULL, NULL, NULL);<br>
return PJ_TRUE;<br>
}</p>
<p>However, according to RFC 2365, value 0 is
perfectly valid, and should have the effect of ending
the subscription.</p>
<div> <br>
</div>
<blockquote type="cite">
<pre> A natural consequence of this scheme is that a SUBSCRIBE with an
"Expires" of 0 constitutes a request to unsubscribe from an event.
</pre>
</blockquote>
<div><br>
</div>
<p>Or is my understanding wrong? Is there some
other way to unsubscribe?</p>
<p>Best regards,</p>
<p>Nik<br>
</p>
</div>
-- <br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" 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" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-dev</a></div>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset></fieldset>
</blockquote>
</div>
-- <br>
_____________________________________________________________________<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/mailman/listinfo/asterisk-dev</a></blockquote></div></div>