int option_reconnect = 0;
int option_transcode_slin = 1;
int option_maxcalls = 0;
+int option_dontwarn = 0;
int fully_booted = 0;
char record_cache_dir[AST_CACHE_DIR_LEN] = AST_TMP_DIR;
char debug_filename[AST_FILENAME_MAX] = "";
/* Disable ANSI colors for console (-c at startup) */
} else if (!strcasecmp(v->name, "nocolor")) {
option_nocolor = ast_true(v->value);
+ /* Disable some usage warnings for picky people :p */
+ } else if (!strcasecmp(v->name, "dontwarn")) {
+ option_dontwarn = ast_true(v->value);
/* Dump core in case of crash (-g) */
} else if (!strcasecmp(v->name, "dumpcore")) {
option_dumpcore = ast_true(v->value);
if ((argc < 2) || (argc > 3))
return RESULT_SHOWUSAGE;
- if (getenv("I_AM_NOT_AN_IDIOT") == NULL)
+ if (!option_dontwarn)
ast_cli(fd, "Disclaimer: this command is for informational purposes only.\n"
"\tIt does not indicate anything about your configuration.\n");
extern int option_timestamp;
extern int option_transcode_slin;
extern int option_maxcalls;
+extern int option_dontwarn;
extern char defaultlanguage[];
extern time_t ast_startuptime;
extern time_t ast_lastreloadtime;
#include <sys/types.h>
#include "asterisk/pbx.h"
#include "asterisk/config.h"
+#include "asterisk/options.h"
#include "asterisk/module.h"
#include "asterisk/logger.h"
#include "asterisk/cli.h"
if (plus)
ipri += atoi(plus);
lastpri = ipri;
- if (!strcmp(realext, "_."))
- ast_log(LOG_WARNING, "The use of '_.' for an extension is strongly discouraged and can have unexpected behavior. Please use '_X.' instead at line %d\n", v->lineno);
+ if(!option_dontwarn) {
+ if (!strcmp(realext, "_."))
+ ast_log(LOG_WARNING, "The use of '_.' for an extension is strongly discouraged and can have unexpected behavior. Please use '_X.' instead at line %d\n", v->lineno);
+ }
if (ast_add_extension2(con, 0, realext, ipri, label, cidmatch, appl, strdup(data), FREE, registrar)) {
ast_log(LOG_WARNING, "Unable to register extension at line %d\n", v->lineno);
}