Work around processing of fast sequence of events (overlapped receiving of called party number)

This commit is contained in:
MelwareDE 2011-04-21 21:04:29 +00:00
parent f0c37c2067
commit 4411cbc18c
1 changed files with 20 additions and 3 deletions

View File

@ -1969,11 +1969,28 @@ static struct ast_frame *pbx_capi_read(struct ast_channel *c)
f = capi_read_pipeframe(i); f = capi_read_pipeframe(i);
if ((f) && (f->frametype == AST_FRAME_VOICE) && (f->datalen > 0)) { if (f != NULL) {
if ((i->doDTMF > 0) && (i->vad != NULL) ) { if (f->frametype == AST_FRAME_VOICE) {
f = ast_dsp_process(c, i->vad, f); if ((f->datalen > 0) && (i->doDTMF > 0) && (i->vad != NULL)) {
f = ast_dsp_process(c, i->vad, f);
}
#if 0
} else if (f->frametype == AST_FRAME_DTMF) {
/* Work around problem with recognition of fast sequences of events,
* see main/channel.c for details
*/
if (!(ast_test_flag(c, AST_FLAG_END_DTMF_ONLY) ||
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);
if (!f->len)
f->len = 100;
}
#endif
} }
} }
return f; return f;
} }