Index: asterisk.c =================================================================== RCS file: /usr/cvsroot/asterisk/asterisk.c,v retrieving revision 1.154 diff -u -r1.154 asterisk.c --- asterisk.c 18 May 2005 01:49:12 -0000 1.154 +++ asterisk.c 18 May 2005 12:55:18 -0000 @@ -88,6 +88,7 @@ int option_reconnect = 0; int option_transcode_slin = 1; int option_maxcalls = 0; +int option_nosupport = 0; int fully_booted = 0; char record_cache_dir[AST_CACHE_DIR_LEN] = AST_TMP_DIR; char debug_filename[AST_FILENAME_MAX] = ""; @@ -1647,6 +1648,9 @@ /* Disable ANSI colors for console (-c at startup) */ } else if (!strcasecmp(v->name, "nocolor")) { option_nocolor = ast_true(v->value); + /* Disable some idiot warnings when you have this option set in asterisk.conf */ + } else if (!strcasecmp(v->name, "nosupport")) { + option_nosupport = ast_true(v->value); /* Dump core in case of crash (-g) */ } else if (!strcasecmp(v->name, "dumpcore")) { option_dumpcore = ast_true(v->value); Index: frame.c =================================================================== RCS file: /usr/cvsroot/asterisk/frame.c,v retrieving revision 1.55 diff -u -r1.55 frame.c --- frame.c 15 May 2005 05:46:34 -0000 1.55 +++ frame.c 18 May 2005 12:54:02 -0000 @@ -578,7 +578,7 @@ if ((argc < 2) || (argc > 3)) return RESULT_SHOWUSAGE; - if (getenv("I_AM_NOT_AN_IDIOT") == NULL) + if (!option_nosupport) ast_cli(fd, "Disclaimer: this command is for informational purposes only.\n" "\tIt does not indicate anything about your configuration.\n"); Index: include/asterisk/options.h =================================================================== RCS file: /usr/cvsroot/asterisk/include/asterisk/options.h,v retrieving revision 1.14 diff -u -r1.14 options.h --- include/asterisk/options.h 18 May 2005 01:49:13 -0000 1.14 +++ include/asterisk/options.h 18 May 2005 12:51:32 -0000 @@ -34,6 +34,7 @@ extern int option_timestamp; extern int option_transcode_slin; extern int option_maxcalls; +extern int option_nosupport; extern char defaultlanguage[]; extern time_t ast_startuptime; extern time_t ast_lastreloadtime; Index: pbx/pbx_config.c =================================================================== RCS file: /usr/cvsroot/asterisk/pbx/pbx_config.c,v retrieving revision 1.61 diff -u -r1.61 pbx_config.c --- pbx/pbx_config.c 12 May 2005 20:47:23 -0000 1.61 +++ pbx/pbx_config.c 18 May 2005 12:53:05 -0000 @@ -14,6 +14,7 @@ #include #include "asterisk/pbx.h" #include "asterisk/config.h" +#include "asterisk/options.h" #include "asterisk/module.h" #include "asterisk/logger.h" #include "asterisk/cli.h" @@ -1739,8 +1740,10 @@ 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_nosupport) { + 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); }