]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-3928 --resolve
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 21 Feb 2012 16:08:58 +0000 (10:08 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Tue, 21 Feb 2012 16:08:58 +0000 (10:08 -0600)
src/mod/applications/mod_dptools/mod_dptools.c
src/mod/endpoints/mod_sofia/mod_sofia.c
src/mod/endpoints/mod_sofia/sofia_glue.c

index e067b091f043b17bc394179e026260da8449ed06..f5c28221c1470cbffd41359b78ff5e5118b32b88 100755 (executable)
@@ -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);
index d8f548e18803f9f803fc2f6993f085acedcf416e..ee799142363cf8664ac5bc6b2bd112724e42142c 100644 (file)
@@ -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);
                        }
 
index 6ae9cef645fd4f87406519bc0884d3913d32682f..d8824dae33ac49f81c5786844482806c0a1bcfe6 100644 (file)
@@ -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);