Asterisk Configuration files
This webpage hopes to solve the mystery of Asterisk's configuration files. Especially where to find them, which files do what,and which files, you can or cannot modify. This webpage is divided into two sections: the first section is for the Asterisk related configuration files found in the /etc/ directory. The 2nd section is for the Asterisk specific configuration files found in /etc/asterisk directory.
The majority of the configuration files (if not all) are text files that can be viewed and modified with a text editor. The standard command line text editor that comes with PBX in a Flash is nano. It is a simple, easy to use, awkward text editor that lacks the basic functionality of most WinXP text editors like the edit program. Unfortunately, it is one of the most user friendly which is a sad testament to the quality of Unix text editors (don't get me started on vi!).
Just for interest sake, any line starting with a semicolon ; or a #is a remark/comment line and can be ignored in these files. Naturally, there are some cases where the rule is broke: a # followed by an Include means to include some code from another source. The configuration files listed below are linked to example files for viewing.
The /etc/ directory configuration files
The /etc/ directory holds 90% of the configuration files for Linux and the applications that are present. The ones that we are concerned with are (in alphabetical order):
This file is used to configure FreePBX - the original name was Asterisk Management Portal (AMP). You can manually change this file and then at the Linux prompt, run:
root@pbx:~ $ /usr/src/AMP/apply_conf
This is 1st part of the password file system for listing the usernames that are allowed to "use" the Linux operating system. The 2nd part is the /etc/shadow file. It holds the encrypted passwords. I've noticed that there are some users that should not be in the default setup for PBX in a Flash. You can create and modify users using the Webmin interface.The questionable users are:
- gopher - gopher was used when the Internet was only text based - it predated the graphical web as we know it
- games - don't need games on a server
- uucp - Unix to Unix copy protocol. It was used a long time ago when the Internet was text based and used dial-up modems. It is considered obsolete
- news - User for the Newsnet protocol. This is the protocol that news servers run on and you get newsgroups. Not too sure what that has to do with Asterisk and telephony.
This script will be executed after all the other init scripts. You can put your own initializationm stuff in here if you don't want to do the full Sys V style init stuff. It is only reloaded when you reboot Linux.
The zaptel.conf file contains data so that the Linux operating system can recognize the hardware. It is a text file that resides in the directory /etc. You do not need to manually configure this file as it is automatically generated by the genzaptelconf program. See the above link for more detailed information.
The fxotune utility is used for tuning the various settings on the fxo modules for analog cards. Supported by Digium TDM400P and clones, TDM800P, TDM2400P, Xorcom Astribank FXO modules and probably some others. Not supported by X100P cards and clones. fxotune tunes the module to generate less echo in the first place. The fxotune.conf holds fxotune's configuration values. See the above link for more info on fxotune
The /etc/asterisk/ directory configuration files
The /etc/asterisk/ directory configuration files are specific to the Asterisk PBX server. Here you will find the telephony configuration files (listed in alphabetical order):
Ths file is used to inform the Asterisk PBX where to find its directories: application directory, logging directory, libraries, modules, etc.. There is no need to modify this file, unless you want to break your Asterisk server.
This file configures the link between the database and Asterisk. It configures the machine (whether local or a remote database server), the database username and password.
Electronic Numbering (ENUM), as defined in RFC 3761, matches phone numbers to ENUM domain names. This is the configuration file that points to the ENUM servers.
This is the extensions file that FreePBX generates. Do NOT modify this file as anything that you put in will be over-written.
This is the extensions file that is concerned with fax, IVR and voicemail. It is automatically generated by FreePBX.Do NOT modify this file as anything that you put in will be over-written. You can modify the following configuration files for custom extensions
This is the file that you can manually add your extensions to. FreePBX calls the context 'from-internal-custom' and is included in 'from-internal' by default.
This file is generated by FreePBX that points to the features that are enabled. Do NOT modify. Use the indicated _custom files instead. Normally, these files are empty shells. Here's a list of the files that it points to:
This is the configuration file for asterisk-flite which is a Flite text-to-speech module for the Asterisk open-source PBX. This provides the "Flite" dialplan application, which allows you to use the Flite TTS Engine with Asterisk.
This is the main configuration file for the IAX protocol. It is generated by FreePBX, do not modify. It points to the following IAX configuraiton files:
This file is generated by FreePBX and has the configuration for the extensions that use the IAX protocol. The example file shows extensions that use the IAXy S100i pots to IAX ATA.
This file is normally not present but it can be manually created and edited for any custom IAX configurations. This file is configured for when IAX starts up.
This file is normally not present but it can be manually created and edited for any custom IAX configurations. This file is configured for when IAX shuts down.
This file is generated by FreePBX and configures the port that IAX binds to and the codecs that are used.
This file is an empty shell and can be manually created and edited for any custom IAX configurations.
This file is normally not present but it can be manually created and edited for any custom IAX configurations.
This file is normally an empty shell (once I do some IAX trunking, I'll check it again) and is automatically generated by FreePBX. Don't modify this file.
This file indicates which tones are used based on your locale (country).
This file is an empty shell. Once I do something with the local prefixes, I'll see how it changes
In this file, you configure logging to files or to the syslog system.
Asterisk Call Management support. The admin password, and rights are configured. I believe that this is configured through FreePBX or Webmin.
This file is an empty shell with one line that includes meetme.additional.conf which doesn't exist yet. Once I do something with MeetMe, I'll see how it changes
This is the file that holds the configuration for dial-up modems and ISDN modems.
This is where the configuration for the sound format (mp3, wav, etc..) is configured. Also if you are running X Windows, you can specify which console to load. And finally, you can tell it not to load obsolete modules that are broken.
Music on hold class definitions reside here but there's none. I'll check when I get music on hold working. This file points to the following two files:
This is the configuration file for Linux Telephony Interface.
PHPAGI is a PHP class for the Asterisk Gateway Interface.
Here's where you can configure how many chances the caller has to enter their number.
Global settings for call queues with notes that none currently exist. So don't know how valuable this configuration file is. It does point to the following non-existent files:
- queues_general_additional.conf - this one exist but is an empty shell that is configured by FreePBX
This file is used to configure the range of ports (default is 10000 to 20000) used by the Real Time Protocol (RTP) protocol. RTP carries the voice data while SIP carries the control.
Main SIP configuration file that is created by FreePBX. Do NOT edit. It points to the following configuration files:
This contains the SIP extension information. It is generated by FreePBX.
This is an empty file for adding custom SIP extensions. It is safe to modify.
This contains the SIP configuration such as the port to use, codec, etc... It is generated by FreePBX.
This contains the information that SIP needs to transverse a router using Network Address Translation (NAT). It is safe to modify this file.
This is currently an empty file. It is generated by FreePBX. I'll have to check what's in here when I'm running some SIP extensions or trunks.
This is file holds the version number of the Asterisk software. Typically only holds information like: Asterisk 126.96.36.199
This file holds each extension's voicemail configuration. It is configured by FreePBX. It also points to the following files:
This file is used to configure the email that is sent to the user to alert them that there is a new voicemail message waiting for them.
This file is used to configure the voicemail parameters like format of sound file to use, max and min length of voicemails, seconds to timeout, etc..
This file holds the global settings for the zaptel hardware. It is configured by FreePBX. It also points to the following files: