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

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Feb 5 07:09:50 CST 2014


Author: oej
Date: Wed Feb  5 07:09:45 2014
New Revision: 407398

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=407398
Log:
Had a great lunch at a thai restaurant and discussed my patch with me, myself and I. Decided that 
it was stupid to work on milliseconds when we simply could count the frames as they pass us by.

I agreed with that decision. No protocol was taken.

Modified:
    team/oej/silence-detection-games-1.8/channels/sip/include/sip.h
    team/oej/silence-detection-games-1.8/configs/sip.conf.sample

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=407398&r1=407397&r2=407398
==============================================================================
--- 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 Wed Feb  5 07:09:45 2014
@@ -62,8 +62,7 @@
 #define DEFAULT_AUTHLIMIT            100
 #define DEFAULT_AUTHTIMEOUT          30
 #define DEFAULT_SILENCELEVEL	     850
-#define DEFAULT_SILENCEPERIOD	     42   /* Milliseconds, meaning we will kill frame #3 in a 20 ms packetized stream 
-						besides 42 being a good number in general. */
+#define DEFAULT_SILENCEPERIOD	     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 */
@@ -721,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 long to wait before suppressing silence */
+	int silenceperiod;	     /*!< Default silence period - how many frames to wait before suppressing silence */
 };
 
 /*! \brief The SIP socket definition */
@@ -1095,10 +1094,10 @@
 
 	struct ast_dsp *dsp;                /*!< Inband DTMF or Fax CNG tone Detection dsp */
 	struct ast_dsp *sildet;             /*!< DSP used for silence detection */
-	time_t silencetimer;		    /*!< Timer used for silence detection. */
 	unsigned int silencelevel;	    /*!< Silence treshold */
-	unsigned int silenceperiod;	    /*!< How many milliseconds to wait for silence before activating silence
+	unsigned int silenceperiod;	    /*!< How many frames to wait for silence before activating silence
 						 support and sending CNG */
+	unsigned int silencecounter;	    /*!< Frame Counter used for silence detection. */
 
 	struct sip_peer *relatedpeer;       /*!< If this dialog is related to a peer, which one
 	                                         Used in peerpoke, mwi subscriptions */

Modified: team/oej/silence-detection-games-1.8/configs/sip.conf.sample
URL: http://svnview.digium.com/svn/asterisk/team/oej/silence-detection-games-1.8/configs/sip.conf.sample?view=diff&rev=407398&r1=407397&r2=407398
==============================================================================
--- team/oej/silence-detection-games-1.8/configs/sip.conf.sample (original)
+++ team/oej/silence-detection-games-1.8/configs/sip.conf.sample Wed Feb  5 07:09:45 2014
@@ -548,10 +548,10 @@
 ;				; You want to enable comfort noise too
 ;silencelevel = 850		; Silence detection noise level - below this is considered silent.
 				; Default = 850
-;silenceperiod = 42		; How many milliseconds of silence should we get before we supress
+;silenceperiod = 2		; How many frames of silence should we get before we supress
 				; audio. Consider packetization. A normal ALAW stream has 20 ms audio
-				; per RTP packet. 42 means we will start sending CNG at the third silent
-				; packet.
+				; per RTP packet. 2 means we will start sending CNG at the third silent
+				; packet, after 40 ms of silence.
 
 ;--------------------------- SIP Session-Timers (RFC 4028)------------------------------------
 ; SIP Session-Timers provide an end-to-end keep-alive mechanism for active SIP sessions.




More information about the svn-commits mailing list