[Asterisk-Users] Pattern matching rules for least cost routing
Fran Boon
flavour at partyvibe.com
Tue Apr 20 16:03:10 MST 2004
On Tue, 2004-04-20 at 23:21, Mark Elkins wrote:
-SNIP-
> ;Cell Phone call
> exten => _00[78][234].,1,Playback(posix-cellphone)
> exten => _00[78][234].,2,Dial(${TRUNK}:${EXTEN:${TRUNKMSD}})
> ;Default catch all - just dial it....
> exten => _0.,1,Playback(posix-defaultroute)
> exten => _0.,2,Dial(${TRUNK}:${EXTEN:${TRUNKMSD}})
> No matter what is dialled - I always go out on the 'Default' line.
> Swapping order makes no difference. If I comment out the 'default' - it
> does match the 'Cell' pattern - and works.
Pattern-matching within a context is not done based on order at all.
To achieve the effect you want:
include => cell
include => default
[cell]
exten => _00[78][234].,1,Playback(posix-cellphone)
exten => _00[78][234].,2,Dial(${TRUNK}:${EXTEN:${TRUNKMSD}})
[default]
exten => _0.,1,Playback(posix-defaultroute)
exten => _0.,2,Dial(${TRUNK}:${EXTEN:${TRUNKMSD}})
F
More information about the asterisk-users
mailing list