[Asterisk-cvs] asterisk/channels chan_sip.c,1.743,1.744
russell at lists.digium.com
russell at lists.digium.com
Sun May 29 19:04:43 CDT 2005
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv8997/channels
Modified Files:
chan_sip.c
Log Message:
use DEFAULT_SIP_PORT (bug #4408)
Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.743
retrieving revision 1.744
diff -u -d -r1.743 -r1.744
--- chan_sip.c 26 May 2005 15:06:24 -0000 1.743
+++ chan_sip.c 29 May 2005 23:08:12 -0000 1.744
@@ -3444,14 +3444,14 @@
ast_copy_string(hostname, h, hn);
h += hn - 1;
- /* Is "port" present? if not default to 5060 */
+ /* Is "port" present? if not default to DEFAULT_SIP_PORT */
if (*h == ':') {
/* Parse port */
++h;
port = strtol(h, &h, 10);
}
else
- port = 5060;
+ port = DEFAULT_SIP_PORT;
/* Got the hostname:port - but maybe there's a "maddr=" to override address? */
maddr = strstr(h, "maddr=");
@@ -4108,7 +4108,7 @@
char iabuf[INET_ADDRSTRLEN];
/* Construct Contact: header */
- if (ourport != 5060)
+ if (ourport != DEFAULT_SIP_PORT)
snprintf(p->our_contact, sizeof(p->our_contact), "<sip:%s%s%s:%d>", p->exten, ast_strlen_zero(p->exten) ? "" : "@", ast_inet_ntoa(iabuf, sizeof(iabuf), p->ourip), ourport);
else
snprintf(p->our_contact, sizeof(p->our_contact), "<sip:%s%s%s>", p->exten, ast_strlen_zero(p->exten) ? "" : "@", ast_inet_ntoa(iabuf, sizeof(iabuf), p->ourip));
@@ -4179,7 +4179,7 @@
else /* Save for any further attempts */
ast_copy_string(p->fromname, n, sizeof(p->fromname));
- if ((ourport != 5060) && ast_strlen_zero(p->fromdomain))
+ if ((ourport != DEFAULT_SIP_PORT) && ast_strlen_zero(p->fromdomain))
snprintf(from, sizeof(from), "\"%s\" <sip:%s@%s:%d>;tag=as%08x", n, l, ast_strlen_zero(p->fromdomain) ? ast_inet_ntoa(iabuf, sizeof(iabuf), p->ourip) : p->fromdomain, ourport, p->tag);
else
snprintf(from, sizeof(from), "\"%s\" <sip:%s@%s>;tag=as%08x", n, l, ast_strlen_zero(p->fromdomain) ? ast_inet_ntoa(iabuf, sizeof(iabuf), p->ourip) : p->fromdomain, p->tag);
More information about the svn-commits
mailing list