You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
install: Improve robustness of various install procedures. (#44)
* res_alarmsystem.conf.sample: Comment out config, to avoid newly built
systems having this module enabled by default.
* wanpipe: Install missing pre-reqs if needed.
* wanpipe: Use more proper arguments for Setup script.
* wanpipe: Don't ignore install failures. wanpipe is not installed by
default anymore and should compile successfully on kernels through
6.1.0. To work around this, users can force continuing the install
if needed using --force, or install on kernels <= 6.1.0.
* No CI is being added, since GitHub uses the 6.8.0-1015-azure
kernel for builds, which is newer than 6.1.0.
* install: Disable yappcap from building if the test suite fails to
build initially. This is deprecated and not needed for all tests.
* install: Fix misimplementation of --fast flag. A nice value was set,
but not actually used anywhere, which actually resulted in builds
being slower with this flag. Also pull this out to the top of the
script, so that all compilation is affected.
PHREAKSCRIPT-42 #close
PHREAKSCRIPT-48 #close
Copy file name to clipboardExpand all lines: configs/samples/res_alarmsystem.conf.sample
+34-34Lines changed: 34 additions & 34 deletions
Original file line number
Diff line number
Diff line change
@@ -14,44 +14,44 @@
14
14
15
15
; *** Server configuration
16
16
17
-
[general]
18
-
bindport=4589 ; UDP port to which alarm server will bind, if any servers are enabled.
17
+
;[general]
18
+
;bindport=4589 ; UDP port to which alarm server will bind, if any servers are enabled.
19
19
;bindaddr=0.0.0.0
20
20
21
-
[myserver] ; Defines an alarm server to which alarm clients can report.
22
-
type = server
23
-
ip_loss_tolerance = 60 ; Number of seconds the server will tolerate not receiving pings from clients before considering
21
+
;[myserver] ; Defines an alarm server to which alarm clients can report.
22
+
;type = server
23
+
;ip_loss_tolerance = 60 ; Number of seconds the server will tolerate not receiving pings from clients before considering
24
24
; IP connectivity to a client to have been lost (which will trigger the internet_lost alarm).
25
-
contexts = myserver-contexts ; A config section which defines dialplan contexts to execute for each alarm event
26
-
logfile = /var/log/asterisk/alarm_server.log ; Log file for this server
25
+
;contexts = myserver-contexts ; A config section which defines dialplan contexts to execute for each alarm event
26
+
;logfile = /var/log/asterisk/alarm_server.log ; Log file for this server
27
27
28
-
[clients] ; Special section defining clients authorized to report to this server
28
+
;[clients] ; Special section defining clients authorized to report to this server
29
29
;A101 = 1D7B ; one entry for each client, with client ID as the key and client PIN as the value
30
30
31
31
; *** Client configuration
32
32
33
-
[myclient] ; Each alarm client is defined in its own section
34
-
type = client
35
-
client_id = A101 ; Unique, telenumeric ID (0-9,A-D) for this client. Should be unique across all clients that report to a server.
33
+
;[myclient] ; Each alarm client is defined in its own section
34
+
;type = client
35
+
;client_id = A101 ; Unique, telenumeric ID (0-9,A-D) for this client. Should be unique across all clients that report to a server.
36
36
; Note that there is no security mechanism to restrict reporting aside from the client ID.
37
37
; Therefore, if the alarm server is exposed to the Internet, you may wish to use long, hard-to-guess client IDs
38
38
; to prevent spoofed reports, or lock down your firewall accordingly.
39
39
;client_pin=1D794B61 ; PIN, if required by server for authentication
40
-
server_ip = 127.0.0.1:4589 ; IP/port to reach alarm server over IP
41
-
server_dialstr = DAHDI/g1/*70w18005551212 ; A dial string for "POTS phone failover" to reach alarm server if unable to by IP. If you need to use dial options, use a Local channel to encapsulate the Dial() call.
40
+
;server_ip = 127.0.0.1:4589 ; IP/port to reach alarm server over IP
41
+
;server_dialstr = DAHDI/g1/*70w18005551212 ; A dial string for "POTS phone failover" to reach alarm server if unable to by IP. If you need to use dial options, use a Local channel to encapsulate the Dial() call.
42
42
; The server should call AlarmEventReceiver() (NOT AlarmReceiver() !!!) when receiving such a call.
43
43
; NOTE: When reporting an alarm trigger, the line will stay open until disarm_delay has been reached, to avoid making multiple calls in succession
44
-
phone_hangup_delay = 45 ; Number of seconds to keep phone failover line open upon reporting event for reporting further events in that time.
44
+
;phone_hangup_delay = 45 ; Number of seconds to keep phone failover line open upon reporting event for reporting further events in that time.
45
45
; It is recommended this setting be at least 10-15 seconds, so that if phone failover is being used,
46
46
; 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
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
-
ping_interval = 4 ; How often to ping the server
49
-
egress_delay = 15 ; number of seconds grace period to exit without re-triggering alarm
50
-
contexts = myclient-contexts ; A config section which defines dialplan contexts to execute for each alarm event
51
-
logfile = /var/log/asterisk/alarm_myclient.log ; Log file to which to log alarm events.
48
+
;ping_interval = 4 ; How often to ping the server
49
+
;egress_delay = 15 ; number of seconds grace period to exit without re-triggering alarm
50
+
;contexts = myclient-contexts ; A config section which defines dialplan contexts to execute for each alarm event
51
+
;logfile = /var/log/asterisk/alarm_myclient.log ; Log file to which to log alarm events.
52
52
53
-
[myclient-contexts]
54
-
type = contexts
53
+
;[myclient-contexts]
54
+
;type = contexts
55
55
; In this section, the key is the name of the alarm event for which the specified dialplan will be executed,
56
56
; and the value is the dialplan [exten@]context to execute. If exten is omitted, s will be used. The priority will always be 1.
57
57
;
@@ -64,20 +64,20 @@ type = contexts
64
64
; internet_lost = iplost@myclientalarm ; Internet connectivity to alarm peer lost
65
65
; internet_restored = iprestored@myclientalarm ; Internet connectivity to alarm peer restored
66
66
67
-
[door] ; Section defining a door sensor
68
-
type = sensor
69
-
sensor_id = 1 ; Unique, numeric ID for this sensor. Should be unique across all sensors belongng to all clients that report to a server.
70
-
client = myclient ; Client associated with this sensor
71
-
device = DAHDI/23 ; if specified, then arg2 to AlarmSensor is optional since we can use the channel to determine which sensor was activated
67
+
;[door] ; Section defining a door sensor
68
+
;type = sensor
69
+
;sensor_id = 1 ; Unique, numeric ID for this sensor. Should be unique across all sensors belongng to all clients that report to a server.
70
+
;client = myclient ; Client associated with this sensor
71
+
;device = DAHDI/23 ; if specified, then arg2 to AlarmSensor is optional since we can use the channel to determine which sensor was activated
72
72
; (This way, the same context can be specified for all sensors, using immediate=yes in chan_dahdi.conf)
73
-
disarm_delay = 45 ; Number of seconds grace period permitted to disarm an active alarm after this sensor triggers before it is considered a breach.
73
+
;disarm_delay = 45 ; Number of seconds grace period permitted to disarm an active alarm after this sensor triggers before it is considered a breach.
74
74
; Default is 60.
75
75
76
-
[keypad] ; Section defining alarm keypad settings. An alarm keypad can be instantiated by using AlarmKeypad()
77
-
type = keypad
78
-
client = myclient ; Client associated with these keypad settings
79
-
keypad_device = PJSIP/Polycom ; dial string for alarm keypad endpoints to autodial when alarm is triggered. Use a Local channel for predial options to autoanswer.
80
-
pin = 1234 ; Hardcoded PIN which must be entered to disarm the alarm. Multiple PINs can be permitted by providing multiple comma-separated PINs.
81
-
audio = custom/siren ; An optional audio file to play while waiting for the alarm to be disarmed. By default, a tone is played.
82
-
cid_num = DISARM SYSTEM NOW ; Caller ID number to use for outgoing calls to the keypad device
83
-
cid_name = ALARM PANEL ; Caller ID name to use for outgoing calls to the keypad device
76
+
;[keypad] ; Section defining alarm keypad settings. An alarm keypad can be instantiated by using AlarmKeypad()
77
+
;type = keypad
78
+
;client = myclient ; Client associated with these keypad settings
79
+
;keypad_device = PJSIP/Polycom ; dial string for alarm keypad endpoints to autodial when alarm is triggered. Use a Local channel for predial options to autoanswer.
80
+
;pin = 1234 ; Hardcoded PIN which must be entered to disarm the alarm. Multiple PINs can be permitted by providing multiple comma-separated PINs.
81
+
;audio = custom/siren ; An optional audio file to play while waiting for the alarm to be disarmed. By default, a tone is played.
82
+
;cid_num = DISARM SYSTEM NOW ; Caller ID number to use for outgoing calls to the keypad device
83
+
;cid_name = ALARM PANEL ; Caller ID name to use for outgoing calls to the keypad device
sed -i '''/HAVE_CRYPT_R/d' include/asterisk/autoconfig.h
3213
3230
sed -i "" -e 's|WRAP_LIBC_MALLOC|ASTMM_LIBC ASTMM_REDIRECT|g' addons/mp3/interface.c # for format_mp3
3214
3231
sed -i "" -e 's|\\s|s|g' build_tools/make_xml_documentation # fix sed command in this script to remove the backslash for BSD sed
3215
-
nice $AST_MAKE"ASTLDFLAGS=-lcrypt -lsysinfo" main
3232
+
$AST_MAKE"ASTLDFLAGS=-lcrypt -lsysinfo" main
3216
3233
if [ $?-eq 0 ];then
3217
-
nice $AST_MAKE -j$(nproc)# compile Asterisk. This is the longest step, if you are installing for the first time. Also, don't let it take over the server.
3234
+
$AST_MAKE -j$(nproc)# compile Asterisk. This is the longest step, if you are installing for the first time. Also, don't let it take over the server.
3218
3235
fi
3219
3236
else
3220
-
nice $AST_MAKE -j$(nproc) main # compile 'main' subdirectory first
3237
+
$AST_MAKE -j$(nproc) main # compile 'main' subdirectory first
3221
3238
if [ $?-eq 0 ];then
3222
-
nice $AST_MAKE -j$(nproc)# compile Asterisk. This is the longest step, if you are installing for the first time. Also, don't let it take over the server.
3239
+
$AST_MAKE -j$(nproc)# compile Asterisk. This is the longest step, if you are installing for the first time. Also, don't let it take over the server.
0 commit comments