An extension in Asterisk defines the series of steps (each step containing an application) through which Asterisk will take a call. Asterisk will perform each step, in sequence, when that extension number is dialed.

When an extension is triggered (usually by the incoming call on the channel), Asterisk will follow the steps defined for the extension. These steps specify what happens to calls as they make their way through the dialplan.

Extensions are defined in the /etc/asterisk/extensions.conf file using the following syntax:

exten => name,priority,application([parameter[,parameter2...]])

An extension begins with the word exten, followed by the arrow sign formed by the equals sign and the greater-than sign. The name parameter defines the name (or a number) of the extension, the priority defines the order in which steps are executed, and the application parameter defines the action that will be performed when the extension is triggered.

Let’s take a closer look at the last two components that define the extension – the priority and the application.

Geek University 2022