summaryrefslogtreecommitdiff
path: root/bridges
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2013-08-22 21:09:52 +0000
committerRichard Mudgett <rmudgett@digium.com>2013-08-22 21:09:52 +0000
commit477dea46616c0a6b79706f10349aaf9a87832e0e (patch)
tree50244a0102181406d83928d23e0ce45ff64169cf /bridges
parent24683444ac07743e202c6f6cae0364ee4057df4c (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 'bridges')
-rw-r--r--bridges/bridge_builtin_features.c4
-rw-r--r--bridges/bridge_builtin_interval_features.c8
2 files changed, 8 insertions, 4 deletions
diff --git a/bridges/bridge_builtin_features.c b/bridges/bridge_builtin_features.c
index c22b83548..ee4a69682 100644
--- a/bridges/bridge_builtin_features.c
+++ b/bridges/bridge_builtin_features.c
@@ -53,6 +53,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/monitor.h"
#include "asterisk/mixmonitor.h"
#include "asterisk/audiohook.h"
+#include "asterisk/causes.h"
enum set_touch_variables_res {
SET_TOUCH_SUCCESS,
@@ -487,7 +488,8 @@ static int feature_hangup(struct ast_bridge_channel *bridge_channel, void *hook_
* bridge_channel to force the channel out of the bridge and the
* core takes care of the rest.
*/
- ast_bridge_channel_leave_bridge(bridge_channel, BRIDGE_CHANNEL_STATE_END);
+ ast_bridge_channel_leave_bridge(bridge_channel, BRIDGE_CHANNEL_STATE_END,
+ AST_CAUSE_NORMAL_CLEARING);
return 0;
}
diff --git a/bridges/bridge_builtin_interval_features.c b/bridges/bridge_builtin_interval_features.c
index edaddf3ea..e804729bf 100644
--- a/bridges/bridge_builtin_interval_features.c
+++ b/bridges/bridge_builtin_interval_features.c
@@ -45,10 +45,10 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/app.h"
#include "asterisk/astobj2.h"
#include "asterisk/test.h"
-
#include "asterisk/say.h"
#include "asterisk/stringfields.h"
#include "asterisk/musiconhold.h"
+#include "asterisk/causes.h"
static int bridge_features_duration_callback(struct ast_bridge_channel *bridge_channel, void *hook_pvt)
{
@@ -58,9 +58,11 @@ static int bridge_features_duration_callback(struct ast_bridge_channel *bridge_c
ast_stream_and_wait(bridge_channel->chan, limits->duration_sound, AST_DIGIT_NONE);
}
- ast_bridge_channel_leave_bridge(bridge_channel, BRIDGE_CHANNEL_STATE_END);
+ ast_bridge_channel_leave_bridge(bridge_channel, BRIDGE_CHANNEL_STATE_END,
+ AST_CAUSE_NORMAL_CLEARING);
- ast_test_suite_event_notify("BRIDGE_TIMELIMIT", "Channel1: %s", ast_channel_name(bridge_channel->chan));
+ ast_test_suite_event_notify("BRIDGE_TIMELIMIT", "Channel1: %s",
+ ast_channel_name(bridge_channel->chan));
return -1;
}