From: Paul Belanger Date: Thu, 13 Jan 2011 16:27:22 +0000 (+0000) Subject: Add dialplan variables for asterisk.conf directories X-Git-Tag: 11.0.0-beta1~1987 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f485bfd1d342d24776d8ea220c93f8cec1ef6fcd;p=thirdparty%2Fasterisk.git Add dialplan variables for asterisk.conf directories Review: https://reviewboard.asterisk.org/r/1075/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@301729 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/CHANGES b/CHANGES index 1053f09bb1..6085d327a9 100644 --- a/CHANGES +++ b/CHANGES @@ -34,6 +34,12 @@ CDR * The filter option in cdr_adaptive_odbc now supports negating the argument, thus allowing records which do NOT match the specified filter. +Dialplan Variables +------------------ + * Added ASTETCDIR, ASTMODDIR, ASTVARLIBDIR, ASTDBDIR, ASTKEYDIR, ASTDATADIR, + ASTAGIDIR, ASTSPOOLDIR, ASTRUNDIR, ASTLOGDIR which hold the equivalent + variables from asterisk.conf. + libpri channel driver (chan_dahdi) DAHDI changes -------------------------- * Added moh_signaling option to specify what to do when the channel's bridged diff --git a/main/pbx.c b/main/pbx.c index 90c09785e8..ba84a694c7 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -3159,6 +3159,26 @@ const char *ast_str_retrieve_variable(struct ast_str **str, ssize_t maxlen, stru s = ast_str_buffer(*str); } else if (!strcmp(var, "SYSTEMNAME")) { s = ast_config_AST_SYSTEM_NAME; + } else if (!strcmp(var, "ASTETCDIR")) { + s = ast_config_AST_CONFIG_DIR; + } else if (!strcmp(var, "ASTMODDIR")) { + s = ast_config_AST_MODULE_DIR; + } else if (!strcmp(var, "ASTVARLIBDIR")) { + s = ast_config_AST_VAR_DIR; + } else if (!strcmp(var, "ASTDBDIR")) { + s = ast_config_AST_DB; + } else if (!strcmp(var, "ASTKEYDIR")) { + s = ast_config_AST_KEY_DIR; + } else if (!strcmp(var, "ASTDATADIR")) { + s = ast_config_AST_DATA_DIR; + } else if (!strcmp(var, "ASTAGIDIR")) { + s = ast_config_AST_AGI_DIR; + } else if (!strcmp(var, "ASTSPOOLDIR")) { + s = ast_config_AST_SPOOL_DIR; + } else if (!strcmp(var, "ASTRUNDIR")) { + s = ast_config_AST_RUN_DIR; + } else if (!strcmp(var, "ASTLOGDIR")) { + s = ast_config_AST_LOG_DIR; } else if (!strcmp(var, "ENTITYID")) { char workspace[20]; ast_eid_to_str(workspace, sizeof(workspace), &ast_eid_default);