Asterisk architecture

Asterisk features a complex architecture that can be loosely divided into the following components:

  • core
  • modules
  • channels
  • dialplans
  • applications

Here is a description of each component in more detail.

Core
The central component of any Asterisk system is the core. The core reads the configuration files and loads all the other modules. This component also loads and builds the dialplan.

Modules
The majority of Asterisk’s features are separated outside of the core into various modules. An Asterisk module is a loadable component that provides a specific functionality, such as a voicemail functionality (provided by the app_voicemail module) or the SIP channel driver (provided by the chan_sip module).

Modules are loaded based on the information found in the /etc/asterisk/modules.conf file and usually have the .so extension. They are stored by default in the /usr/lib/asterisk/modules directory.

Channels
A channel represents a connection between the Asterisk system and some telephony endpoint. A channel could be a connection to an ordinary telephone device or an ordinary telephone line, or to a logical call (e.g. an Internet phone call). Some of the channel types provided by Asterisk are SIP, Skinny, IAX, and H.323 channels.

Dialplans
The dialplan in Asterisk controls how the call logic is applied to any connection from any channel, such as what happens when a device dials the extension 200. The file used to define the dialplan is the /etc/asterisk/extensions.conf.

Applications
Asterisk features many applications that can be used in the dialplan. These applications define the action that will be performed on the current channel. For example, the Dial application is used to dial a channel, the Playback application will play a sound file, and the Hangup application will hang up the call.

Geek University 2022