mod_conference "auto-record" enhancement
FreeSWITCH may or may not need this but I added an auto-record feature into the mod_conference module. Essentially, one can specify within the "conf/autoload_configs/conference.conf.xml" the following attribute: <param name="auto-record" value="/var/myNFSshare/audio/" /> When this is specified the conference will automatically record the conference->name with an appended ".wav" into that folder. I built this out of necessity for my current implementation. I thought since it is able to be toggled off and on based on specifying the "auto-record" parameter that it might be worthy of inclusion. Attached is my svn diff. Kind Regards, Chris -- *Chris Danielson* Software Consultant and Co-Founder Web: MaxPowerSoft, LLC <http://www.maxpowersoft.com/> Email: chris@maxpowersoft.com <mailto:chris@maxpowersoft.com> Index: mod_conference.c =================================================================== --- mod_conference.c (revision 8910) +++ mod_conference.c (working copy) @@ -27,8 +27,8 @@ * Neal Horman <neal at wanlink dot com> * Bret McDanel <trixter at 0xdecafbad dot com> * Dale Thatcher <freeswitch at dalethatcher dot com> + * Chris Danielson <chris at maxpowersoft dot com> * - * * mod_conference.c -- Software Conference Bridge * */ @@ -230,6 +230,7 @@ char *caller_id_number; char *sound_prefix; char *special_announce; + char *auto_record; uint32_t max_members; char *maxmember_sound; uint32_t anounce_count; @@ -880,6 +881,14 @@ switch_mutex_lock(globals.hash_mutex); globals.threads++; switch_mutex_unlock(globals.hash_mutex); + + if (conference->auto_record) { + char *rfile = switch_mprintf("%s%s%s", conference->auto_record, conference->name, ".wav"); + switch_assert(rfile); + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Auto recording file: %s\n", rfile); + launch_conference_record_thread(conference, rfile); + switch_safe_free(rfile); + } while (globals.running && !switch_test_flag(conference, CFLAG_DESTRUCT)) { switch_size_t file_sample_len = samples; @@ -4806,6 +4815,7 @@ switch_status_t status; int comfort_noise_level = 0; char *suppress_events = NULL; + char *auto_record = NULL; /* Validate the conference name */ if (switch_strlen_zero(name)) { @@ -4923,6 +4933,8 @@ } } else if (!strcasecmp(var, "suppress-events") && !switch_strlen_zero(val)) { suppress_events = val; + } else if (!strcasecmp(var, "auto-record") && !switch_strlen_zero(val)) { + auto_record = val; } } @@ -5078,6 +5090,10 @@ clear_eflags(suppress_events, &conference->eflags); } + if (!switch_strlen_zero(auto_record)) { + conference->auto_record = switch_core_strdup(conference->pool, auto_record); + } + /* caller control configuration chores */ if (switch_ivr_digit_stream_parser_new(conference->pool, &conference->dtmf_parser) == SWITCH_STATUS_SUCCESS) {
can the auto-record send the conference to an icecast stream using mod_shout? On Mon, Jul 7, 2008 at 5:36 PM, Chris Danielson <chris@maxpowersoft.com> wrote:
FreeSWITCH may or may not need this but I added an auto-record feature into the mod_conference module. Essentially, one can specify within the "conf/autoload_configs/conference.conf.xml" the following attribute: <param name="auto-record" value="/var/myNFSshare/audio/" /> When this is specified the conference will automatically record the conference->name with an appended ".wav" into that folder. I built this out of necessity for my current implementation. I thought since it is able to be toggled off and on based on specifying the "auto-record" parameter that it might be worthy of inclusion.
Attached is my svn diff.
Kind Regards, Chris
-- *Chris Danielson* Software Consultant and Co-Founder Web: MaxPowerSoft, LLC <http://www.maxpowersoft.com/> Email: chris@maxpowersoft.com
Index: mod_conference.c =================================================================== --- mod_conference.c (revision 8910) +++ mod_conference.c (working copy) @@ -27,8 +27,8 @@ * Neal Horman <neal at wanlink dot com> * Bret McDanel <trixter at 0xdecafbad dot com> * Dale Thatcher <freeswitch at dalethatcher dot com> + * Chris Danielson <chris at maxpowersoft dot com> * - * * mod_conference.c -- Software Conference Bridge * */ @@ -230,6 +230,7 @@ char *caller_id_number; char *sound_prefix; char *special_announce; + char *auto_record; uint32_t max_members; char *maxmember_sound; uint32_t anounce_count; @@ -880,6 +881,14 @@ switch_mutex_lock(globals.hash_mutex); globals.threads++; switch_mutex_unlock(globals.hash_mutex); + + if (conference->auto_record) { + char *rfile = switch_mprintf("%s%s%s", conference->auto_record, conference->name, ".wav"); + switch_assert(rfile); + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Auto recording file: %s\n", rfile); + launch_conference_record_thread(conference, rfile); + switch_safe_free(rfile); + }
while (globals.running && !switch_test_flag(conference, CFLAG_DESTRUCT)) { switch_size_t file_sample_len = samples; @@ -4806,6 +4815,7 @@ switch_status_t status; int comfort_noise_level = 0; char *suppress_events = NULL; + char *auto_record = NULL;
/* Validate the conference name */ if (switch_strlen_zero(name)) { @@ -4923,6 +4933,8 @@ } } else if (!strcasecmp(var, "suppress-events") && !switch_strlen_zero(val)) { suppress_events = val; + } else if (!strcasecmp(var, "auto-record") && !switch_strlen_zero(val)) { + auto_record = val; } }
@@ -5078,6 +5090,10 @@ clear_eflags(suppress_events, &conference->eflags); }
+ if (!switch_strlen_zero(auto_record)) { + conference->auto_record = switch_core_strdup(conference->pool, auto_record); + } + /* caller control configuration chores */ if (switch_ivr_digit_stream_parser_new(conference->pool, &conference->dtmf_parser) == SWITCH_STATUS_SUCCESS) {
_______________________________________________ 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
This patch is the equivalent of automatically running the following command every time a new conference starts. conference <conference name> record <my auto record location>/<conference name> *Chris Danielson* Software Consultant and Co-Founder Web: MaxPowerSoft, LLC <http://www.maxpowersoft.com/> e schmidbauer wrote:
can the auto-record send the conference to an icecast stream using mod_shout?
On Mon, Jul 7, 2008 at 5:36 PM, Chris Danielson <chris@maxpowersoft.com <mailto:chris@maxpowersoft.com>> wrote:
FreeSWITCH may or may not need this but I added an auto-record feature into the mod_conference module. Essentially, one can specify within the "conf/autoload_configs/conference.conf.xml" the following attribute: <param name="auto-record" value="/var/myNFSshare/audio/" /> When this is specified the conference will automatically record the conference->name with an appended ".wav" into that folder. I built this out of necessity for my current implementation. I thought since it is able to be toggled off and on based on specifying the "auto-record" parameter that it might be worthy of inclusion.
Attached is my svn diff.
Kind Regards, Chris
-- *Chris Danielson* Software Consultant and Co-Founder Web: MaxPowerSoft, LLC <http://www.maxpowersoft.com/> Email: chris@maxpowersoft.com <mailto:chris@maxpowersoft.com>
Index: mod_conference.c =================================================================== --- mod_conference.c (revision 8910) +++ mod_conference.c (working copy) @@ -27,8 +27,8 @@ * Neal Horman <neal at wanlink dot com> * Bret McDanel <trixter at 0xdecafbad dot com> * Dale Thatcher <freeswitch at dalethatcher dot com> + * Chris Danielson <chris at maxpowersoft dot com> * - * * mod_conference.c -- Software Conference Bridge * */ @@ -230,6 +230,7 @@ char *caller_id_number; char *sound_prefix; char *special_announce; + char *auto_record; uint32_t max_members; char *maxmember_sound; uint32_t anounce_count; @@ -880,6 +881,14 @@ switch_mutex_lock(globals.hash_mutex); globals.threads++; switch_mutex_unlock(globals.hash_mutex); + + if (conference->auto_record) { + char *rfile = switch_mprintf("%s%s%s", conference->auto_record, conference->name, ".wav"); + switch_assert(rfile); + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Auto recording file: %s\n", rfile); + launch_conference_record_thread(conference, rfile); + switch_safe_free(rfile); + }
while (globals.running && !switch_test_flag(conference, CFLAG_DESTRUCT)) { switch_size_t file_sample_len = samples; @@ -4806,6 +4815,7 @@ switch_status_t status; int comfort_noise_level = 0; char *suppress_events = NULL; + char *auto_record = NULL;
/* Validate the conference name */ if (switch_strlen_zero(name)) { @@ -4923,6 +4933,8 @@ } } else if (!strcasecmp(var, "suppress-events") && !switch_strlen_zero(val)) { suppress_events = val; + } else if (!strcasecmp(var, "auto-record") && !switch_strlen_zero(val)) { + auto_record = val; } }
@@ -5078,6 +5090,10 @@ clear_eflags(suppress_events, &conference->eflags); }
+ if (!switch_strlen_zero(auto_record)) { + conference->auto_record = switch_core_strdup(conference->pool, auto_record); + } + /* caller control configuration chores */ if (switch_ivr_digit_stream_parser_new(conference->pool, &conference->dtmf_parser) == SWITCH_STATUS_SUCCESS) {
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org <mailto: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
------------------------------------------------------------------------
_______________________________________________ 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
Dan and I had a chat about this issue. I had to think on it but I think Dan and I have agreed on a solution. <param name="auto-record" value="/nfs/conference/$ {some_conference_variable}-${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/> or <param name="auto-record" value="shout://user:pass@shoutcasthost.org/$ {some_conference_variable}.mp3"/> Does that sound sane to you? /b On Jul 7, 2008, at 4:42 PM, e schmidbauer wrote:
can the auto-record send the conference to an icecast stream using mod_shout?
Brian West sip:brian@freeswitch.org
On Mon, 2008-07-07 at 17:56 -0500, Brian West wrote:
Dan and I had a chat about this issue. I had to think on it but I think Dan and I have agreed on a solution.
<param name="auto-record" value="/nfs/conference/$ {some_conference_variable}-${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/>
or
<param name="auto-record" value="shout://user:pass@shoutcasthost.org/$ {some_conference_variable}.mp3"/>
Does that sound sane to you?
How about the ability to do both at the same time? Storing in a wav so for example the lawyers have something to wave with in court while the rest listens in on a live mp3 stream. Or does your example already imply this? Cheers, Patrick
Your shoutcast sever should have this ability. On Jul 7, 2008, at 6:12 PM, Patrick wrote:
How about the ability to do both at the same time? Storing in a wav so for example the lawyers have something to wave with in court while the rest listens in on a live mp3 stream. Or does your example already imply this?
Brian West sip:brian@freeswitch.org
http://jira.freeswitch.org/browse/MODAPP-112 Patch uploaded to jira and attached to this email as well. Please let me know if there is something incorrect in this work, or what not. Everything worked fine in my tests. I added a new type of variable to the channel named "conference-name". Now one can do something as follows: <param name="auto-record" value="/var/nfs_shar/usr/${conference-name}_${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/> or you can do <param name="auto-record" value="shout://user:pass@server.com <mailto:pass@server.com>/live.mp3" /> I followed Brian's lead on using the switch_channel_expand_variables call. Kind Regards, Chris *Chris Danielson* Software Consultant and Co-Founder Web: MaxPowerSoft, LLC <http://www.maxpowersoft.com/> Brian West wrote:
Dan and I had a chat about this issue. I had to think on it but I think Dan and I have agreed on a solution.
<param name="auto-record" value="/nfs/conference/$ {some_conference_variable}-${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/>
or
<param name="auto-record" value="shout://user:pass@shoutcasthost.org/$ {some_conference_variable}.mp3"/>
Does that sound sane to you?
/b
On Jul 7, 2008, at 4:42 PM, e schmidbauer wrote:
can the auto-record send the conference to an icecast stream using mod_shout?
Brian West sip:brian@freeswitch.org
_______________________________________________ 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
Index: mod_conference.c =================================================================== --- mod_conference.c (revision 8910) +++ mod_conference.c (working copy) @@ -27,8 +27,8 @@ * Neal Horman <neal at wanlink dot com> * Bret McDanel <trixter at 0xdecafbad dot com> * Dale Thatcher <freeswitch at dalethatcher dot com> + * Chris Danielson <chris at maxpowersoft dot com> * - * * mod_conference.c -- Software Conference Bridge * */ @@ -230,6 +230,7 @@ char *caller_id_number; char *sound_prefix; char *special_announce; + char *auto_record; uint32_t max_members; char *maxmember_sound; uint32_t anounce_count; @@ -866,6 +867,7 @@ switch_event_t *event; uint8_t *file_frame; uint8_t *async_file_frame; + switch_channel_t *channel; file_frame = switch_core_alloc(conference->pool, SWITCH_RECOMMENDED_BUFFER_SIZE); async_file_frame = switch_core_alloc(conference->pool, SWITCH_RECOMMENDED_BUFFER_SIZE); @@ -880,6 +882,19 @@ switch_mutex_lock(globals.hash_mutex); globals.threads++; switch_mutex_unlock(globals.hash_mutex); + + if (conference->auto_record) { + imember = conference->members; + if (imember) { + channel = switch_core_session_get_channel(imember->session); + char *rfile = switch_channel_expand_variables(channel, conference->auto_record); + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Auto recording file: %s\n", rfile); + launch_conference_record_thread(conference, rfile); + switch_safe_free(rfile); + } else { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Auto Record Failed. No members in conference.\n"); + } + } while (globals.running && !switch_test_flag(conference, CFLAG_DESTRUCT)) { switch_size_t file_sample_len = samples; @@ -4252,12 +4267,14 @@ /* Create the conference object. */ conference = conference_new(conf_name, xml_cfg, NULL); - + if (!conference) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Memory Error!\n"); goto done; } + switch_channel_set_variable(channel, "conference-name", conference->name); + /* Set the minimum number of members (once you go above it you cannot go below it) */ conference->min = 2; @@ -4287,6 +4304,8 @@ if (dpin) { conference->pin = switch_core_strdup(conference->pool, dpin); } + + switch_channel_set_variable(channel, "conference-name", conference->name); /* Set the minimum number of members (once you go above it you cannot go below it) */ conference->min = 1; @@ -4296,8 +4315,10 @@ /* Start the conference thread for this conference */ launch_conference_thread(conference); + } else { /* setup user variable */ + switch_channel_set_variable(channel, "conference-name", conference->name); } - + /* acquire a read lock on the thread so it can't leave without us */ if (switch_thread_rwlock_tryrdlock(conference->rwlock) != SWITCH_STATUS_SUCCESS) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Read Lock Fail\n"); @@ -4380,7 +4401,7 @@ } } - + /* Release the config registry handle */ if (cxml) { switch_xml_free(cxml); @@ -4806,6 +4827,7 @@ switch_status_t status; int comfort_noise_level = 0; char *suppress_events = NULL; + char *auto_record = NULL; /* Validate the conference name */ if (switch_strlen_zero(name)) { @@ -4923,6 +4945,8 @@ } } else if (!strcasecmp(var, "suppress-events") && !switch_strlen_zero(val)) { suppress_events = val; + } else if (!strcasecmp(var, "auto-record") && !switch_strlen_zero(val)) { + auto_record = val; } } @@ -5078,6 +5102,10 @@ clear_eflags(suppress_events, &conference->eflags); } + if (!switch_strlen_zero(auto_record)) { + conference->auto_record = switch_core_strdup(conference->pool, auto_record); + } + /* caller control configuration chores */ if (switch_ivr_digit_stream_parser_new(conference->pool, &conference->dtmf_parser) == SWITCH_STATUS_SUCCESS) {
Can you please attach this patch as a file to a bug on jira.freeswitch.org? Mike On Jul 7, 2008, at 5:36 PM, Chris Danielson wrote:
FreeSWITCH may or may not need this but I added an auto-record feature into the mod_conference module. Essentially, one can specify within the "conf/autoload_configs/conference.conf.xml" the following attribute: <param name="auto-record" value="/var/myNFSshare/audio/" /> When this is specified the conference will automatically record the conference->name with an appended ".wav" into that folder. I built this out of necessity for my current implementation. I thought since it is able to be toggled off and on based on specifying the "auto-record" parameter that it might be worthy of inclusion.
Attached is my svn diff.
Kind Regards, Chris
-- Chris Danielson Software Consultant and Co-Founder Web: MaxPowerSoft, LLC Email: chris@maxpowersoft.com Index: mod_conference.c =================================================================== --- mod_conference.c (revision 8910) +++ mod_conference.c (working copy) @@ -27,8 +27,8 @@ * Neal Horman <neal at wanlink dot com> * Bret McDanel <trixter at 0xdecafbad dot com> * Dale Thatcher <freeswitch at dalethatcher dot com> + * Chris Danielson <chris at maxpowersoft dot com> * - * * mod_conference.c -- Software Conference Bridge * */ @@ -230,6 +230,7 @@ char *caller_id_number; char *sound_prefix; char *special_announce; + char *auto_record; uint32_t max_members; char *maxmember_sound; uint32_t anounce_count; @@ -880,6 +881,14 @@ switch_mutex_lock(globals.hash_mutex); globals.threads++; switch_mutex_unlock(globals.hash_mutex); + + if (conference->auto_record) { + char *rfile = switch_mprintf("%s%s%s", conference->auto_record, conference->name, ".wav"); + switch_assert(rfile); + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Auto recording file: %s\n", rfile); + launch_conference_record_thread(conference, rfile); + switch_safe_free(rfile); + }
while (globals.running && !switch_test_flag(conference, CFLAG_DESTRUCT)) { switch_size_t file_sample_len = samples; @@ -4806,6 +4815,7 @@ switch_status_t status; int comfort_noise_level = 0; char *suppress_events = NULL; + char *auto_record = NULL;
/* Validate the conference name */ if (switch_strlen_zero(name)) { @@ -4923,6 +4933,8 @@ } } else if (!strcasecmp(var, "suppress-events") && ! switch_strlen_zero(val)) { suppress_events = val; + } else if (!strcasecmp(var, "auto-record") && ! switch_strlen_zero(val)) { + auto_record = val; } }
@@ -5078,6 +5090,10 @@ clear_eflags(suppress_events, &conference->eflags); }
+ if (!switch_strlen_zero(auto_record)) { + conference->auto_record = switch_core_strdup(conference->pool, auto_record); + } + /* caller control configuration chores */ if (switch_ivr_digit_stream_parser_new(conference->pool, &conference->dtmf_parser) == SWITCH_STATUS_SUCCESS) {
_______________________________________________ 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
http://jira.freeswitch.org/browse/MODAPP-112 Thanks! Chris *Chris Danielson* Software Consultant and Co-Founder Web: MaxPowerSoft, LLC <http://www.maxpowersoft.com/> Michael Jerris wrote:
Can you please attach this patch as a file to a bug on jira.freeswitch.org?
Mike
On Jul 7, 2008, at 5:36 PM, Chris Danielson wrote:
FreeSWITCH may or may not need this but I added an auto-record feature into the mod_conference module. Essentially, one can specify within the "conf/autoload_configs/conference.conf.xml" the following attribute: <param name="auto-record" value="/var/myNFSshare/audio/" /> When this is specified the conference will automatically record the conference->name with an appended ".wav" into that folder. I built this out of necessity for my current implementation. I thought since it is able to be toggled off and on based on specifying the "auto-record" parameter that it might be worthy of inclusion.
Attached is my svn diff.
Kind Regards, Chris
-- *Chris Danielson* Software Consultant and Co-Founder Web: MaxPowerSoft, LLC <http://www.maxpowersoft.com/> Email: chris@maxpowersoft.com <mailto:chris@maxpowersoft.com> Index: mod_conference.c =================================================================== --- mod_conference.c (revision 8910) +++ mod_conference.c (working copy) @@ -27,8 +27,8 @@ * Neal Horman <neal at wanlink dot com> * Bret McDanel <trixter at 0xdecafbad dot com> * Dale Thatcher <freeswitch at dalethatcher dot com> + * Chris Danielson <chris at maxpowersoft dot com> * - * * mod_conference.c -- Software Conference Bridge * */ @@ -230,6 +230,7 @@ char *caller_id_number; char *sound_prefix; char *special_announce; + char *auto_record; uint32_t max_members; char *maxmember_sound; uint32_t anounce_count; @@ -880,6 +881,14 @@ switch_mutex_lock(globals.hash_mutex); globals.threads++; switch_mutex_unlock(globals.hash_mutex); + + if (conference->auto_record) { + char *rfile = switch_mprintf("%s%s%s", conference->auto_record, conference->name, ".wav"); + switch_assert(rfile); + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Auto recording file: %s\n", rfile); + launch_conference_record_thread(conference, rfile); + switch_safe_free(rfile); + }
while (globals.running && !switch_test_flag(conference, CFLAG_DESTRUCT)) { switch_size_t file_sample_len = samples; @@ -4806,6 +4815,7 @@ switch_status_t status; int comfort_noise_level = 0; char *suppress_events = NULL; + char *auto_record = NULL;
/* Validate the conference name */ if (switch_strlen_zero(name)) { @@ -4923,6 +4933,8 @@ } } else if (!strcasecmp(var, "suppress-events") && !switch_strlen_zero(val)) { suppress_events = val; + } else if (!strcasecmp(var, "auto-record") && !switch_strlen_zero(val)) { + auto_record = val; } }
@@ -5078,6 +5090,10 @@ clear_eflags(suppress_events, &conference->eflags); }
+ if (!switch_strlen_zero(auto_record)) { + conference->auto_record = switch_core_strdup(conference->pool, auto_record); + } + /* caller control configuration chores */ if (switch_ivr_digit_stream_parser_new(conference->pool, &conference->dtmf_parser) == SWITCH_STATUS_SUCCESS) {
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org <mailto: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
------------------------------------------------------------------------
_______________________________________________ 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
Woof! Using mod_socket (outbound mode) on svn version 8911, after the call is answered, I'm having difficulty with generating silence periods during which I want to be able to detect DTMF events. If I use: sendmsg call-command: execute execute-app-name: sleep execute-app-arg: 5000 It won't detect DTMF during the command (and any entered digit events are sent once the command completes 5000 mS later.) If I use: sendmsg call-command: execute execute-app-name: playback execute-app-arg: tone_stream://%(5000, 0, 0) In an attempt to generate a 5000 mS 0 Hz "tone", it doesn't take 5000 mS, the command just completes immediately. I've been using this as a workaround: sendmsg call-command: execute execute-app-name: playback execute-app-arg: tone_stream://%(5000, 0, 8000) Which works on 8000 Hz calls...but will probably be very annoying to the caller if I ever accept a wide-band call! Any ideas? --Woof!
I see this module was committed this week. Anybody have any info on how it works?
I have started adding documentation here http://wiki.freeswitch.org/wiki/Mod_pocketsphinx I have this working with our pizza demo but not out of the box. I'll add more info as more people test and help write the docs. On Jul 8, 2008, at 11:58 AM, andrew wrote:
I see this module was committed this week. Anybody have any info on how it works?
Brian West sip:brian@freeswitch.org
Try latest trunk, I added support for what you want. On Tue, Jul 8, 2008 at 10:59 AM, Andy Spitzer <woof@pingtel.com> wrote:
Woof!
Using mod_socket (outbound mode) on svn version 8911, after the call is answered, I'm having difficulty with generating silence periods during which I want to be able to detect DTMF events.
If I use:
sendmsg call-command: execute execute-app-name: sleep execute-app-arg: 5000
It won't detect DTMF during the command (and any entered digit events are sent once the command completes 5000 mS later.)
If I use:
sendmsg call-command: execute execute-app-name: playback execute-app-arg: tone_stream://%(5000, 0, 0)
In an attempt to generate a 5000 mS 0 Hz "tone", it doesn't take 5000 mS, the command just completes immediately.
I've been using this as a workaround:
sendmsg call-command: execute execute-app-name: playback execute-app-arg: tone_stream://%(5000, 0, 8000)
Which works on 8000 Hz calls...but will probably be very annoying to the caller if I ever accept a wide-band call!
Any ideas?
--Woof!
_______________________________________________ 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
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
Woof! On Tue, 08 Jul 2008 13:27:40 -0400, Anthony Minessale <anthony.minessale@gmail.com> wrote:
Try latest trunk, I added support for what you want.
Thanks. I just tried it. DTMF event reporting now works...but I cannot "break" out of the sleep command once it is started. --Woof!
Right you are, sorry forgot that bit. update and try again. On Tue, Jul 8, 2008 at 2:12 PM, Andy Spitzer <woof@pingtel.com> wrote:
Woof!
On Tue, 08 Jul 2008 13:27:40 -0400, Anthony Minessale < anthony.minessale@gmail.com> wrote:
Try latest trunk, I added support for what you want.
Thanks. I just tried it. DTMF event reporting now works...but I cannot "break" out of the sleep command once it is started.
--Woof!
_______________________________________________ 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
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
darn, forgot another 3 lines of code, try now =D On Tue, Jul 8, 2008 at 2:58 PM, Andy Spitzer <woof@pingtel.com> wrote:
Woof!
On Tue, 08 Jul 2008 15:27:02 -0400, Anthony Minessale < anthony.minessale@gmail.com> wrote:
update and try again.
Alas, no joy. Break still won't wake it up.
svn version 8933
--Woof!
_______________________________________________ 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
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
Woof! On Tue, 08 Jul 2008 19:13:24 -0400, Anthony Minessale <anthony.minessale@gmail.com> wrote:
try now =D
Ahh, now there is joy! Can I trouble you to also make "tone_stream://%(150, 0, 0)" (or something similar) also work? I can forsee a need for injecting short pauses into a sequence of prompts, and tone_stream:: has the correct semantics for that. Thanks! --Woof!
What do you get now when you try to do this? Mike On Jul 9, 2008, at 10:58 AM, Andy Spitzer wrote:
Woof!
On Tue, 08 Jul 2008 19:13:24 -0400, Anthony Minessale <anthony.minessale@gmail.com
wrote:
try now =D
Ahh, now there is joy!
Can I trouble you to also make "tone_stream://%(150, 0, 0)" (or something similar) also work? I can forsee a need for injecting short pauses into a sequence of prompts, and tone_stream:: has the correct semantics for that.
Thanks!
--Woof!
_______________________________________________ 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
Woof! On Wed, 09 Jul 2008 11:24:20 -0400, Michael Jerris <mike@jerris.com> wrote:
What do you get now when you try to do this?
When I do "tone_stream://%(10000, 0, 0)", expecting 10 seconds of silence, it instantly completes the command without error. It doesn't take 10 seconds ;-) --Woof!
you can try 1,1 instead of 0,0 which is still silent On Wed, Jul 9, 2008 at 11:15 AM, Andy Spitzer <woof@pingtel.com> wrote:
Woof!
On Wed, 09 Jul 2008 11:24:20 -0400, Michael Jerris <mike@jerris.com> wrote:
What do you get now when you try to do this?
When I do "tone_stream://%(10000, 0, 0)", expecting 10 seconds of silence, it instantly completes the command without error. It doesn't take 10 seconds ;-)
--Woof!
_______________________________________________ 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
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
Woof! On Wed, 09 Jul 2008 12:49:51 -0400, Anthony Minessale <anthony.minessale@gmail.com> wrote:
you can try 1,1 instead of 0,0 which is still silent
Actually, it isn't. It is quite audible on several phones I've played with (most likely due to the uLaw companding adding a "step" to each voltage, and poor analog filters on the phones), and it also has an RMS power value that is certainly not low energy. I've tried lots of variations of power and frequency and have found nothing as truly silent as 0,8000 (or 0,16000 and 0,32000) I'm just worried that if we ever see a codec that isn't a multiple of 8Khz, it wouldn't be silence anymore. --Woof!
since doing this with teletone is inefficient anyway, I added silence_stream (also in mod_tone_stream) silence_stream://<ms>[,<noise level>] eg silence_stream://10000 will generate 10 sec of absolute zeros silence_stream://10000,2000 will generate comfort noise for 10 seconds. the noise level actually gets louder the closer it gets to zero so 2000 is softer than 1000 etc On Wed, Jul 9, 2008 at 1:02 PM, Andy Spitzer <woof@pingtel.com> wrote:
Woof!
On Wed, 09 Jul 2008 12:49:51 -0400, Anthony Minessale < anthony.minessale@gmail.com> wrote:
you can try 1,1 instead of 0,0 which is still silent
Actually, it isn't. It is quite audible on several phones I've played with (most likely due to the uLaw companding adding a "step" to each voltage, and poor analog filters on the phones), and it also has an RMS power value that is certainly not low energy.
I've tried lots of variations of power and frequency and have found nothing as truly silent as 0,8000 (or 0,16000 and 0,32000) I'm just worried that if we ever see a codec that isn't a multiple of 8Khz, it wouldn't be silence anymore.
--Woof!
_______________________________________________ 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
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
Woof! On Wed, 09 Jul 2008 15:07:56 -0400, Anthony Minessale <anthony.minessale@gmail.com> wrote:
silence_stream://<ms>[,<noise level>]
eg silence_stream://10000
will generate 10 sec of absolute zeros
Nice! Pefect for my needs. Thanks. --Woof!
participants (8)
-
andrew
-
Andy Spitzer
-
Anthony Minessale
-
Brian West
-
Chris Danielson
-
e schmidbauer
-
Michael Jerris
-
Patrick