--- pbx/pbx_config.c.orig 2009-08-10 20:30:55.000000000 +0100 +++ pbx/pbx_config.c 2009-10-13 10:10:58.000000000 +0100 @@ -954,18 +954,18 @@ } } app = whole_exten; - if (app && (start = strchr(app, '(')) && (end = strrchr(app, ')'))) { - *start = *end = '\0'; - app_data = start + 1; - } else { - if (app) { + app_data = NULL; + if (app && iprior != PRIORITY_HINT) { + if ((start = strchr(app, '(')) && (end = strrchr(app, ')'))) { + *start = *end = '\0'; + app_data = start + 1; + } else { app_data = strchr(app, ','); if (app_data) { *app_data = '\0'; app_data++; } - } else - app_data = NULL; + } } if (!exten || !prior || !app || (!app_data && iprior != PRIORITY_HINT)) @@ -1446,7 +1446,7 @@ appl = S_OR(stringp, ""); /* Find the first occurrence of '(' */ firstp = strchr(appl, '('); - if (!firstp) { + if (ipri == PRIORITY_HINT || !firstp) { /* No arguments */ data = ""; } else {