[asterisk-commits] file: branch file/bridging r110333 - /team/file/bridging/apps/app_confbridge.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Mar 20 15:57:35 CDT 2008


Author: file
Date: Thu Mar 20 15:57:35 2008
New Revision: 110333

URL: http://svn.digium.com/view/asterisk?view=rev&rev=110333
Log:
Add option for not playing audio prompts.

Modified:
    team/file/bridging/apps/app_confbridge.c

Modified: team/file/bridging/apps/app_confbridge.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/apps/app_confbridge.c?view=diff&rev=110333&r1=110332&r2=110333
==============================================================================
--- team/file/bridging/apps/app_confbridge.c (original)
+++ team/file/bridging/apps/app_confbridge.c Thu Mar 20 15:57:35 2008
@@ -66,6 +66,7 @@
 "      'l' -- Do not play message when first person enters\n"
 "      's' -- Set initially muted\n"
 "      'w' -- Wait until a marked user enters before starting the conference\n"
+"      'q' -- Do not play audio prompts\n"
 "The join sound can be set using the CONFBRIDGE_JOIN_SOUND variable and the leave sound\n"
 "can be set using the CONFBRIDGE_LEAVE_SOUND variable. These can be unique to the caller.";
 
@@ -79,6 +80,7 @@
 	OPTION_ANNOUNCEUSERCOUNT = (1 << 6), /*!< Set if the number of users should be announced to the caller */
 	OPTION_MARKEDUSER = (1 << 7),        /*!< Set if the caller is a marked user */
 	OPTION_WAITMARKED = (1 << 8),        /*!< Set if the conference must wait for a marked user before starting */
+	OPTION_QUIET = (1 << 9),             /*!< Set if no audio prompts should be played */
 } option_flags;
 
 enum {
@@ -97,6 +99,7 @@
 	AST_APP_OPTION('1', OPTION_NOONLYPERSON),
 	AST_APP_OPTION('s', OPTION_STARTMUTED),
 	AST_APP_OPTION('w', OPTION_WAITMARKED),
+	AST_APP_OPTION('q', OPTION_QUIET),
 });
 
 #define MAX_CONF_NAME 32
@@ -229,7 +232,7 @@
 
 	/* If we are the first participant we may need to start MOH, if we are the second participant we may need to stop MOH on the first */
 	if (previous_participants == 0) {
-		if (!ast_test_flag(&conference_bridge_user->flags, OPTION_NOONLYPERSON)) {
+		if (!ast_test_flag(&conference_bridge_user->flags, OPTION_QUIET) && !ast_test_flag(&conference_bridge_user->flags, OPTION_NOONLYPERSON)) {
 			/* Play back the "you are currently the only person in this conference" recording while not blocking, as that would be silly. */
 			AST_LIST_UNLOCK(&conference_bridges);
 			ast_stream_and_wait(conference_bridge_user->chan, "conf-onlyperson", "");
@@ -481,7 +484,7 @@
 	}
 
 	/* If there is 1 or more people already in the conference then play our join sound unless overridden */
-	if (!ast_strlen_zero(join_sound) && conference_bridge->users >= 2) {
+	if (!ast_test_flag(&conference_bridge_user.flags, OPTION_QUIET) && !ast_strlen_zero(join_sound) && conference_bridge->users >= 2) {
 		ast_autoservice_start(chan);
 		play_sound_file(conference_bridge, join_sound);
 		ast_autoservice_stop(chan);
@@ -491,7 +494,7 @@
 	ast_bridge_join(conference_bridge->bridge, chan, NULL, &conference_bridge_user.features);
 
 	/* If there is 1 or more people (not including us) already in the conference then play our leave sound unless overridden */
-	if (!ast_strlen_zero(leave_sound) && conference_bridge->users >= 2) {
+	if (!ast_test_flag(&conference_bridge_user.flags, OPTION_QUIET) && !ast_strlen_zero(leave_sound) && conference_bridge->users >= 2) {
 		ast_autoservice_start(chan);
 		play_sound_file(conference_bridge, leave_sound);
 		ast_autoservice_stop(chan);
@@ -504,7 +507,7 @@
 	ast_bridge_features_cleanup(&conference_bridge_user.features);
 
 	/* If the user was kicked from the conference play back the audio prompt for it */
-	if (conference_bridge_user.kicked) {
+	if (!ast_test_flag(&conference_bridge_user.flags, OPTION_QUIET) && conference_bridge_user.kicked) {
 		res = ast_stream_and_wait(chan, "conf-kicked", "");
 	}
 




More information about the asterisk-commits mailing list