In this chapter, we're going to build an Asterisk configuration on the platform we have just installed. For the first few sections on FXO and FXS channels, we'll assume that you have a Digium TDM11B kit (which comes with one FXO and one FXS interface). This will allow you to connect to an analog circuit (FXO) and to an analog telephone (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:
Here, we'll do low-level configuration for the hardware interface. We'll set up one FXO channel and one FXS channel. This is configuring the driver for the Linux kernel.
In this file, we'll configure Asterisk's interface to the hardware. This file contains a slightly higher level configuration of the hardware in the Asterisk user-level process.
The dialplans we create will be extremely primitive, but they will prove that the system is working.
This is where we'll configure the SIP protocol.
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 module
reload from the Asterisk console; however, changing signalling
methods requires a restart. You will need to perform
a iax2 reload and a
sip reload after editing the
iax.conf and sip.conf files,
respectively.
In order to test the new devices we have defined, we must have a
dialplan through which we can make connections. Even though we have not
discussed the Asterisk dialplan (that's coming up in the next chapter), we
want you to create a basic extensions.conf file so
that we can test our work in this chapter.
Make a backup copy of the sample extensions.conf (try the bash
command mv extensions.conf extensions.conf.sample), and
then create a blank extensions.conf file (using the bash command
touch extensions.conf), and insert the following
lines:
[globals] [general] autofallthrough=yes [default] [incoming_calls] [internal] [phones] include => internal
![]() |
Note |
|---|---|
|
In the Do not be afraid if what we just written doesn't make a whole lot of sense as we haven't explored the dialplan, applications, priorities, or extensions yet (that is coming up in the next chapter). So for now, just set autofallthrough=yes. It is safest to use the |
There is nothing else for now, but we'll be using this file as we go
through this chapter to build a test dialplan so we can ensure all of our
devices are working. Also, be sure to run the dialplan
reload command from the Asterisk CLI to update to the latest
changes. Verify your changes by running the CLI command dialplan
show.
*CLI> dialplan show [ Context 'phones' created by 'pbx_config' ] Include => 'internal' [pbx_config] [ Context 'internal' created by 'pbx_config' ] [ Context 'incoming_calls' created by 'pbx_config' ] [ Context 'default' created by 'pbx_config' ] [ Context 'parkedcalls' created by 'res_features' ] '700' => 1. Park((null)) [res_features] -= 1 extension (1 priority) in 5 contexts. =-
![]() |
Note |
|---|---|
You will see the |