[asterisk-users] Dialplan matching

A J Stiles asterisk_list at earthshod.co.uk
Mon Apr 4 11:17:05 CDT 2011


On Monday 04 Apr 2011, Asterisk User wrote:
> Hello all, I am trying to figure out the logic in on prefix matching for
> Asterisk 1.4.5. I want to be able to pass all international calls EXCEPT
> calls to 011870, 01137455 and so on.

Asterisk's default behaviour is always to try the hardest-to-match expression 
first  (i.e. the exact extension number).  If there is no match there, it 
then tries progressively easier-to-match expressions; only ever trying 
something like _. if nothing else matched.

(Compare the rules of poker when wild cards are introduced:  a "natural" hand 
beats an otherwise-equivalent hand containing wild cards.)

-- 
AJS

Answers come *after* questions.



More information about the asterisk-users mailing list