[asterisk-users] Dial Plan - Routing via Caller ID

lists65 at gmail.com lists65 at gmail.com
Thu Apr 5 12:35:51 CDT 2012


I am running Asterisk 1.8.10.1.

I am trying to set up some routing in my dial plans and having some issues
(the issue being that I don't quite understand all of the syntax and
patterns that can be used:

Examples: 

DID1 = 6140000000
DID2 = 6140000001
CNAME1 = 6149999999
CNAME2 = 6149999998
CNAME3 = 6149999997

context1
context2
context3



I have looked at several examples (patterns) and I am a little confused and
am looking to the list for guidance.
Assuming I have (2) two DIDs and I want to route incoming calls according to
the DID called and as well as the Caller ID various contexts.


If I wanted to route a call from a particular DID and the CALLERID from a
specific A/C this doesn't seem to work for me:

exten => 6140000000/_702XXXXXXX,n,Goto(context1,s,1)
exten => 6140000000/6149999999,n,Goto(context2,s,1)
exten => 6140000000/6149999998,n,Goto(context3,s,1)
exten => 6140000000/6149999997,n,Dial(SIP/7777,25)

I have seen examples where I could use a pattern like (not specifying a
Caller ID info, and that works fine):

exten => _X!,n,Goto(context1,s,1)
exten => _X!,n,Goto(context2,s,1)
exten => _X!,n,Goto(context3,s,1)


I am confused on how to use patterns.

I would like to learn how I can take either DID and route the calls to
various contexts via the CallerID (which couild be the entire DID number, an
NPA only or an NPANXX.

Could someone please give me an example on how to do this?

TIA




More information about the asterisk-users mailing list