[asterisk-dev] new priority of pattern matching in 1.4. Does it makes sense?

John Lange john.lange at open-it.ca
Sat Feb 23 12:18:18 CST 2008


On Fri, 2008-02-22 at 16:10 -0600, Matthew Nicholson wrote:
> On Fri, 2008-02-22 at 10:31 -0600, John Lange wrote:
> > 
> > [...]
> > 
> > My point is simply that this example doesn't work with the existing
> > system. "convert-to-local" never matches because "long-distance" is
> > always a higher priority.
> > 
> 
> I didn't test this, but my gut tells me [convert-to-local] would match
> before long-distance (asterisk would search in [local] then in
> [convert-to-local] before moving on).  Also you would need to include
> the [no-sex] context first for it to be effective, other wise 900
> numbers would match in [longdistance].

The order of the patterns has no effect on how they match.

>From what I have gathered on this thread, it is "best match current
context" followed by "best match sub context level 1", "best match sub
context level 2" etc. down the tree.

John





More information about the asterisk-dev mailing list