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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Mar 8 15:44:00 CST 2008


Author: file
Date: Sat Mar  8 15:44:00 2008
New Revision: 107006

URL: http://svn.digium.com/view/asterisk?view=rev&rev=107006
Log:
Add an option to disable the only person prompt.

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=107006&r1=107005&r2=107006
==============================================================================
--- team/file/bridging/apps/app_confbridge.c (original)
+++ team/file/bridging/apps/app_confbridge.c Sat Mar  8 15:44:00 2008
@@ -53,10 +53,11 @@
  " It shows you the basic structure to create your own Asterisk applications.\n";
 
 enum {
-	OPTION_DYNAMIC = (1 << 0),     /*!< Set if the conference is to be dynamically generated */
-	OPTION_ADMIN = (1 << 1),       /*!< Set if the caller is an administrator */
-	OPTION_MENU = (1 << 2),        /*!< Set if the caller should have access to the conference bridge IVR menu */
-	OPTION_MUSICONHOLD = (1 << 3), /*!< Set if music on hold should be played if nobody else is in the conference bridge */
+	OPTION_DYNAMIC = (1 << 0),      /*!< Set if the conference is to be dynamically generated */
+	OPTION_ADMIN = (1 << 1),        /*!< Set if the caller is an administrator */
+	OPTION_MENU = (1 << 2),         /*!< Set if the caller should have access to the conference bridge IVR menu */
+	OPTION_MUSICONHOLD = (1 << 3),  /*!< Set if music on hold should be played if nobody else is in the conference bridge */
+	OPTION_NOONLYPERSON = (1 << 4), /*!< Set if the "you are currently the only person in this conference" sound file should not be played */
 } option_flags;
 
 AST_APP_OPTIONS(app_opts,{
@@ -64,6 +65,7 @@
 	AST_APP_OPTION('d', OPTION_DYNAMIC),
 	AST_APP_OPTION('m', OPTION_MENU),
 	AST_APP_OPTION('M', OPTION_MUSICONHOLD),
+	AST_APP_OPTION('1', OPTION_NOONLYPERSON),
 });
 
 #define MAX_CONF_NAME 32
@@ -157,12 +159,14 @@
 
 	/* 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) {
-		/* 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_streamfile(conference_bridge_user->chan, "conf-onlyperson", conference_bridge_user->chan->language);
-		ast_waitstream(conference_bridge_user->chan, AST_DIGIT_ANY);
-		ast_stopstream(conference_bridge_user->chan);
-		AST_LIST_LOCK(&conference_bridges);
+		if (!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_streamfile(conference_bridge_user->chan, "conf-onlyperson", conference_bridge_user->chan->language);
+			ast_waitstream(conference_bridge_user->chan, AST_DIGIT_ANY);
+			ast_stopstream(conference_bridge_user->chan);
+			AST_LIST_LOCK(&conference_bridges);
+		}
 		/* We have to check again as the value may have changed while playing back the recording */
 		if (conference_bridge->users == 1 && ast_test_flag(&conference_bridge_user->flags, OPTION_MUSICONHOLD)) {
 			ast_moh_start(conference_bridge_user->chan, NULL, NULL);




More information about the asterisk-commits mailing list