From 53b8d9c9c04ecbecdf919120e98edd9284f5e7c7 Mon Sep 17 00:00:00 2001 From: kpfleming Date: Wed, 27 Apr 2005 04:52:58 +0000 Subject: perform global variable substitution before splitting extension and cidmatch when reading in dialplan (bug #4035) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5515 f38db490-d61c-443f-a65b-d21fe96a405b --- pbx/pbx_config.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pbx/pbx_config.c b/pbx/pbx_config.c index 83488437e..33a669396 100755 --- a/pbx/pbx_config.c +++ b/pbx/pbx_config.c @@ -1662,7 +1662,8 @@ static int pbx_load_module(void) ext = strsep(&stringp, ","); if (!ext) ext=""; - cidmatch = strchr(ext, '/'); + pbx_substitute_variables_helper(NULL, ext, realext, sizeof(realext) - 1); + cidmatch = strchr(realext, '/'); if (cidmatch) { *cidmatch = '\0'; cidmatch++; @@ -1700,7 +1701,7 @@ static int pbx_load_module(void) ast_log(LOG_WARNING, "Can't use 'same' priority on the first entry!\n"); } else { if (sscanf(pri, "%i", &ipri) != 1) { - if ((ipri = ast_findlabel_extension2(NULL, con, ext, pri, cidmatch)) < 1) { + if ((ipri = ast_findlabel_extension2(NULL, con, realext, pri, cidmatch)) < 1) { ast_log(LOG_WARNING, "Invalid priority/label '%s' at line %d\n", pri, v->lineno); ipri = 0; } @@ -1733,7 +1734,6 @@ static int pbx_load_module(void) if (!data) data=""; while(*appl && (*appl < 33)) appl++; - pbx_substitute_variables_helper(NULL, ext, realext, sizeof(realext) - 1); if (ipri) { if (plus) ipri += atoi(plus); -- cgit v1.2.3