[asterisk-commits] russell: branch group/vldtmf r39502 - in
/team/group/vldtmf: ./ res/
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Wed Aug 9 22:46:52 MST 2006
Author: russell
Date: Thu Aug 10 00:46:52 2006
New Revision: 39502
URL: http://svn.digium.com/view/asterisk?rev=39502&view=rev
Log:
when monitoring DTMF on a bridged call, make sure res_features receives and
eats BEGIN frames so that a BEGIN isn't passed for a digit that will actually
not be passed across because it is activating a feature, or when res_features
releases it's queue of digits, there aren't duplicated BEGIN frames received
by the bridged channel.
Modified:
team/group/vldtmf/channel.c
team/group/vldtmf/res/res_features.c
Modified: team/group/vldtmf/channel.c
URL: http://svn.digium.com/view/asterisk/team/group/vldtmf/channel.c?rev=39502&r1=39501&r2=39502&view=diff
==============================================================================
--- team/group/vldtmf/channel.c (original)
+++ team/group/vldtmf/channel.c Thu Aug 10 00:46:52 2006
@@ -3534,10 +3534,14 @@
/* monitored dtmf causes exit from bridge */
int monitored_source = (who == c0) ? watch_c0_dtmf : watch_c1_dtmf;
- if (f->frametype == AST_FRAME_DTMF && monitored_source) {
+ if (monitored_source &&
+ (f->frametype == AST_FRAME_DTMF_END ||
+ f->frametype == AST_FRAME_DTMF_BEGIN)) {
*fo = f;
*rc = who;
- ast_log(LOG_DEBUG, "Got DTMF on channel (%s)\n", who->name);
+ ast_log(LOG_DEBUG, "Got DTMF %s on channel (%s)\n",
+ f->frametype == AST_FRAME_DTMF_END ? "end" : "begin",
+ who->name);
break;
}
/* Write immediately frames, not passed through jb */
Modified: team/group/vldtmf/res/res_features.c
URL: http://svn.digium.com/view/asterisk/team/group/vldtmf/res/res_features.c?rev=39502&r1=39501&r2=39502&view=diff
==============================================================================
--- team/group/vldtmf/res/res_features.c (original)
+++ team/group/vldtmf/res/res_features.c Thu Aug 10 00:46:52 2006
@@ -1416,9 +1416,9 @@
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);
}
- }
- /* check for '*', if we find it it's time to disconnect */
- if (f->frametype == AST_FRAME_DTMF) {
+ } else if (f->frametype == AST_FRAME_DTMF_BEGIN) {
+ /* eat it */
+ } else if (f->frametype == AST_FRAME_DTMF) {
char *featurecode;
int sense;
More information about the asterisk-commits
mailing list