Index: doc/asterisk.sgml =================================================================== --- doc/asterisk.sgml (revision 230418) +++ doc/asterisk.sgml (working copy) @@ -310,6 +310,16 @@ + + -X + + + Enables executing of includes via #exec directive. + This can be useful if You want to do #exec inside + asterisk.conf + + + Index: main/asterisk.c =================================================================== --- main/asterisk.c (revision 230418) +++ main/asterisk.c (working copy) @@ -2777,6 +2777,7 @@ printf(" of output to the CLI\n"); printf(" -v Increase verbosity (multiple v's = more verbose)\n"); printf(" -x Execute command (only valid with -r)\n"); + printf(" -X Execute includes by default (allows #exec in asterisk.conf)\n"); printf(" -W Adjust terminal colors to compensate for a light background\n"); printf("\n"); return 0; @@ -3141,7 +3142,7 @@ if (getenv("HOME")) snprintf(filename, sizeof(filename), "%s/.asterisk_history", getenv("HOME")); /* Check for options */ - while ((c = getopt(argc, argv, "mtThfFdvVqprRgciInx:U:G:C:L:M:e:s:WB")) != -1) { + while ((c = getopt(argc, argv, "mtThfFdvVqprRgciInXx:U:G:C:L:M:e:s:WB")) != -1) { switch (c) { #if defined(HAVE_SYSINFO) case 'e': @@ -3205,6 +3206,9 @@ ast_set_flag(&ast_options, AST_OPT_FLAG_EXEC); xarg = ast_strdupa(optarg); break; + case 'X': + ast_set_flag(&ast_options, AST_OPT_FLAG_EXEC_INCLUDES); + break; case 'C': ast_copy_string(cfg_paths.config_file, optarg, sizeof(cfg_paths.config_file)); ast_set_flag(&ast_options, AST_OPT_FLAG_OVERRIDE_CONFIG);