summaryrefslogtreecommitdiff
path: root/channels/chan_misdn.c
diff options
context:
space:
mode:
authorKinsey Moore <kmoore@digium.com>2012-06-19 21:13:41 +0000
committerKinsey Moore <kmoore@digium.com>2012-06-19 21:13:41 +0000
commitf080be134edec9e9fd7dc9175170db6fd946a010 (patch)
tree3531d5107d293d97ba5ef1e9dd955e4f63fbdc86 /channels/chan_misdn.c
parent91157d5c2bdbc9eb44b799fde0df0841a34bfa4c (diff)
Ensure that pvt cause information does not break native bridging
Channel drivers that allow native bridging need to handle AST_CONTROL_PVT_CAUSE_CODE frames and previously did not handle them properly, usually breaking out of the native bridge. This change corrects that behavior and exposes the available cause code information to the dialplan while native bridges are in place. This required exposing the HANGUPCAUSE hash setter outside of channel.c, so additional documentation has been added. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369086 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_misdn.c')
-rw-r--r--channels/chan_misdn.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/channels/chan_misdn.c b/channels/chan_misdn.c
index ffae020f8..b81d7ca5a 100644
--- a/channels/chan_misdn.c
+++ b/channels/chan_misdn.c
@@ -7583,7 +7583,7 @@ static enum ast_bridge_result misdn_bridge(struct ast_channel *c0,
}
f = ast_read(who);
- if (!f || f->frametype == AST_FRAME_CONTROL) {
+ if (!f || (f->frametype == AST_FRAME_CONTROL && f->subtype.integer != AST_CONTROL_PVT_CAUSE_CODE)) {
/* got hangup .. */
if (!f) {
@@ -7613,7 +7613,11 @@ static enum ast_bridge_result misdn_bridge(struct ast_channel *c0,
}
#endif
- ast_write((who == c0) ? c1 : c0, f);
+ if (f->frametype == AST_FRAME_CONTROL && f->subclass.integer == AST_CONTROL_PVT_CAUSE_CODE) {
+ ast_channel_hangupcause_hash_set((who == c0) ? c1 : c0, f->data.ptr);
+ } else {
+ ast_write((who == c0) ? c1 : c0, f);
+ }
}
chan_misdn_log(1, ch1->bc->port, "I SEND: Splitting conference with Number:%d\n", ch1->bc->pid + 1);