[Asterisk-Users] Coding a telemarketing call blocker

Walt Reed asterisk at linuxguy.com
Thu Jun 16 10:57:31 MST 2005


On Thu, Jun 16, 2005 at 10:45:04AM -0600, Tore Hansen said:
> I am interested in creating a telemarketing call blocker in my Asterisk 
> dial plan. I am not much of a programmer, and I am wondering if external 
> AGI code would be required to implement this.
> 
> The logic that I would like to have in place is this:
> 
> 1. If the incoming call carries proper name and number caller ID, then 
> ring default extension.
> 
> 2. If the incoming call carries no caller ID information, then send call 
> to recorded message, followed by voice mail.
> 
> 3. If the incoming call carries number only caller ID (no name info), 
> then check the area code the call is from. If it is my local area code, 
> then ring default extension, but if it is from a different area code, 
> then send call to recorded message, followed by voice mail.

See the wiki:
http://www.voip-info.org/tiki-index.php?page=Asterisk%20cmd%20GotoIf

Example 3 has some logic that could easily be extended to do exactly
what you want.

With modern versions of * (CVS HEAD for example) the dial plan can be
simplified a bit. I wrote that example pre 1.0 days...



More information about the asterisk-users mailing list