[svn-commits] oej: branch oej/silence-detection-games-1.8 r411813 - in /team/oej/silence-de...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Apr 7 09:59:36 CDT 2014


Author: oej
Date: Mon Apr  7 09:59:32 2014
New Revision: 411813

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=411813
Log:
Silenceperiod is now silenceframes. Better. Smarter. More beautiful. More elegant.

A perfect choice.

Modified:
    team/oej/silence-detection-games-1.8/channels/chan_sip.c
    team/oej/silence-detection-games-1.8/channels/sip/include/sip.h
    team/oej/silence-detection-games-1.8/include/asterisk/silencedetection.h

Modified: team/oej/silence-detection-games-1.8/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/silence-detection-games-1.8/channels/chan_sip.c?view=diff&rev=411813&r1=411812&r2=411813
==============================================================================
--- team/oej/silence-detection-games-1.8/channels/chan_sip.c (original)
+++ team/oej/silence-detection-games-1.8/channels/chan_sip.c Mon Apr  7 09:59:32 2014
@@ -19027,7 +19027,7 @@
 	ast_cli(a->fd, "  Use ClientCode:         %s\n", AST_CLI_YESNO(ast_test_flag(&global_flags[0], SIP_USECLIENTCODE)));
 	ast_cli(a->fd, "  Silence detection:      %s\n", AST_CLI_YESNO(ast_test_flag(&global_flags[2], SIP_PAGE3_SILENCE_DETECTION)));
 	ast_cli(a->fd, "  Silence level: 	  %d\n", sip_cfg.silencelevel);
-	ast_cli(a->fd, "  Silence period: 	  %d\n", sip_cfg.silenceperiod);
+	ast_cli(a->fd, "  Silence frames: 	  %d\n", sip_cfg.silenceframes);
 	ast_cli(a->fd, "  Progress inband:        %s\n", (ast_test_flag(&global_flags[0], SIP_PROG_INBAND) == SIP_PROG_INBAND_NEVER) ? "Never" : (AST_CLI_YESNO(ast_test_flag(&global_flags[0], SIP_PROG_INBAND) != SIP_PROG_INBAND_NO)));
 	ast_cli(a->fd, "  Language:               %s\n", default_language);
 	ast_cli(a->fd, "  MOH Interpret:          %s\n", default_mohinterpret);
@@ -19425,7 +19425,7 @@
 			ast_cli(a->fd, "  DTMF Mode:              %s\n", dtmfmode2str(ast_test_flag(&cur->flags[0], SIP_DTMF)));
 			ast_cli(a->fd, "  Silence Detection:      %s\n", AST_CLI_YESNO(ast_test_flag(&cur->flags[2], SIP_PAGE3_SILENCE_DETECTION)));
 			ast_cli(a->fd, "  Silence level:          %d\n", cur->silencelevel);
-			ast_cli(a->fd, "  Silence period:         %d\n", cur->silenceperiod);
+			ast_cli(a->fd, "  Silence frames:         %d\n", cur->silenceframes);
 			ast_cli(a->fd, "  SIP Options:            ");
 			if (cur->sipoptions) {
 				int x;
@@ -29056,7 +29056,7 @@
 	ast_copy_string(default_mwi_from, DEFAULT_MWI_FROM, sizeof(default_mwi_from));
 	sip_cfg.compactheaders = DEFAULT_COMPACTHEADERS;
 	sip_cfg.silencelevel = DEFAULT_SILENCELEVEL;
-	sip_cfg.silenceperiod = DEFAULT_SILENCEPERIOD;
+	sip_cfg.silenceframes = DEFAULT_SILENCEFRAMES;
 	global_reg_timeout = DEFAULT_REGISTRATION_TIMEOUT;
 	global_regattempts_max = 0;
 	global_reg_retry_403 = 0;
@@ -29611,11 +29611,11 @@
 				ast_log(LOG_WARNING, "'%s' is not a valid silencelevel value at line %d.  Using default.\n", v->value, v->lineno);
 				sip_cfg.silencelevel = DEFAULT_SILENCELEVEL;
 			}
-		} else if (!strcasecmp(v->name, "silenceperiod")) {
-			if (sscanf(v->value, "%30d", &sip_cfg.silenceperiod) != 1
-				|| sip_cfg.silenceperiod < 0 || sip_cfg.silenceperiod > 150) {
+		} else if (!strcasecmp(v->name, "silenceframes")) {
+			if (sscanf(v->value, "%30d", &sip_cfg.silenceframes) != 1
+				|| sip_cfg.silenceframes < 0 || sip_cfg.silenceframes > 150) {
 				ast_log(LOG_WARNING, "'%s' is not a valid silencelevel value at line %d.  Using default.\n", v->value, v->lineno);
-				sip_cfg.silencelevel = DEFAULT_SILENCELEVEL;
+				sip_cfg.silenceframes = DEFAULT_SILENCEFRAMES;
 			}
 		} else if (!strcasecmp(v->name, "maxforwards")) {
 			if (sscanf(v->value, "%30d", &sip_cfg.default_max_forwards) != 1

Modified: team/oej/silence-detection-games-1.8/channels/sip/include/sip.h
URL: http://svnview.digium.com/svn/asterisk/team/oej/silence-detection-games-1.8/channels/sip/include/sip.h?view=diff&rev=411813&r1=411812&r2=411813
==============================================================================
--- team/oej/silence-detection-games-1.8/channels/sip/include/sip.h (original)
+++ team/oej/silence-detection-games-1.8/channels/sip/include/sip.h Mon Apr  7 09:59:32 2014
@@ -62,7 +62,7 @@
 #define DEFAULT_AUTHLIMIT            100
 #define DEFAULT_AUTHTIMEOUT          30
 #define DEFAULT_SILENCELEVEL	     850
-#define DEFAULT_SILENCEPERIOD	     2   /* Number of frames of silence to let through before we start suppressing it */
+#define DEFAULT_SILENCEFRAMES	     2   /* Number of frames of silence to let through before we start suppressing it */
 
 /* guard limit must be larger than guard secs */
 /* guard min must be < 1000, and should be >= 250 */
@@ -720,7 +720,7 @@
 	int tcp_enabled;
 	int default_max_forwards;    /*!< Default max forwards (SIP Anti-loop) */
 	int silencelevel;	     /*!< Default silence treshold for silence detection */
-	int silenceperiod;	     /*!< Default silence period - how many frames to wait before suppressing silence */
+	int silenceframes;	     /*!< Default silence period - how many frames to wait before suppressing silence */
 };
 
 /*! \brief The SIP socket definition */

Modified: team/oej/silence-detection-games-1.8/include/asterisk/silencedetection.h
URL: http://svnview.digium.com/svn/asterisk/team/oej/silence-detection-games-1.8/include/asterisk/silencedetection.h?view=diff&rev=411813&r1=411812&r2=411813
==============================================================================
--- team/oej/silence-detection-games-1.8/include/asterisk/silencedetection.h (original)
+++ team/oej/silence-detection-games-1.8/include/asterisk/silencedetection.h Mon Apr  7 09:59:32 2014
@@ -31,7 +31,7 @@
 	\param silencelevel 	Audio treshold for silence
 	\param silenceframes	Number of frames before we react
 */
-int ast_sildet_activate(struct ast_channel *chan, int silencelevel, int silenceframes)
+int ast_sildet_activate(struct ast_channel *chan, int silencelevel, int silenceframes);
 
 #if defined(__cplusplus) || defined(c_plusplus)
 }




More information about the svn-commits mailing list