diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-04-03 22:24:17 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-04-03 22:24:17 +0000 |
commit | bbbb1d493dfcc49a639c0d6fda114322041a4f2b (patch) | |
tree | 7c20e0af42271b217a16e5042fbd1e55d1e5ad94 | |
parent | 9dd83d2337a5779ee66486cbc6f3a4474492675b (diff) |
further thought says '!' is a better early-match wildcard (bug #3889, take 2)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5372 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-x | configs/extensions.conf.sample | 2 | ||||
-rwxr-xr-x | pbx.c | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/configs/extensions.conf.sample b/configs/extensions.conf.sample index b0768d84b..f53e3a90f 100755 --- a/configs/extensions.conf.sample +++ b/configs/extensions.conf.sample @@ -69,7 +69,7 @@ TRUNKMSD=1 ; MSD digits to strip (usually 1 or 0) ; [1235-9] - any digit in the brackets (in this example, 1,2,3,5,6,7,8,9) ; . - wildcard, matches anything remaining (e.g. _9011. matches ; anything starting with 9011 excluding 9011 itself) -; + - wildcard, causes the matching process to complete as soon as +; ! - wildcard, causes the matching process to complete as soon as ; it can unambiguously determine that no other matches are possible ; ; For example the extension _NXXXXXX would match normal 7 digit dialings, @@ -633,7 +633,7 @@ static void pbx_destroy(struct ast_pbx *p) case '.':\ /* Must match */\ return 1;\ - case '+':\ + case '!':\ /* Early match */\ return 2;\ case ' ':\ @@ -648,8 +648,8 @@ static void pbx_destroy(struct ast_pbx *p) data++;\ pattern++;\ }\ - /* If we ran off the end of the data and the pattern ends in '+', match */\ - if (match && !*data && (*pattern == '+'))\ + /* If we ran off the end of the data and the pattern ends in '!', match */\ + if (match && !*data && (*pattern == '!'))\ return 2;\ } @@ -774,7 +774,7 @@ static struct ast_exten *pbx_find_extension(struct ast_channel *chan, struct ast (!eroot->matchcid || matchcid(eroot->cidmatch, callerid))) { if (action == HELPER_MATCHMORE && match == 2 && !earlymatch) { - /* It matched an extension ending in a '+' wildcard + /* It matched an extension ending in a '!' wildcard So ignore it for now, unless there's a better match */ earlymatch = eroot; } else { |