[asterisk-dev] extension ordering

Luigi Rizzo rizzo at icir.org
Mon Jan 23 08:34:39 MST 2006


On Mon, Jan 23, 2006 at 09:13:34AM -0600, Kevin P. Fleming wrote:
> Luigi Rizzo wrote:
> 
> > The problem is how much do existing dialplans rely on the
> > ordering of extensions...
> 
> (jumping in late, the list server was hosed over the weekend)
> 
> Ordering of extensions for matching is well-defined, so it cannot be 
> changed.

i can buy the argument "it's always been like this",
but would be more convinced if 1) you could point me to
a piece of documentation that defines that ordering,
and 2) if you could show that the ordering is more useful
or more intuitive than, say, longest prefix match...

also i would like to know (i already asked but got no response)
if the following is defined anywhere:

1. ast_extension_close() uses str[n]casecmp() whereas
   ast_extension_match() uses strcmp (case-sensitive) for exact matches.
   Does it matter that a later call to ast_extension_close() with the
   same argument may fail ?

2. space and '-' are ignored in patterns, though they do affect the
   sorting order. Is this intentional ?

3. in a pattern, NnXxZz represent sequence of digits, all other
   character are used for exact (case-sensitive) match,
   even in ast_extension_close() which in case #1 was case-insensitive.

(i repeat, my goal is just to make things work consistently with
their documented behaviour...)

cheers
luigi



More information about the asterisk-dev mailing list