]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Skip check for extension when subscribing for MWI.
authorJoshua Colp <jcolp@digium.com>
Tue, 24 Feb 2009 15:16:07 +0000 (15:16 +0000)
committerJoshua Colp <jcolp@digium.com>
Tue, 24 Feb 2009 15:16:07 +0000 (15:16 +0000)
Since the remote side is not actually subscribing to a specific extension when
subscribing for MWI just skip the check to see if the extension exists. They can't use it
to specify the mailbox either since we require configuration of that in sip.conf

(closes issue #14531)
Reported by: festr

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

channels/chan_sip.c

index b39f0ccc405dfbfc93239f1713a5bd925fc0854a..799355cb921f4006cefcd774b7ca342fe3420b86 100644 (file)
@@ -15504,7 +15504,7 @@ static int handle_request_message(struct sip_pvt *p, struct sip_request *req)
 /*! \brief  Handle incoming SUBSCRIBE request */
 static int handle_request_subscribe(struct sip_pvt *p, struct sip_request *req, struct sockaddr_in *sin, int seqno, char *e)
 {
-       int gotdest;
+       int gotdest = 0;
        int res = 0;
        int firststate = AST_EXTENSION_REMOVED;
        struct sip_peer *authpeer = NULL;
@@ -15612,8 +15612,10 @@ static int handle_request_subscribe(struct sip_pvt *p, struct sip_request *req,
                return 0;
        }
 
-       /* Get destination right away */
-       gotdest = get_destination(p, NULL);
+       if (strcmp(event, "message-summary")) {
+               /* Get destination right away */
+               gotdest = get_destination(p, NULL);
+       }
 
        /* Get full contact header - this needs to be used as a request URI in NOTIFY's */
        parse_ok_contact(p, req);