diff --git a/CHANGES b/CHANGES index ed39722708..906efa54b6 100644 --- a/CHANGES +++ b/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 ------------------- diff --git a/apps/app_confbridge.c b/apps/app_confbridge.c index 5bc1c5d483..76a269bb19 100644 --- a/apps/app_confbridge.c +++ b/apps/app_confbridge.c @@ -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) diff --git a/apps/confbridge/conf_config_parser.c b/apps/confbridge/conf_config_parser.c index 6c5ea0bb8e..ecb989f7be 100644 --- a/apps/confbridge/conf_config_parser.c +++ b/apps/confbridge/conf_config_parser.c @@ -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); diff --git a/apps/confbridge/include/confbridge.h b/apps/confbridge/include/confbridge.h index 059262065d..54d429a289 100644 --- a/apps/confbridge/include/confbridge.h +++ b/apps/confbridge/include/confbridge.h @@ -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 {