diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-07-26 23:20:25 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-07-26 23:20:25 +0000 |
commit | 08f2930c10aa1c31084ab86838155d01ec281671 (patch) | |
tree | e0a76d4f126541ea35b52264c445f6c922b135fa | |
parent | 563ed941de82284202fe6129c73b2bbc75326587 (diff) |
Merged revisions 77460 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r77460 | file | 2007-07-26 20:19:04 -0300 (Thu, 26 Jul 2007) | 4 lines
(closes issue #10302)
Reported by: litnialex
If a DTMF end frame comes from a channel without a begin and it is going to a technology that only accepts end frames (aka INFO) then use the minimum DTMF duration if one is not in the frame already.
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@77461 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | main/channel.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/main/channel.c b/main/channel.c index bc47e0a60..c1b3b88ba 100644 --- a/main/channel.c +++ b/main/channel.c @@ -2302,9 +2302,12 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio) } } else { struct timeval now = ast_tvnow(); - ast_clear_flag(chan, AST_FLAG_IN_DTMF); - if (!f->len) - f->len = ast_tvdiff_ms(now, chan->dtmf_tv); + if (ast_test_flag(chan, AST_FLAG_IN_DTMF)) { + ast_clear_flag(chan, AST_FLAG_IN_DTMF); + if (!f->len) + f->len = ast_tvdiff_ms(now, chan->dtmf_tv); + } else if (!f->len) + f->len = AST_MIN_DTMF_DURATION; if (f->len < AST_MIN_DTMF_DURATION) { ast_set_flag(chan, AST_FLAG_EMULATE_DTMF); chan->emulate_dtmf_digit = f->subclass; |