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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Mar 17 17:45:56 CDT 2011


Author: dvossel
Date: Thu Mar 17 17:45:52 2011
New Revision: 311294

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=311294
Log:
Re-introduction of the 'drop_silence' option

This option had some problems when I first introduced it,
but now it has been refined.

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=311294&r1=311293&r2=311294
==============================================================================
--- team/dvossel/hd_confbridge/apps/app_confbridge.c (original)
+++ team/dvossel/hd_confbridge/apps/app_confbridge.c Thu Mar 17 17:45:52 2011
@@ -905,6 +905,10 @@
 	/* If the caller should be joined already muted, make it so */
 	if (ast_test_flag(&conference_bridge_user.u_profile, USER_OPT_STARTMUTED)) {
 		conference_bridge_user.features.mute = 1;
+	}
+
+	if (ast_test_flag(&conference_bridge_user.u_profile, USER_OPT_DROP_SILENCE)) {
+		conference_bridge_user.tech_args.drop_silence = 1;
 	}
 
 	if (ast_test_flag(&conference_bridge_user.u_profile, USER_OPT_DENOISE)) {

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=311294&r1=311293&r2=311294
==============================================================================
--- team/dvossel/hd_confbridge/apps/confbridge/conf_config_parser.c (original)
+++ team/dvossel/hd_confbridge/apps/confbridge/conf_config_parser.c Thu Mar 17 17:45:52 2011
@@ -252,6 +252,10 @@
 			u_profile->flags = ast_true(var->value) ?
 				u_profile->flags | USER_OPT_DENOISE :
 				u_profile->flags & ~USER_OPT_DENOISE;
+		} else if (!strcasecmp(var->name, "drop_silence")) {
+			u_profile->flags = ast_true(var->value) ?
+				u_profile->flags | USER_OPT_DROP_SILENCE :
+				u_profile->flags & ~USER_OPT_DROP_SILENCE;
 		} else {
 			ast_log(LOG_WARNING, "Unknown option '%s' at line %d of %s is not supported.\n",
 				var->name, var->lineno, CONF_CONFIG);
@@ -502,6 +506,9 @@
 	ast_cli(a->fd,"END Marked:          %s\n",
 		u_profile.flags & USER_OPT_ENDMARKED ?
 		"enabled" : "disabled");
+	ast_cli(a->fd,"Drop_silence:        %s\n",
+		u_profile.flags & USER_OPT_DROP_SILENCE ?
+		"enabled" : "disabled");
 	ast_cli(a->fd,"Denoise:             %s\n",
 		u_profile.flags & USER_OPT_DENOISE ?
 		"enabled" : "disabled");

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=311294&r1=311293&r2=311294
==============================================================================
--- team/dvossel/hd_confbridge/apps/confbridge/include/confbridge.h (original)
+++ team/dvossel/hd_confbridge/apps/confbridge/include/confbridge.h Thu Mar 17 17:45:52 2011
@@ -44,6 +44,7 @@
 	USER_OPT_DENOISE =      (1 << 9), /*!< Sets if denoise filter should be used on audio before mixing. */
 	USER_OPT_ANNOUNCE_JOIN_LEAVE = (1 << 10), /*!< Sets if the user's name should be recorded and announced on join and leave. */
 	USER_OPT_TALKER_DETECT = (1 << 11), /*!< Sets if start and stop talking events should generated for this user over AMI. */
+	USER_OPT_DROP_SILENCE =  (1 << 12), /*!< Sets if silence should be dropped from the mix or not. */
 };
 
 enum bridge_profile_flags {

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=311294&r1=311293&r2=311294
==============================================================================
--- team/dvossel/hd_confbridge/configs/confbridge.conf.sample (original)
+++ team/dvossel/hd_confbridge/configs/confbridge.conf.sample Thu Mar 17 17:45:52 2011
@@ -33,9 +33,18 @@
                    ; joining the conference. Off by default.
 ;end_marked=yes ; This option will kick every user with this option set in their
                 ; user profile after the last Marked user exists the conference.
+;drop_silence=yes  ; This option drops what Asterisk detects as silence from
+                   ; entering into the bridge.  Enabling this option will drastically
+                   ; improve performance and help remove the buildup of background
+                   ; noise from the conference. Highly recommended for large conferences
+                   ; due to its performance enhancements.
 ;denoise=yes ; Sets whether or not a denoise filter should be applied
              ; to the audio before mixing or not.  Off by default. Requires
-             ; codec_speex to be built and installed.
+             ; codec_speex to be built and installed.  Do not confuse this option
+             ; with drop_silence.  Denoise is useful if there is a lot of background
+             ; noise for a user as it attempts to remove the noise while preserving
+             ; the speech.  This option does NOT remove silence from being mixed into
+             ; the conference and does come at the cost of a slight performance hit.
 ;pin=1234  ; Sets if this user must enter a PIN number before entering
            ; the conference.  The PIN will be prompted for.
 ;announce_join_leave=yes ; When enabled, this option will prompt the user for a




More information about the asterisk-commits mailing list