[asterisk-commits] file: branch 11 r427844 - /branches/11/apps/confbridge/conf_state_multi_marked.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Nov 14 08:54:53 CST 2014


Author: file
Date: Fri Nov 14 08:54:50 2014
New Revision: 427844

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=427844
Log:
app_confbridge: Play "leader has left" sound even when musiconhold is enabled.

Currently if the leader of a conference bridge leaves any participant
that has musiconhold enabled will not hear the "leader has left" sound.
This is because musiconhold is started and THEN the sound is played.

This change makes it so that the sound is played and THEN musiconhold
is started. This provides a better experience for users as they may not
have known previously why they went back to musiconhold.

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

Modified:
    branches/11/apps/confbridge/conf_state_multi_marked.c

Modified: branches/11/apps/confbridge/conf_state_multi_marked.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/apps/confbridge/conf_state_multi_marked.c?view=diff&rev=427844&r1=427843&r2=427844
==============================================================================
--- branches/11/apps/confbridge/conf_state_multi_marked.c (original)
+++ branches/11/apps/confbridge/conf_state_multi_marked.c Fri Nov 14 08:54:50 2014
@@ -105,12 +105,6 @@
 				cbu_iter->conference_bridge->activeusers--;
 				AST_LIST_INSERT_TAIL(&cbu_iter->conference_bridge->waiting_list, cbu_iter, list);
 				cbu_iter->conference_bridge->waitingusers++;
-
-				/* Handle moh of cbu_iter if necessary */
-				if (ast_test_flag(&cbu_iter->u_profile, USER_OPT_MUSICONHOLD)) {
-					conf_moh_start(cbu_iter);
-				}
-				conf_update_user_mute(cbu_iter);
 			}
 		}
 		AST_LIST_TRAVERSE_SAFE_END;
@@ -166,6 +160,18 @@
 			ast_autoservice_stop(cbu->chan);
 			ao2_lock(cbu->conference_bridge);
 		}
+
+		AST_LIST_TRAVERSE(&cbu->conference_bridge->waiting_list, cbu_iter, list) {
+			if (cbu_iter->kicked) {
+				continue;
+			}
+
+			if (ast_test_flag(&cbu_iter->u_profile, USER_OPT_MUSICONHOLD)) {
+				conf_moh_start(cbu_iter);
+			}
+
+			conf_update_user_mute(cbu_iter);
+		}
 	}
 }
 




More information about the asterisk-commits mailing list