mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-13 15:50:59 +00:00
FS-9765 one tweak from submitted patch to use switch_channel_var_true instead of switch_channel_get_variable no need to allocate on every hold/unhold just to check if this is enabled.
This commit is contained in:
parent
c9a05d7e60
commit
89063a1a4c
@ -7638,10 +7638,13 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
||||
switch_core_media_gen_local_sdp(session, SDP_TYPE_RESPONSE, NULL, 0, NULL,
|
||||
if (switch_channel_var_true(channel, "sip_unhold_nosdp")) {
|
||||
switch_core_media_gen_local_sdp(session, SDP_TYPE_RESPONSE, NULL, 0, "sendrecv",
|
||||
zstr(tech_pvt->mparams.local_sdp_str) || !switch_channel_test_flag(channel, CF_PROXY_MODE));
|
||||
} else {
|
||||
switch_core_media_gen_local_sdp(session, SDP_TYPE_RESPONSE, NULL, 0, NULL,
|
||||
zstr(tech_pvt->mparams.local_sdp_str) || !switch_channel_test_flag(channel, CF_PROXY_MODE));
|
||||
|
||||
}
|
||||
|
||||
if (zstr(tech_pvt->mparams.local_sdp_str)) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Cannot find a SDP\n");
|
||||
|
Loading…
x
Reference in New Issue
Block a user