[Asterisk-Dev] background festival
Mark Spencer
markster at digium.com
Fri Jun 13 00:06:38 MST 2003
> I am not sure where to start modifying so that the dtmf packets are
> actually passed on to the extension matcher as happens in background, since
> those calls deal with a filename and the festival ones deal with a file
> descriptor that is already open.
Actually it would be very easy. If you get back a DTMF frame while
playing audio, simply return the value of the DTMF frame, something like
this...
while(playing audio and not hungup yet) {
res = ast_waitfor(chan, how long i need to wait);
.
.
f = ast_read(chan);
if (!f) { res = -1; break; }
if ((f->frametype == AST_FRAME_DTMF))
return f->subclass;
}
Mark
More information about the asterisk-dev
mailing list