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

Alex Hermann alex at speakup.nl
Mon Mar 16 12:20:54 CDT 2009


On Monday 16 March 2009 17:57:20 Klaus Darilion wrote:
> Hi!
>
> I tried the CID match feature of Asterisk (1.4.23) but found a strange
> behavior: it matches on shortest prefix, e.g:
>
>    s/_+436991116! => &Macro1();
>    s/_+4369911!   => &Macro2();
>
> if CALLERID(num) is +43699111600 I would think that Macro1 is executed,
> but instead Macro2 is executed. Regardless of the order in the config file.
>
> Debugging is very difficult, as the CID match is not shown in "dialplan
> show" and also the logging does not reveal any CID matching.
>
> I think this is a bug - or is there a reason why shortest prefix match?

That is the function of the !: match as soon as possible. Try a . (dot) 
instead and it will match the loger pattern.

-- 
Alex Hermann




More information about the asterisk-dev mailing list