Getting Asterisk / alarmreceiver to read DTMF digits properly.

I know this may not be directly related to fire alarms, but I know that some people here have tried and been able to do this.
I am trying to use Asterisk and its alarmreceiver module to connect with my 5820XL. The 5820XL is connected to a Grandstream HT802.
Alarmreceiver is working for the most part, and the 5820XL is reporting perfectly. Alarmreceiver starts the call with the two tones, and the 5820XL replies just fine. The problem is, asterisk cannot properly read the DTMF digits the 5820XL is trying to send. Alarmrecevier is looking for the checksum at the end of the DTMF string, but it never matches, so alarmreceiver never sends the kissoff tone. I have been able to play the kissoff into the phone and the 5820XL hangs up just fine with no trouble. In sip.conf I have set dtmfmode to inband. In the ATAs settings, I have set the DTMF mode priority to have in audio first, set the in band duration to 50, the inter duration to 50, and disabled DTMF negotiation.
When I look in the Asterisk console, it is trying to “emulate” the DTMF. I think this is the problem. If someone knows a way to disable the DTMF emulation, please tell me. If you need more info or screenshots of the console, please tell me. Again, I am sorry if this is a bit off topic for fire alarm help.

I am trying to use Asterisk and its alarmreceiver module to connect with my 5820XL. The 5820XL is connected to a Grandstream HT802. Alarmreceiver is working for the most part, and the 5820XL is reporting perfectly. Alarmreceiver starts the call with the two tones, and the 5820XL replies just fine.

Is the panel set to report contact ID or some variant of the Ademco formatting scheme that is supported by the module in your Asterisk install?

The problem is, asterisk cannot properly read the DTMF digits the 5820XL is trying to send. Alarmrecevier is looking for the checksum at the end of the DTMF string, but it never matches, so alarmreceiver never sends the kissoff tone. I have been able to play the kissoff into the phone and the 5820XL hangs up just fine with no trouble.

This tells me the panel’s DACT is working properly and Asterisk is not receiving the DTMF tones properly.

In sip.conf I have set dtmfmode to inband. In the ATAs settings, I have set the DTMF mode priority to have in audio first, set the in band duration to 50, the inter duration to 50, and disabled DTMF negotiation.

Set Asterisk and your Grandstream ATA to use rfc2833, and let me know what happens.

When I look in the Asterisk console, it is trying to “emulate” the DTMF. I think this is the problem. If someone knows a way to disable the DTMF emulation, please tell me. If you need more info or screenshots of the console, please tell me. Again, I am sorry if this is a bit off topic for fire alarm help.

The app_alarmreceiver module does not emulate DTMF tones, they are audio frequencies sent in the RTP stream, however the module is expecting a series of digits and the proper checksum to be calculated.


I know the whole mechanism works on Silent Knight panels, since my initial testing with Andrew was on an IK 5808 - https://www.youtube.com/watch?v=7DXhjVttu0w.
I refined the speech later on as you can see here, https://www.youtube.com/watch?v=2iQSmF-GCXY.

I set the ATA back to rfc2833 and reset the timers in alarmreceiver.conf to more reasonable values. I have been able to get alarmreceiver to respond by dialing the digits into a phone. I am absolutely sure the 5820XL is sending Contact ID. I have attached an image of the asterisk console when the 5820XL dials out.

It’s not sending enough digits to match any format. You can see the source code to the module at: asterisk/apps/app_alarmreceiver.c at master · asterisk/asterisk · GitHub

Your codes:

5201 13 5 000 00
5208 13 5 000 00

Contact ID Format: AAAA ID P CCC XX ZZZ S

This is a neat little project. I have yet to try it because I don’t have the proper hardware, but it could potentially be useful in the field for troubleshooting dialer communications.

I’ve also been thinking about a little open source coding project that would use a voice modem or sound card to “listen in” on the communication between a dialer and central station. It could then save the wave file and interpret the DTMF digits to help me narrow down the causes of dialer issues. Haven’t gotten too far yet though, I’m just getting my bearings on simple Python stuff.

I will continue to work with this when I get my server back up in a bit. I believe that asterisk cannot the 50ms DTMF tones as they are too short in duration and asterisk ends up skipping some of them. I would agree that if this works, it would be extremely useful for testing panels in the field, but asterisk and alarmreciever are not UL listed.

You may be able to try listening in on the phone “conversation” and recording it to a wav file. This page has some suggestions for how to do that on the analog phone lines, or there may be way to do it within Asterisk. You could then analyze it with a program like Audacity to see if it is actually sending the proper number and duration of DTMF tones.

I have listened in, and the 5820XL sounds like it is doing the right stuff, but I should record it. The panel does hang up if I play it the kissoff tone.

I have no doubt the panel is working correctly, you just need to tweak your SIP adapter to get the best DTMF results.

This is what it should sound like, https://www.youtube.com/watch?v=dfRYHJXmiQc.