[asterisk-commits] file: branch 1.4 r89101 - /branches/1.4/channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Nov 7 20:26:48 CST 2007
Author: file
Date: Wed Nov 7 20:26:48 2007
New Revision: 89101
URL: http://svn.digium.com/view/asterisk?view=rev&rev=89101
Log:
Do not add a sip: to the beginning of the To URI unless needed.
(closes issue #10756)
Reported by: goestelecom
Modified:
branches/1.4/channels/chan_sip.c
Modified: branches/1.4/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_sip.c?view=diff&rev=89101&r1=89100&r2=89101
==============================================================================
--- branches/1.4/channels/chan_sip.c (original)
+++ branches/1.4/channels/chan_sip.c Wed Nov 7 20:26:48 2007
@@ -6891,7 +6891,7 @@
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);
More information about the asterisk-commits
mailing list