You guys are making this more complicated than it needs to be.
Set your context to dialout & do this:
[dialout]
include => blocked
include => notblocked
[blocked]
exten => _003763.,1,Congestion
exten => _003764.,1,Congestion
exten => _003765.,1,Congestion
exten => _003764.,1,Congestion
exten => _003765.,1,Congestion
[notblocked]
exten => _00376.,1,Dial(my iax terminiator)
This will look for a match in the "blocked" context first. If it finds a match, then it will play congestion, if it doesn't find a match, it will go to the "notblocked" context.
This will look for a match in the "blocked" context first. If it finds a match, then it will play congestion, if it doesn't find a match, it will go to the "notblocked" context.
Good Luck,
bp
On 8/1/06, Andrea Spadaccini <[EMAIL PROTECTED]> wrote:
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.
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________ --Bandwidth and Colocation provided by Easynews.com --
asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users