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

Christopher Rienzo cmrienzo at gmail.com
Sat Mar 12 02:31:41 MSK 2011


Trim some of the audio off the end of the file after the recording is done.



On Fri, Mar 11, 2011 at 5:19 PM, Matt Stockton <mstockton at harqen.com> wrote:

> 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
>
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110311/5fc81ccb/attachment.html 


More information about the FreeSWITCH-users mailing list