summaryrefslogtreecommitdiff
path: root/main/bridge.c
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2013-10-22 17:06:21 +0000
committerRichard Mudgett <rmudgett@digium.com>2013-10-22 17:06:21 +0000
commitd5db1f76f84f485bb0854b1ed986a04edf72e4c6 (patch)
tree4416c04acc96e89325c994a07965d4abf3e3327e /main/bridge.c
parent8f03a463e1e04384fc8d5609d318566de2c7437b (diff)
Bridging: Fix orphaned bridge if neither of the joining channels can join.
The original issue noted that the bridge is orphaned when res_parking.so is not loaded and a call uses the dial kK flags. A similar issue happens when only one of the park flags is used. In this case you have the bridge with one or the other channel left in it. The channel and bridge will stay around until the channel hangs up. * Fixed the initial bridge channel push failure to act as if the channel were kicked out of the bridge. The bridge then decides if it needs to be dissolved. (closes issue ASTERISK-22629) Reported by: Kevin Harwell Review: https://reviewboard.asterisk.org/r/2928/ ........ Merged revisions 401424 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@401425 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/bridge.c')
-rw-r--r--main/bridge.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/main/bridge.c b/main/bridge.c
index feeb564d4..a7b61847d 100644
--- a/main/bridge.c
+++ b/main/bridge.c
@@ -1791,6 +1791,8 @@ void bridge_do_merge(struct ast_bridge *dst_bridge, struct ast_bridge *src_bridg
bridge_channel_change_bridge(bridge_channel, dst_bridge);
if (bridge_channel_internal_push(bridge_channel)) {
+ ast_bridge_features_remove(bridge_channel->features,
+ AST_BRIDGE_HOOK_REMOVE_ON_PULL);
ast_bridge_channel_leave_bridge(bridge_channel,
BRIDGE_CHANNEL_STATE_END_NO_DISSOLVE, bridge_channel->bridge->cause);
}
@@ -2036,11 +2038,15 @@ int bridge_do_move(struct ast_bridge *dst_bridge, struct ast_bridge_channel *bri
if (bridge_channel_internal_push(bridge_channel)) {
/* Try to put the channel back into the original bridge. */
+ ast_bridge_features_remove(bridge_channel->features,
+ AST_BRIDGE_HOOK_REMOVE_ON_PULL);
if (attempt_recovery && was_in_bridge) {
/* Point back to original bridge. */
bridge_channel_change_bridge(bridge_channel, orig_bridge);
if (bridge_channel_internal_push(bridge_channel)) {
+ ast_bridge_features_remove(bridge_channel->features,
+ AST_BRIDGE_HOOK_REMOVE_ON_PULL);
ast_bridge_channel_leave_bridge(bridge_channel,
BRIDGE_CHANNEL_STATE_END_NO_DISSOLVE, bridge_channel->bridge->cause);
bridge_channel_settle_owed_events(orig_bridge, bridge_channel);