[asterisk-users] Toll free pattern matching

D'Arcy J.M. Cain darcy at Vex.Net
Fri Aug 5 09:06:55 CDT 2016


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
http://stackoverflow.com/questions/7235291/asterisk-priorities-that-have-a-possibility-of-matching
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.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:darcy at Vex.Net
VoIP: sip:darcy at Vex.Net



More information about the asterisk-users mailing list