FS-7166 #resolve
This commit is contained in:
parent
6789f37b39
commit
955dd099ca
|
@ -6127,10 +6127,7 @@ static void generate_m(switch_core_session_t *session, char *buf, size_t buflen,
|
||||||
//port, secure ? "S" : "", switch_channel_test_flag(session->channel, CF_AVPF) ? "F" : "");
|
//port, secure ? "S" : "", switch_channel_test_flag(session->channel, CF_AVPF) ? "F" : "");
|
||||||
|
|
||||||
switch_snprintf(buf + strlen(buf), buflen - strlen(buf), "m=audio %d %s", port,
|
switch_snprintf(buf + strlen(buf), buflen - strlen(buf), "m=audio %d %s", port,
|
||||||
get_media_profile_name(session,
|
get_media_profile_name(session, secure || a_engine->crypto_type != CRYPTO_INVALID));
|
||||||
(secure && switch_channel_direction(session->channel) == SWITCH_CALL_DIRECTION_OUTBOUND) ||
|
|
||||||
a_engine->crypto_type != CRYPTO_INVALID));
|
|
||||||
|
|
||||||
|
|
||||||
for (i = 0; i < smh->mparams->num_codecs; i++) {
|
for (i = 0; i < smh->mparams->num_codecs; i++) {
|
||||||
const switch_codec_implementation_t *imp = smh->codecs[i];
|
const switch_codec_implementation_t *imp = smh->codecs[i];
|
||||||
|
@ -6556,6 +6553,12 @@ SWITCH_DECLARE(void) switch_core_media_gen_local_sdp(switch_core_session_t *sess
|
||||||
switch_channel_clear_flag(smh->session->channel, CF_DTLS);
|
switch_channel_clear_flag(smh->session->channel, CF_DTLS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (switch_channel_test_flag(session->channel, CF_PROXY_OFF) && (tmp = switch_channel_get_variable(smh->session->channel, "uuid_media_secure_media"))) {
|
||||||
|
switch_channel_set_variable(smh->session->channel, "rtp_secure_media", tmp);
|
||||||
|
switch_core_session_parse_crypto_prefs(session);
|
||||||
|
switch_core_session_check_outgoing_crypto(session);
|
||||||
|
}
|
||||||
|
|
||||||
if (is_outbound || switch_channel_test_flag(session->channel, CF_RECOVERING) ||
|
if (is_outbound || switch_channel_test_flag(session->channel, CF_RECOVERING) ||
|
||||||
switch_channel_test_flag(session->channel, CF_3PCC)) {
|
switch_channel_test_flag(session->channel, CF_3PCC)) {
|
||||||
if (!switch_channel_test_flag(session->channel, CF_AVPF) &&
|
if (!switch_channel_test_flag(session->channel, CF_AVPF) &&
|
||||||
|
@ -6973,7 +6976,6 @@ SWITCH_DECLARE(void) switch_core_media_gen_local_sdp(switch_core_session_t *sess
|
||||||
|
|
||||||
mult = switch_channel_get_variable(session->channel, "sdp_m_per_ptime");
|
mult = switch_channel_get_variable(session->channel, "sdp_m_per_ptime");
|
||||||
|
|
||||||
|
|
||||||
if (switch_channel_test_flag(session->channel, CF_AVPF) || (mult && switch_false(mult))) {
|
if (switch_channel_test_flag(session->channel, CF_AVPF) || (mult && switch_false(mult))) {
|
||||||
char *bp = buf;
|
char *bp = buf;
|
||||||
int both = (switch_channel_test_flag(session->channel, CF_AVPF) || switch_channel_test_flag(session->channel, CF_DTLS)) ? 0 : 1;
|
int both = (switch_channel_test_flag(session->channel, CF_AVPF) || switch_channel_test_flag(session->channel, CF_DTLS)) ? 0 : 1;
|
||||||
|
|
|
@ -808,6 +808,10 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_perform_receive_message(swit
|
||||||
switch_channel_clear_flag(session->channel, CF_EARLY_MEDIA);
|
switch_channel_clear_flag(session->channel, CF_EARLY_MEDIA);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (message->message_id == SWITCH_MESSAGE_INDICATE_MEDIA) {
|
||||||
|
switch_channel_set_flag(session->channel, CF_PROXY_OFF);
|
||||||
|
}
|
||||||
|
|
||||||
if (message->message_id == SWITCH_MESSAGE_INDICATE_DISPLAY) {
|
if (message->message_id == SWITCH_MESSAGE_INDICATE_DISPLAY) {
|
||||||
char *arg = NULL;
|
char *arg = NULL;
|
||||||
|
|
||||||
|
@ -914,6 +918,10 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_perform_receive_message(swit
|
||||||
|
|
||||||
end:
|
end:
|
||||||
|
|
||||||
|
if (message->message_id == SWITCH_MESSAGE_INDICATE_MEDIA) {
|
||||||
|
switch_channel_clear_flag(session->channel, CF_PROXY_OFF);
|
||||||
|
}
|
||||||
|
|
||||||
switch_core_session_free_message(&message);
|
switch_core_session_free_message(&message);
|
||||||
switch_core_session_rwunlock(session);
|
switch_core_session_rwunlock(session);
|
||||||
|
|
||||||
|
|
|
@ -1655,6 +1655,13 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_nomedia(const char *uuid, switch_medi
|
||||||
status = SWITCH_STATUS_SUCCESS;
|
status = SWITCH_STATUS_SUCCESS;
|
||||||
channel = switch_core_session_get_channel(session);
|
channel = switch_core_session_get_channel(session);
|
||||||
|
|
||||||
|
if (switch_channel_test_flag(channel, CF_SECURE)) {
|
||||||
|
switch_core_session_rwunlock(session);
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR,
|
||||||
|
"Cannot bypass %s due to secure connection.\n", switch_channel_get_name(channel));
|
||||||
|
return SWITCH_STATUS_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
if (switch_channel_test_flag(channel, CF_MEDIA_TRANS)) {
|
if (switch_channel_test_flag(channel, CF_MEDIA_TRANS)) {
|
||||||
switch_core_session_rwunlock(session);
|
switch_core_session_rwunlock(session);
|
||||||
return SWITCH_STATUS_INUSE;
|
return SWITCH_STATUS_INUSE;
|
||||||
|
|
Loading…
Reference in New Issue