mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-19 03:07:59 +00:00
bridge_channel: Support the lonely flag and make ARI use it.
The lonely flag is an optional flag for bridge channels that will make them leave a bridge when a channel leaves if only lonely channels are in the bridge at that point. This is useful for things like ending recording and playback channels when they cease to be interacting with other channels in the bridge. (closes issue ASTERISK-22117) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/2721/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396497 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -668,7 +668,7 @@ void ast_unreal_call_setup(struct ast_channel *semi1, struct ast_channel *semi2)
|
||||
ast_channel_datastore_inherit(semi1, semi2);
|
||||
}
|
||||
|
||||
int ast_unreal_channel_push_to_bridge(struct ast_channel *ast, struct ast_bridge *bridge)
|
||||
int ast_unreal_channel_push_to_bridge(struct ast_channel *ast, struct ast_bridge *bridge, unsigned int flags)
|
||||
{
|
||||
struct ast_bridge_features *features;
|
||||
struct ast_channel *chan;
|
||||
@@ -741,7 +741,8 @@ int ast_unreal_channel_push_to_bridge(struct ast_channel *ast, struct ast_bridge
|
||||
ast_channel_unref(chan);
|
||||
return -1;
|
||||
}
|
||||
ast_set_flag(&features->feature_flags, AST_BRIDGE_CHANNEL_FLAG_IMMOVABLE);
|
||||
|
||||
ast_set_flag(&features->feature_flags, flags);
|
||||
|
||||
/* Impart the semi2 channel into the bridge */
|
||||
if (ast_bridge_impart(bridge, chan, NULL, features, 1)) {
|
||||
|
Reference in New Issue
Block a user