diff options
author | Russell Bryant <russell@russellbryant.com> | 2009-04-01 13:48:26 +0000 |
---|---|---|
committer | Russell Bryant <russell@russellbryant.com> | 2009-04-01 13:48:26 +0000 |
commit | 083e57a5e5299ab53287237e6658b0110f4b5fbd (patch) | |
tree | d4aa563f9259b015a606c0299a3fe8a6ff362ef5 /main | |
parent | 1dda5f7c80111446d590949e5fd6436eb99293e8 (diff) |
Merged revisions 185771 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r185771 | russell | 2009-04-01 08:47:30 -0500 (Wed, 01 Apr 2009) | 6 lines
Fix a case where DTMF could bypass audiohooks.
This change fixes a situation where an audiohook that wants DTMF would not
actually get it. This is in the code path where we end DTMF digit length
emulation while handling a NULL frame.
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@185772 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
-rw-r--r-- | main/channel.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/main/channel.c b/main/channel.c index c51747c96..b492f5113 100644 --- a/main/channel.c +++ b/main/channel.c @@ -2828,6 +2828,13 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio) ast_clear_flag(chan, AST_FLAG_EMULATE_DTMF); chan->emulate_dtmf_digit = 0; ast_log(LOG_DTMF, "DTMF end emulation of '%c' queued on %s\n", f->subclass, chan->name); + if (chan->audiohooks) { + struct ast_frame *old_frame = f; + f = ast_audiohook_write_list(chan, chan->audiohooks, AST_AUDIOHOOK_DIRECTION_READ, f); + if (old_frame != f) { + ast_frfree(old_frame); + } + } } } break; |