[asterisk-commits] oej: branch oej/silence-detection-games-1.8 r407396 - /team/oej/silence-detec...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Feb 5 07:03:39 CST 2014


Author: oej
Date: Wed Feb  5 07:03:37 2014
New Revision: 407396

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=407396
Log:
I need anti-typo stuff. More stuff.

Modified:
    team/oej/silence-detection-games-1.8/channels/chan_sip.c

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=407396&r1=407395&r2=407396
==============================================================================
--- team/oej/silence-detection-games-1.8/channels/chan_sip.c (original)
+++ team/oej/silence-detection-games-1.8/channels/chan_sip.c Wed Feb  5 07:03:37 2014
@@ -7467,7 +7467,7 @@
 	ast_debug(3, "Checking if we need silence detection on %s\n", dialog->callid);
 
 	/* Check if we really want silence suppression */
-	if (!dialog || !dialog->rtp || !dialog->chan || !ast_test_flag(&dialog->flags[2], SIP_PAGE3_SILENCE_DETECTION)) {
+	if (!dialog || !dialog->rtp || !dialog->owner || !ast_test_flag(&dialog->flags[2], SIP_PAGE3_SILENCE_DETECTION)) {
 		return FALSE;
 	}
 	/* Allocate a new DSP */
@@ -7475,7 +7475,7 @@
 		ast_log(LOG_WARNING, "Unable to create silence detector :(\n");
 		return FALSE;
 	}
-	ast_dsp_set_threshold(sildet, ast_dsp_get_threshold_from_settings(dialog->silencelevel));
+	ast_dsp_set_threshold(dialog->sildet, ast_dsp_get_threshold_from_settings(dialog->silencelevel));
 
 	/* Create the silence detector */
 	/* Put channel in the right codec mode: SLINEAR
@@ -7483,7 +7483,7 @@
 		to a converted frame stream. After that we want the codecs themselves (when involved)
 		to be able to tell us if something is silent without having to transcode first.
 	 */
-	if ((res = ast_set_read_format(dialog->chan, AST_FORMAT_SLINEAR)) < 0) {
+	if ((res = ast_set_read_format(dialog->owner, AST_FORMAT_SLINEAR)) < 0) {
 		ast_log(LOG_WARNING, "Unable to set channel to linear mode, giving up\n");
 		ast_dsp_free(dialog->sildet);
 		dialog->sildet = NULL;




More information about the asterisk-commits mailing list