I am a 1 week newbie to Asterisk. I am planning to use asterisk in my home to route telemarketers to an answering machine based on callerid output. Both my provider and home loop are PSTN. I will be running Asterisk 11.6 on CentOS 6.5. I have a 4 port FXO/FXS card on order. Here is what I would like to do:
- Answer incoming calls, but suppress ring until the callerid is transmitted
- Compare the callerid number to a blacklist. (I do not anticipate the blacklist to ever exceed 1000 entries)
- If the number is blacklisted, route to a hardware answering machine
- If the call is not blacklisted, route to my home loop.
Once I get this working, I will work on adding a callerid name capability to the blacklisting. I have been reading all the Asterisk documentation I can find and have a few questions: - I have concluded that the blacklist comparison will need to be done outside of the dial plan. I am not familiar with Python, Perl, PGP, but I was a C programmer and KORN shell scripter in the 1980s. Can I call a complied C program with arguments using AGI? How about calling a KORN shell script?
- With a blacklist of less than 1000 entries, I plan to use a flat file instead of a full-fledged database to simplify implementation. From a performance impact perspective, are there any guidelines on the maximum allowable elapsed time from the start of the AGI call to the return of a yes/no response to the dialplan?
- I am sure I am not the first person to want to route calls based on callerid. Am I missing an easier way that is readily available?
Please feel free to correct any wrong assumptions I have and thanks in advance for any help or advice you can provide.