[asterisk-users] Routing incoming call based on caller id

Edwin Lam edwin.lam at officegeneral.com
Fri Nov 6 13:48:34 CST 2009


Lyle Giese wrote:
> [housemenu]
> exten => s,1,GotoIF($["${CALLERID(num)}" = "815xxxxxxx"]?s|12);
> 815xxxxxxx is our home phone number, when caller id fails or is missing
> that is what is recorded.
> 
> I want to expand this from just branching on our home phone number to
> include any toll free number, (800, 866, 877, etc) as a telemarketer
> screening system.  But I am not sure of the syntax here, but don't want
> to add another line for each 8xx toll free npa either.

how about something like this:

[housemenu]
exten => s/_815XXXXXXX,1,Goto(s|12)
exten => s/_800XXXXXXX,1,Goto(tollfree|s|1)
exten => s/_866XXXXXXX,1,Goto(tollfree|s|1)
exten => s,1,<other callerid do something else...>



-- 
Edwin Lam <edwin.lam at officegeneral.com>
Systems Engineer, Office General, Inc.
Ph: +1 415 439 4988 Fax: +1 415 283 3370
http://pgpkeys.mit.edu:11371/pks/lookup?op=get&search=0xD6506D20




More information about the asterisk-users mailing list