]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
update sip subscription debug message to a warning message
authorDavid Vossel <dvossel@digium.com>
Thu, 22 Jul 2010 14:56:26 +0000 (14:56 +0000)
committerDavid Vossel <dvossel@digium.com>
Thu, 22 Jul 2010 14:56:26 +0000 (14:56 +0000)
If the Expire header of a SUBSCRIBE is less that our expiremin,
a log warning will be displayed.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278619 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index af8745ef95757e1bccb5fa6a80db9e9cf3c7c553..0bb691c2bf62b0da865614dd11db386a0c54cd89 100644 (file)
@@ -23160,9 +23160,11 @@ static int handle_request_subscribe(struct sip_pvt *p, struct sip_request *req,
                if (p->expiry > max_expiry) {
                        p->expiry = max_expiry;
                } else if (p->expiry < min_expiry && p->expiry > 0) {
-                       p->expiry = min_expiry;
                        transmit_response_with_minexpires(p, "423 Interval too small", req);
-                       ast_debug(2, "Received SIP subscribe with Expire header less that our minexpires limit.\n");
+                       ast_log(LOG_WARNING, "Received subscription for extension \"%s\" context \"%s\" "
+                               "with Expire header less that 'minexpire' limit. Received \"Expire: %d\" min is %d\n",
+                               p->exten, p->context, p->expiry, min_expiry);
+                       p->expiry = min_expiry;
                        pvt_set_needdestroy(p, "Expires is less that the min expires allowed. ");
                        return 0;
                }