Skip to content

Commit 733854a

Browse files
committed
res_alarmsystem: Improve the telephone-only reporting experience.
Make some improvements that make this more suitable for systems where the client will only be reporting events by telephone, not IP. * Act sanely if no IP reporting host is provided. * Allow events to be batched, so they are not all reported in real time. Breaches continue to be reported in real time, and the event queue can also be flushed on demand (e.g. via a cron job). * Include the date and hour in the timestamp, instead of just minutes and seconds. This is the only backwards-incompatible change, though users should not need to do anything unless they were parsing the timestamp in the logs. * Allow IP connectivity loss detection to be disabled. * Speed up the DTMF digits slightly. * Use exponential backoff if phone line is unavailable and reporting synchronization by phone fails.
1 parent 4815fb8 commit 733854a

File tree

2 files changed

+306
-43
lines changed

2 files changed

+306
-43
lines changed

configs/samples/res_alarmsystem.conf.sample

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@
1818
;bindport=4589 ; UDP port to which alarm server will bind, if any servers are enabled.
1919
;bindaddr=0.0.0.0
2020

21-
;[myserver] ; Defines an alarm server to which alarm clients can report.
21+
;[myserver] ; Defines an alarm server to which alarm clients can report. Only one server may be configured.
2222
;type = server
2323
;ip_loss_tolerance = 60 ; Number of seconds the server will tolerate not receiving pings from clients before considering
2424
; IP connectivity to a client to have been lost (which will trigger the internet_lost alarm).
25+
; Setting to 0 will disable checks/alerts for lost connectivity.
2526
;contexts = myserver-contexts ; A config section which defines dialplan contexts to execute for each alarm event
2627
;logfile = /var/log/asterisk/alarm_server.log ; Log file for this server
2728

@@ -44,7 +45,8 @@
4445
;phone_hangup_delay = 45 ; Number of seconds to keep phone failover line open upon reporting event for reporting further events in that time.
4546
; It is recommended this setting be at least 10-15 seconds, so that if phone failover is being used,
4647
; a single phone call is sufficient to report sensor trigger and alarm disarm events, rather than dialing up a second time to report this event.
47-
; You may want to tweak this based on the cost of each call, cost per minute, and the acceptable amount of delay in setting up a call. Default is 45.
48+
; You may want to tweak this based on the cost of each call, cost per minute, and the acceptable amount of delay in setting up a call. Default is 50.
49+
;batch_events=no ; Whether to batch reporting events together when breaches occur or for when the queue is flushed manually (intended for telephone-only reporting)
4850
;ping_interval = 4 ; How often to ping the server
4951
;egress_delay = 15 ; number of seconds grace period to exit without re-triggering alarm
5052
;contexts = myclient-contexts ; A config section which defines dialplan contexts to execute for each alarm event

0 commit comments

Comments
 (0)