aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-05 20:50:08 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-05 20:50:08 +0000
commit6d7866df5928cc9a412c8bf71bc8f5d8e6f39ff4 (patch)
tree2fc6e5973b3c4bbfde20aaafb330f0bfe0c20794 /res
parenta8fb68c1cc4946f3d953b11953c079f3df782899 (diff)
Pass HOLD and UNHOLD frames to the other channel when they are returned from a
native bridge function. This fixes a problem where when two zap channels are natively bridged and one does a flash hook, the other channel did not receive music on hold. (Reported to me directly by Doug Bailey at Digium) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@73512 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r--res/res_features.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/res/res_features.c b/res/res_features.c
index a4d3e9cef..1d616657f 100644
--- a/res/res_features.c
+++ b/res/res_features.c
@@ -1470,17 +1470,24 @@ int ast_bridge_call(struct ast_channel *chan,struct ast_channel *peer,struct ast
/* many things should be sent to the 'other' channel */
other = (who == chan) ? peer : chan;
if (f->frametype == AST_FRAME_CONTROL) {
- if (f->subclass == AST_CONTROL_RINGING)
- ast_indicate(other, AST_CONTROL_RINGING);
- else if (f->subclass == -1)
- ast_indicate(other, -1);
- else if (f->subclass == AST_CONTROL_FLASH)
- ast_indicate(other, AST_CONTROL_FLASH);
- else if (f->subclass == AST_CONTROL_OPTION) {
+ switch (f->subclass) {
+ case AST_CONTROL_RINGING:
+ case AST_CONTROL_FLASH:
+ case -1:
+ ast_indicate(other, f->subclass);
+ break;
+ case AST_CONTROL_HOLD:
+ case AST_CONTROL_UNHOLD:
+ ast_indicate_data(other, f->subclass, f->data, f->datalen);
+ break;
+ case AST_CONTROL_OPTION:
aoh = f->data;
/* Forward option Requests */
- if (aoh && aoh->flag == AST_OPTION_FLAG_REQUEST)
- ast_channel_setoption(other, ntohs(aoh->option), aoh->data, f->datalen - sizeof(struct ast_option_header), 0);
+ if (aoh && aoh->flag == AST_OPTION_FLAG_REQUEST) {
+ ast_channel_setoption(other, ntohs(aoh->option), aoh->data,
+ f->datalen - sizeof(struct ast_option_header), 0);
+ }
+ break;
}
} else if (f->frametype == AST_FRAME_DTMF_BEGIN) {
/* eat it */