aboutsummaryrefslogtreecommitdiffstats
path: root/configs/extensions.conf.sample
diff options
context:
space:
mode:
authormurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-24 21:00:26 +0000
committermurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-24 21:00:26 +0000
commit2a36d53ce3bceb7f31ccfe840d3efa6ad1977c5c (patch)
tree15cf03868acd5ee0433da42a45f4399c9f9cb621 /configs/extensions.conf.sample
parent2794d1de7a94f7716bcb98058a505b17a15cb100 (diff)
closes issue #11363; where the pattern _20x. buried in an included context, didn't match 2012; There were a small set of problems to fix: 1. I needed NOT to score patterns unless you are at the end of the data string. 2. Capital N,X,Z and small n,x,z are OK in patterns. I canonicalize the patterns in the trie to caps. 3. When a pattern ends with dot or exclamation, CANMATCH/MATCHMORE should always report this pattern, no matter the length. With this commit, I also supplied the wish of Luigi, where the user can select which pattern matching algorithm to use, the old (legacy) pattern matcher, or the new, trie based matcher. The OLD matcher is the default. A new [general] section variable, extenpatternmatchnew, is added to the extensions.conf, and the example config has it set to false. If true, the new matcher is used. In all other respects, the context/exten structs are the same; the tries and hashtabs are formed, but in the new mode the tries are not used. A new CLI command 'dialplan set extenpatternmatch true/false' is provided to allow switching at run time. I beg users that are forced to return to the old matcher to please report the reason in the bug tracker. Measured the speed benefit of the new matcher against an impossibly large context with 10,000 extensions: the new matcher is 374 times faster.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89547 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'configs/extensions.conf.sample')
-rw-r--r--configs/extensions.conf.sample20
1 files changed, 20 insertions, 0 deletions
diff --git a/configs/extensions.conf.sample b/configs/extensions.conf.sample
index ae9272393..a5d992de1 100644
--- a/configs/extensions.conf.sample
+++ b/configs/extensions.conf.sample
@@ -36,6 +36,26 @@ writeprotect=no
;
;autofallthrough=no
;
+; By default, the old pattern matcher is used.
+
+; If extenpatternmatchnew is set (true, yes, etc), then a new algorithm that uses
+; a Trie to find the best matching pattern is used. In dialplans
+; with more than about 20-40 extensions in a single context, this
+; new algorithm can provide a noticeable speedup.
+; With 1000 extensions, the speedup is ~25x
+; with 10,000 extensions, the speedup is 374x
+; Basically, the new algorithm provides a fairly flat response
+; time, no matter the number of extensions.
+;
+; The new pattern matcher is for the brave, the bold, and
+; the desperate. If you have large dialplans, and/or high
+; call volume, you might consider setting this value to "yes" !!
+;
+; This value can be switched at runtime using the cli command "dialplan set extenpatternmatchnew true"
+; or "dialplan set extenpatternmatchnew false", so you can experiment to your hearts content.
+;
+;extenpatternmatchnew=no
+;
; If clearglobalvars is set, global variables will be cleared
; and reparsed on an extensions reload, or Asterisk reload.
;