diff options
Diffstat (limited to 'res/ari/resource_bridges.c')
-rw-r--r-- | res/ari/resource_bridges.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/res/ari/resource_bridges.c b/res/ari/resource_bridges.c index 7b9b94665..6018c43be 100644 --- a/res/ari/resource_bridges.c +++ b/res/ari/resource_bridges.c @@ -296,10 +296,11 @@ static void *bridge_channel_control_thread(void *data) thread_data = NULL; stasis_app_control_execute_until_exhausted(bridge_channel, control); + stasis_app_control_flush_queue(control); - ast_hangup(bridge_channel); - ao2_cleanup(control); stasis_forward_cancel(forward); + ao2_cleanup(control); + ast_hangup(bridge_channel); return NULL; } @@ -526,9 +527,7 @@ static enum play_found_result ari_bridges_play_found(const char *args_media, control = stasis_app_control_find_by_channel(play_channel); if (!control) { - ast_ari_response_error( - response, 500, "Internal Error", "Failed to get control snapshot"); - return PLAY_FOUND_FAILURE; + return PLAY_FOUND_CHANNEL_UNAVAILABLE; } ao2_lock(control); |