[asterisk-commits] jrose: trunk r402854 - in /trunk: ./ apps/ apps/confbridge/ apps/confbridge/i...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Nov 15 16:38:57 CST 2013


Author: jrose
Date: Fri Nov 15 16:38:52 2013
New Revision: 402854

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=402854
Log:
Confbridge: Add option to review the recording similar to announce_join_leave

Review: https://reviewboard.asterisk.org/r/3008/

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

Modified: trunk/CHANGES
URL: http://svnview.digium.com/svn/asterisk/trunk/CHANGES?view=diff&rev=402854&r1=402853&r2=402854
==============================================================================
--- trunk/CHANGES (original)
+++ trunk/CHANGES Fri Nov 15 16:38:52 2013
@@ -20,6 +20,11 @@
  * CONFBRIDGE dialplan function is now capable of removing dynamic conference
    menus, bridge settings, and user settings that have been applied by the
    CONFBRIDGE dialplan function.
+
+ * Added conference user option 'announce_join_leave_review'. This option
+   implies 'announce_join_leave' with the added effect that the user will
+   be asked if they want to confirm or re-record the recording of their
+   name when entering the conference
 
 Say
 --------------------------

Modified: trunk/apps/app_confbridge.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_confbridge.c?view=diff&rev=402854&r1=402853&r2=402854
==============================================================================
--- trunk/apps/app_confbridge.c (original)
+++ trunk/apps/app_confbridge.c Fri Nov 15 16:38:52 2013
@@ -1508,16 +1508,26 @@
 		 "%s/confbridge-name-%s-%s", destdir,
 		 conf_name, ast_channel_uniqueid(user->chan));
 
-	res = ast_play_and_record(user->chan,
-		"vm-rec-name",
-		user->name_rec_location,
-		10,
-		"sln",
-		&duration,
-		NULL,
-		ast_dsp_get_threshold_from_settings(THRESHOLD_SILENCE),
-		0,
-		NULL);
+	if (!(ast_test_flag(&user->u_profile, USER_OPT_ANNOUNCE_JOIN_LEAVE_REVIEW))) {
+		res = ast_play_and_record(user->chan,
+			"vm-rec-name",
+			user->name_rec_location,
+			10,
+			"sln",
+			&duration,
+			NULL,
+			ast_dsp_get_threshold_from_settings(THRESHOLD_SILENCE),
+			0,
+			NULL);
+	} else {
+		res = ast_record_review(user->chan,
+			"vm-rec-name",
+			user->name_rec_location,
+			10,
+			"sln",
+			&duration,
+			NULL);
+	}
 
 	if (res == -1) {
 		user->name_rec_location[0] = '\0';
@@ -1603,7 +1613,9 @@
 	}
 
 	/* See if we need them to record a intro name */
-	if (!quiet && ast_test_flag(&user.u_profile, USER_OPT_ANNOUNCE_JOIN_LEAVE)) {
+	if (!quiet &&
+		(ast_test_flag(&user.u_profile, USER_OPT_ANNOUNCE_JOIN_LEAVE) ||
+		(ast_test_flag(&user.u_profile, USER_OPT_ANNOUNCE_JOIN_LEAVE_REVIEW)))) {
 		conf_rec_name(&user, args.conf_name);
 	}
 

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=402854&r1=402853&r2=402854
==============================================================================
--- trunk/apps/confbridge/conf_config_parser.c (original)
+++ trunk/apps/confbridge/conf_config_parser.c Fri Nov 15 16:38:52 2013
@@ -109,6 +109,10 @@
 				</configOption>
 				<configOption name="announce_join_leave">
 					<synopsis>Prompt user for their name when joining a conference and play it to the conference when they enter</synopsis>
+				</configOption>
+				<configOption name="announce_join_leave_review">
+					<synopsis>Prompt user for their name when joining a conference and play it to the conference when they enter.
+					The user will be asked to review the recording of their name before entering the conference.</synopsis>
 				</configOption>
 				<configOption name="pin">
 					<synopsis>Sets a PIN the user must enter before joining the conference</synopsis>
@@ -1384,8 +1388,9 @@
 		u_profile.flags & USER_OPT_ANNOUNCEUSERCOUNT ?
 		"enabled" : "disabled");
 	ast_cli(a->fd,"Announce join/leave:     %s\n",
-		u_profile.flags & USER_OPT_ANNOUNCE_JOIN_LEAVE ?
-		"enabled" : "disabled");
+		u_profile.flags & (USER_OPT_ANNOUNCE_JOIN_LEAVE | USER_OPT_ANNOUNCE_JOIN_LEAVE_REVIEW) ?
+		u_profile.flags & USER_OPT_ANNOUNCE_JOIN_LEAVE_REVIEW ?
+		"enabled (with review)" : "enabled" : "disabled");
 	ast_cli(a->fd,"Announce User Count all: %s\n",
 		u_profile.flags & USER_OPT_ANNOUNCEUSERCOUNTALL ?
 		"enabled" : "disabled");
@@ -2054,6 +2059,7 @@
 	aco_option_register(&cfg_info, "talk_detection_events", ACO_EXACT, user_types, "no", OPT_BOOLFLAG_T, 1, FLDSET(struct user_profile, flags), USER_OPT_TALKER_DETECT);
 	aco_option_register(&cfg_info, "dtmf_passthrough", ACO_EXACT, user_types, "no", OPT_BOOLFLAG_T, 1, FLDSET(struct user_profile, flags), USER_OPT_DTMF_PASS);
 	aco_option_register(&cfg_info, "announce_join_leave", ACO_EXACT, user_types, "no", OPT_BOOLFLAG_T, 1, FLDSET(struct user_profile, flags), USER_OPT_ANNOUNCE_JOIN_LEAVE);
+	aco_option_register(&cfg_info, "announce_join_leave_review", ACO_EXACT, user_types, "no", OPT_BOOLFLAG_T, 1, FLDSET(struct user_profile, flags), USER_OPT_ANNOUNCE_JOIN_LEAVE_REVIEW);
 	aco_option_register(&cfg_info, "pin", ACO_EXACT, user_types, NULL, OPT_CHAR_ARRAY_T, 0, CHARFLDSET(struct user_profile, pin));
 	aco_option_register(&cfg_info, "music_on_hold_class", ACO_EXACT, user_types, NULL, OPT_CHAR_ARRAY_T, 0, CHARFLDSET(struct user_profile, moh_class));
 	aco_option_register(&cfg_info, "announcement", ACO_EXACT, user_types, NULL, OPT_CHAR_ARRAY_T, 0, CHARFLDSET(struct user_profile, announcement));

Modified: trunk/apps/confbridge/include/confbridge.h
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/confbridge/include/confbridge.h?view=diff&rev=402854&r1=402853&r2=402854
==============================================================================
--- trunk/apps/confbridge/include/confbridge.h (original)
+++ trunk/apps/confbridge/include/confbridge.h Fri Nov 15 16:38:52 2013
@@ -59,6 +59,7 @@
 	USER_OPT_DTMF_PASS    =  (1 << 13), /*!< Sets if dtmf should be passed into the conference or not */
 	USER_OPT_ANNOUNCEUSERCOUNTALL = (1 << 14), /*!< Sets if the number of users should be announced to everyone. */
 	USER_OPT_JITTERBUFFER =  (1 << 15), /*!< Places a jitterbuffer on the user. */
+	USER_OPT_ANNOUNCE_JOIN_LEAVE_REVIEW = (1 << 16), /*!< modifies ANNOUNCE_JOIN_LEAVE - user reviews the recording before continuing */
 };
 
 enum bridge_profile_flags {

Modified: trunk/configs/confbridge.conf.sample
URL: http://svnview.digium.com/svn/asterisk/trunk/configs/confbridge.conf.sample?view=diff&rev=402854&r1=402853&r2=402854
==============================================================================
--- trunk/configs/confbridge.conf.sample (original)
+++ trunk/configs/confbridge.conf.sample Fri Nov 15 16:38:52 2013
@@ -128,6 +128,11 @@
                          ; name when entering the conference.  After the name is
                          ; recorded, it will be played as the user enters and exists
                          ; the conference. This option is off by default.
+;announce_join_leave_review=yes ; When enabled, implies announce_join_leave, but the user
+                                ; will be prompted to review their recording before
+                                ; entering the conference. During this phase, the recording
+                                ; may be listened to, re-recorded, or accepted as is. This
+                                ; option is off by default.
 ;dtmf_passthrough=yes  ; Sets whether or not DTMF should pass through the conference.
                        ; This option is off by default.
 ;announcement=</path/to/file> ; Play a sound file to the user when they join the conference.




More information about the asterisk-commits mailing list