Asterisk – Things You Need to Know

So you have Asterisk installed to your CentOS hardware. Now what? Let’s open up the hood and see what Asterisk can do… Before we do that, let’s examine some things that you need to know about Asterisk to setup and manage your Asterisk box…

In a default Asterisk installation, we will want to put our configuration files in the directory: “/etc/asterisk”
If you want to have some Asterisk sample conf files to help guide you, you can issue the command: “make samples” from your Asterisk installation directory. (In my previous posts, I installed mine to /usr/src/asterisk/)


Basic Configuration Files

For the most basic installation, there a a handful of configuration files that you need to be concerned with:

sip.conf and/or iax.conf
These generally depend on your carrier and the connection “type” that you choose with them. And then as well, the connection that is made between your Asterisk server and your phones. We’ll get into more detail on the contents of the file later on.

extensions.conf
This is what I consider the backbone of your phone system. Within the extensions.conf you determine what happens when a number is dialed, or what time of the day a call is routed to your phone, which phone a call is routed to, and so much more. Again, we’ll get into more detail on this file later on.

voicemail.conf
This one pretty much explains itself. It’s where you setup the voicemail boxes and users.

zapata.conf
This configuration file would apply if you were using a FXS/FXO Card, which we’re not in my example.


Basic Asterisk Commands

You will need to get familiar with the Asterisk Cli (command line.)
For that matter, you will want to get to know Linux and the basic commands there as well. We won’t get into the Linux commands, but here’s some Asterisk Commands that you should get to know.



Getting to Asterisk Cli:

asterisk -r

Once you are in the Asterisk Cli, you can issue any of the following

reload – This command reloads the configuration files, thus applying any changes that you made.

queue show – This command will show you the status of a Queue (if you have any setup) – it will show you how many calls are waiting in that queue, the average holdtime, each member/agent that’s currently in that queue, and how many calls and how long ago each members last call was.

sip show registry - This command will show you the status of any SIP connections with remote hosts. (eg: Your VOIP carrier.) If you have an authenticated connection with them, it will show as “registered” otherwise it will show it as “unregistered.”

iax2 show registry – This command will show you the status of any IAX connections, and whether they are registered or not.

sip show users – This command will show you a list of all the SIP Users setup in the sip.conf – along with their “secret” password. This is great for when you go to setup the phones.

There’s so much more that can be done with Asterisk. These are just some basics to get you started.


Leave a Reply