summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorGeorge Joseph <gjoseph@digium.com>2017-06-14 07:29:00 -0600
committerSean Bright <sean.bright@gmail.com>2017-06-14 11:07:07 -0500
commitea3f8c6889e236a8c7aa8065da5fe426a28f01ae (patch)
tree53fa50799e97caf73ca02d517aee907ef394f295 /res
parentc33168c14761a38ec8732dbcb6d3be2758a6571a (diff)
res_pjsip_session: Correct inverted test in session_outgoing_nat_hook
There was a typo introduced in commit 776ffd77 which was preventing the transport's external media address from being used. ASTERISK-27024 #close Reported-by: Christopher van de Sande patches: patch.diff submitted by Florian Floimair (license 6892) Change-Id: I7ec617171eaa2d86d2680b00cf37d5088adafc27
Diffstat (limited to 'res')
-rw-r--r--res/res_pjsip_session.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/res/res_pjsip_session.c b/res/res_pjsip_session.c
index 8447be36e..bde66d25a 100644
--- a/res/res_pjsip_session.c
+++ b/res/res_pjsip_session.c
@@ -3159,8 +3159,7 @@ static void session_outgoing_nat_hook(pjsip_tx_data *tdata, struct ast_sip_trans
ast_sockaddr_parse(&addr, host, PARSE_PORT_FORBID);
if (!transport_state->localnet
- || (transport_state->localnet
- && ast_apply_ha(transport_state->localnet, &addr) == AST_SENSE_ALLOW)) {
+ || ast_apply_ha(transport_state->localnet, &addr) != AST_SENSE_ALLOW) {
ast_debug(5, "Setting external media address to %s\n", transport->external_media_address);
pj_strdup2(tdata->pool, &sdp->conn->addr, transport->external_media_address);
}