System information
A very common mistake when writing labels is to insert a comma be-
tween the n and the (, like this:
exten => 123,n,(label),application() ;<-- THIS IS NOT GOING TO WORK
This mistake will break that part of your dialplan, and you will get an
error stating that the application cannot be found.
Applications
Applications are the workhorses of the dialplan. Each application performs a specific
action on the current channel, such as playing a sound, accepting touch-tone input,
looking something up in a database, dialing a channel, hanging up the call, and so forth.
In the previous example, you were introduced to two simple applications: Answer() and
Hangup(). You’ll learn more about how these work momentarily.
Some applications, including Answer() and Hangup(), need no other instructions to do
their jobs. Most applications, however, require additional information. These addi-
tional elements, or arguments, are passed on to the applications to affect how they
perform their actions. To pass arguments to an application, place them between the
parentheses that follow the application name, separated by commas.
Occasionally, you may also see the pipe character (|) being used as a
separator between arguments, instead of a comma. Starting in Asterisk
1.6.0, support for the pipe as a separator character has been removed.
§
The Answer(), Playback(), and Hangup() Applications
The Answer() application is used to answer a channel that is ringing. This does the initial
setup for the channel that receives the incoming call. As we mentioned earlier,
Answer() takes no arguments. Answer() is not always required (in fact, in some cases it
may not be desirable at all), but it is an effective way to ensure a channel is connected
before performing further actions.
The Progress() Application
Sometimes it is useful to be able to pass information back to the network before an-
swering a call. The Progress() application attempts to provide call progress information
to the originating channel. Some carriers expect this, and thus you may be able to
resolve strange signaling problems by inserting Progress() into the dialplan where your
incoming calls arrive.
§ Except in some parts of voicemail.conf.
Dialplan Syntax | 113