[asterisk-commits] dvossel: branch dvossel/hd_confbridge r309340 - in /team/dvossel/hd_confbridg...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Mar 2 17:44:01 CST 2011


Author: dvossel
Date: Wed Mar  2 17:43:57 2011
New Revision: 309340

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=309340
Log:
Adds the announce_only_user user profile option

Modified:
    team/dvossel/hd_confbridge/apps/app_confbridge.c
    team/dvossel/hd_confbridge/apps/confbridge/conf_config_parser.c
    team/dvossel/hd_confbridge/apps/confbridge/include/confbridge.h
    team/dvossel/hd_confbridge/configs/confbridge.conf.sample

Modified: team/dvossel/hd_confbridge/apps/app_confbridge.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/hd_confbridge/apps/app_confbridge.c?view=diff&rev=309340&r1=309339&r2=309340
==============================================================================
--- team/dvossel/hd_confbridge/apps/app_confbridge.c (original)
+++ team/dvossel/hd_confbridge/apps/app_confbridge.c Wed Mar  2 17:43:57 2011
@@ -238,7 +238,7 @@
 	/* Play back audio prompt and start MOH if need be if we are the first participant */
 	if (conference_bridge->users == 1) {
 		/* If audio prompts have not been quieted or this prompt quieted play it on out */
-		if (!ast_test_flag(&conference_bridge_user->u_profile, USER_OPT_QUIET | OPTION_NOONLYPERSON)) {
+		if (!ast_test_flag(&conference_bridge_user->u_profile, USER_OPT_QUIET | USER_OPT_NOONLYPERSON)) {
 			play_prompt_to_channel(conference_bridge, conference_bridge_user->chan, "conf-onlyperson");
 		}
 		/* If we need to start music on hold on the channel do so now */
@@ -451,7 +451,7 @@
 
 			/* Now on to starting MOH if needed */
 			AST_LIST_TRAVERSE(&conference_bridge->users_list, other_participant, list) {
-				if (ast_test_flag(&other_participant->u_profile, OPTION_MUSICONHOLD) && !ast_bridge_suspend(conference_bridge->bridge, other_participant->chan)) {
+				if (ast_test_flag(&other_participant->u_profile, USER_OPT_MUSICONHOLD) && !ast_bridge_suspend(conference_bridge->bridge, other_participant->chan)) {
 					ast_moh_start(other_participant->chan, other_participant->opt_args[OPTION_MUSICONHOLD_CLASS], NULL);
 					ast_bridge_unsuspend(conference_bridge->bridge, other_participant->chan);
 				}

Modified: team/dvossel/hd_confbridge/apps/confbridge/conf_config_parser.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/hd_confbridge/apps/confbridge/conf_config_parser.c?view=diff&rev=309340&r1=309339&r2=309340
==============================================================================
--- team/dvossel/hd_confbridge/apps/confbridge/conf_config_parser.c (original)
+++ team/dvossel/hd_confbridge/apps/confbridge/conf_config_parser.c Wed Mar  2 17:43:57 2011
@@ -199,6 +199,10 @@
 			u_profile->flags = ast_true(var->value) ?
 				u_profile->flags | USER_OPT_ANNOUNCEUSERCOUNT :
 				u_profile->flags & ~USER_OPT_ANNOUNCEUSERCOUNT;
+		} else if (!strcasecmp(var->name, "announce_only_user")) {
+			u_profile->flags = ast_true(var->value) ?
+				u_profile->flags & ~USER_OPT_NOONLYPERSON :
+				u_profile->flags | USER_OPT_NOONLYPERSON;
 		} else {
 			ast_log(LOG_WARNING, "Unknown option '%s' at line %d of %s is not supported.\n",
 				var->name, var->lineno, CONF_CONFIG);

Modified: team/dvossel/hd_confbridge/apps/confbridge/include/confbridge.h
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/hd_confbridge/apps/confbridge/include/confbridge.h?view=diff&rev=309340&r1=309339&r2=309340
==============================================================================
--- team/dvossel/hd_confbridge/apps/confbridge/include/confbridge.h (original)
+++ team/dvossel/hd_confbridge/apps/confbridge/include/confbridge.h Wed Mar  2 17:43:57 2011
@@ -34,11 +34,11 @@
 	USER_OPT_MUSICONHOLD = (1 << 4),     /*!< Set if music on hold should be played if nobody else is in the conference bridge */
 	USER_OPT_QUIET = (1 << 5),        /*!< Set if no audio prompts should be played */
 	USER_OPT_ANNOUNCEUSERCOUNT = (1 << 6), /*!< Set if the number of users should be announced to the caller */
+	USER_OPT_NOONLYPERSON = (1 << 1), /*!< Set if the "you are currently the only person in this conference" sound file should not be played */
 };
 
 enum bridge_profile_flags {
-	BRIDGE_OPT_NOONLYPERSON = (1 << 1), /*!< Set if the "you are currently the only person in this conference" sound file should not be played */
-	BRIDGE_OPT_WAITMARKED = (1 << 2),   /*!< Set if the conference must wait for a marked user before starting */
+	BRIDGE_OPT_WAITMARKED = (1 << 0),   /*!< Set if the conference must wait for a marked user before starting */
 };
 
 struct conf_menu {

Modified: team/dvossel/hd_confbridge/configs/confbridge.conf.sample
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/hd_confbridge/configs/confbridge.conf.sample?view=diff&rev=309340&r1=309339&r2=309340
==============================================================================
--- team/dvossel/hd_confbridge/configs/confbridge.conf.sample (original)
+++ team/dvossel/hd_confbridge/configs/confbridge.conf.sample Wed Mar  2 17:43:57 2011
@@ -16,6 +16,8 @@
 ;quiet=yes            ; Sets if no audio prompts should be played. Off by default
 ;announce_user_count=yes  ; Sets if the number of users should be announced to the
                           ; caller.  Off by default.
+;announce_only_user=yes   ; Sets if the only user announcement should be played
+                          ; when a channel enters a empty conference.  On by default.
 
 
 




More information about the asterisk-commits mailing list