System information

Asterisk allows devices using many different protocols to speak to it
(and therefore to each other). However, the SIP and IAX2 protocols are
the most popular and mature VoIP modules, so we will focus our at-
tention on them. For your first Asterisk build, you might be best off not
bothering with the other protocols (such as Skinny/SCCP, Unistim,
H.323, and MGCP), and getting comfortable working with SIP and
IAX2 first. The configuration for the other protocols is similar, and the
sample configuration files are full of information and examples, so once
you have the basics down, other protocols should be fairly easy to
work with.
The channel configuration files, such as sip.conf and iax.conf, contain the configuration
for the channel driver, such as chan_iax2.so or chan_sip.so, along with the information
and credentials required for a telephony device to contact and interact with Asterisk.
Common information about the channel driver is contained at the top of the configu-
ration file, in the [general] section. All section names are encased in square brackets,
including device names. Anything that follows a section name (or device definition,
which for our purposes is essentially the same thing) is applied to that section. The
[general] section can also contain information to define defaults for device configu-
rations, which are overridden in the section for each device, or in a template. Asterisk
also comes with defaults that are hardcoded, so while some settings are mandatory,
many other settings can be ignored as long as you are happy with the defaults.
Asterisk will check for parameters in the following order:
1. Check the specific section for the relevant channel.
2. Check the template for the section.
3. Check the [general] section.
4. Use the hardcoded defaults.
This means that just because you didn’t specify a setting for a particular
parameter doesn’t mean your device isn’t going to have a setting for that
parameter. If you are not sure, set the parameter explicitly in the section
of the configuration file that deals with that specific channel, or in the
relevant template.
This concept should make more sense as you read on.
How Channel Configuration Files Work with the Dialplan
While we haven’t discussed Asterisk dialplans yet, it is useful to be able to visualize the
relationship between the channel configuration files (sip.conf, iax.conf) and the dialplan
(extensions.conf). The dialplan is the heart of an Asterisk system: it controls how call
logic is applied to any connection from any channel, such as what happens when a
device dials extension 101 or an incoming call from an external provider is routed. Both
88 | Chapter 5:User Device Configuration