diff options
author | Richard Mudgett <rmudgett@digium.com> | 2013-08-22 21:09:52 +0000 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2013-08-22 21:09:52 +0000 |
commit | 477dea46616c0a6b79706f10349aaf9a87832e0e (patch) | |
tree | 50244a0102181406d83928d23e0ce45ff64169cf /main/features.c | |
parent | 24683444ac07743e202c6f6cae0364ee4057df4c (diff) |
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
Diffstat (limited to 'main/features.c')
-rw-r--r-- | main/features.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/main/features.c b/main/features.c index f3e2f0fb1..32fccf7a6 100644 --- a/main/features.c +++ b/main/features.c @@ -676,7 +676,7 @@ int ast_bridge_call_with_flags(struct ast_channel *chan, struct ast_channel *pee /* Put peer into the bridge */ if (ast_bridge_impart(bridge, peer, NULL, peer_features, 1)) { - ast_bridge_destroy(bridge); + ast_bridge_destroy(bridge, 0); ast_bridge_features_cleanup(&chan_features); bridge_failed_peer_goto(chan, peer); return -1; @@ -829,7 +829,7 @@ static int action_bridge(struct mansession *s, const struct message *m) if (ast_bridge_add_channel(bridge, chana, NULL, playtone & PLAYTONE_CHANNEL1, xfer_cfg_a ? xfer_cfg_a->xfersound : NULL)) { snprintf(buf, sizeof(buf), "Unable to add Channel1 to bridge: %s", ast_channel_name(chana)); astman_send_error(s, m, buf); - ast_bridge_destroy(bridge); + ast_bridge_destroy(bridge, 0); return 0; } @@ -837,7 +837,7 @@ static int action_bridge(struct mansession *s, const struct message *m) if (ast_bridge_add_channel(bridge, chanb, NULL, playtone & PLAYTONE_CHANNEL2, xfer_cfg_b ? xfer_cfg_b->xfersound : NULL)) { snprintf(buf, sizeof(buf), "Unable to add Channel2 to bridge: %s", ast_channel_name(chanb)); astman_send_error(s, m, buf); - ast_bridge_destroy(bridge); + ast_bridge_destroy(bridge, 0); return 0; } @@ -1125,7 +1125,7 @@ static int bridge_exec(struct ast_channel *chan, const char *data) ast_test_flag(&opts, BRIDGE_OPT_PLAYTONE), xfer_cfg ? xfer_cfg->xfersound : NULL)) { ast_bridge_features_destroy(peer_features); ast_bridge_features_cleanup(&chan_features); - ast_bridge_destroy(bridge); + ast_bridge_destroy(bridge, 0); goto done; } |