Category Archives: VOIP

Combatting telemarketers with Asterisk

One of the few good acts of the previous government was the legislation and subsequent funding of the Do Not Call register, allowing those people who do not want to talk to telemarketers to opt out completely. I registered for it as soon as it went live, and I definitely noticed a reduction in the number of unsolicited calls that I received.

Unfortunately, the legislation simply did not go far enough; political organisations, polling companies and especially charities are exempt from the DNC register. The number of charities calling lately has risen considerably, and it’s starting to drive me insane.

I have a rule: I will not give any money to a charity that asks me for it. That includes phone calls, doorknockers (the Consumer Action Law Centre has a good sticker that deals with them) and that incredibly annoying import from the UK – twenty-somethings with clipboards on city streets.

At this point, I will make a brief aside: if there’s anyone from Amnesty International reading this, could you please screen your clipboarders better? I really don’t appreciate your blow-ins asking me ridiculous questions, such as, “how long do you plan to live here?” as I exit the gates at a city railway station, and then abusing me when I tell them I don’t have time to talk, because I’m rushing off to recover a server that’s crashed in a large telco.

Back to the phone calls, however. Asterisk has a nice little command that will deal with telemarketers with autodialers – Zapateller. When invoked, it will play three tones that cause the telemarketer’s autodialer to think that the number is not valid, and then hang up.

I put the Zapateller command into my dial plan yesterday, and today I’ve received three phone calls, all of which had disconnected by the time I answered them.

  ; Ring both phones
  exten => 2100,1,Answer()
  exten => 2100,n,Zapateller()
  exten => 2100,n,Dial(SIP/snom&SIP/sipura,20)
  exten => 2100,n,Voicemail(u2000)

I will eventually put a couple of seconds delay between the Zapateller command and the line that dials my two telephones, so that I don’t hear any ringing at all.

Obviously, there’s no way I can be sure the callers today were telemarketers, especially since I’m not paying for caller-ID, but given that I haven’t received any personal calls on this line in weeks, I can be fairly confident that my phone system has only been playing tones to an autodialer… and Asterisk

For any Asterisk users out there using sipme as their Voice-over-IP provider who, like me, have been banging their heads against walls trying to figure out why it isn’t working, it turns out that sometime in early February, they made a change to their SIP proxy setup and elected not to mention it on their website.

Their new equipment apparently doesn’t like talking to Asterisk, so to make it work, it’s necessary to mask the user agent string by putting the following in the [general] section of your sip.conf file:


…which I found out only after considerably websearching let me stumble upon this thread in Whirlpool.

Evidentally, I haven’t made any non-Melbourne phone calls for almost two months, or I’d have discovered this earlier.