Re: [Freeswitch-users] Ending recordFile with a touchtone in Python
I sent this email this morning but it didn't seem to make it through, so I'm sending it again. My appologies if it eventually becomes a duplicate: Hello. In the modLua documentation (pasted below), it suggests in the comment that recordings using recordFile may be ended by pressing the # key. For Python, the documentation for the API points to modLua, but the touch-tone barge-in doesn't seem to be working for me. And I can't figure out a simple way to accomplish this. Any advice? session:recordFile syntax is session:recordFile(file_name, max_len, silence_threshold, silence_secs) Example: session:recordFile("/tmp/blah.wav", 30000, 10, 10); -- pressing # ends the recording session:streamFile("/tmp/blah.wav");
The proper prototype is file_name time_limit silence_threshold silence_hits recordFile(char *file_name, int time_limit = 0, int silence_threshold = 0, int silence_hits = 0); On Aug 21, 2008, at 1:19 AM, Marc Orenberg wrote:
I sent this email this morning but it didn't seem to make it through, so I'm sending it again. My appologies if it eventually becomes a duplicate:
Hello. In the modLua documentation (pasted below), it suggests in the comment that recordings using recordFile may be ended by pressing the # key. For Python, the documentation for the API points to modLua, but the touch-tone barge-in doesn't seem to be working for me. And I can't figure out a simple way to accomplish this. Any advice? session:recordFile
syntax is session:recordFile(file_name, max_len, silence_threshold, silence_secs)
Example:
session:recordFile("/tmp/blah.wav", 30000, 10, 10); -- pressing # ends the recording session:streamFile("/tmp/blah.wav"); _______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Marc, I don't know if this will work but if you could try it that would be helpful for documentation purposes. First, here's the link for the wiki page on the record app: http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_record It references that you can set the playback_terminators channel variable to the digits you'd like to have break the recording/playback. The dialplan syntax is: <application="set" data="playback_terminators=#"/> I don't know the Python syntax for setting a chan var off the top of my head. If I understand this correctly you'll want to set the variable right before the record app, or at least after the channel is established. Let us know how that goes! -MC ________________________________ From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Marc Orenberg Sent: Wednesday, August 20, 2008 10:19 PM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Ending recordFile with a touchtone in Python I sent this email this morning but it didn't seem to make it through, so I'm sending it again. My appologies if it eventually becomes a duplicate: Hello. In the modLua documentation (pasted below), it suggests in the comment that recordings using recordFile may be ended by pressing the # key. For Python, the documentation for the API points to modLua, but the touch-tone barge-in doesn't seem to be working for me. And I can't figure out a simple way to accomplish this. Any advice? session:recordFile syntax is session:recordFile(file_name, max_len, silence_threshold, silence_secs) Example: session:recordFile("/tmp/blah.wav", 30000, 10, 10); -- pressing # ends the recording session:streamFile("/tmp/blah.wav");
This doesn't exactly work the same in the languages.... If you recall anthony said use the setInputCallback to stop it. Not this. ;) That was my fault for misleading you on this one. On Aug 21, 2008, at 10:38 AM, Michael Collins wrote:
I don’t know the Python syntax for setting a chan var off the top of my head. If I understand this correctly you’ll want to set the variable right before the record app, or at least after the channel is established.
Brian West sip:brian@freeswitch.org
Mea culpa! I didn't read closely enough. I'll make a note that we need to update the record function in the scripting langs on the wiki. -MC ________________________________ From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Brian West Sent: Thursday, August 21, 2008 8:45 AM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Ending recordFile with a touchtone in Python This doesn't exactly work the same in the languages.... If you recall anthony said use the setInputCallback to stop it. Not this. ;) That was my fault for misleading you on this one. On Aug 21, 2008, at 10:38 AM, Michael Collins wrote: I don't know the Python syntax for setting a chan var off the top of my head. If I understand this correctly you'll want to set the variable right before the record app, or at least after the channel is established. Brian West sip:brian@freeswitch.org
participants (4)
-
Brian West
-
Marc Orenberg
-
Michael Collins
-
Michael Jerris