diff --git a/main/bridge_channel.c b/main/bridge_channel.c index 3ee04db55d64dd48ef2efffa967b7d576b5951bb..8ce022005c84c4c7371130ff639d5e5f5e58cd3a 100644 --- a/main/bridge_channel.c +++ b/main/bridge_channel.c @@ -1914,6 +1914,13 @@ static void bridge_channel_handle_action(struct ast_bridge_channel *bridge_chann default: break; } + + /* While invoking an action it is possible for the channel to be hung up. So + * that the bridge respects this we check here and if hung up kick it out. + */ + if (bridge_channel->chan && ast_check_hangup_locked(bridge_channel->chan)) { + ast_bridge_channel_kick(bridge_channel, 0); + } } /*!