res_pjsip_nat: Apply external addresses to IPv6 TCP/TLS transports

process_nat() calls ast_sip_set_request_transport_details() with use_ipv6
disabled, so on an IPv6 TCP or TLS transport without an explicit transport
selector the transport type mapping fails and the function returns early,
skipping the Contact/Via and SDP external address rewrites.

Passing use_ipv6 maps TCP6 to TCP and TLS6 to TLS, as
ast_sip_rewrite_uri_to_local() already does.

Fixes: #2222

UserNote: The external_media_address, external_signaling_address and
local_net transport options are now also applied to messages sent over IPv6
TCP and TLS transports.
pull/2243/head
Akos Marton 2 months ago
parent 900dd6a883
commit 5407ee2d88

@ -327,7 +327,7 @@ static pj_status_t process_nat(pjsip_tx_data *tdata)
RAII_VAR(struct ao2_container *, hooks, NULL, ao2_cleanup);
const char *transport_type_name = "unknown";
if (ast_sip_set_request_transport_details(&details, tdata, 0)) {
if (ast_sip_set_request_transport_details(&details, tdata, 1)) {
ast_debug(4, "Unable to process message for transport type '%s'\n", transport_type_name);
return PJ_SUCCESS;
}

Loading…
Cancel
Save