fprintf(stdout, "\033]1;%s\007", text);
}
-static int set_priority(int pri)
+int ast_set_priority(int pri)
{
struct sched_param sched;
memset(&sched, 0, sizeof(sched));
ast_verbose("[ Reading Master Configuration ]");
ast_readconfig();
- if (set_priority(option_highpriority)) {
+ if (ast_set_priority(option_highpriority)) {
exit(1);
}
extern char ast_config_AST_CTL_GROUP[AST_CONFIG_MAX_PATH];
extern char ast_config_AST_CTL[AST_CONFIG_MAX_PATH];
+/* Provided by asterisk.c */
+extern int ast_set_priority(int);
/* Provided by module.c */
extern int load_modules(const int preload_only);
/* Provided by pbx.c */
for (x=STDERR_FILENO + 2;x<1024;x++)
close(x);
+ /* Don't run AGI scripts with realtime priority -- it causes audio stutter */
+ ast_set_priority(0);
+
/* Execute script */
execv(script, argv);
/* Can't use ast_log since FD's are closed */