diff --git a/channels/chan_sip.c b/channels/chan_sip.c index d45e2714259a98b5600b092e0ed836676633df93..693ee34e53d8aea61a439b64b49b2eb4182d050d 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -20061,7 +20061,7 @@ static void add_peer_mwi_subs(struct sip_peer *peer) /*! \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; @@ -20168,8 +20168,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);