diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-11-08 02:26:48 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-11-08 02:26:48 +0000 |
commit | d58ff7cdcd72c26dad11d860507470e759336176 (patch) | |
tree | 3104a256f18ac82f9ef79668e84d82d29f95273f /channels | |
parent | ef6203ef48e940ea4394880e79e9a836b21adf58 (diff) |
Do not add a sip: to the beginning of the To URI unless needed.
(closes issue #10756)
Reported by: goestelecom
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89101 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 84cbdfc26..49caddf99 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -6891,7 +6891,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), "<sip:%s>;tag=%s", 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); |