aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorrizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b>2006-10-07 11:11:16 +0000
committerrizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b>2006-10-07 11:11:16 +0000
commit65c11fa26c4f796e3d591d6f1f4776f6e0b74921 (patch)
treef02d65ca55d0ebc70ba242eca45fe1a7ab969d18 /channels
parent06a2c8c7362596be05553a71e788f488f3faf2c5 (diff)
remove hardwired usage of 5060, use DEFAULT_SIP_PORT instead
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@44662 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 3ca2e0a80..65997d1e9 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -6293,7 +6293,7 @@ static void extract_uri(struct sip_pvt *p, struct sip_request *req)
static void build_contact(struct sip_pvt *p)
{
/* Construct Contact: header */
- if (ourport != 5060) /* Needs to be 5060, according to the RFC */
+ if (ourport != DEFAULT_SIP_PORT) /* Needs to be 5060, according to the RFC */
ast_string_field_build(p, our_contact, "<sip:%s%s%s:%d>", p->exten, ast_strlen_zero(p->exten) ? "" : "@", ast_inet_ntoa(p->ourip), ourport);
else
ast_string_field_build(p, our_contact, "<sip:%s%s%s>", p->exten, ast_strlen_zero(p->exten) ? "" : "@", ast_inet_ntoa(p->ourip));
@@ -6452,7 +6452,7 @@ static void initreqprep(struct sip_request *req, struct sip_pvt *p, int sipmetho
l = tmp2;
}
- if ((ourport != 5060) && ast_strlen_zero(p->fromdomain)) /* Needs to be 5060 */
+ if (ourport != DEFAULT_SIP_PORT && ast_strlen_zero(p->fromdomain)) /* Needs to be 5060 */
snprintf(from, sizeof(from), "\"%s\" <sip:%s@%s:%d>;tag=%s", n, l, S_OR(p->fromdomain, ast_inet_ntoa(p->ourip)), ourport, p->tag);
else
snprintf(from, sizeof(from), "\"%s\" <sip:%s@%s>;tag=%s", n, l, S_OR(p->fromdomain, ast_inet_ntoa(p->ourip)), p->tag);
@@ -6473,7 +6473,7 @@ static void initreqprep(struct sip_request *req, struct sip_pvt *p, int sipmetho
ast_build_string(&invite, &invite_max, "%s@", n);
}
ast_build_string(&invite, &invite_max, "%s", p->tohost);
- if (ntohs(p->sa.sin_port) != 5060) /* Needs to be 5060 */
+ if (ntohs(p->sa.sin_port) != DEFAULT_SIP_PORT) /* Needs to be 5060 */
ast_build_string(&invite, &invite_max, ":%d", ntohs(p->sa.sin_port));
ast_build_string(&invite, &invite_max, "%s", urioptions);
}