Added Confbridge record_file_append option.
Currently, if one starts, stops, and then starts a recording again for a conference the recorded data is appended to the file originally created on the first record start. An option record_file_append has been added that defaults to "yes", but when set to "no" will force creation of a new file between every record start/stop. (issue AST-1088) Reported by: John Bigelow Review: http://reviewboard.digium.internal/r/374/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381729 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
parent
0d553eece8
commit
31b7426115
3
CHANGES
3
CHANGES
|
@ -146,6 +146,9 @@ ConfBridge
|
|||
file will be played to the user, and only the user, upon joining the
|
||||
conference bridge.
|
||||
|
||||
* Added record_file_append option that defaults to "yes", but if set to no
|
||||
will create a new file between each start/stop recording.
|
||||
|
||||
|
||||
Dial
|
||||
-------------------
|
||||
|
|
|
@ -602,7 +602,7 @@ static void set_rec_filename(struct conference_bridge *bridge, struct ast_str **
|
|||
time_t now;
|
||||
char *ext;
|
||||
|
||||
if (ast_str_strlen(*filename)) {
|
||||
if (ast_str_strlen(*filename) && ast_test_flag(&bridge->b_profile, BRIDGE_OPT_RECORD_FILE_APPEND)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -621,7 +621,10 @@ static void set_rec_filename(struct conference_bridge *bridge, struct ast_str **
|
|||
ast_str_set(filename, 0, "%s-%u", rec_file, (unsigned int)now);
|
||||
}
|
||||
}
|
||||
ast_str_append(filename, 0, ",a");
|
||||
|
||||
if (ast_test_flag(&bridge->b_profile, BRIDGE_OPT_RECORD_FILE_APPEND)) {
|
||||
ast_str_append(filename, 0, ",a");
|
||||
}
|
||||
}
|
||||
|
||||
static void *record_thread(void *obj)
|
||||
|
|
|
@ -1330,6 +1330,10 @@ static char *handle_cli_confbridge_show_bridge_profile(struct ast_cli_entry *e,
|
|||
b_profile.flags & BRIDGE_OPT_RECORD_CONFERENCE ?
|
||||
"yes" : "no");
|
||||
|
||||
ast_cli(a->fd,"Record File Append: %s\n",
|
||||
b_profile.flags & BRIDGE_OPT_RECORD_FILE_APPEND ?
|
||||
"yes" : "no");
|
||||
|
||||
ast_cli(a->fd,"Record File: %s\n",
|
||||
ast_strlen_zero(b_profile.rec_file) ? "Auto Generated" :
|
||||
b_profile.rec_file);
|
||||
|
@ -1788,6 +1792,7 @@ int conf_load_config(int reload)
|
|||
aco_option_register_custom(&cfg_info, "mixing_interval", ACO_EXACT, bridge_types, "20", mix_interval_handler, 0);
|
||||
aco_option_register(&cfg_info, "record_conference", ACO_EXACT, bridge_types, "no", OPT_BOOLFLAG_T, 1, FLDSET(struct bridge_profile, flags), BRIDGE_OPT_RECORD_CONFERENCE);
|
||||
aco_option_register_custom(&cfg_info, "video_mode", ACO_EXACT, bridge_types, NULL, video_mode_handler, 0);
|
||||
aco_option_register(&cfg_info, "record_file_append", ACO_EXACT, bridge_types, "yes", OPT_BOOLFLAG_T, 1, FLDSET(struct bridge_profile, flags), BRIDGE_OPT_RECORD_FILE_APPEND);
|
||||
aco_option_register(&cfg_info, "max_members", ACO_EXACT, bridge_types, "0", OPT_UINT_T, 0, FLDSET(struct bridge_profile, max_members));
|
||||
aco_option_register(&cfg_info, "record_file", ACO_EXACT, bridge_types, NULL, OPT_CHAR_ARRAY_T, 0, CHARFLDSET(struct bridge_profile, rec_file));
|
||||
aco_option_register_custom(&cfg_info, "^sound_", ACO_REGEX, bridge_types, NULL, sound_option_handler, 0);
|
||||
|
|
|
@ -65,6 +65,7 @@ enum bridge_profile_flags {
|
|||
BRIDGE_OPT_VIDEO_SRC_LAST_MARKED = (1 << 1), /*!< Set if conference should feed video of last marked user to all participants. */
|
||||
BRIDGE_OPT_VIDEO_SRC_FIRST_MARKED = (1 << 2), /*!< Set if conference should feed video of first marked user to all participants. */
|
||||
BRIDGE_OPT_VIDEO_SRC_FOLLOW_TALKER = (1 << 3), /*!< Set if conference set the video feed to follow the loudest talker. */
|
||||
BRIDGE_OPT_RECORD_FILE_APPEND = (1 << 4), /*!< Set if the record file should be appended to between start/stops. */
|
||||
};
|
||||
|
||||
enum conf_menu_action_id {
|
||||
|
|
Loading…
Reference in New Issue