Index: pbx/pbx_config.c =================================================================== --- pbx/pbx_config.c (revision 229670) +++ pbx/pbx_config.c (working copy) @@ -1496,12 +1496,26 @@ /* No arguments */ data = ""; } else { + /* tmp char for stringp */ + char tmp[512]; + /* make copy from stringp */ + strcpy(tmp, appl); appl = strsep(&stringp, "("); - data = S_OR(stringp, ""); - if ((end = strrchr(data, ')'))) { - *end = '\0'; + + /* check if there are variables or expressions without an application, like: exten => 100,hint,DAHDI/g0/${GLOBAL(var)} */ + if (strstr(appl, "${") || strstr(appl, "$[")){ + /* set appl to tmp (stringp) */ + appl = tmp; + /* set no data */ + data = ""; + /* no variable before application found -> go ahead */ } else { - ast_log(LOG_WARNING, "No closing parenthesis found? '%s(%s'\n", appl, data); + data = S_OR(stringp, ""); + if ((end = strrchr(data, ')'))) { + *end = '\0'; + } else { + ast_log(LOG_WARNING, "No closing parenthesis found? '%s(%s'\n", appl, data); + } } }