User guide
also do far more things that you do not expect. By keeping things simple you will learn slowly but
steadily.
6.4 Basic Asterisk Commands
Asterisk
has two built-in components: a server that normally runs as a background process, and a
client (CLI) that can monitor the server. Both server and client are invoked using the same command
“
Asterisk
” but appending different flags (options).
Once you have successfully installed
Asterisk
, you should know some of the basic commands:
Start/Stop Asterisk from a run level
To run Asterisk (forks to background)
#/etc/init.d/asterisk (start|
stop)
Start Asterisk from the command line
Alternatively, run Asterisk from the command line (as a
daemon)
# asterisk
Run the Asterisk server with “verbose” information (-vvv)
and open a client “console” (-c) (the client console or CLI
allows you to monitor what is going on in the Asterisk server)
# asterisk -vvvc
If the server is already running, open a client “terminal” and
connect to the server to monitor its status (-r).
# asterisk -r
CLI basic commands
Turn on debug information for SIP or IAX2 #CLI> IAX2 debug
#CLI> SIP debug
Turn off debug information for SIP or IAX2 #CLI> IAX2 no debug
#CLI> SIP no debug
Show the status information of users, peers and channels for
SIP or IAX2
#CLI> sip show users
#CLI> sip show peers
#CLI> sip show channels
#CLI> iax2 show peers
#CLI> iax2 show users
#CLI> iax2 show channels
Page 23 TRICALCAR | www.wilac.net/tricalcar – Version: February 2008