diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-04-01 13:50:36 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-04-01 13:50:36 +0000 |
commit | da7bb796b38093b916f29a6d6d2157c2343d5d0d (patch) | |
tree | 4612e020fb22250b705e79efdd200a224765879c /main/channel.c | |
parent | 9f3bd57c9d1921039344326d43e99f23666eec8e (diff) |
Merged revisions 185772 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r185772 | russell | 2009-04-01 08:48:26 -0500 (Wed, 01 Apr 2009) | 14 lines
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: http://svn.digium.com/svn/asterisk/branches/1.6.1@185774 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/channel.c')
-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 4b056766c..af5fe052f 100644 --- a/main/channel.c +++ b/main/channel.c @@ -2801,6 +2801,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; |