From: Anthony Minessale Date: Mon, 13 Oct 2014 15:36:51 +0000 (-0500) Subject: FS-6911 #resolve X-Git-Tag: v1.4.13~1^2~45 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9bd3bd30d3ce9b4227935fdfc0a67d337aa95d2f;p=thirdparty%2Ffreeswitch.git FS-6911 #resolve --- diff --git a/src/switch_core_media.c b/src/switch_core_media.c index 0bb1669215..5602af5036 100644 --- a/src/switch_core_media.c +++ b/src/switch_core_media.c @@ -4084,7 +4084,7 @@ SWITCH_DECLARE(int) switch_core_media_toggle_hold(switch_core_session_t *session if (switch_channel_test_flag(session->channel, CF_PROTO_HOLD)) { const char *val; int media_on_hold_a = switch_true(switch_channel_get_variable_dup(session->channel, "bypass_media_resume_on_hold", SWITCH_FALSE, -1)); - int media_on_hold_b = switch_true(switch_channel_get_variable_dup(b_channel, "bypass_media_resume_on_hold", SWITCH_FALSE, -1)); + int media_on_hold_b = 0; int bypass_after_hold_a = 0; int bypass_after_hold_b = 0; @@ -4092,10 +4092,12 @@ SWITCH_DECLARE(int) switch_core_media_toggle_hold(switch_core_session_t *session bypass_after_hold_a = switch_true(switch_channel_get_variable_dup(session->channel, "bypass_media_after_hold", SWITCH_FALSE, -1)); } - if (media_on_hold_b) { - bypass_after_hold_b = switch_true(switch_channel_get_variable_dup(b_channel, "bypass_media_after_hold", SWITCH_FALSE, -1)); + if (b_channel) { + if ((media_on_hold_b = switch_true(switch_channel_get_variable_dup(b_channel, "bypass_media_resume_on_hold", SWITCH_FALSE, -1)))) { + bypass_after_hold_b = switch_true(switch_channel_get_variable_dup(b_channel, "bypass_media_after_hold", SWITCH_FALSE, -1)); + } } - + switch_yield(250000); if (b_channel && (switch_channel_test_flag(session->channel, CF_BYPASS_MEDIA_AFTER_HOLD) ||