summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2008-12-10 19:02:57 +0000
committerJoshua Colp <jcolp@digium.com>2008-12-10 19:02:57 +0000
commita039a65656bccbe1ff6fdd673f7bcdfec2b34c71 (patch)
tree400f76793c7aed0e0e75eb8fa2824bbe6db3c45b /channels
parent02ce4faaeb2b5b2aa57e9e0595dbc94a853cf39d (diff)
Merged revisions 162804 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r162804 | file | 2008-12-10 15:01:17 -0400 (Wed, 10 Dec 2008) | 6 lines Fix subscription based MWI up a bit. We only want to put sip: at the beginning of the URI if it is not already there and revert code to ignore destination check if subscribing for MWI. (closes issue #12560) Reported by: vsauer Patches: patch001.diff uploaded by ramonpeek (license 266) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@162805 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index e6b519348..0c5752add 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -9672,7 +9672,7 @@ static void initreqprep(struct sip_request *req, struct sip_pvt *p, int sipmetho
} else {
if (sipmethod == SIP_NOTIFY && !ast_strlen_zero(p->theirtag)) {
/* If this is a NOTIFY, use the From: tag in the subscribe (RFC 3265) */
- snprintf(to, sizeof(to), "<%s%s>;tag=%s", (strncasecmp(p->uri, "sip:", 4) ? "sip:" : ""), p->uri, p->theirtag);
+ snprintf(to, sizeof(to), "<%s%s>;tag=%s", (!strncasecmp(p->uri, "sip:", 4) ? "sip:" : ""), p->uri, p->theirtag);
} else if (p->options && p->options->vxml_url) {
/* If there is a VXML URL append it to the SIP URL */
snprintf(to, sizeof(to), "<%s>;%s", p->uri, p->options->vxml_url);
@@ -19680,7 +19680,7 @@ static int handle_request_subscribe(struct sip_pvt *p, struct sip_request *req,
parse_ok_contact(p, req);
build_contact(p);
- if (strcmp(event, "message-summary") && gotdest) {
+ if (gotdest) {
transmit_response(p, "404 Not Found", req);
pvt_set_needdestroy(p, "subscription target not found");
if (authpeer)