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/branches/1.4@162804 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.4
Joshua Colp 17 years ago
parent ee47cfddbe
commit f7521fb0db

@ -7122,7 +7122,7 @@ static void initreqprep(struct sip_request *req, struct sip_pvt *p, int sipmetho
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);
@ -15442,7 +15442,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);
ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);
if (authpeer)

Loading…
Cancel
Save