Asterisk cmd AlarmReceiver
SIA (Ademco) Contact ID Alarm Receiver Application
WARNING: This application is to be used at your own risk! This application is NOT Underwriter's Laboratory (UL) approved and should not be used in any application where it is the primary or sole means of receiving alarm messages or events.
This application emulates an SIA (Ademco) Contact ID alarm receiver. The Contact ID protocol is the most popular signalling protocol used between alarm panels and central stations. For the complete spec on SIA Contact ID, you can purchase a copy at www.siaonline.org
The application will answer the call, wait 1250 milliseconds, send the ACK tone sequence then waits for the panel to send an event in DTMF. Each event will be checked for data integrity, and if valid, the KISSOFF tone will be sent. After the KISSOFF tone is sent, the application will wait for another DTMF event from the panel. This will continue until the panel terminates the call.
Asterisk 1.8, 11 and later
Note: Until after Asterisk 11 Alarmreceiver() requires ulaw as codec, after that also Alaw will work. Many code corrections were included for soon-to-be Asterisk 12 (i.e. after the release of Asterisk 11).
Usage
To use the alarmreceiver application, an entry needs to be inserted in your extensions.conf to direct incoming calls to the application. An example would look like:
exten => 18005550911,1,Ringing(); exten => 18005550911,2,Wait(6); exten => 18005550911,3,AlarmReceiver exten => 18005550911,4,Hangup
The application can be configured to write the events one-at-a-time or in a batch mode as files to a user-configureable spool directory. The application may optionally exec a user command after the panel hangs up to wake up a processing application. For information on what is configurable, see the WIKI section on the configuration file alarmreceiver.conf
The files written to the spool directory contain metadata fields followed by a list of events. An example of such a file is:
[metadata] PROTOCOL=ADEMCO_CONTACT_ID CALLINGFROM=202-555-1212 CALLERNAME=John Homeowner TIMESTAMP=Mon Jun 21, 2004 @ 20:00:17 PDT [events] 1234181131010158 1234183131010156
Notes
Consider using INBAND DTMF in extensions.conf if your ATA (Analogue Terminal Adapter) has trouble recognizing the DTMF. Asterisk seems far better at recognizing fast DTMF than most ATA's.