Toll Free Pattern Matching

Home » Asterisk Users » Toll Free Pattern Matching
Asterisk Users 3 Comments

I have this in my config:

exten => _800XXXXXXX,1,Verbose(0,${CHANNEL(peername)} Calling ${EXTEN})
same => n,Dial(SIP/tollfree/1${EXTEN})
exten => _1800XXXXXXX,1,Verbose(0,${CHANNEL(peername)} Calling ${EXTEN})
same => n,Dial(SIP/tollfree/${EXTEN})
exten => _NXXNXXXXXX,1,Verbose(0,${CHANNEL(peername)} Calling ${EXTEN})
same => n,Dial(SIP/trunk/1${EXTEN})
exten => _1NXXNXXXXXX,1,Verbose(0,${CHANNEL(peername)} Calling ${EXTEN})
same => n,Dial(SIP/trunk/${EXTEN})

I came across which seems to imply that the above won’t work and that all the calls would go to the trunk. However, this is working as expected for me. Did the behaviour change in the last four years or could I run into problems with this setup? Perhaps I am misunderstanding the poster’s issue.

3 thoughts on - Toll Free Pattern Matching