Page 145 - Asterisk™: The Future of Telephony
P. 145
# /usr/sbin/asterisk -c
To connect to a remote Asterisk console, start the daemon first and then connect with
the -r flag:
# /usr/sbin/asterisk
# /usr/sbin/asterisk -r
If you are having a problem with a specific module not loading, or a module causing
Asterisk to not load, start the Asterisk process with the -c flag to monitor the status of
modules loading. For example, if you attempt to load the OSS channel driver (which
allows the use of the CONSOLE channel), and Asterisk is unable to open /dev/dsp, you will
receive the following error on startup:
WARNING[32174]: chan_oss.c:470 soundcard_init: Unable to open /dev/dsp:
No such file or directory
== No sound card detected -- console channel will be unavailable
== Turn off OSS support by adding 'noload=chan_oss.so' in /etc/
asterisk/modules.conf
Enabling Verbosity and Debugging
Asterisk can output debugging information in the form of WARNING, NOTICE, and ERROR
messages. These messages will give you information about your system, such as regis-
trations, status, and progression of calls, and various other useful bits of information.
Note that WARNING and NOTICE messages are not errors; however, ERROR messages should
be investigated. To enable various levels of verbosity, use set verbose followed by a
numerical value. Useful values range from 3 to 10. For example, to set the highest level
of verbosity, use:
# set verbose 10
You can also enable core debugging messages with set debug followed by a numerical
value. To enable DEBUG output on the console, you may need to enable it in the
logger.conf file by adding debug to the console => statement, as follows:
console => warning,notice,error,event,debug
Useful values for set debug range from 3 to 10. For example:
# set debug 10
Conclusion
If you've worked through all of the sections in this chapter, you will have configured a
pair of analog interfaces, a local SIP and IAX2 channel connected to a softphone and/
or a hardphone, and placed calls across servers using the SIP and IAX2 protocols. These
configurations are quite basic, but they give us functional channels to work with. We
will make use of them in the following chapters, while we learn to build more useful
dialplans.
Conclusion | 117