mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 04:11:08 +00:00
internal_timing: Remove the option and always make it enabled if a timing module is loaded.
The masquerade supertest frequently fails because either the local channel chain doesn't completely optimize out or the DTMF handshake doesn't completely get accross. Local channel optimization requires frames flowing to trigger when optimization can happen. When optimization happens the media frame that triggered the optimization is dropped. Sending DTMF requires frames to flow in the other direction for timing purposes while sending nothing. If internal timing is not enabled when MOH is playing, Asterisk switches to received timing when an audio frame is received. With optimization dropping media frames and MOH not sending frames unless it receives frames, occasionaly there are no more frames being passed and the test fails. * The asterisk command line -I option and the asterisk.conf internal_timing option are removed. Asterisk now always uses internal timing when needed if any timing module is loaded. The issue ASTERISK-14861 did this quite awhile ago in v1.4 but effectively is broken if other internal timing modules besides DAHDI are used. The ast_read_generator_actions() now only does received timing if it has no choice for frame generators like MOH, silence, and playback streaming. * Cleaned up some code dealing with frame generators in ast_deactivate_generator(), generator_write_format_change(), ast_activate_generator(), and ast_channel_stop_silence_generator(). * Removed ast_internal_timing_enabled(), AST_OPT_FLAG_INTERNAL_TIMING, and ast_opt_internal_timing. ASTERISK-22846 #close Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/3414/ ........ Merged revisions 411715 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 411716 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 411717 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@411724 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -637,7 +637,6 @@ static char *handle_show_settings(struct ast_cli_entry *e, int cmd, struct ast_c
|
||||
ast_cli(a->fd, " User name and group: %s/%s\n", ast_config_AST_RUN_USER, ast_config_AST_RUN_GROUP);
|
||||
ast_cli(a->fd, " Executable includes: %s\n", ast_test_flag(&ast_options, AST_OPT_FLAG_EXEC_INCLUDES) ? "Enabled" : "Disabled");
|
||||
ast_cli(a->fd, " Transcode via SLIN: %s\n", ast_test_flag(&ast_options, AST_OPT_FLAG_TRANSCODE_VIA_SLIN) ? "Enabled" : "Disabled");
|
||||
ast_cli(a->fd, " Internal timing: %s\n", ast_test_flag(&ast_options, AST_OPT_FLAG_INTERNAL_TIMING) ? "Enabled" : "Disabled");
|
||||
ast_cli(a->fd, " Transmit silence during rec: %s\n", ast_test_flag(&ast_options, AST_OPT_FLAG_TRANSMIT_SILENCE) ? "Enabled" : "Disabled");
|
||||
ast_cli(a->fd, " Generic PLC: %s\n", ast_test_flag(&ast_options, AST_OPT_FLAG_GENERIC_PLC) ? "Enabled" : "Disabled");
|
||||
ast_cli(a->fd, " Min DTMF duration:: %u\n", option_dtmfminduration);
|
||||
@@ -3363,7 +3362,6 @@ static int show_cli_help(void)
|
||||
printf(" -g Dump core in case of a crash\n");
|
||||
printf(" -h This help screen\n");
|
||||
printf(" -i Initialize crypto keys at startup\n");
|
||||
printf(" -I Enable internal timing if DAHDI timer is available\n");
|
||||
printf(" -L <load> Limit the maximum load average before rejecting new calls\n");
|
||||
printf(" -M <value> Limit the maximum number of calls to the specified value\n");
|
||||
printf(" -m Mute debugging and console output on the console\n");
|
||||
@@ -3539,9 +3537,6 @@ static void ast_readconfig(void)
|
||||
/* Transmit SLINEAR silence while a channel is being recorded or DTMF is being generated on a channel */
|
||||
} else if (!strcasecmp(v->name, "transmit_silence_during_record") || !strcasecmp(v->name, "transmit_silence")) {
|
||||
ast_set2_flag(&ast_options, ast_true(v->value), AST_OPT_FLAG_TRANSMIT_SILENCE);
|
||||
/* Enable internal timing */
|
||||
} else if (!strcasecmp(v->name, "internal_timing")) {
|
||||
ast_set2_flag(&ast_options, ast_true(v->value), AST_OPT_FLAG_INTERNAL_TIMING);
|
||||
} else if (!strcasecmp(v->name, "mindtmfduration")) {
|
||||
if (sscanf(v->value, "%30u", &option_dtmfminduration) != 1) {
|
||||
option_dtmfminduration = AST_MIN_DTMF_DURATION;
|
||||
@@ -3869,9 +3864,6 @@ int main(int argc, char *argv[])
|
||||
case 'h':
|
||||
show_cli_help();
|
||||
exit(0);
|
||||
case 'I':
|
||||
ast_set_flag(&ast_options, AST_OPT_FLAG_INTERNAL_TIMING);
|
||||
break;
|
||||
case 'i':
|
||||
ast_set_flag(&ast_options, AST_OPT_FLAG_INIT_KEYS);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user