From d9d6759f37dfee5e0eeff67416954ade8c6846ba Mon Sep 17 00:00:00 2001 From: russell Date: Sun, 29 May 2005 23:08:12 +0000 Subject: use DEFAULT_SIP_PORT (bug #4408) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5782 f38db490-d61c-443f-a65b-d21fe96a405b --- channels/chan_sip.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 36433f3b4..da9d5cf04 100755 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -3444,14 +3444,14 @@ static void set_destination(struct sip_pvt *p, char *uri) 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 @@ static void build_contact(struct sip_pvt *p) char iabuf[INET_ADDRSTRLEN]; /* Construct Contact: header */ - if (ourport != 5060) + if (ourport != DEFAULT_SIP_PORT) snprintf(p->our_contact, sizeof(p->our_contact), "", 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), "", p->exten, ast_strlen_zero(p->exten) ? "" : "@", ast_inet_ntoa(iabuf, sizeof(iabuf), p->ourip)); @@ -4179,7 +4179,7 @@ static void initreqprep(struct sip_request *req, struct sip_pvt *p, int sipmetho 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\" ;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\" ;tag=as%08x", n, l, ast_strlen_zero(p->fromdomain) ? ast_inet_ntoa(iabuf, sizeof(iabuf), p->ourip) : p->fromdomain, p->tag); -- cgit v1.2.3