From 6a7f9d4a8efa9de77e4afb76436bd3f66545ed30 Mon Sep 17 00:00:00 2001 From: Dragos Oancea Date: Thu, 30 Mar 2017 10:36:12 +0100 Subject: [PATCH] FS-10198: mod_conference: add var in xml to configure audio recording metadata --- src/mod/applications/mod_conference/conference_record.c | 3 ++- src/mod/applications/mod_conference/mod_conference.c | 7 +++++++ src/mod/applications/mod_conference/mod_conference.h | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/mod/applications/mod_conference/conference_record.c b/src/mod/applications/mod_conference/conference_record.c index f926d3043d..aca71a0298 100644 --- a/src/mod/applications/mod_conference/conference_record.c +++ b/src/mod/applications/mod_conference/conference_record.c @@ -306,7 +306,8 @@ void *SWITCH_THREAD_FUNC conference_record_thread_run(switch_thread_t *thread, v switch_safe_free(vval); } - switch_core_file_set_string(&member->rec->fh, SWITCH_AUDIO_COL_STR_ARTIST, "FreeSWITCH mod_conference Software Conference Module"); + switch_core_file_set_string(&member->rec->fh, SWITCH_AUDIO_COL_STR_ARTIST, + !zstr(conference->recording_metadata)?conference->recording_metadata:"FreeSWITCH mod_conference Software Conference Module"); if (test_eflag(conference, EFLAG_RECORD) && switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) { diff --git a/src/mod/applications/mod_conference/mod_conference.c b/src/mod/applications/mod_conference/mod_conference.c index 1923671a2a..a8a480818e 100644 --- a/src/mod/applications/mod_conference/mod_conference.c +++ b/src/mod/applications/mod_conference/mod_conference.c @@ -2631,6 +2631,7 @@ conference_obj_t *conference_new(char *name, conference_xml_cfg_t cfg, switch_co char *suppress_events = NULL; char *verbose_events = NULL; char *auto_record = NULL; + char *recording_metadata = NULL; int auto_record_canvas = 0; int min_recording_participants = 1; char *conference_log_dir = NULL; @@ -2939,6 +2940,8 @@ conference_obj_t *conference_new(char *name, conference_xml_cfg_t cfg, switch_co verbose_events = val; } else if (!strcasecmp(var, "auto-record") && !zstr(val)) { auto_record = val; + } else if (!strcasecmp(var, "recording-metadata") && !zstr(val)) { + recording_metadata = val; } else if (!strcasecmp(var, "auto-record-canvas-id") && !zstr(val)) { auto_record_canvas = atoi(val); if (auto_record_canvas) { @@ -3481,6 +3484,10 @@ conference_obj_t *conference_new(char *name, conference_xml_cfg_t cfg, switch_co conference->auto_record = switch_core_strdup(conference->pool, auto_record); } + if (!zstr(recording_metadata)) { + conference->recording_metadata = switch_core_strdup(conference->pool, recording_metadata); + } + conference->min_recording_participants = min_recording_participants; if (!zstr(desc)) { diff --git a/src/mod/applications/mod_conference/mod_conference.h b/src/mod/applications/mod_conference/mod_conference.h index 8370232348..c710d1d73f 100644 --- a/src/mod/applications/mod_conference/mod_conference.h +++ b/src/mod/applications/mod_conference/mod_conference.h @@ -683,6 +683,7 @@ typedef struct conference_obj { int broadcast_chat_messages; int comfort_noise_level; int auto_recording; + char *recording_metadata; int record_count; uint32_t min_recording_participants; int ivr_dtmf_timeout;