AlarmReceiver, howto get it to work

Hi all !
My first post here, and one of my first tries using asterisk.
I’m trying to get the server to ansver to alarmcalls from my panel.

I have an ordinary landline that my alarm will use, and the a SIP account for the server.
There is no problem receiving and making calls via the server. But when I’m trying to follow this guide, it won’t work: http://www.voip-info.org/wiki/view/Asterisk+cmd+AlarmReceiver

On the server I have an inbound rule directing the calls to one extension. My plan is to use the server just for reciving the alarms, maybe it shuld call another extension when reciving the alarm, but that optional.

It says that I shuld put the following lines in the extensions.conf

exten => 18005550911,1,Ringing();
exten => 18005550911,2,Wait(6);
exten => 18005550911,3,AlarmReceiver
exten => 18005550911,4,Hangup

I guess I should change the numbers to something, I have tried with the number the alarm is calling from. All that happens then is that the call gets to the default extension. I’ve tried to put the number for the extension, the same result. I have tried the number to the server, same result. I have tried to remove in inbound rule, resulting in that I get a voice saying that the number is not in use… My guess that this lines are ignored or something like that…

I don’t know what else I can try, so please, come with some ideas…

Edit extensions_custom.conf and add this at the bottom
; Alarmreceiver
[custom-myalarmreceiver]
exten => s,1,NoOp(Alarm received)
exten => s,n,Answer
exten => s,n,Ringing()
exten => s,n,Wait(6)
exten => s,n,AlarmReceiver
exten => s,n,Hangup

Go to http://www.voip-info.org/wiki/view/Asterisk+config+alarmreceiver.conf and copy the text there and paste into /etc/asterisk/alarmreceiver.conf

Start asterisk prompt asterisk -r
Type this load app_alarmreceiver.so
It should report back:

 == Parsing '/etc/asterisk/alarmreceiver.conf': Found
 == Registered application 'AlarmReceiver'
 Loaded app_alarmreceiver.so => (Alarm Receiver for Asterisk)

In FreePBX go to Tools, Custom Destinations
Click on Add Custom Destination
Enter in Custom Destination this custom-myalarmreceiver,s,1
In Description enter Alarm Receiver
Submit Changes
Go to Inbound Routes and edit or add a new Incoming Route, in Set Destination look for Custom Destinations and select Alarm Receiver
Submit
Apply Changes

Note! This is only an example, I have provided enough information here to get you started.

Note 2! Do NOT use this example to protect valuables, get a proper alarm service.

And if I’m using trixbox at the moment, do you have any good start for that aswell, or shuld I switch to free pbx?

I canät find the “custom detination” or is that the same as extensions ?

Well, FreePBX is “the real thing” :slight_smile:

Go to Module Admin, click on Check for updates online, under the heading System Administration select Custom Applications and download it.

This will add the needed module.

When I try the command:
“load app_alarmreceiver.so”

it reports back:
Unable to load module app_alarmreceiver.so
command ´load app_alarmreceiver.so` failed

If I look at the the module admin it says:
Custom Applications tool 2.5.0.5 Enabled and up to date

So i guess that’s ok…

You use trixbox. Bad thing, they “decide” what to go into Asterisk or not.
app_alarmreceiver has been in Asterisk since 1.2.

Have you tried to update your trixbox or manually update Asterisk?

Well, the app_alarmreceiver.so file is included. Tried to make a manual update but with the same result. Will try with asterisk@home to see if that works.

Otherwise I guess I can run freepbx under any linux dist? Like Ubuntu?

Can the problem be that when the server sends the 1400Hz and 2300Hz tone, something happends and the alarm dosen’t understand that it’s ok to start sending data?

When I call from an ordinary phone and starts to punch digits the will show upp.
It also works to send tones from an extension on the server to an external phone. But it’s hard to say if there is something wrong with the tones.
Can it be a DTMF error? What can I do to fix that?

Well…

I’m kind of new into this, was playing around with it a while aga, when it was called Asterisk@home. It might be that I’m running asterisk now. Is there any easy way to check that?
Anyway, ther verison numbers that I can find is:
FreePBX 2.5.2.2

Ah… that’s NOT Asterisk@Home then, so don’t refer to it that way. Anyway, to address your original question, you can try setting the ownership on that directory (both owner and group) to Asterisk and see if that helps.

I runned asterisk -r to get a console to see what happends when the alarm panels calls. And I could find the following error:

== AlarmReceiver: Incomplete string: , trying again…

but no further info… Any tip what I shuld look into next ?

I have managed to get some more info but I have no idea how I can fix it…

AlarmReceiver: Setting read and write formats to ULAW
AlarmReceiver: Answering channel
AlarmReceiver: Waiting for connection to stabilize
AlarmReceiver: Waiting for first event from panel
AlarmReceiver: Sending 1400Hz 100ms burst (ACK)
AlarmReceiver: Sending 2300Hz 100ms burst (ACK)
AlarmReceiver: DTMF Digit Timeout on SIP/xxx.xxx.xxx.xxx
== AlarmReceiver: Incomplete string: , trying again…

Old post, But i’m still struggeling with this.

I have managed to get the alarm to call my asterisk@home server now, but it won’t create any of the files.
Can there be a permissions error?
I created the folder /var/spool/asterisk/alarm_events
as root, may that be the problem that the system don’t have any write access to that folder?

Okay, what follows is my opinion. It APPEARS that you somehow found some very old software - it seems to me like “Asterisk@Home” was retired about three years ago. Chances are nobody’s going to help you with that.

What you need is a modern, up-to-date distribution that uses REAL FreePBX. That could be PBX in a Flash, Elastix, or a recent version of AsteriskNOW. Or, you can build your own system from the ground up, but it doesn’t sound like you have the expertise to do that.

Granted this is not help you with your present problem, but it just seems like you are making some questionable choices (first using Trixbox, then going to software so old that nobody who uses FreePBX would be running it). I know it will be painful, but the best thing you could do is go through your configuration pages one by one and copy your settings (or take screenshots or something), then install one of the distributions mentioned above (which will reformat your hard drive, which is a desirable thing in your situation). Then copy all your settings back, but be aware you’ll have additional options to consider. You will have a day or two of extreme pain (hopefully I’m slightly exaggerating about that), but afterward you’ll have a shiny new clean system and more importantly, it will be something that perhaps folks in these forums can actually help you with.

One BIG difference is that FreePBX handles inbound calls much better (using Inbound Routes) so you may find that the thing you are struggling with becomes easier to manage (but since I don’t have an alarm like you’ve got, I can’t say that for sure). But seriously, dump the 3-4 year old software and get something modern.

Anyone have any clue what might be the error?
I think the problem is that the alarm panel dosn’t get the ack signals and won’t start sending the DTMF tones. why is that? Is there anyone on this forum that have tried thiss app?
On all other forums people seemes to use it with an ata-box, and i’m trying to do with an PSTN to voip solution. Can that cause some problems?

Hi,

Can anyone tell me if they are using this module with a recent release of asterisk. I have attempted to get it going with asterisk 1.8.4 and asterisk dies (dumps core) every time I try and dial the virtual extension configured with this module.

Many thanks

Phil

I just tested it on Asterisk 1.10 without any problems.

It was a while since I tested so I don’t know.
Maybe it’s time to make a new try.

Or is it the DTMF signaling thats wrong? because I’m using a PSTN to voip solution?

Hi,

Thankyou so much for testing and confirming there is nothing wrong with the module. I obviouly don’t know what I am doing then. I followed your instructions above, but my alarm panel will not be calling in from an external line. It will be calling from an internal extension (spa3102 attached to the alarm panel). I went under custom destinations as described and set up a destination for “Alarm Receiver”. I then went to “Misc Applications” and created a Misc Application called “Alarm Receiver EXtension”, entered “666” for the “Feature Code” set “Feature Status” to “Enabled” and then under “Destination” I select “Custom Destinations” and “Alarm Receiver”. Submit changes etc.

From a working extension, I then dial extension “666” and was expecting to hear something. The phone rings a couple of times, it is picked up, the asterisk dies.

While running asterisk -r, this is what I see…

root@pbx:/etc/asterisk $ asterisk -r
Asterisk 1.8.4, Copyright © 1999 - 2010 Digium, Inc. and others.
Created by Mark Spencer [email protected]
Asterisk comes with ABSOLUTELY NO WARRANTY; type ‘core show warranty’ for detail s.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type ‘core show license’ for details.

Connected to Asterisk 1.8.4 currently running on pbx (pid = 26315)
Verbosity is at least 3
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Executing [666@from-internal:1] NoOp(“SIP/200-00000000”, “Running miscapp 2: Alarm Receiver EXtension”) in new stack
– Executing [666@from-internal:2] Macro(“SIP/200-00000000”, "user-callerid, ") in new stack
– Executing [s@macro-user-callerid:1] Set(“SIP/200-00000000”, “AMPUSER=200” ) in new stack
– Executing [s@macro-user-callerid:2] GotoIf(“SIP/200-00000000”, “0?report” ) in new stack
– Executing [s@macro-user-callerid:3] ExecIf(“SIP/200-00000000”, “1?Set(REA LCALLERIDNUM=200)”) in new stack
– Executing [s@macro-user-callerid:4] Set(“SIP/200-00000000”, “AMPUSER=200” ) in new stack
– Executing [s@macro-user-callerid:5] Set(“SIP/200-00000000”, “AMPUSERCIDNA ME=Kitchen”) in new stack
– Executing [s@macro-user-callerid:6] GotoIf(“SIP/200-00000000”, “0?report” ) in new stack
– Executing [s@macro-user-callerid:7] Set(“SIP/200-00000000”, “AMPUSERCID=2 00”) in new stack
– Executing [s@macro-user-callerid:8] Set(“SIP/200-00000000”, “CALLERID(all )=“Kitchen” <200>”) in new stack
– Executing [s@macro-user-callerid:9] ExecIf(“SIP/200-00000000”, “0?Set(CHA NNEL(language)=)”) in new stack
– Executing [s@macro-user-callerid:10] GotoIf(“SIP/200-00000000”, “0?contin ue”) in new stack
– Executing [s@macro-user-callerid:11] Set(“SIP/200-00000000”, “__TTL=64”) in new stack
– Executing [s@macro-user-callerid:12] GotoIf(“SIP/200-00000000”, “1?contin ue”) in new stack
– Goto (macro-user-callerid,s,19)
– Executing [s@macro-user-callerid:19] Set(“SIP/200-00000000”, “CALLERID(nu mber)=200”) in new stack
– Executing [s@macro-user-callerid:20] Set(“SIP/200-00000000”, “CALLERID(na me)=Kitchen”) in new stack
– Executing [s@macro-user-callerid:21] NoOp(“SIP/200-00000000”, “Using Call erID “Kitchen” <200>”) in new stack
– Executing [666@from-internal:3] Goto(“SIP/200-00000000”, “custom-myalarmr eceiver,s,1”) in new stack
– Goto (custom-myalarmreceiver,s,1)
– Executing [s@custom-myalarmreceiver:1] NoOp(“SIP/200-00000000”, “Alarm re ceived”) in new stack
– Executing [s@custom-myalarmreceiver:2] Answer(“SIP/200-00000000”, “”) in new stack
– Executing [s@custom-myalarmreceiver:3] Ringing(“SIP/200-00000000”, “”) in new stack
– Executing [s@custom-myalarmreceiver:4] Wait(“SIP/200-00000000”, “6”) in n ew stack
– Executing [s@custom-myalarmreceiver:5] AlarmReceiver(“SIP/200-00000000”, “”) in new stack
pbx*CLI>
Disconnected from Asterisk server
root@pbx:/etc/asterisk $

Any help would be greatly appreciated.

Many thanks

Phil

Phil, I have a similar setup to what you’ve described and I too am seeing the same results; I get similar lines of code then I’m disconnected from Asterisk. Were you able to get any farther?

I’m using FreePBX 2.8.0.1 and asterisk 1.6.2.7

just to try an alarm receiving

in extension_custom.conf i’ve added

[internal]
;alarm receiver
exten => 560,1,Verbose(1|Extension 560 - Alarm Receiver)
exten => 560,n,Ringing()
exten => 560,n,Wait(2)
exten => 560,n,AlarmReceiver()
exten => 560,n,Hangup()

and added in custom destination internal,560,1
and added an inbound route to 560, i’m receiving from a sip trunk without compression codec.

after some incomplete string finally a received event, then an infinity of incomplete string and nothing writed in the spool directory…
I miss something??

== AlarmReceiver: Incomplete string: , trying again…
== AlarmReceiver: Received Event 123418114000001B
== AlarmReceiver: Incomplete string: , trying again…
== AlarmReceiver: Incomplete string: , trying again…