-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
phreaknet.1
467 lines (467 loc) · 12.8 KB
/
phreaknet.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
.\" Automatically generated by Pandoc 2.9.2.1
.\"
.TH "PHREAKNET" "1" "August 2022" "PhreakScript 0.1.83" ""
.hy
.SH NAME
.PP
phreaknet - install, enhance, configure, and manage Asterisk and DAHDI
.SH SYNOPSIS
.PP
\f[B]phreaknet\f[R] \f[I]command\f[R] [\f[I]OPTION\f[R]]
.SH DESCRIPTION
.PP
\f[B]phreaknet\f[R] automates the installation, maintenance, and
debugging of Asterisk and DAHDI while integrating additional patches to
provide the richest telephony experience.
The utility automatically installs any necessary prerequisites as part
of operation.
.PP
It also contains tools to automate the process of setting up a new node
on PhreakNet (hence the utility\[aq]s name).
However, it can be used to set up any generic Asterisk system.
.PP
PhreakScript installs the latest LTS (Long Term Servicing) version of
Asterisk along with the latest releases of DAHDI Linux and DAHDI Tools
(if the -d or --dahdi options are specified).
Many additional bug fixes, features, enhancements, and improvements are
also provided to provide the best Asterisk and DAHDI experience.
.SH COMMANDS
.SS Getting started
.TP
\f[B]about\f[R]
Provides information about PhreakScript
.TP
\f[B]help\f[R]
Provides a condensed command and option listing
.TP
\f[B]version\f[R]
Print current PhreakScript version and exit
.TP
\f[B]examples\f[R]
Print some examples of PhreakScript usage
.TP
\f[B]info\f[R]
Print current system, Asterisk, and DAHDI version information and exit
.TP
\f[B]wizard\f[R]
Interactive installation wizard for most common install options
.SS First Use and Installation
.TP
\f[B]make\f[R]
Add PhreakScript to path
.TP
\f[B]man\f[R]
Compile and install PhreakScript man page
.TP
\f[B]mancached\f[R]
Install cached PhreakScript man page (may be outdated)
.TP
\f[B]install\f[R]
Install or upgrade Asterisk.
This is the primary command provided by PhreakScript.
.TP
\f[B]source\f[R]
Download the source code for Asterisk into the current working directory.
.TP
\f[B]dahdi\f[R]
Install or upgrade DAHDI (only).
Generally this command does not need to be used.
To install Asterisk with DAHDI, use the install command and provide the
-d or --dahdi option instead.
.TP
\f[B]odbc\f[R]
Install ODBC (Open Database Connector) for MariaDB
.TP
\f[B]installts\f[R]
Install Asterisk Test Suite
.TP
\f[B]fail2ban\f[R]
Install Asterisk fail2ban configuration
.TP
\f[B]apiban\f[R]
Install apiban client
.TP
\f[B]freepbx\f[R]
Install FreePBX GUI (not recommended).
This is used to install the FreePBX GUI on an existing Asterisk
installation.
To install Asterisk with FreePBX, provide the --freepbx flag to the
install command instead.
.TP
\f[B]pulsar\f[R]
Install Revertive Pulsing simulator (audio files and AGI script).
.TP
\f[B]sounds\f[R]
Install Pat Fleet sound library, overwriting any default Asterisk
prompts that they may replace.
.TP
\f[B]boilerplate-sounds\f[R]
Install PhreakNet boilerplate audio sounds.
.TP
\f[B]ulaw\f[R]
Convert a wav file to ulaw.
If no argument is provided, all wav files in the current directory will
be converted.
If an argument is provided, only the specified file will be converted.
.TP
\f[B]uninstall\f[R]
Uninstall Asterisk, but leave configuration behind
.TP
\f[B]uninstall-all\f[R]
Uninstall Asterisk, and completely remove all traces of it (configs,
etc.)
.SS Initial Configuration
.TP
\f[B]bconfig\f[R]
Install PhreakNet boilerplate config
.TP
\f[B]config\f[R]
Install PhreakNet boilerplate config and autoconfigure PhreakNet
variables in the [globals] context in your dialplan
.TP
\f[B]keygen\f[R]
Install and update PhreakNet RSA keys.
If you are installing keys for the first time, you should specify the
--rotate flag.
.SS Maintenace
.TP
\f[B]update\f[R]
Update PhreakScript to the latest version.
You should run this regularly, and before using this utility for
installations.
If PhreakScript is out of date, a warning will be displayed before a
requested operation is performed.
.TP
\f[B]patch\f[R]
DEPRECATED.
Patch PhreakNet Asterisk configuration.
.TP
\f[B]genpatch\f[R]
DEPRECATED.
Generate a PhreakPatch (patch to be used with the phreaknet patch
command)
.TP
\f[B]freedisk\f[R]
Free up disk space, useful if disk space is running low.
This command will rotate and remove old logs, remove unused swap files,
remove old package files, and remove core dump files.
.TP
\f[B]topdisk\f[R]
Show top files taking up disk space
.TP
\f[B]enable-swap\f[R]
Temporarily allocate and enable swap file
.TP
\f[B]disable-swap\f[R]
Disable and deallocate temporary swap file
.TP
\f[B]restart\f[R]
Fully restart DAHDI and Asterisk
.TP
\f[B]kill\f[R]
Forcibly kill Asterisk
.TP
\f[B]forcerestart\f[R]
Forcibly restart Asterisk
.TP
\f[B]ban\f[R]
Manually ban an IP address using iptables.
Argument is the IP address to block.
.SS Debugging
.TP
\f[B]dialplanfiles\f[R]
Verify what files are being parsed into the dialplan
.TP
\f[B]validate\f[R]
DEPRECATED.
Run dialplan validation and diagnostics and look for problems
.TP
\f[B]trace\f[R]
Capture a CLI trace and upload to InterLinked Paste
.TP
\f[B]paste\f[R]
Upload an arbitrary existing file to InterLinked Paste
.TP
\f[B]iaxping\f[R]
Check if a remote IAX2 listener is reachable
.TP
\f[B]pcap\f[R]
Perform a packet capture, optionally against a specific IP address
.TP
\f[B]pcaps\f[R]
Same as pcap, but open in sngrep afterwards
.TP
\f[B]sngrep\f[R]
Perform SIP message debugging using \f[B]sngrep\f[R]
.TP
\f[B]enable-backtraces\f[R]
Enables backtraces to be extracted from the core dumper (new or existing
installs).
This may require Asterisk to be recompiled.
.TP
\f[B]backtrace\f[R]
Use astcoredumper to obtain a backtrace from a core dump and upload to
InterLinked Paste
.TP
\f[B]backtrace-only\f[R]
Use astcoredumper to process a backtrace
.TP
\f[B]rundump\f[R]
Get a backtrace from the running Asterisk process
.SS Developer Debugging
.TP
\f[B]valgrind\f[R]
Run Asterisk under valgrind.
Asterisk must not be running prior to running this command.
Asterisk will be started in the foreground (using the -c console mode).
.TP
\f[B]cppcheck\f[R]
Run cppcheck on Asterisk for static code analysis
.SS Development and Testing
.TP
\f[B]docverify\f[R]
Show documentation validation errors and details
.TP
\f[B]runtests\f[R]
Run differential PhreakNet tests
.TP
\f[B]runtest\f[R]
Run a specific PhreakNet test.
The argument is the name of the specific test to run.
.TP
\f[B]stresstest\f[R]
Run any specified test multiple times in a row.
The argument is the name of the specific test to run.
.TP
\f[B]gerrit\f[R]
Manually install a custom patch set from the Asterisk Gerrit repository
.TP
\f[B]fullpatch\f[R]
Redownload an entire PhreakNet source file from the PhreakScript
repository.
.TP
\f[B]ccache\f[R]
Globally install ccache to speed up recompilation
.SS Miscellaneous
.TP
\f[B]docgen\f[R]
Generate Asterisk user documentation
.TP
\f[B]pubdocs\f[R]
DEPRECATED.
Generate Asterisk user documentation
.TP
\f[B]edit\f[R]
Edit local PhreakScript source directly
.SH OPTIONS
.TP
\f[B]-h\f[R]
Display usage
.TP
\f[B]-o\f[R], \f[B]--flag-test\f[R]
Option flag test.
This is a development option only used to verify proper option parsing
and handling.
.PP
Some options are only used with certain commands.
.PP
The following options may be used with the \f[B]install\f[R] command.
.TP
\f[B]--audit\f[R]
Audit package installation.
At the end of the install, a report will be generated showing what
packages were installed.
.TP
\f[B]-b\f[R], \f[B]--backtraces\f[R]
Enables getting backtraces
.TP
\f[B]-c\f[R], \f[B]--cc\f[R]
Country code used for Asterisk installation.
Default is 1 (NANPA).
.TP
\f[B]-d\f[R], \f[B]--dahdi\f[R]
Install DAHDI along with Asterisk.
.TP
\f[B]--drivers\f[R]
Also install DAHDI drivers removed in 2018 by Sangoma
.TP
\f[B]-f\f[R], \f[B]--force\f[R]
Force install a new version of DAHDI/Asterisk, even if one already
exists, overwriting old source directories if necessary.
.TP
\f[B]--freepbx\f[R]
Install FreePBX GUI (not recommended)
.TP
\f[B]--manselect\f[R]
Manually run menuselect yourself.
Generally, this is unnecessary.
.TP
\f[B]--minimal\f[R]
Do not upgrade the kernel or install nonrequired dependencies (such as
utilities that may be useful on typical Asterisk servers)
.TP
\f[B]-s\f[R], \f[B]--sip\f[R]
Install chan_sip instead of or in addition to chan_pjsip.
By default, chan_sip is not compiled or loaded since it is deprecated
and will be removed in Asterisk 21.
.TP
\f[B]--alsa\f[R]
Ensure ALSA library detection exists in the build system. This does
NOT readd the deprecated/removed chan_alsa module.
.TP
\f[B]--cisco\f[R]
Add full support for Cisco Call Manager phones using the usecallmanager
patches (chan_sip only)
.TP
\f[B]--sccp\f[R]
Install community chan_sccp channel driver (Cisco Skinny)
.TP
\f[B]-t\f[R], \f[B]--testsuite\f[R]
Compile with developer support for Asterisk test suite and unit tests.
.TP
\f[B]-u\f[R], \f[B]--user\f[R]
User as which to run Asterisk (non-root).
By default, Asterisk is install as root.
.TP
\f[B]--vanilla\f[R]
Do not install extra features or enhancements.
Bug fixes are always installed.
(May be required for older versions)
.TP
\f[B]-v\f[R], \f[B]--version\f[R]
Specific version of Asterisk to install (M.m.b e.g.
18.8.0).
Also, see \f[B]--vanilla\f[R].
.PP
The following options may be used with the \f[B]sounds\f[R] command.
.TP
\f[B]--boilerplate\f[R]
Also install boilerplate sounds
.PP
The following options may be used with the \f[B]config\f[R] command.
.TP
\f[B]--api-key\f[R]
InterLinked API key
.TP
\f[B]--clli\f[R]
CLLI code
.PP
The following options may be used with the \f[B]keygen\f[R] command.
.TP
\f[B]--rotate\f[R]
Rotate existing RSA keys or create keys if none exist.
.PP
The following options may be used with the \f[B]update\f[R] command.
.TP
\f[B]--upstream\f[R]
Specify upstream source from which to update PhreakScript.
By default, this is the official repository or development mirror.
.PP
The following options may be used with the \f[B]trace\f[R] command.
.TP
\f[B]--debug\f[R]
Debug level (default is 0/OFF, max is 10)
.SH EXAMPLES
.SS Installation and configuration examples
.TP
\f[B]phreaknet install\f[R]
Install the latest version of Asterisk.
.TP
\f[B]phreaknet install --cc=44\f[R]
Install the latest version of Asterisk, with country code 44.
.TP
\f[B]phreaknet install --force\f[R]
Reinstall the latest version of Asterisk.
.TP
\f[B]phreaknet install --dahdi\f[R]
Install the latest version of Asterisk, with DAHDI.
.TP
\f[B]phreaknet install --sip --weaktls\f[R]
Install Asterisk with chan_sip built AND support for TLS 1.0.
.TP
\f[B]phreaknet install --version 18.9.0\f[R]
Install Asterisk version 18.9.0 as the base version of Asterisk.
.TP
\f[B]phreaknet installts\f[R]
Install Asterisk Test Suite and Unit Test support (developers only)
.TP
\f[B]phreaknet pulsar\f[R]
Install revertive pulsing pulsar sounds and AGI, with bug fixes
.TP
\f[B]phreaknet sounds --boilerplate\f[R]
Install Pat Fleet sounds and basic boilerplate old city tone audio
.TP
\f[B]phreaknet config --force --api-key= --clli= --disa=\f[R]
Download and initialize boilerplate PhreakNet configuration
.TP
\f[B]phreaknet keygen\f[R]
Upload existing RSA public key to PhreakNet
.TP
\f[B]phreaknet keygen --rotate\f[R]
Create or rotate PhreakNet RSA keypair, then upload public key to
PhreakNet
.TP
\f[B]phreaknet validate\f[R]
Validate your dialplan configuration and check for errors
.SS Debugging examples
.TP
\f[B]phreaknet trace\f[R]
Perform a trace with verbosity 10 and no debug level (and notify the
Business Office)
.TP
\f[B]phreaknet trace --debug 1\f[R]
Perform a trace with verbosity 10 and debug level 1 (and notify the
Business Office)
.TP
\f[B]phreaknet backtrace\f[R]
Process, extract, and upload a core dump
.SS Maintenance examples
.TP
\f[B]phreaknet update\f[R]
Update PhreakScript.
No Asterisk or configuration modification will occur.
.TP
\f[B]phreaknet update --upstream=URL\f[R]
Update PhreakScript using URL as the upstream source (for testing).
.TP
\f[B]phreaknet patch\f[R]
Apply the latest PhreakNet configuration patches.
.TP
\f[B]phreaknet fullpatch app_verify\f[R]
Download the latest version of the app_verify module.
Recompilation will be required.
.SH EXIT VALUES
.TP
\f[B]0\f[R]
Success
.TP
\f[B]1\f[R]
Error
.TP
\f[B]2\f[R]
Error
.SH BUGS
.PP
Please report any bugs or issues at
https://github.com/InterLinked1/phreakscript
.PP
The public mailing list for discussion of this utility may be found at
https://groups.io/g/phreaknet
.SH COPYRIGHT
.PP
Copyright (C) 2022 PhreakNet, Naveen Albert and others.
.PP
Licensed under the Apache License, Version 2.0 (the \[dq]License\[dq]);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
.PP
http://www.apache.org/licenses/LICENSE-2.0
.PP
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an \[dq]AS IS\[dq]
BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied.
See the License for the specific language governing permissions and
limitations under the License.
.SH AUTHORS
Naveen Albert.