[asterisk-dev] SIP subscription with expires=0

Nikša Baldun it at voxdiversa.hr
Mon Oct 25 02:22:26 CDT 2021


Hello,

I see the following in res_pjsip_pubsub.c:

         if (expires_header->ivalue == 0) {
             ast_debug(1, "Subscription request from endpoint %s 
rejected. Expiration of 0 is invalid\n",
                 ast_sorcery_object_get_id(endpoint));
pjsip_endpt_respond_stateless(ast_sip_get_pjsip_endpoint(), rdata, 400, 
NULL, NULL, NULL);
                 return PJ_TRUE;
         }

However, according to RFC 2365, value 0 is perfectly valid, and should 
have the effect of ending the subscription.

>     A natural consequence of this scheme is that a SUBSCRIBE with an
>     "Expires" of 0 constitutes a request to unsubscribe from an event.

Or is my understanding wrong? Is there some other way to unsubscribe?

Best regards,

Nik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20211025/4be670fe/attachment.html>


More information about the asterisk-dev mailing list