FOSSLC is a non-profit organization that specializes in technology and know-how to record conferences with excellent quality. Click on the icons below to view great videos from communities we are actively involved with:

 

Step by step: running and managing your phone system using asterisk

07 Sep in How To, Sysadmin, Asterisk
Printer-friendly version
Asterisk

Previously, we provided Step by step - how to set up your own phone system using Asterisk as an easy to follow set of instructions for getting Asterisk installed and running on a Fedora machine. The instructions for Ubuntu or other Linux distributions are very similar since we compiled from source.

The following are additional instructions to help you. While a subset of them may work for earlier versions of Asterisk, they have been tested for Asterisk version 1.6.

Managing the Asterisk server

From the asterisk source directory, if you haven't already, set asterisk to start on boot:
make config
chkconfig asterisk on

Then you can start asterisk with:
service asterisk start

or stop asterisk with:
service asterisk stop

or check whether it is running with:
service asterisk status

Using the Asterisk command line interface

To connect to asterisk and establish a command line interface(CLI):
asterisk -r

From the CLI, you can run all sorts of useful commands. Particularly useful ones include:
"reload" - to reload your configuration files

Core commands

"core stop gracefully" - to shut down asterisk

"core show sysinfo" - show information about the system such as free memory, uptime, etc.

"core show uptime" - show how long asterisk has been up

"help core" - show the help for all core commands

SIP commands

"sip show peers" - to view a list of sip agents asterisk knows about

"sip show users" - show a listing of sip users

There are many other commands that are useful. We'll cover more of them in time.

Viewing logs

Logs from asterisk are in /var/log/asterisk by default.

messages is the file you'll be interested in most often.

To show the last 20 lines of the messages log file:
tail -20 messages

To look for all instances of "WARNING" in the log file:
grep WARNING messages

To look for all instances of "ERROR" in the log file:
grep ERROR messages

Enjoy

We hope you find these how-to's useful. In the next how-to, we'll cover a bit more about macros and how they can be used to simplify your dialplan.

Comments

Superb information that you

Superb information that you have shared.