mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-16 23:08:32 +00:00
app_confbridge: Add the ability to pass options/command to MixMonitor
This patch adds the ability to pass options and a command to MixMontor when
recording a conference using ConfBridge.
New options are -
* record_options: Options to MixMontor, eg: m(), W() etc.
* record_command: The command to execute when recording is over.
* record_file_timestamp: Append the start time to the file name.
These options can also be used with the CONFBRIDGE function, e.g.,
Set(CONFBRIDGE(bridge,record_command)=/path/to/command ^{MIXMONITOR_FILENAME}))
Review: https://reviewboard.asterisk.org/r/4023
ASTERISK-24351 #close
Reported by: Gareth Palmer
patches:
record_command-428838.patch uploaded by Gareth Palmer (License 5169)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@429934 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -569,7 +569,7 @@ static void set_rec_filename(struct confbridge_conference *conference, struct as
|
||||
ast_str_reset(*filename);
|
||||
if (ast_strlen_zero(rec_file)) {
|
||||
ast_str_set(filename, 0, "confbridge-%s-%u.wav", conference->name, (unsigned int)now);
|
||||
} else {
|
||||
} else if (ast_test_flag(&conference->b_profile, BRIDGE_OPT_RECORD_FILE_TIMESTAMP)) {
|
||||
/* insert time before file extension */
|
||||
ext = strrchr(rec_file, '.');
|
||||
if (ext) {
|
||||
@@ -578,11 +578,14 @@ static void set_rec_filename(struct confbridge_conference *conference, struct as
|
||||
} else {
|
||||
ast_str_set(filename, 0, "%s-%u", rec_file, (unsigned int)now);
|
||||
}
|
||||
} else {
|
||||
ast_str_set(filename, 0, "%s", rec_file);
|
||||
}
|
||||
|
||||
if (ast_test_flag(&conference->b_profile, BRIDGE_OPT_RECORD_FILE_APPEND)) {
|
||||
ast_str_append(filename, 0, ",a");
|
||||
}
|
||||
ast_str_append(filename, 0, ",%s%s,%s",
|
||||
ast_test_flag(&conference->b_profile, BRIDGE_OPT_RECORD_FILE_APPEND) ? "a" : "",
|
||||
conference->b_profile.rec_options,
|
||||
conference->b_profile.rec_command);
|
||||
}
|
||||
|
||||
static int is_new_rec_file(const char *rec_file, struct ast_str **orig_rec_file)
|
||||
|
||||
Reference in New Issue
Block a user