Index: channels/chan_sip.c =================================================================== --- channels/chan_sip.c (revision 11943) +++ channels/chan_sip.c (working copy) @@ -4774,7 +4774,7 @@ char iabuf[INET_ADDRSTRLEN]; /* 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, "", p->exten, ast_strlen_zero(p->exten) ? "" : "@", ast_inet_ntoa(iabuf, sizeof(iabuf), p->ourip), ourport); else ast_string_field_build(p, our_contact, "", p->exten, ast_strlen_zero(p->exten) ? "" : "@", ast_inet_ntoa(iabuf, sizeof(iabuf), p->ourip)); @@ -4934,7 +4934,7 @@ 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\" ;tag=%s", 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=%s", n, l, ast_strlen_zero(p->fromdomain) ? ast_inet_ntoa(iabuf, sizeof(iabuf), p->ourip) : p->fromdomain, p->tag); @@ -4955,7 +4955,7 @@ 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); }