Bridge API: Set a cause code on a channel when it is ejected from a bridge.

The cause code needs to be passed from the disconnecting channel to the
bridge peers if the disconnecting channel dissolves the bridge.

* Made the call to an app_agent_pool agent disconnect with the busy cause
code if the agent does not ack the call in time or hangs up before acking
the call.

(closes issue ASTERISK-22042)
Reported by: Matt Jordan

Review: https://reviewboard.asterisk.org/r/2772/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397472 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Richard Mudgett
2013-08-22 21:09:52 +00:00
parent 24683444ac
commit 477dea4661
17 changed files with 184 additions and 112 deletions

View File

@@ -299,7 +299,8 @@ static int basic_hangup_hook(struct ast_bridge_channel *bridge_channel, void *ho
}
if (2 <= bridge_count) {
/* Just allow this channel to leave the multi-party bridge. */
ast_bridge_channel_leave_bridge(bridge_channel, BRIDGE_CHANNEL_STATE_END_NO_DISSOLVE);
ast_bridge_channel_leave_bridge(bridge_channel,
BRIDGE_CHANNEL_STATE_END_NO_DISSOLVE, 0);
}
ast_bridge_unlock(bridge_channel->bridge);
return 0;
@@ -1488,7 +1489,7 @@ static void attended_transfer_properties_shutdown(struct attended_transfer_prope
}
if (props->target_bridge) {
ast_bridge_destroy(props->target_bridge);
ast_bridge_destroy(props->target_bridge, 0);
props->target_bridge = NULL;
}
@@ -2454,7 +2455,7 @@ static enum attended_transfer_state wait_to_recall_exit(struct attended_transfer
static int fail_enter(struct attended_transfer_properties *props)
{
if (props->transferee_bridge) {
ast_bridge_destroy(props->transferee_bridge);
ast_bridge_destroy(props->transferee_bridge, 0);
props->transferee_bridge = NULL;
}
return 0;