aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-26 23:19:04 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-26 23:19:04 +0000
commitdea98af79e00a6dfd5715d7876d9c0b2e7a7bb63 (patch)
tree4cd61c72f6100cf5bd4016768eebf42895a855d0 /main
parentaaf380bdb22566efd5caa1aded9b21e9f6735f66 (diff)
(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/branches/1.4@77460 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/channel.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/main/channel.c b/main/channel.c
index 735c82475..7a5ca91dc 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -2373,9 +2373,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;