diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-12-07 20:46:55 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-12-07 20:46:55 +0000 |
commit | 16524c87e00c7cd714e64bdbeee3c70a81f4a140 (patch) | |
tree | 5f1538d42be320011eb8f094b6f54822da4c94b6 /pbx.c | |
parent | 5b5b71faa7f9d5ebaf260ec50dffb650e7ee5503 (diff) |
ensure that hints are allowed to use global variable references
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@7382 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx.c')
-rw-r--r-- | pbx.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -4652,6 +4652,16 @@ int ast_add_extension2(struct ast_context *con, int res; int length; char *p; + char expand_buf[VAR_BUF_SIZE]; + + /* if we are adding a hint, and there are global variables, and the hint + contains variable references, then expand them + */ + if ((priority == PRIORITY_HINT) && AST_LIST_FIRST(&globals) && strstr(application, "${")) { + pbx_substitute_variables_varshead(&globals, application, expand_buf, sizeof(expand_buf)); + application = expand_buf; + } + length = sizeof(struct ast_exten); length += strlen(extension) + 1; length += strlen(application) + 1; |