You can do:
exten => 123,1,GotoIf($[${CALLERID(num):0:6}=123456]?50);if cidnum is
123456 goto 50
Or you can do this:
exten => 123/_123456.,1,Goto(50);if cidnum is 123456 goto 50
exten => 123/_234567.,1,Goto(51);if cidnum is 234567 goto 51
exten => 123/,1,Goto(70);anything else or blank goto 70
exten => 123,1,Goto(70)


On 8/4/06, Matthew Crocker <[EMAIL PROTECTED]> wrote:

Can anyone help point me in the right direction?  I have calls coming
into Asterisk over a PRI, all going to the same #.  I need to have
asterisk route the calls to a different location based on the NPANXX
of the callerId for the inbound call.  Something like


exten =>  123,1,$newnumber = DBLookup(CallerID)
exten =>  123,2,Dial($newnumber)

I don't know AGI,  the 'database' can be a flat text file something like

_413746XXXX:4135551212/Zap1-1

I'll have a couple thousand entries in the database.  Any ideas on
the easiest (read most reliable) was of doing this?

-Matt

--
Matthew S. Crocker
Vice President
Crocker Communications, Inc.
Internet Division
PO BOX 710
Greenfield, MA 01302-0710
http://www.crocker.com

_______________________________________________
--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

Reply via email to