From ba1db5b65af34f0adf1f9ece9017dac57bc4f772 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Tue, 21 Feb 2012 10:08:58 -0600 Subject: [PATCH] FS-3928 --resolve --- src/mod/applications/mod_dptools/mod_dptools.c | 6 ++++++ src/mod/endpoints/mod_sofia/mod_sofia.c | 3 ++- src/mod/endpoints/mod_sofia/sofia_glue.c | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/mod/applications/mod_dptools/mod_dptools.c b/src/mod/applications/mod_dptools/mod_dptools.c index e067b091f0..f5c28221c1 100755 --- a/src/mod/applications/mod_dptools/mod_dptools.c +++ b/src/mod/applications/mod_dptools/mod_dptools.c @@ -3038,6 +3038,12 @@ SWITCH_STANDARD_APP(audio_bridge_function) } else { if (switch_channel_test_flag(caller_channel, CF_PROXY_MODE)) { + switch_channel_t *channel = switch_core_session_get_channel(session); + switch_channel_t *peer_channel = switch_core_session_get_channel(peer_session); + if (switch_true(switch_channel_get_variable(caller_channel, SWITCH_BYPASS_MEDIA_AFTER_BRIDGE_VARIABLE)) || + switch_true(switch_channel_get_variable(peer_channel, SWITCH_BYPASS_MEDIA_AFTER_BRIDGE_VARIABLE))) { + switch_channel_set_flag(caller_channel, CF_BYPASS_MEDIA_AFTER_BRIDGE); + } switch_ivr_signal_bridge(session, peer_session); } else { switch_channel_t *channel = switch_core_session_get_channel(session); diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index d8f548e188..ee79914236 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -1723,7 +1723,8 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi } - if ((var = switch_channel_get_variable(channel, SOFIA_SECURE_MEDIA_VARIABLE)) && switch_true(var)) { + if ((var = switch_channel_get_variable(channel, SOFIA_SECURE_MEDIA_VARIABLE)) && + (switch_true(var) || !strcasecmp(var, SWITCH_RTP_CRYPTO_KEY_32) || !strcasecmp(var, SWITCH_RTP_CRYPTO_KEY_80))) { sofia_set_flag_locked(tech_pvt, TFLAG_SECURE); } diff --git a/src/mod/endpoints/mod_sofia/sofia_glue.c b/src/mod/endpoints/mod_sofia/sofia_glue.c index 6ae9cef645..d8824dae33 100644 --- a/src/mod/endpoints/mod_sofia/sofia_glue.c +++ b/src/mod/endpoints/mod_sofia/sofia_glue.c @@ -4628,7 +4628,8 @@ uint8_t sofia_glue_negotiate_sdp(switch_core_session_t *session, const char *r_s crypto_tag = atoi(crypto); if (tech_pvt->remote_crypto_key && switch_rtp_ready(tech_pvt->rtp_session)) { - if (crypto_tag && crypto_tag == tech_pvt->crypto_tag) { + /* Compare all the key. The tag may remain the same even if key changed */ + if (crypto && !strcmp(crypto, tech_pvt->remote_crypto_key)) { switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Existing key is still valid.\n"); } else { const char *a = switch_stristr("AES", tech_pvt->remote_crypto_key);