Working with Interface Configuration Files

In this chapter, we’re finally going to “get our hands dirty” and start building an Asterisk configuration. For the first few sections on FXO and FXS channels, we’ll assume that you have the Digium Dev-Lite kit with one FXO and one FXS interface, which allows you to connect to an analog phone line (FXO) and to an analog phone (FXS). Note that this hardware interface isn’t necessary; if you want to build an IP-only configuration, you can skip to the section on configuring SIP.

The configuration we do in this chapter won’t be particularly useful on its own, but it will be a kernel to build on. We’re going to touch on the following files:

zaptel.conf

Here, we’ll do low-level configuration for the hardware interface. We’ll set up one FXO channel and one FXS channel.

zapata.conf

In this file, we’ll configure Asterisk’s interface to the hardware.

extensions.conf

The dialplans we create will be extremely primitive, but they will prove that the system is working.

sip.conf

This is where we’ll configure the SIP protocol.

iax.conf

This is where we’ll configure incoming and outgoing IAX channels.

In the following sections, you will be editing several configuration files . You’ll have to reload these files for your changes to take effect. After you edit the zaptel.conf file, you will need to reload the configuration for the hardware with /sbin/ztcfg -vv (you may omit the -vv if you don’t need verbose output). Changes made in zapata.conf will require a reload from the Asterisk console; however, changing signaling methods requires a restart. You will need to perform a reload chan_iax2.so and a reload chan_sip.so after editing the iax.conf and sip.conf files, respectively.

Get Asterisk: The Future of Telephony now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.