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

master
MelwareDE 12 years ago
parent f0c37c2067
commit 4411cbc18c
  1. 23
      chan_capi.c

@ -1969,11 +1969,28 @@ static struct ast_frame *pbx_capi_read(struct ast_channel *c)
f = capi_read_pipeframe(i);
if ((f) && (f->frametype == AST_FRAME_VOICE) && (f->datalen > 0)) {
if ((i->doDTMF > 0) && (i->vad != NULL) ) {
f = ast_dsp_process(c, i->vad, f);
if (f != NULL) {
if (f->frametype == AST_FRAME_VOICE) {
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;
}

Loading…
Cancel
Save