mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 11:25:35 +00:00
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
This commit is contained in:
committed by
Sean Bright
parent
c33168c147
commit
ea3f8c6889
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user