When you pick your GSM modem from the cheap end of the module spectrum, you might end up with one that doesn't route the audio connectors to the breakout board. So instead of connecting a microphone and speakers, the only choice you have left for audio communication is using DTMF tones.

And when DTMF tones are your only choice, you'll start remembering some ancient wisdom once shared upon the internet of "playing Happy Birthday to someone via the phone keypad", and look closer into it. You'll then see that there are quite a few songs you can play this way and somewhat even recognize them. This has to be automated!

My initial idea was to create a device that would call random phone numbers and play some awful sounding tones to them, but then my conscious kicked in and I changed the communication direction. So instead of annoying random innocent people, it would annoy people who purposely call the device's number. And I hope that one day, telemarketers will be among them.

The System

In the big picture, all there is to it, is a Raspberry Pi 3 running a Python script that communicates with the GSM modem. The script takes care to unlock the SIM card when powering up / resetting, and then just waits for incoming calls. Once a call comes in, the script answers the call, sends one by one a pre-defined set of DTMF tones, and hangs up. Rinse and repeat.

There are currently two "songs" stored inside the script that are "played" alternating:

  • Mary had a little lamb
  • If you're happy and you know it

Here's a video of the first one in action

At some point I will move the hardware on a perfboard and attach it to a Pi Zero, until then it may or may not be up and running.

The video above was extracted from the main video I took describing the system. I guess I didn't really have much interesting things to say about it, and when trying to demonstrate the system, it kept on failing (some combination of bad wire connection, weak power supply and messed up states in the code resulting from that). But then, that's life, so here's that.