[Freeswitch-dev] Issue with in-band DTMF when using session:recordFile

Daniel Casanova casanova at brastel.co.jp
Thu Mar 24 14:43:15 MSK 2011

I'm using Mod lua's session:recordFile to record audio to a file, but
when working with in-band DTMF, the digit I set to stop the recording
not only stops it but its tone is also recorded in the audio file (as
a result, all my recorded files end having a beep sound at the end of
the file).

I tried the following code from  http://wiki.freeswitch.org and it
only happens when working with in-band DTMF. When working with RFC
2833 there are no beeping at all.

function onInput(s, type, obj)
   if (type == "dtmf" and obj['digit'] == '#') then
       return "break";

session:setInputCallback("onInput", "");
session:recordFile("/tmp/blah.wav", 30000, 10, 10); -- pressing # ends
the recording

Any help would be greatly appreciated.



More information about the FreeSWITCH-dev mailing list