From 43e2232a0e8d899aba15da62e4aa5c5b92f76be1 Mon Sep 17 00:00:00 2001 From: MelwareDE Date: Fri, 29 Apr 2011 09:44:26 +0000 Subject: [PATCH] Activate work around for processing fast sequences of CPN/DTMF/KEY events. Please see main/channel.c (call to tech->read or tech.read and processing of DTMF frames). --- chan_capi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chan_capi.c b/chan_capi.c index e271a9b..2561a11 100644 --- a/chan_capi.c +++ b/chan_capi.c @@ -1974,7 +1974,7 @@ static struct ast_frame *pbx_capi_read(struct ast_channel *c) if ((f->datalen > 0) && (i->doDTMF > 0) && (i->vad != NULL)) { f = ast_dsp_process(c, i->vad, f); } -#if 0 +#ifdef CC_AST_HAS_VERSION_1_4 } else if (f->frametype == AST_FRAME_DTMF) { /* Work around problem with recognition of fast sequences of events, * see main/channel.c for details @@ -1983,7 +1983,7 @@ static struct ast_frame *pbx_capi_read(struct ast_channel *c) ast_test_flag(c, AST_FLAG_EMULATE_DTMF) || ast_test_flag(c, AST_FLAG_IN_DTMF))) { ast_set_flag(c, AST_FLAG_IN_DTMF); - c->dtmf_tv = ast_tv(0,0); + c->dtmf_tv = ast_tvsub(ast_tvnow(),ast_tv(0,250*1000)); if (!f->len) f->len = 100; }