diff options
author | Jonathan Rose <jrose@digium.com> | 2013-08-09 17:22:28 +0000 |
---|---|---|
committer | Jonathan Rose <jrose@digium.com> | 2013-08-09 17:22:28 +0000 |
commit | 6fe21ef48eede571957863484a203124a6118d9f (patch) | |
tree | a267da3dde4b48ff8065f552958de2026bf9a086 /res/ari/resource_bridges.c | |
parent | 6eec8a44e7a9158fff224957ffe93260f513835c (diff) |
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
Diffstat (limited to 'res/ari/resource_bridges.c')
-rw-r--r-- | res/ari/resource_bridges.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/res/ari/resource_bridges.c b/res/ari/resource_bridges.c index 65fe8d79f..cc92017fc 100644 --- a/res/ari/resource_bridges.c +++ b/res/ari/resource_bridges.c @@ -300,7 +300,8 @@ void ast_ari_play_on_bridge(struct ast_variable *headers, struct ast_play_on_bri } ast_debug(1, "Created announcer channel '%s'\n", ast_channel_name(play_channel)); - if (ast_unreal_channel_push_to_bridge(play_channel, bridge)) { + if (ast_unreal_channel_push_to_bridge(play_channel, bridge, + AST_BRIDGE_CHANNEL_FLAG_IMMOVABLE | AST_BRIDGE_CHANNEL_FLAG_LONELY)) { ast_ari_response_error( response, 500, "Internal Error", "Failed to put playback channel into the bridge"); return; @@ -394,7 +395,8 @@ void ast_ari_record_bridge(struct ast_variable *headers, struct ast_record_bridg return; } - if (ast_unreal_channel_push_to_bridge(record_channel, bridge)) { + if (ast_unreal_channel_push_to_bridge(record_channel, bridge, + AST_BRIDGE_CHANNEL_FLAG_IMMOVABLE | AST_BRIDGE_CHANNEL_FLAG_LONELY)) { ast_ari_response_error( response, 500, "Internal Error", "Failed to put recording channel into the bridge"); return; |