Asterisk (PBX) - Configuration

Configuration

To configure Asterisk into an operational system, the administrator must:

  • create channels/devices that allow Asterisk to communicate through a voice path that uses that channel and/or devices. These can be VoIP, or TDM, or analogue telephony devices.
  • compose a dial plan, written in the Asterisk control language, to express the algorithm or control flow Asterisk uses to respond when calls are presented to it over these channels. Asterisk can be used for many specific applications and a customized dial plan has to be created specifically for each purpose, such as the functionality of a PBX. Asterisk is thus a 'construction kit' for building PBXs, rather than a PBX in itself, as is commonly thought.

Asterisk is configured by a set of configuration text files. One of these, extensions.conf, contains the operational flow logic of Asterisk. A native scripting language is used to define the elements of process control, namely variables, procedural macros, contexts, extensions, and actions. A context groups all the valid destination numbering codes which apply to a set of channels on which incoming (to Asterisk) calls can be presented. These numbering codes, called “extensions” (even though they often are not) are the starting points for the scripts which instruct Asterisk how to process calls made to those numbers within that context.

To clarify: contexts define the source of a call, and extensions define its destination.

Because each channel declares a context, the dial plan restricts and permits which extensions and facilities its device may access. Extensions consist of possibly multiple steps of execution, each performing either logical operations, directing program flow, or executing one of the many included applications available in Asterisk.

Applications are loadable modules that perform specialized operations, such as dial a telephone number or another internal extension (app_dial), perform conferencing services (app_meetme), or handle the operations of voice mail (app_voicemail). The plethora of applications available provide a unique capability and tool set to formulate algorithms that can perform a large array of different, customized telephony scenarios. Applications control the Asterisk core functions through a set of internal operation primitives, that are organized in an extensible fashion through a modular architecture and application programming interfaces (APIs).

Programming an Asterisk system can also be accomplished via separate, external applications using the Asterisk Gateway Interface. The Asterisk Gateway Interface (AGI) is a software interface and communications protocol for inter-process communication with Asterisk. In this, external, user-written programs, are launched from the Asterisk dial plan via pipes to control telephony operations on its associated control and voice channels. It is similar to the CGI feature of web servers in that any language can be used to write the external program which communicates with Asterisk via the standard streams, stdin and stdout.

There are several graphical user interfaces (GUIs) for Asterisk. These interfaces allow administrators to view, edit, and change various aspects of Asterisk via a web interface. As of version 1.8, a GUI labeled “Asterisk-GUI” is being developed alongside Asterisk by Digium. There are other GUIs, such as FreePBX. Other attempts to simplify Asterisk installation have been made, trixbox (formerly Asterisk at home (A@H)) is a popular distribution of Asterisk that includes Asterisk and FreePBX. However, trixbox is no longer supported by Fonality and the project, as of August 2012, appears to be dead. PBX in a Flash (PIAF) is another such distribution as is Elastix.

Digium has also packaged a variant entitled AsteriskNow, which is a customized Linux installation and includes FreePBX and all ancillary software to provide an "off-the-shelf" PBX, requiring only that the user prepare the requisite dial plans (see above) and connect the necessary hardware. The target market for AsteriskNow is the administrator who wishes to set up a PBX using Asterisk, but who may not have the experience in server configuration to perform the initial setup of a base Asterisk installation.

Read more about this topic:  Asterisk (PBX)