[asterisk-commits] branch oej/rtptiming r14232 - in /team/oej/rtptiming: ./ channels/ doc/ inclu...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Mar 22 14:25:03 MST 2006


Author: oej
Date: Wed Mar 22 15:24:56 2006
New Revision: 14232

URL: http://svn.digium.com/view/asterisk?rev=14232&view=rev
Log:
Change name from "silence suppression" to "internal timing"

Modified:
    team/oej/rtptiming/asterisk.c
    team/oej/rtptiming/channel.c
    team/oej/rtptiming/channels/chan_sip.c
    team/oej/rtptiming/doc/asterisk-conf.txt
    team/oej/rtptiming/include/asterisk/channel.h
    team/oej/rtptiming/include/asterisk/options.h

Modified: team/oej/rtptiming/asterisk.c
URL: http://svn.digium.com/view/asterisk/team/oej/rtptiming/asterisk.c?rev=14232&r1=14231&r2=14232&view=diff
==============================================================================
--- team/oej/rtptiming/asterisk.c (original)
+++ team/oej/rtptiming/asterisk.c Wed Mar 22 15:24:56 2006
@@ -160,7 +160,7 @@
 double option_maxload = 0.0;			/*!< Max load avg on system */
 int option_maxcalls = 0;			/*!< Max number of active calls */
 
-int option_silence_suppression = 0;
+int option_internal_timing = 0;
 
 
 /*! @} */
@@ -1972,8 +1972,8 @@
 		} else if (!strcasecmp(v->name, "transmit_silence_during_record")) {
 			ast_set2_flag(&ast_options, ast_true(v->value), AST_OPT_FLAG_TRANSMIT_SILENCE);
 		/* Enable silence suppression */
-		} else if (!strcasecmp(v->name, "silence_suppression")) {
-			option_silence_suppression = ast_true(v->value);
+		} else if (!strcasecmp(v->name, "internal_timing")) {
+			option_internal_timing = ast_true(v->value);
 } else if (!strcasecmp(v->name, "maxcalls")) {
 			if ((sscanf(v->value, "%d", &option_maxcalls) != 1) || (option_maxcalls < 0)) {
 				option_maxcalls = 0;
@@ -2091,8 +2091,6 @@
 		case 'q':
 			ast_set_flag(&ast_options, AST_OPT_FLAG_QUIET);
 			break;
-		case 's':
-			option_silence_suppression++;
 			break;
 		case 't':
 			ast_set_flag(&ast_options, AST_OPT_FLAG_CACHE_RECORD_FILES);
@@ -2108,6 +2106,8 @@
 			ast_copy_string(ast_config_AST_CONFIG_FILE, optarg, sizeof(ast_config_AST_CONFIG_FILE));
 			ast_set_flag(&ast_options, AST_OPT_FLAG_OVERRIDE_CONFIG);
 			break;
+		case 'I':
+			option_internal_timing++;
 		case 'i':
 			ast_set_flag(&ast_options, AST_OPT_FLAG_INIT_KEYS);
 			break;

Modified: team/oej/rtptiming/channel.c
URL: http://svn.digium.com/view/asterisk/team/oej/rtptiming/channel.c?rev=14232&r1=14231&r2=14232&view=diff
==============================================================================
--- team/oej/rtptiming/channel.c (original)
+++ team/oej/rtptiming/channel.c Wed Mar 22 15:24:56 2006
@@ -1978,7 +1978,7 @@
 
 				/* Run generator sitting on the line if timing device not available
 				* and synchronous generation of outgoing frames is necessary       */
-				if (f && (f->frametype == AST_FRAME_VOICE) && chan->generatordata && !ast_silence_suppression_enabled(chan)) {
+				if (f && (f->frametype == AST_FRAME_VOICE) && chan->generatordata && !ast_internal_timing_enabled(chan)) {
 					void *tmp;
 					int res;
 					int (*generate)(struct ast_channel *chan, void *tmp, int datalen, int samples);
@@ -2018,11 +2018,11 @@
 	return f;
 }
 
-int ast_silence_suppression_enabled(struct ast_channel *chan)
-{
-	int ret = option_silence_suppression && chan->timingfd > -1;
+int ast_internal_timing_enabled(struct ast_channel *chan)
+{
+	int ret = option_internal_timing && chan->timingfd > -1;
 	if (option_verbose > 2) 
-		ast_verbose(VERBOSE_PREFIX_3 "Silence suppression is %s (option_silence_suppression=%d chan->timingfd=%d)\n", ret? "enabled": "disabled", option_silence_suppression, chan->timingfd);
+		ast_verbose(VERBOSE_PREFIX_3 "Internal timing is %s (option_internal_timing=%d chan->timingfd=%d)\n", ret? "enabled": "disabled", option_internal_timing, chan->timingfd);
 	return ret;
 }
 

Modified: team/oej/rtptiming/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/rtptiming/channels/chan_sip.c?rev=14232&r1=14231&r2=14232&view=diff
==============================================================================
--- team/oej/rtptiming/channels/chan_sip.c (original)
+++ team/oej/rtptiming/channels/chan_sip.c Wed Mar 22 15:24:56 2006
@@ -4637,7 +4637,7 @@
 				    debug);
 	}
 
-	if(!ast_silence_suppression_enabled(p->owner))
+	if(!ast_internal_timing_enabled(p->owner))
 		ast_build_string(&a_audio_next, &a_audio_left, "a=silenceSupp:off - - - -\r\n");
 
 	if ((m_audio_left < 2) || (m_video_left < 2) || (a_audio_left == 0) || (a_video_left == 0))

Modified: team/oej/rtptiming/doc/asterisk-conf.txt
URL: http://svn.digium.com/view/asterisk/team/oej/rtptiming/doc/asterisk-conf.txt?rev=14232&r1=14231&r2=14232&view=diff
==============================================================================
--- team/oej/rtptiming/doc/asterisk-conf.txt (original)
+++ team/oej/rtptiming/doc/asterisk-conf.txt Wed Mar 22 15:24:56 2006
@@ -52,7 +52,7 @@
 runuser = asterisk				; User to run asterisk as (-U) NOTE: will require changes to
 						; directory and device permisions
 rungroup = asterisk				; Group to run asterisk as (-G)
-silence_suppression = yes | no			; Enable silence suppression support (-s)
+internal_timing = yes | no			; Enable internal timing support (-I)
 
 ;These options have no command line equivalent
 cache_record_files = yes | no			; Cache record() files in another directory until completion

Modified: team/oej/rtptiming/include/asterisk/channel.h
URL: http://svn.digium.com/view/asterisk/team/oej/rtptiming/include/asterisk/channel.h?rev=14232&r1=14231&r2=14232&view=diff
==============================================================================
--- team/oej/rtptiming/include/asterisk/channel.h (original)
+++ team/oej/rtptiming/include/asterisk/channel.h Wed Mar 22 15:24:56 2006
@@ -1132,7 +1132,7 @@
   This function will return 1 if silence suppression is enabled and the timing
   device is available.
  */
-int ast_silence_suppression_enabled(struct ast_channel *chan);
+int ast_internal_timing_enabled(struct ast_channel *chan);
 
 /* Misc. functions below */
 

Modified: team/oej/rtptiming/include/asterisk/options.h
URL: http://svn.digium.com/view/asterisk/team/oej/rtptiming/include/asterisk/options.h?rev=14232&r1=14231&r2=14232&view=diff
==============================================================================
--- team/oej/rtptiming/include/asterisk/options.h (original)
+++ team/oej/rtptiming/include/asterisk/options.h Wed Mar 22 15:24:56 2006
@@ -101,10 +101,10 @@
 extern struct ast_flags ast_options;
 
 extern int option_verbose;
-extern int option_debug;
-extern int option_maxcalls;
+extern int option_debug;		/*!< Debugging */
+extern int option_maxcalls;		/*!< Maximum number of simultaneous channels */
 extern double option_maxload;
-extern int option_silence_suppression;
+extern int option_internal_timing;	/*!< Flag for internal timing (RTP) */
 extern char defaultlanguage[];
 
 extern time_t ast_startuptime;



More information about the asterisk-commits mailing list