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