Index: configs/samples/confbridge.conf.sample =================================================================== --- configs/samples/confbridge.conf.sample (revision 423782) +++ configs/samples/confbridge.conf.sample (working copy) @@ -163,6 +163,9 @@ ; By default, the record_file is stored in Asterisk's spool/monitor directory ; with a unique filename starting with the 'confbridge' prefix. +;record_options= ; Pass additional options to MixMonitor +;record_command= ; Command to execute when recording has finished + ;internal_sample_rate=auto ; Sets the internal native sample rate the ; conference is mixed at. This is set to automatically ; adjust the sample rate to the best quality by default. Index: apps/confbridge/include/confbridge.h =================================================================== --- apps/confbridge/include/confbridge.h (revision 423782) +++ apps/confbridge/include/confbridge.h (working copy) @@ -198,6 +198,8 @@ char name[64]; char language[MAX_LANGUAGE]; /*!< Language used for playback_chan */ char rec_file[PATH_MAX]; + char rec_options[128]; + char rec_command[PATH_MAX * 2]; unsigned int flags; unsigned int max_members; /*!< The maximum number of participants allowed in the conference */ unsigned int internal_sample_rate; /*!< The internal sample rate of the bridge. 0 when set to auto adjust mode. */ Index: apps/confbridge/conf_config_parser.c =================================================================== --- apps/confbridge/conf_config_parser.c (revision 423782) +++ apps/confbridge/conf_config_parser.c (working copy) @@ -1528,6 +1528,9 @@ ast_strlen_zero(b_profile.rec_file) ? "Auto Generated" : b_profile.rec_file); + ast_cli(a->fd,"Record Options: %s\n", b_profile.rec_options); + ast_cli(a->fd,"Record Command: %s\n", b_profile.rec_command); + if (b_profile.max_members) { ast_cli(a->fd,"Max Members: %u\n", b_profile.max_members); } else { @@ -2098,6 +2101,8 @@ 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(&cfg_info, "record_options", ACO_EXACT, bridge_types, NULL, OPT_CHAR_ARRAY_T, 0, CHARFLDSET(struct bridge_profile, rec_options)); + aco_option_register(&cfg_info, "record_command", ACO_EXACT, bridge_types, NULL, OPT_CHAR_ARRAY_T, 0, CHARFLDSET(struct bridge_profile, rec_command)); aco_option_register(&cfg_info, "language", ACO_EXACT, bridge_types, "en", OPT_CHAR_ARRAY_T, 0, CHARFLDSET(struct bridge_profile, language)); aco_option_register_custom(&cfg_info, "^sound_", ACO_REGEX, bridge_types, NULL, sound_option_handler, 0); /* This option should only be used with the CONFBRIDGE dialplan function */ Index: apps/app_confbridge.c =================================================================== --- apps/app_confbridge.c (revision 423782) +++ apps/app_confbridge.c (working copy) @@ -556,33 +556,21 @@ static void set_rec_filename(struct confbridge_conference *conference, struct ast_str **filename, int is_new) { - char *rec_file = conference->b_profile.rec_file; - time_t now; - char *ext; - if (ast_str_strlen(*filename) && ast_test_flag(&conference->b_profile, BRIDGE_OPT_RECORD_FILE_APPEND) && !is_new) { return; } - time(&now); - ast_str_reset(*filename); - if (ast_strlen_zero(rec_file)) { - ast_str_set(filename, 0, "confbridge-%s-%u.wav", conference->name, (unsigned int)now); + if (ast_strlen_zero(conference->b_profile.rec_file)) { + ast_str_set(filename, 0, "confbridge-%s-%u.wav", conference->name, (unsigned int) time(NULL)); } else { - /* insert time before file extension */ - ext = strrchr(rec_file, '.'); - if (ext) { - ast_str_set_substr(filename, 0, rec_file, ext - rec_file); - ast_str_append(filename, 0, "-%u%s", (unsigned int)now, ext); - } else { - ast_str_set(filename, 0, "%s-%u", rec_file, (unsigned int)now); - } + ast_str_set(filename, 0, "%s", conference->b_profile.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", + conference->b_profile.rec_options, + ast_test_flag(&conference->b_profile, BRIDGE_OPT_RECORD_FILE_APPEND) ? "a" : "", + conference->b_profile.rec_command); } static int is_new_rec_file(const char *rec_file, struct ast_str **orig_rec_file)