]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-6054
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 19 Dec 2013 16:36:28 +0000 (21:36 +0500)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 19 Dec 2013 16:36:28 +0000 (21:36 +0500)
src/switch_core_media.c

index 56c8d72ad4092826e005286f6200b711c4fbcfc6..d77e430b83261a9adbccaaecfbec097a2d59cc63 100644 (file)
@@ -3739,9 +3739,16 @@ SWITCH_DECLARE(int) switch_core_media_toggle_hold(switch_core_session_t *session
 
                        if (!switch_media_handle_test_media_flag(smh, SCMF_DISABLE_RTP_AUTOADJ) &&
                                !((val = switch_channel_get_variable(session->channel, "disable_rtp_auto_adjust")) && switch_true(val)) && 
-                               !switch_channel_test_flag(session->channel, CF_WEBRTC) && a_engine->rtp_session) {
+                               !switch_channel_test_flag(session->channel, CF_WEBRTC)) {
                                /* Reactivate the NAT buster flag. */
-                               switch_rtp_set_flag(a_engine->rtp_session, SWITCH_RTP_FLAG_AUTOADJ);
+
+                               if (a_engine->rtp_session) {
+                                       switch_rtp_set_flag(a_engine->rtp_session, SWITCH_RTP_FLAG_AUTOADJ);
+                               }
+
+                               if (v_engine->rtp_session) {
+                                       switch_rtp_set_flag(v_engine->rtp_session, SWITCH_RTP_FLAG_AUTOADJ);
+                               }
                        }
 
                        switch_channel_clear_flag(session->channel, CF_PROTO_HOLD);