[asterisk-commits] russell: branch group/vldtmf r40520 -
/team/group/vldtmf/channel.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sat Aug 19 08:52:04 MST 2006
Author: russell
Date: Sat Aug 19 10:52:04 2006
New Revision: 40520
URL: http://svn.digium.com/view/asterisk?rev=40520&view=rev
Log:
if DEFER_DTMF is turned on for a channel, have ast_read() eat incoming
DTMF_BEGIN frames, because incoming DTMF_END frames are going to be queued on
the channel until DEFER is turned off. Also, the case where DEFER gets turned
off between the BEGIN and END is already happily handled. The END will be seen
as an END without a BEGIN, and the length of the digit will be emulated.
Modified:
team/group/vldtmf/channel.c
Modified: team/group/vldtmf/channel.c
URL: http://svn.digium.com/view/asterisk/team/group/vldtmf/channel.c?rev=40520&r1=40519&r2=40520&view=diff
==============================================================================
--- team/group/vldtmf/channel.c (original)
+++ team/group/vldtmf/channel.c Sat Aug 19 10:52:04 2006
@@ -2062,7 +2062,11 @@
break;
case AST_FRAME_DTMF_BEGIN:
ast_log(LOG_DTMF, "DTMF begin '%c' received on %s\n", f->subclass, chan->name);
- ast_set_flag(chan, AST_FLAG_IN_DTMF);
+ if (ast_test_flag(chan, AST_FLAG_DEFER_DTMF)) {
+ ast_frfree(f);
+ f = &ast_null_frame;
+ } else
+ ast_set_flag(chan, AST_FLAG_IN_DTMF);
break;
case AST_FRAME_VOICE:
/* The EMULATE_DTMF flag must be cleared here as opposed to when the samples
More information about the asterisk-commits
mailing list