Defeating telemarketers with Asterisk

One of the reasons I initially started using Asterisk at home is that I was tired of telemarketers. Most telemarketers have been deterred by the national (U.S.) do not call list. However, the do not call list has two important exceptions for political organizations and charities (see question 29 on the FTC’s Q&A).

The exception for politics is a huge hole in California. In addition to all the candidates for public office, we typically are faced with a slew of ballot propositions. In this election cycle, there are thirteen state measures and eleven city measures in San Francisco, to say nothing of the actual people running for office. I think a majority of the money and effort is spent on the referendum side of the ballot, since text inserted into the state constitution, city charter, or California legal code never develops an annoying conscience and turns on its financiers.

Now that it’s the final push in the electoral season here in California, I’m sure the calls are flying furiously. However, I sit in blissful silence at home with a phone that’s not ringing. When you call my house, Asterisk picks up and asks you to enter an extension number or use the dial-by-name directory. If you don’t do either of those tasks, you can’t make the internal extensions ring.

Initially, I had expected that guarding the phone was going to be hard. I thought it would require validating caller ID, checking it for correctness somehow, and possibly even doing a “liveness” proof that generated a random string of digits for the caller and requested that the caller enter them back to you. It turns out that there’s a much simpler and easier way. Most mass-dialing operations use predictive dialers or robot dialers. Neither type of device is capable of understanding and reacting to speech appropriately. All I needed to do was to pick up the phone, read out an extension number (“hello, you’ve reached this phone number, dial extension 123 to talk to person #1“), and wait for a response. Most computer dialers are not able to intelligently process the voice, so Asterisk hangs up on them.

Here’s the essence of the code I use:
mainmenu => {
Answer;
NoOp(Received Caller ID is => ${CALLERID(all)});

// Caller ID checks and Iotum processing left out for clarity
// Friends and family menu check goes here

// My voice menu — default for most callers
NVBackgroundDetect(msg/reached-mynum,t);
NVBackgroundDetect(msg/enter-three-digit-exten,t);
NVBackgroundDetect(msg/matthew-at-extension,t);
NVBackgroundDetect(msg/dial-by-name-press-star,t);
NVBackgroundDetect(silence/5,t);
Hangup;
};

So far, that simple voice menu does the trick. I haven’t needed to modify the code yet so that when it detects a telemarketing computer, it plays the “disconnected number” tones with the Zapateller application.

2 Responses to “Defeating telemarketers with Asterisk”

  1. […] The campaign caught making repeated phone calls has blamed the telemarketing contractor, saying that it was obviously a mis-configured computer. Well, those campaigns can retain their mis-configured computer, because my correctly configured Asterisk machine will handle the calls appropriately. I’ll make my voting decision in peace, by reviewing sources of information I trust. (Hint to campaign managers: this probably is not you.) Please, make as many calls as you want. My computer is happy to listen to you spew your message, and it will deliver it to me if it is appropriate. I have programmed my computer with an algorithm that is working quite well so far, namely, that all telemarketing calls should be discarded. […]

  2. This sounds like some great advice. Will have to give this a try!

Leave a Reply