[asterisk-dev] CID match uses "shortest prefix match"

Jared Smith jsmith at digium.com
Thu Mar 19 09:09:55 CDT 2009


----- "Klaus Darilion" <klaus.mailinglists at pernau.at> wrote:
> So, I guess the sorting is not done when Asterisk tries to match an
> extension, but when parsing extensions.conf. Because when I execute
> "show dialplan test" I see the extensions are always in the order you
> have described (first: less possible solutions, second: ASCII sorting
> but . and ! are lees prior), e.g:

If you type "dialplan show test", it's just going to show you the contents of the [test] context, and not bother to sort the entries.  If you add an extension by typing "dialplan show 1234 at test", it *will* sort the entries based on that extension.  

> Ok. So now back to the original topic: The CID matching problem. When
> doing normmal matching and exten = +43699111600:
>     _+436991116! => &Macro1();
>     _+4369911!   => &Macro2();
> Macro1 will be executed.
> 
> But when using CID matching (CID=+43699111600)
>     s/_+436991116! => &Macro1();
>     s/_+4369911!   => &Macro2();
> Macro2 will be executed. Thus I think this is a bug as Macro1 should
> be executed too - shouldn't it?

Yes, it should be, and I would consider this a bug!

--
Jared Smith
Training Manager
Digium, Inc.



More information about the asterisk-dev mailing list