diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-10-04 22:35:43 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-10-04 22:35:43 +0000 |
commit | e9f2397173028076b028bc9043dc78a68be350f0 (patch) | |
tree | 11cf6f1d62f70f11687f6201efa57f3e52aacb11 /res | |
parent | 716df588dee70ce62098d62ace645faebbdb43ef (diff) |
truncate last 200ms of DTMF-terminated recording to eliminate inband DTMF (issue #5383)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6717 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rwxr-xr-x | res/res_agi.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/res/res_agi.c b/res/res_agi.c index c13eab760..5645b79cb 100755 --- a/res/res_agi.c +++ b/res/res_agi.c @@ -962,7 +962,11 @@ static int handle_recordfile(struct ast_channel *chan, AGI *agi, int argc, char 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); |