<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
This patch is the equivalent of automatically running the following
command every time a new conference starts.<br>
<br>
conference <conference name> record <my auto record
location>/<conference name><br>
<br>
<br>
<div class="moz-signature"><b>Chris Danielson</b>
<br>
Software Consultant and Co-Founder
<br>
Web: <a href="http://www.maxpowersoft.com/">MaxPowerSoft, LLC</a>
<br>
</div>
<br>
<br>
e schmidbauer wrote:
<blockquote
cite="mid:2cef777b0807071442p1deb9c8u39cebbddd8c0eb9e@mail.gmail.com"
type="cite">can the auto-record send the conference to an icecast
stream using mod_shout?<br>
<br>
<div class="gmail_quote">On Mon, Jul 7, 2008 at 5:36 PM, Chris
Danielson <<a moz-do-not-send="true"
href="mailto:chris@maxpowersoft.com">chris@maxpowersoft.com</a>>
wrote:<br>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000">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:<br>
<param name="auto-record" value="/var/myNFSshare/audio/" /><br>
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. <br>
<br>
Attached is my svn diff.<br>
<br>
Kind Regards,<br>
Chris<br>
<br>
<div>-- <br>
<b>Chris Danielson</b>
<br>
Software Consultant and Co-Founder
<br>
Web: <a moz-do-not-send="true" href="http://www.maxpowersoft.com/"
target="_blank">MaxPowerSoft, LLC</a>
<br>
Email: <a moz-do-not-send="true" href="mailto:chris@maxpowersoft.com"
target="_blank">chris@maxpowersoft.com</a>
<br>
</div>
</div>
<br>
Index: mod_conference.c<br>
===================================================================<br>
--- mod_conference.c (revision 8910)<br>
+++ mod_conference.c (working copy)<br>
@@ -27,8 +27,8 @@<br>
* Neal Horman <neal at wanlink dot com><br>
* Bret McDanel <trixter at 0xdecafbad dot com><br>
* Dale Thatcher <freeswitch at dalethatcher dot com><br>
+ * Chris Danielson <chris at maxpowersoft dot com><br>
*<br>
- *<br>
* mod_conference.c -- Software Conference Bridge<br>
*<br>
*/<br>
@@ -230,6 +230,7 @@<br>
char *caller_id_number;<br>
char *sound_prefix;<br>
char *special_announce;<br>
+ char *auto_record;<br>
uint32_t max_members;<br>
char *maxmember_sound;<br>
uint32_t anounce_count;<br>
@@ -880,6 +881,14 @@<br>
switch_mutex_lock(globals.hash_mutex);<br>
globals.threads++;<br>
switch_mutex_unlock(globals.hash_mutex);<br>
+<br>
+ if (conference->auto_record) {<br>
+ char *rfile = switch_mprintf("%s%s%s",
conference->auto_record, conference->name, ".wav");<br>
+ switch_assert(rfile);<br>
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
"Auto recording file: %s\n", rfile);<br>
+ launch_conference_record_thread(conference, rfile);<br>
+ switch_safe_free(rfile);<br>
+ }<br>
<br>
while (globals.running && !switch_test_flag(conference,
CFLAG_DESTRUCT)) {<br>
switch_size_t file_sample_len = samples;<br>
@@ -4806,6 +4815,7 @@<br>
switch_status_t status;<br>
int comfort_noise_level = 0;<br>
char *suppress_events = NULL;<br>
+ char *auto_record = NULL;<br>
<br>
/* Validate the conference name */<br>
if (switch_strlen_zero(name)) {<br>
@@ -4923,6 +4933,8 @@<br>
}<br>
} else if (!strcasecmp(var, "suppress-events")
&& !switch_strlen_zero(val)) {<br>
suppress_events = val;<br>
+ } else if (!strcasecmp(var, "auto-record") &&
!switch_strlen_zero(val)) {<br>
+ auto_record = val;<br>
}<br>
}<br>
<br>
@@ -5078,6 +5090,10 @@<br>
clear_eflags(suppress_events,
&conference->eflags);<br>
}<br>
<br>
+ if (!switch_strlen_zero(auto_record)) {<br>
+ conference->auto_record =
switch_core_strdup(conference->pool, auto_record);<br>
+ }<br>
+<br>
/* caller control configuration chores */<br>
if (switch_ivr_digit_stream_parser_new(conference->pool,
&conference->dtmf_parser) == SWITCH_STATUS_SUCCESS) {<br>
<br>
<br>
_______________________________________________<br>
Freeswitch-users mailing list<br>
<a moz-do-not-send="true"
href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
<a moz-do-not-send="true"
href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users"
target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a moz-do-not-send="true"
href="http://lists.freeswitch.org/mailman/options/freeswitch-users"
target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a moz-do-not-send="true" href="http://www.freeswitch.org"
target="_blank">http://www.freeswitch.org</a><br>
<br>
</blockquote>
</div>
<br>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
Freeswitch-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
</pre>
</blockquote>
</body>
</html>