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.

  1. 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):

    • /etc/amportal.conf

      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

    • /etc/passwd

      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.

    • /etc/rc.local

      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.

    • /etc/zaptel.conf

      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.

    • /etc/fxotune.conf

      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

  2. 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):

    • /etc/asterisk/asterisk.conf

      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.

    • /etc/asterisk/cdr_mysql.conf

      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.

    • /etc/asterisk/enum.conf

      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.

    • /etc/asterisk/extensions.conf

      This is the extensions file that FreePBX generates. Do NOT modify this file as anything that you put in will be over-written.

    • /etc/asterisk/extensions_additional.conf

      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

    • /etc/asterisk/extensions_custom.conf

      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.

    • /etc/asterisk/features.conf

      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:

      • features_general_additional.conf
      • features_general_custom.conf
      • features_applicationmap_additional.conf
      • features_applicationmap_custom.conf
      • features_featuremap_additional.conf
      • features_featuremap_custom.conf

    • /etc/asterisk/flite.conf

      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.

    • /etc/asterisk/iax.conf

      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:

      • /etc/asterisk/iax_additional.conf

        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.

      • /etc/asterisk/iax_custom.conf

        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.

      • /etc/asterisk/iax_custom_post.conf

        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.

      • /etc/asterisk/iax_general_additional.conf

        This file is generated by FreePBX and configures the port that IAX binds to and the codecs that are used.

      • /etc/asterisk/iax_general_custom.conf

        This file is an empty shell and can be manually created and edited for any custom IAX configurations.

      • /etc/asterisk/iax_registrations_custom.conf

        This file is normally not present but it can be manually created and edited for any custom IAX configurations.

      • /etc/asterisk/iax_registrations.conf

        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.

    • /etc/asterisk/indications.conf

      This file indicates which tones are used based on your locale (country).

    • /etc/asterisk/localprefixes.conf

      This file is an empty shell. Once I do something with the local prefixes, I'll see how it changes

    • /etc/asterisk/logger.conf

      In this file, you configure logging to files or to the syslog system.

    • /etc/asterisk/manager.conf

      Asterisk Call Management support. The admin password, and rights are configured. I believe that this is configured through FreePBX or Webmin.

    • /etc/asterisk/meetme.conf

      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

    • /etc/asterisk/modem.conf

      This is the file that holds the configuration for dial-up modems and ISDN modems.

    • /etc/asterisk/modules.conf

      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.

    • /etc/asterisk/musiconhold.conf

      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:

      • /etc/asterisk/musiconhold_additional.conf

        Contains the directory for the music files and some minor configuration such as random play of music.

      • /etc/asterisk/musiconhold_custom.conf

        Here's where you can add your custom music on hold parameters.

    • /etc/asterisk/phone.conf

      This is the configuration file for Linux Telephony Interface.

    • /etc/asterisk/phpagi.conf

      PHPAGI is a PHP class for the Asterisk Gateway Interface.

    • /etc/asterisk/privacy.conf

      Here's where you can configure how many chances the caller has to enter their number.

    • /etc/asterisk/queues.conf

      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
      • queues_custom_general.conf
      • queues_custom.conf
      • queues_additional.conf
      • queues_post_custom.conf

    • /etc/asterisk/rtp.conf

      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.

    • /etc/asterisk/sip.conf

      Main SIP configuration file that is created by FreePBX. Do NOT edit. It points to the following configuration files:

      • sip_additional.conf

        This contains the SIP extension information. It is generated by FreePBX.

      • sip_custom.conf

        This is an empty file for adding custom SIP extensions. It is safe to modify.

      • sip_general_additional.conf

        This contains the SIP configuration such as the port to use, codec, etc... It is generated by FreePBX.

      • sip_nat.conf

        This contains the information that SIP needs to transverse a router using Network Address Translation (NAT). It is safe to modify this file.

      • sip_registrations.conf

        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.

    • /etc/asterisk/version

      This is file holds the version number of the Asterisk software. Typically only holds information like: Asterisk 1.4.18.1

    • /etc/asterisk/voicemail.conf

      This file holds each extension's voicemail configuration. It is configured by FreePBX. It also points to the following files:

      • /etc/asterisk/vm_email.inc

        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.

      • /etc/asterisk/vm_general.inc

        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..

    • /etc/asterisk/zapata.conf

      This file holds the global settings for the zaptel hardware. It is configured by FreePBX. It also points to the following files:

Please donate to support the cost of buying new hardware, thanks.

Return to

TelecomWorld.ca

Copyright December, 2012 Eugene Blanchard