[Freeswitch-users] session:record / prevent DTMF tones from being recorded

Matt Stockton mstockton at harqen.com
Sat Mar 12 01:19:46 MSK 2011


Hi all,

I have a freeswitch lua script that is recording and I want the recording to
be terminated when the user presses the '#' key. That is all working fine
for me, but the recording always has the DTMF tone at the end of it.

I am wondering, is there a way to instruct freeswitch to not record the DTMF
tones? Any help is appreciated. For reference, here are some excerpts from
my lua script:

function inputHook(s, type, obj)

  freeswitch.consoleLog("INFO", "On input");

  if (inRecording and type == "dtmf" and obj['digit'] == '#') then

      inRecording = false;

      return "break";

  end

end

.....

session:setInputCallback("inputHook", "");

.....

session:recordFile(recordFilePath, 202, 500, 25);


Thanks in advance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110311/4a20e5d5/attachment-0001.html 


More information about the FreeSWITCH-users mailing list