Update of /usr/cvsroot/asterisk/pbx In directory mongoose.digium.com:/tmp/cvs-serv27684/pbx
Modified Files:
pbx_config.c
Log Message:
perform global variable substitution before splitting extension and cidmatch
when reading in dialplan (bug #4035)
Index: pbx_config.c
===================================================================
RCS file: /usr/cvsroot/asterisk/pbx/pbx_config.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -d -r1.57 -r1.58
--- pbx_config.c 21 Apr 2005 06:02:44 -0000 1.57
+++ pbx_config.c 27 Apr 2005 04:52:58 -0000 1.58
@@ -1662,7 +1662,8 @@
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 @@
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 @@
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);
_______________________________________________
Asterisk-Cvs mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-cvs
