[Freeswitch-users] session.steamFile misses DTMF event for first few seconds

Frank @ Impact frank at impactfax.com
Mon Apr 26 05:45:30 PDT 2010


I recently upgraded from FS 12790M to svn 17188.  When I did, I noticed
that session.streamFile behaved differently and I started having
problems with my IVR app.  
 
With the upgraded FS, I have a problem with streamFile no firing on the
DTMF and calling the callback function for the first few seconds of the
wav file playback.  It behaves as though it does not hear the DTMFs.  If
I wait for 2 seconds or so of the wav file and then DTMF, streamFile
catches the DTMF and all is well.  If I key as soon as I hear the wav
file start, streamFile just keeps playing the wav and does not call the
callback function.
 
When I revert back to the previous version of FS, streamFile always
fires the callback right away no matter how quickly I press the first
DTMF as the wav file starts to stream out.
 
The wave file is RIFF (little-endian) data, WAVE audio, Microsoft PCM,
16 bit, mono 8000 Hz
 
The snippet of js code I am using is as follows.
 
if(session.ready()) {
    session.answer();
    session.sleep(750);
    while(session.ready()) {
        session.sleep(500);
        session.flushDigits(); // clear out input buffers

 
if((pin=session.streamFile(snd_prefix+"/enter-acct-numbers.wav",onlyDigi
ts_cb,""))===false) {
            pin=session.getDigits(pinmax,pinterm,pinwait);
        } else {
            pin+=session.getDigits(pinmax-1,pinterm,pinwait);
        }
        // more code here..
    }
 
Do I need to change the way I use streamFile in the later release?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20100426/ced040a3/attachment.html 


More information about the FreeSWITCH-users mailing list