diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-07-05 20:51:08 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-07-05 20:51:08 +0000 |
commit | 2a355b23db091f048de6edfbd138f051fde4cc89 (patch) | |
tree | 7fb1ea739080f77b11186b8e9cdd74ba654cb141 /res | |
parent | c1b9d9c92bccead351e87261305cc817e92ee58b (diff) |
Merged revisions 73512 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r73512 | russell | 2007-07-05 15:50:08 -0500 (Thu, 05 Jul 2007) | 5 lines
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/trunk@73513 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r-- | res/res_features.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/res/res_features.c b/res/res_features.c index 629fea3fb..213fdbe05 100644 --- a/res/res_features.c +++ b/res/res_features.c @@ -1749,17 +1749,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 */ |