aboutsummaryrefslogtreecommitdiffstats
path: root/main/channel.c
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-05-09 19:22:39 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-05-09 19:22:39 +0000
commitc3c753c6ff0c7d86c0b854936b6bfac18eb2bf14 (patch)
tree98989375d73889cf445150a703732d36a26797ec /main/channel.c
parent71bc1f628ddbe7a1c09a83e656c8ae8b95055120 (diff)
Use the DTMF frame on the channel when returning a DTMF frame from AST_FRAME_NULL or AST_FRAME_VOICE.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@63698 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/channel.c')
-rw-r--r--main/channel.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/main/channel.c b/main/channel.c
index ac258dd34..b6e62deb8 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -2332,6 +2332,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);
@@ -2358,6 +2360,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);