summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2007-05-09 19:24:27 +0000
committerJoshua Colp <jcolp@digium.com>2007-05-09 19:24:27 +0000
commit9427cf5dd67df8d6fca2f270baf066cbc8b2be94 (patch)
tree2ebe06b7b91a5a63e87de10144c821925f7c2859 /main
parent56254ee49148abcaed6c01f0a84f6952d693a588 (diff)
Merged revisions 63698 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r63698 | file | 2007-05-09 15:22:39 -0400 (Wed, 09 May 2007) | 2 lines Use the DTMF frame on the channel when returning a DTMF frame from AST_FRAME_NULL or AST_FRAME_VOICE. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@63699 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
-rw-r--r--main/channel.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/main/channel.c b/main/channel.c
index 17b85a20d..dd3a5c7e1 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -2292,6 +2292,8 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio)
struct timeval now = ast_tvnow();
if (ast_tvdiff_ms(now, chan->dtmf_tv) >= chan->emulate_dtmf_duration) {
chan->emulate_dtmf_duration = 0;
+ ast_frfree(f);
+ f = &chan->dtmff;
f->frametype = AST_FRAME_DTMF_END;
f->subclass = chan->emulate_dtmf_digit;
f->len = ast_tvdiff_ms(now, chan->dtmf_tv);
@@ -2318,6 +2320,8 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio)
struct timeval now = ast_tvnow();
if (ast_tvdiff_ms(now, chan->dtmf_tv) >= chan->emulate_dtmf_duration) {
chan->emulate_dtmf_duration = 0;
+ ast_frfree(f);
+ f = &chan->dtmff;
f->frametype = AST_FRAME_DTMF_END;
f->subclass = chan->emulate_dtmf_digit;
f->len = ast_tvdiff_ms(now, chan->dtmf_tv);