[asterisk-users] Is there a smarter way to ban expensive calls
in dial plan?
Andrea Spadaccini
a.spadaccini at mediatechnologies.it
Tue Aug 1 13:44:42 MST 2006
Ciao Chris,
> So if I try the following dial plan my pattern always matches the
> first wild card
>
> Exten => _00376.,1,Dial(my iax terminiator)
> Exten => _003763.,1,Congestion
> Exten => _003764.,1,Congestion
> Exten => _003765.,1,Congestion
This is a common pitfall in Asterisk dialplans: Asterisk doesn't try to
match your extensions in the order you insert them into your dialplan,
but it sorts them out according to its own internal order.
See the CLI command "show dialplan example" to discover how it sorts
them.
So, how to solve this misunderstanding?
You must create other contexts, and include them in your main context.
Asterisk will try to match current context's extensions first, and then
extensions included from other contexts, in the order you included them.
Please refer to
http://www.voip-info.org/wiki/index.php?page=Asterisk+config+extensions.conf+sorting
for further information.
HTH,
--
Andrea Spadaccini
Multimedia Technologies Institute s.r.l.
More information about the asterisk-users
mailing list