in Asterisk

Monitoring my alarm panel with Asterisk

Remember when I wanted to get my Asterisk phone system monitoring my home alarm panel? I did it today! It was surprisingly easy, too. Took about a half-hour of geeking to get it done.

Why monitor my alarm with Asterisk? Because the house has no land line and I don’t see the wisdom of paying some company $240 a year to do what I can do much better myself. Plus there’s something cool about having your computer do things when something physical happens – and Asterisk can do just that.

The best part about all of this is that Asterisk can do this right out of the box. The applet that does it, called AlarmReceiver, has been included with Asterisk for four years. All that needs to be done is to set up extensions.conf to use the AlarmReceiver module whenever a certain extension is dialed.

While I could explain the process step by step, there is already a great guide on the Internet which shows how its done. Check out Matt Watson’s great HOWTO and follow the simple steps. Its as easy as that.

The real trick was finally deciding to call the company that installed my alarm and asking them to program the dial-out phone number for me. Once that was done Asterisk handled the rest.

Now whenever an alarm is triggered, I get a cool text file created that looks like this one:


TIMESTAMP=Wed Aug 27, 2008 @ 21:42:02 EDT



The good stuff is the last line, of course.

  • The CCCC is my subscriber ID (CCCC is the default because I don’t subscribe to anything. Heh).
  • 18 is the message type (can be 18 or 98)
  • 1 indicates a new event
  • 406 indicates a CANCEL event
  • 01 is the partition (not important in a residential setup)
  • 002 is the zone, in this case the keypad
  • # is the checksum for the string

The Ademco event codes are available on the Internet and provide a wealth of status information.

The other big trick to getting this to work has to do with the VoIP setup inside my house. I’ve got my alarm panel plugged into a Linksys VoIP terminal adapter (TA), which in turn transmits the DTMF tones into bits to cross my network, where the Asterisk system decodes them again to send to AlarmReceiver. To do this reliably in VoIP, one must set the Linksys TA to do in-band DTMF signalling and use the G.711 ulaw codec. This should ensure the DTMF tones don’t get garbled on the way to Asterisk. This can be done in about 30 seconds.

Got an alarm panel currently being monitored by a commercial service that you’d like to turn over to Asterisk? No problem! Simply connect its phone line to a VoIP terminal adapter, cause an event, and watch your Asterisk logs to see which number the panel calls. Then create that extension in Asterisk, and redirect the call to the AlarmReceiver app. Once you get all your settings right you can cancel your monitoring service.

Asterisk can alert you to practically any event you’d like. If someone breaks into your house Asterisk could call your mobile phone, play a message saying “your intrusion alarm has been triggered. Press 1 to ring your home phone.” You could then choose to call your home and decide if further action is required (i.e. call the cops). Or, you could put in an option that turns on a microphone, allowing you to listen in on the home. Even better, you could have the alarm automatically turn on webcams so you could see the cause of the alarm! Hey, you could have Asterisk automatically “release the hounds” while you’re at it!

  1. HI, was very interested in ure ademco reciever article
    . I was wondering if you could help me tho. Im trying to get the string outputed on the serial , just like a real 685 would do with heart beats and the full acks. i have a real 685 here on my bench . i also run full automation software for monitoring.

    Some sort of supervision is required for registered dialers??

    i work for an alarm install company, so i can test most formats , CID SIAII and fast format 4-8-1,


  2. Thanks for stopping by, Fast-Format. It sounds to me like you know more about alarms than I do, and thus I’m not sure how much I can help you. I particularly have no experience with 685s as they’re out of my financial reach.

    What is it that you’re trying to accomplish? Reading the event IDs from the serial port directly, as opposed to dialing out? If so, I would be interested in helping because I would love to be able to read these events straight into a serial port, rather than dial out to my PC.

    If you’ve got strategies for implementing this, let me know and we can work together.

  3. hi thanks for the fast reply,
    yes im trying to get my aster box to pipe the account and event string to say com 1 ,
    Then it can be read by most mainstream automation/monitoring software out there , or just hyper terminal, i would prefer full ademco685 emulation output tho or raidionics 685, Btw im uk based so terminology may differ in protocol names.

    im currently running a full windows based alarm monitoring package here in the uk , with true 685 and surguard recievers,

    i previously got the *685 working ok sorta , got the calls i used a mashed up , SQL trigger script, all events where dumped to the event file ok. then i used a small script to echo all the meta data to the comport,

    Problems with SQL arose , had problems with implementing a heart beat and ack/nack signal between *box and windows app.

    Anyway , a few people hav released some support and misc scripts relating to this , also i can giv u a windows or dos based package to setup if u want, for local testing..


Comments are closed.