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

Lyle Giese lyle at lcrcomputer.net
Fri Nov 6 09:48:17 CST 2009


I am not that good at regex and it's use in Asterisk. I am running
Asterisk 1.4.13

Currently I have this in my extensions.conf for incoming calls on our
house phone line:

[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.

Looking for suggestion on syntax here and not even sure how to pattern
match on only the area code(first three digits) here.

Thanks for any suggestions!

Lyle Giese
LCR Computer Services, Inc.



More information about the asterisk-users mailing list