[Asterisk-cvs] asterisk/res res_agi.c,1.50,1.51
kpfleming
kpfleming
Tue Oct 4 18:39:56 CDT 2005
Update of /usr/cvsroot/asterisk/res
In directory mongoose.digium.com:/tmp/cvs-serv1388/res
Modified Files:
res_agi.c
Log Message:
truncate last 200ms of DTMF-terminated recording to eliminate inband DTMF (issue #5383)
Index: res_agi.c
===================================================================
RCS file: /usr/cvsroot/asterisk/res/res_agi.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- res_agi.c 14 Sep 2005 20:46:50 -0000 1.50
+++ res_agi.c 4 Oct 2005 22:35:43 -0000 1.51
@@ -962,7 +962,11 @@
switch(f->frametype) {
case AST_FRAME_DTMF:
if (strchr(argv[4], f->subclass)) {
- /* This is an interrupting chracter */
+ /* This is an interrupting chracter, so rewind to chop off any small
+ amount of DTMF that may have been recorded
+ */
+ ast_stream_rewind(fs, 200);
+ ast_truncstream(fs);
sample_offset = ast_tellstream(fs);
fdprintf(agi->fd, "200 result=%d (dtmf) endpos=%ld\n", f->subclass, sample_offset);
ast_closestream(fs);
More information about the svn-commits
mailing list