diff --git a/src/mod/applications/mod_commands/mod_commands.c b/src/mod/applications/mod_commands/mod_commands.c index d7176b2465..cf1bd5a705 100644 --- a/src/mod/applications/mod_commands/mod_commands.c +++ b/src/mod/applications/mod_commands/mod_commands.c @@ -1954,11 +1954,7 @@ SWITCH_STANDARD_API(break_function) } channel = switch_core_session_get_channel(psession); - if (switch_channel_test_flag(channel, CF_BROADCAST)) { - switch_channel_stop_broadcast(channel); - } else { - switch_channel_set_flag(channel, CF_BREAK); - } + switch_core_session_rwunlock(psession); return SWITCH_STATUS_SUCCESS; diff --git a/src/mod/applications/mod_dptools/mod_dptools.c b/src/mod/applications/mod_dptools/mod_dptools.c index 25e511d3f7..2a71681a71 100644 --- a/src/mod/applications/mod_dptools/mod_dptools.c +++ b/src/mod/applications/mod_dptools/mod_dptools.c @@ -385,7 +385,19 @@ SWITCH_STANDARD_APP(remove_bugs_function) SWITCH_STANDARD_APP(break_function) { - switch_channel_set_flag(switch_core_session_get_channel(session), CF_BREAK); + switch_channel_t *channel; + + channel = switch_core_session_get_channel(session); + + if (data && strcasecmp(data, "all")) { + switch_core_session_flush_private_events(session); + } + + if (switch_channel_test_flag(channel, CF_BROADCAST)) { + switch_channel_stop_broadcast(channel); + } else { + switch_channel_set_flag(channel, CF_BREAK); + } } SWITCH_STANDARD_APP(queue_dtmf_function)