summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index f28ad5821..41ea8e6dc 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -13954,7 +13954,7 @@ static void initreqprep(struct sip_request *req, struct sip_pvt *p, int sipmetho
ast_uri_encode(l, tmp_l, sizeof(tmp_l), ast_uri_sip_user);
}
- ourport = (p->fromdomainport) ? p->fromdomainport : ast_sockaddr_port(&p->ourip);
+ ourport = (p->fromdomainport && (p->fromdomainport != STANDARD_SIP_PORT)) ? p->fromdomainport : ast_sockaddr_port(&p->ourip);
/* If a caller id name was specified, add a display name. */
if (cid_has_name || !cid_has_num) {
@@ -14920,7 +14920,7 @@ static int transmit_notify_with_mwi(struct sip_pvt *p, int newmsgs, int oldmsgs,
{
struct sip_request req;
struct ast_str *out = ast_str_alloca(500);
- int ourport = (p->fromdomainport) ? p->fromdomainport : ast_sockaddr_port(&p->ourip);
+ int ourport = (p->fromdomainport && (p->fromdomainport != STANDARD_SIP_PORT)) ? p->fromdomainport : ast_sockaddr_port(&p->ourip);
const char *domain;
const char *exten = S_OR(vmexten, default_vmexten);