[asterisk-commits] oej: branch oej/silence-detection-games-1.8 r411919 - in /team/oej/silence-de...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Apr 8 08:20:04 CDT 2014
Author: oej
Date: Tue Apr 8 08:19:58 2014
New Revision: 411919
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=411919
Log:
Setting levels, listening to nothing.
Modified:
team/oej/silence-detection-games-1.8/channels/sip/include/sip.h
team/oej/silence-detection-games-1.8/main/silencedetection.c
team/oej/silence-detection-games-1.8/res/res_rtp_asterisk.c
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=411919&r1=411918&r2=411919
==============================================================================
--- 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 Tue Apr 8 08:19:58 2014
@@ -61,7 +61,7 @@
#define DEFAULT_AUTHLIMIT 100
#define DEFAULT_AUTHTIMEOUT 30
-#define DEFAULT_SILENCELEVEL 850
+#define DEFAULT_SILENCELEVEL 100
#define DEFAULT_SILENCEFRAMES 7 /* Number of frames of silence to let through before we start suppressing it */
/* guard limit must be larger than guard secs */
Modified: team/oej/silence-detection-games-1.8/main/silencedetection.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/silence-detection-games-1.8/main/silencedetection.c?view=diff&rev=411919&r1=411918&r2=411919
==============================================================================
--- team/oej/silence-detection-games-1.8/main/silencedetection.c (original)
+++ team/oej/silence-detection-games-1.8/main/silencedetection.c Tue Apr 8 08:19:58 2014
@@ -101,6 +101,9 @@
struct ast_datastore *datastore = NULL;
struct silence_detection_info *sildet = NULL;
+ if (direction != AST_AUDIOHOOK_DIRECTION_WRITE) {
+ return 1;
+ }
/* If the audiohook is stopping it means the channel is shutting down.... but we let the datastore destroy take care of it */
if (audiohook->status == AST_AUDIOHOOK_STATUS_DONE) {
@@ -149,6 +152,8 @@
sildet->silencecounter++;
if (sildet->detect == 1 && sildet->silencecounter > sildet->silenceframes) {
ast_frame_clear(frame); /* Should really be dropped. */
+ frame->samples = 0;
+ frame->datalen = 0;
//frame->frametype = AST_FRAME_DROP;
ast_channel_unlock(chan);
Modified: team/oej/silence-detection-games-1.8/res/res_rtp_asterisk.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/silence-detection-games-1.8/res/res_rtp_asterisk.c?view=diff&rev=411919&r1=411918&r2=411919
==============================================================================
--- team/oej/silence-detection-games-1.8/res/res_rtp_asterisk.c (original)
+++ team/oej/silence-detection-games-1.8/res/res_rtp_asterisk.c Tue Apr 8 08:19:58 2014
@@ -1341,11 +1341,6 @@
/* If we don't actually know the remote address don't even bother doing anything */
if (ast_sockaddr_isnull(&remote_address)) {
ast_debug(1, "No remote address on RTP instance '%p' so dropping frame\n", instance);
- return 0;
- }
-
- if (frame->frametype != AST_FRAME_DROP) {
- /* This is a victim of silence suppression. Just ignore it. */
return 0;
}
More information about the asterisk-commits
mailing list