Section 17.2. Asterisk s Configuration Files


17.2. Asterisk's Configuration Files

Asterisk's operations are governed by a set of text configuration files, like Apache and other common Unix software. Everything from the assignment of extension numbers to call queuing to low-level hardware interfacing is established by these files, which are located in /etc/asterisk . Now would be a good time to peruse a few of the most important ones:



asterisk.conf

Contains the locations of Asterisk software components , sound files used for music-on-hold , automation scripts (AGIs), and other files used by Asterisk.



extensions.conf

Contains the all-encompassing dial-plan , a comprehensive configuration of phone users, voice mailboxes, call-processing instructions, and default behaviors.



features.conf

Tells Asterisk how to handle features such as call park.



h323.conf

Contains instructions on how Asterisk should interact with devices using the popular H.323 VoIP signaling protocol, such as Microsoft's NetMeeting softphone, if you've compiled H.323 support.



iax.conf

Tells Asterisk how to handle Inter-Asterisk Exchange protocol peers.



manager.conf

Configures security restrictions for Asterisk's Manager Socket API.



mgcp.conf

Configures Asterisk's support of the Media Gateway Control Protocol.



modules.conf

Tells Asterisk which modules, or telephony applications, to load when it starts up.



sip.conf

Contains instructions on how Asterisk should interact with VoIP devices using the SIP signaling protocol, such as Xten's X-Lite softphone and Cisco's 7960 SIP hardphone.



skinny.conf

Allows SCCP phones like the Cisco 7970 to be used with Asterisk in a manner similar to SIP phones.



logger.conf

Tells Asterisk where to store its logfiles and how detailed they should be.



voicemail.conf

Tells Asterisk how to operate its built-in voice mail server, called Comedian Mail.



zapata.conf and zaptel.conf

Tell Digium's signaling kernel modules ( wcfxs , etc.) and the Asterisk PBX what type of legacy interface hardware is installed and how it is configured ( zaptel.conf is in /etc ; it's the only config file not in /etc/asterisk ).

There are many other configuration files. At a bare minimum, you'll need to familiarize yourself with extensions.conf and SIP.conf , h323.conf , or skinny.conf in order to build a bare-bones VoIP server that can handle simple calls. If you're using legacy interface hardware such as the X100P card, you'll also need to learn about zaptel.conf and zapata.conf .

The files in /etc/asterisk follow a similar convention, mostly. Many have organizational sections that begin with a string of text in square brackets ( [ and ] ). Following each bracketed heading is a list of configuration settings and directives. A setting is a string followed by = and a user -specifiable value, like this:

 writeprotect=yes 

A directive has a slightly different syntax than a setting. Directives tend to have a more complex definition, and convention dictates that they use the => operator rather than simply = (though either will work). This definition's structure will vary depending on what kind of directive is instantiating it. For example, variable assignments are directives that have a simple syntax in extensions.conf :

 LINE1 => Zap/1 

But an extension directive appears more complex:

 exten => 2101,1,Dial(Zap/3/5552101) 

A directive could be an extension assignment or a priority of an extension assignment (more on this later). Many directives and settings only work in one of the configuration files and are invalid in the others. For example, you can't use voicemail settings in the extensions.conf file; you can only use them in voicemail.conf .

17.2.1. Including Configuration Files

You can't assign extensions in any files other than extensions.conf , unless you specifically include those other configuration files. All of the configuration files support an inclusion directive, which allows them to pull settings and commands from another file that you specify, like this:

 #include myCustomExtensions.conf 

If you put this line in extensions.conf , Asterisk would read the file called myCustomExtensions.conf and treat it as though it were a part of extensions.conf . The file you included would need to have a structure that is valid for extensions.conf , too. Included configuration files are expected to have a structure that is also valid for the file they are included into .



Switching to VoIP
Switching to VoIP
ISBN: 0596008686
EAN: 2147483647
Year: 2005
Pages: 172

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net