[asterisk-commits] kharwell: trunk r381729 - in /trunk: ./ apps/ apps/confbridge/ apps/confbridg...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Feb 19 09:41:42 CST 2013


Author: kharwell
Date: Tue Feb 19 09:41:37 2013
New Revision: 381729

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=381729
Log:
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/

Modified:
    trunk/CHANGES
    trunk/apps/app_confbridge.c
    trunk/apps/confbridge/conf_config_parser.c
    trunk/apps/confbridge/include/confbridge.h

Modified: trunk/CHANGES
URL: http://svnview.digium.com/svn/asterisk/trunk/CHANGES?view=diff&rev=381729&r1=381728&r2=381729
==============================================================================
--- trunk/CHANGES (original)
+++ trunk/CHANGES Tue Feb 19 09:41:37 2013
@@ -145,6 +145,9 @@
  * Added announcement configuration option to user profile. If set the sound
    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

Modified: trunk/apps/app_confbridge.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_confbridge.c?view=diff&rev=381729&r1=381728&r2=381729
==============================================================================
--- trunk/apps/app_confbridge.c (original)
+++ trunk/apps/app_confbridge.c Tue Feb 19 09:41:37 2013
@@ -602,7 +602,7 @@
 	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 @@
 			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)

Modified: trunk/apps/confbridge/conf_config_parser.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/confbridge/conf_config_parser.c?view=diff&rev=381729&r1=381728&r2=381729
==============================================================================
--- trunk/apps/confbridge/conf_config_parser.c (original)
+++ trunk/apps/confbridge/conf_config_parser.c Tue Feb 19 09:41:37 2013
@@ -1330,6 +1330,10 @@
 		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 @@
 	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);

Modified: trunk/apps/confbridge/include/confbridge.h
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/confbridge/include/confbridge.h?view=diff&rev=381729&r1=381728&r2=381729
==============================================================================
--- trunk/apps/confbridge/include/confbridge.h (original)
+++ trunk/apps/confbridge/include/confbridge.h Tue Feb 19 09:41:37 2013
@@ -65,6 +65,7 @@
 	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 {




More information about the asterisk-commits mailing list