[asterisk-commits] dvossel: branch dvossel/hd_confbridge r313093 - /team/dvossel/hd_confbridge/a...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Apr 7 11:53:42 CDT 2011


Author: dvossel
Date: Thu Apr  7 11:53:38 2011
New Revision: 313093

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=313093
Log:
Fixes issue with using moh with the announce_user_count_all confbridge option

Modified:
    team/dvossel/hd_confbridge/apps/app_confbridge.c

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=313093&r1=313092&r2=313093
==============================================================================
--- team/dvossel/hd_confbridge/apps/app_confbridge.c (original)
+++ team/dvossel/hd_confbridge/apps/app_confbridge.c Thu Apr  7 11:53:38 2011
@@ -691,22 +691,23 @@
 		announce_user_count(conference_bridge, conference_bridge_user);
 		ao2_lock(conference_bridge);
 	}
+
+	/* If we are the second participant we may need to stop music on hold on the first */
+	if (conference_bridge->users == 2) {
+		struct conference_bridge_user *first_participant = AST_LIST_FIRST(&conference_bridge->users_list);
+
+		/* Temporarily suspend the above participant from the bridge so we have control to stop MOH if needed */
+		if (ast_test_flag(&first_participant->u_profile, USER_OPT_MUSICONHOLD) && !ast_bridge_suspend(conference_bridge->bridge, first_participant->chan)) {
+			ast_moh_stop(first_participant->chan);
+			ast_bridge_unsuspend(conference_bridge->bridge, first_participant->chan);
+		}
+	}
+
 	if (ast_test_flag(&conference_bridge_user->u_profile, USER_OPT_ANNOUNCEUSERCOUNTALL) &&
 		(conference_bridge->users > conference_bridge_user->u_profile.announce_user_count_all_after)) {
 		ao2_unlock(conference_bridge);
 		announce_user_count(conference_bridge, NULL);
 		ao2_lock(conference_bridge);
-	}
-
-	/* If we are the second participant we may need to stop music on hold on the first */
-	if (conference_bridge->users == 2) {
-		struct conference_bridge_user *first_participant = AST_LIST_FIRST(&conference_bridge->users_list);
-
-		/* Temporarily suspend the above participant from the bridge so we have control to stop MOH if needed */
-		if (ast_test_flag(&first_participant->u_profile, USER_OPT_MUSICONHOLD) && !ast_bridge_suspend(conference_bridge->bridge, first_participant->chan)) {
-			ast_moh_stop(first_participant->chan);
-			ast_bridge_unsuspend(conference_bridge->bridge, first_participant->chan);
-		}
 	}
 }
 




More information about the asterisk-commits mailing list