* 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
*
char *caller_id_number;
char *sound_prefix;
char *special_announce;
+ char *auto_record;
uint32_t max_members;
char *maxmember_sound;
uint32_t anounce_count;
switch_mutex_lock(globals.hash_mutex);
globals.threads++;
switch_mutex_unlock(globals.hash_mutex);
+
+ if (conference->auto_record) {
+ imember = conference->members;
+ if (imember) {
+ switch_channel_t *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);
+ if (rfile != conference->auto_record) {
+ 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;
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;
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;
/* 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 */
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)) {
}
} 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;
}
}
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) {