diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-03-03 15:30:29 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-03-03 15:30:29 +0000 |
commit | ae272b289b59fb4b9982fe13be05fb74676019f9 (patch) | |
tree | 30fe6b47673042ee2b2623c843f159319b2d7f9e /main | |
parent | 3f509574c3c0cf309aa5fe98929a72509db81941 (diff) |
Merged revisions 105560 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r105560 | file | 2008-03-03 11:28:59 -0400 (Mon, 03 Mar 2008) | 7 lines
It is possible for no audio to pass between the current digit and next digit so expand logic that clears emulation to AST_FRAME_NULL.
(closes issue #11911)
Reported by: edgreenberg
Patches:
v1-11911.patch uploaded by dimas (license 88)
Tested by: tbsky
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@105561 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r-- | main/channel.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/main/channel.c b/main/channel.c index ecebc7062..a7e158d32 100644 --- a/main/channel.c +++ b/main/channel.c @@ -2537,9 +2537,16 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio) } break; case AST_FRAME_NULL: + /* The EMULATE_DTMF flag must be cleared here as opposed to when the duration + * is reached , because we want to make sure we pass at least one + * voice frame through before starting the next digit, to ensure a gap + * between DTMF digits. */ if (ast_test_flag(chan, AST_FLAG_EMULATE_DTMF)) { struct timeval now = ast_tvnow(); - if (ast_tvdiff_ms(now, chan->dtmf_tv) >= chan->emulate_dtmf_duration) { + if (!chan->emulate_dtmf_duration) { + ast_clear_flag(chan, AST_FLAG_EMULATE_DTMF); + chan->emulate_dtmf_digit = 0; + } else if (ast_tvdiff_ms(now, chan->dtmf_tv) >= chan->emulate_dtmf_duration) { chan->emulate_dtmf_duration = 0; ast_frfree(f); f = &chan->dtmff; |