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
This commit is contained in:
Kinsey Moore
2012-06-19 21:13:41 +00:00
parent 91157d5c2b
commit f080be134e
6 changed files with 36 additions and 17 deletions

View File

@@ -933,7 +933,7 @@ static enum ast_bridge_result local_bridge_loop(struct ast_channel *c0, struct a
}
ast_frfree(fr);
} else if (fr->subclass.integer == AST_CONTROL_PVT_CAUSE_CODE) {
ast_indicate_data(other, fr->subclass.integer, fr->data.ptr, fr->datalen);
ast_channel_hangupcause_hash_set(other, fr->data.ptr);
ast_frfree(fr);
} else {
*fo = fr;
@@ -1227,7 +1227,7 @@ static enum ast_bridge_result remote_bridge_loop(struct ast_channel *c0,
}
ast_frfree(fr);
} else if (fr->subclass.integer == AST_CONTROL_PVT_CAUSE_CODE) {
ast_indicate_data(other, fr->subclass.integer, fr->data.ptr, fr->datalen);
ast_channel_hangupcause_hash_set(other, fr->data.ptr);
ast_frfree(fr);
} else {
*fo = fr;