text
stringlengths
0
152
This command displays a helpful list of the options you can use. For a complete
list of all the options and their descriptions, run the command man asterisk.
This option starts Asterisk as an application (in the foreground). This means that
Asterisk is tied to your user session. In other words, if you close your user session
by logging out or losing the connection, Asterisk dies. This is the option you will
typically use when building, testing, and debugging, but you would not want to
use it in production. If you started Asterisk in this manner, type core stop now
at the CLI prompt to stop Asterisk and exit.
-v, -vv, -vvv, -vvvv, etc.
This option can be used with other options (e.g., -cvvv) in order to increase the
verbosity of the console output. It does exactly the same thing as the CLI com‐
mand core set verbose n where n is any integer between 0 and 5 (any integer
greater than 5 will work, but will not provide any more verbosity). Sometimes it’s
46
|
Chapter 3: Installing Asterisk
useful to not set the verbosity at all. For example, if you are looking to see only
startup errors, notices, and warnings, leaving verbosity off will prevent all the
other startup messages from being displayed.
-d, -dd, -ddd, -dddd, etc.
This option can be used in the same way as -v, but instead of normal output, this
will specify the level of debug output (which is primarily useful for developers
who wish to troubleshoot problems with the code). You will also need to enable
output of debugging information in the logger.conf file (which we will cover in
more detail in Chapter 21).
-r
-T
-x
-g
This command is essential if you want to connect to the CLI of an Asterisk pro‐
cess running as a daemon. You will probably use this option more than any other
for Asterisk systems that are in production. This option will only work if you
have a daemonized instance of Asterisk already running. To exit the CLI when
this option has been used, type exit.
This option will add a timestamp to CLI output.
This command allows you to pass a string to Asterisk that will be executed as if it
had been typed at the CLI. As an example, to get a quick listing of all the chan‐
nels in use without having to start the Asterisk console, simply type asterisk
-rx 'core show channels' from the shell, and you’ll get the output you are
looking for.
This option instructs Asterisk to dump a core file if it crashes.
We recommend you try out a few combinations of these commands to see what they
do.
safe_asterisk
When you install Asterisk using the make config directive, it will create a script
called safe_asterisk, which is run during the init process of Linux each time you
boot.
The safe_asterisk script provides the following benefits:
• Restarts Asterisk automatically after a crash
• Can be configured to email the administrator if a crash has occurred
• Defines where crash files are stored (/tmp by default)
Some Final Configuration Notes
|
47
• Executes a script if a crash has occurred
You don’t need to know too much about this script, other than to understand that it
should normally be running. In most environments this script works fine in its
default format.
Conclusion
In this chapter we’ve provided a curated example of how an Asterisk installation
should go. We’ve chosen the Linux distribution and MySQL server for you for the
sake of brevity, but noted that Asterisk is in fact quite flexible in such matters. We
now have a solid foundation on which to build our Asterisk system. In the following
chapters we will explore how to connect devices to our Asterisk system in order to
start placing calls internally, and work toward increasingly complex concepts in later
chapters (such as video conferencing and WebRTC).
48
|