Home Creators Posts Import Register Favorites Logout

Content

Hi folks,

A few months ago I posted "Call Me, Baby" - a project that used an old-fashioned rotary phone to interface with an Arduino, to hear pre-recorded messages or activate a relay when a certain number is dialled. Following that project, I got lots of useful feedback, and I learned many things myself... 

...one of the factors I hadn't fully appreciated was quite how much variation there is in different phone systems around the world, which meant that the approach I used (based on a UK phone) could not always be directly applied with phone handsets in other countries. This understandably left some of you (and me!) frustrated when you couldn't make the project work as expected. 

However, it was also obvious that many of you do still want to use telephone handsets in playful ways, so I was determined to find another solution. I'm pleased to now share the first part of that new solution with you.

Rather than a simple interface between a single telephone handset and an Arduino, this approach uses "Asterisk" open source communication software (https://www.asterisk.org/) running on a Raspberry Pi, to create a complete, standalone local private branch exchange (PBX) network. This is the same sort of telephone system as you'd find in an organisation to route incoming and outgoing calls between multiple lines, handle conference calls and voicemail boxes, etc. This makes it wayyyy more powerful than the previous approach- here's some examples of what it will let you do:

Hear pre-recorded or dynamically-generated messages when dialling different extension numbers – with easily configurable rules to create an almost limitless range of call destinations

Step through a telephone menu tree, with sophisticated conditional logic, to hear an automated hint for a puzzle

Dial a number or type a passcode on the telephone keypad to control physical devices, e.g. release a doorlock

Trigger incoming phone calls by an external event or device, such as from an Arduino, which can deliver messages based on the value of a supplied variable

Deliver a dynamically-generated voice message created using TTS synthesis

A gamemaster or actor can call players from a control room to deliver clues or advance the narrative

Integrate with external software, e.g. to record the phone conversation (or specific responses from it) and pass that to voice-recognition software

And, perhaps best of all, because this requires absolutely no hardware modification, I'm hoping that this be a universally-accessible approach, no matter what country or phone system you use. All features are configured through software and, if your phone can connect to the server (via an ATA interface such as a Linksys PAP2T), it should have the full range of functionality available.

Now, because Asterisk is very powerful and relatively complex, there is quite a bit of software setup involved. I'm also aware that I haven't really covered using Raspberry Pis in any tutorials before, so I'd like to make sure I explain a bit of the basics of working with them too. So what I'm planning to do is split this tutorial up into several sections:

The first part, shared here, just provides an introduction and demonstration of the main features of the system, and talks through the hardware required.

In the next part, I'm going to explain the software installation on the Raspberry Pi to get the core functionality of making calls between extensions.

After that, I'll cover different features such as controlling hardware such as relays, creating dynamic messages, and triggering incoming calls from other devices such as Arduinos.

Finally, although I think video is a good medium to demonstrate the system functionality in action, I know some of you prefer text documents (particularly to my Patreons for whom English is not your first language). So I'm also going to be writing this up into a comprehensive PDF which I'll share at the end, and it'll be that document which will be available to Patrons-only.

Hope that all makes sense, and please ask if you have any questions - I really hope you're going to like it!

Files

"Smooth Operator" - Creating a Playful Telephony Network with Asterisk - Part 1

This is the first in a series of videos explaining how to use "Asterisk" (https://www.asterisk.org/) open source communications software to create a complete, standalone local private branch exchange (PBX) network which can be used for playful telephone puzzles such as might be used in an escape room. Example functionality includes: - Hear pre-recorded or dynamically-generated messages when dialling different extension numbers – with easily configurable rules to create an almost limitless range of call destinations - Step through a telephone menu tree, with sophisticated conditional logic, to hear an automated hint for a puzzle - Dial a number or type a passcode on the telephone keypad to control physical devices, e.g. release a doorlock - Trigger incoming phone calls by an external event or device, such as from an Arduino, which can deliver messages based on the value of a supplied variable - Deliver a dynamically-generated voice message created using TTS synthesis - A gamemaster or actor can call players from a control room to deliver clues or advance the narrative - Integrate with external software, e.g. to record the phone conversation (or specific responses from it) and pass that to voice-recognition software In this video, I demonstrate the core functionality of the system and describe the hardware required: - Raspberry Pi ~ £35 (I'm using a fairly old Model B v2.0 with 512Mb RAM - newer models should run faster) - Linksys PAP2T Analogue Telephone Adaptor ~£20 - Telephone handset with RJ11 connector (tone dial, not pulse dial) - Relay, Maglock etc. as desired

Comments

Colin Morgan

Thanks so much Alastair! Legend.

Andy

Hi Alistair, I am unable to get the code to work on a Pi4 4GB - any suggestions how to proceed? Thanks

John Miller

So am in the process of trying to do this, but do not see the PDF, also I am solely an arduino user so was wondering if there still is a good arduino sketch that works? Thanks