Files
asterisk/doc/tex/extensions.tex
T

83 lines
3.2 KiB
TeX
Raw Normal View History

2007-03-15 22:29:45 +00:00
\subsubsection{The Asterisk dialplan}
2005-08-26 15:24:38 +00:00
The Asterisk dialplan is divided into contexts. A context is simply a group
of extensions. For each "line" that should be able to be called, an extension
must be added to a context. Then, you configure the calling "line" to have
access to this context.
If you change the dialplan, you can use the Asterisk CLI command
"extensions reload" to load the new dialplan without disrupting
service in your PBX.
Extensions are routed according to priority and may be based on any set
2007-03-15 22:29:45 +00:00
of characters (a-z), digits, \#, and *. Please note that when matching a
2005-08-26 15:24:38 +00:00
pattern, "N", "X", and "Z" are interpreted as classes of digits.
For each extension, several actions may be listed and must be given a unique
2006-09-11 17:02:37 +00:00
priority. When each action completes, the call continues at the next priority
2007-10-12 15:50:29 +00:00
(except for some modules which use explicitly GOTO's).
2005-08-26 15:24:38 +00:00
When each action completes, it generally moves to the next priority (except for
2007-10-12 15:50:29 +00:00
some modules which use explicitly GOTO's.
2005-08-26 15:24:38 +00:00
1999-10-19 01:44:58 +00:00
Extensions frequently have data they pass to the executing application
2005-08-26 15:24:38 +00:00
(most frequently a string). You can see the available dialplan applications
by entering the "core show applications" command in the CLI.
2005-08-26 15:24:38 +00:00
In this version of Asterisk, dialplan functions are added. These can
be used as arguments to any application. For a list of the installed
functions in your Asterisk, use the "core show functions" command.
1999-10-19 01:44:58 +00:00
2007-03-15 22:29:45 +00:00
\subsubsection{Example dialplan}
2005-08-26 15:24:38 +00:00
2007-10-12 15:50:29 +00:00
The example dial plan, in the \path{configs/extensions.conf.sample} file
2005-08-26 15:24:38 +00:00
is installed as extensions.conf if you run "make samples" after
installation of Asterisk. This file includes many more instructions
2006-09-11 17:02:37 +00:00
and examples than this file, so it's worthwhile to read it.
1999-10-19 01:44:58 +00:00
2007-03-15 22:29:45 +00:00
\subsubsection{Special extensions}
2005-08-26 15:24:38 +00:00
There are some extensions with important meanings:
1999-10-19 01:44:58 +00:00
2007-03-15 22:29:45 +00:00
\begin{itemize}
\item s
\begin{itemize}
\item What to do when an extension context is entered (unless
overridden by the low level channel interface)
2007-10-12 15:50:29 +00:00
This is used in macros, and some special cases.
2007-03-15 22:29:45 +00:00
"s" is not a generic catch-all wildcard extension.
\end{itemize}
\item i
\begin{itemize}
\item What to do if an invalid extension is entered
\end{itemize}
\item h
\begin{itemize}
\item The hangup extension, executed at hangup
\end{itemize}
\item t
\begin{itemize}
\item What to do if nothing is entered in the requisite amount
of time.
\end{itemize}
\item T
\begin{itemize}
\item This is the extension that is executed when the 'absolute'
timeout is reached. See "core show function TIMEOUT" for more
2007-03-15 22:29:45 +00:00
information on setting timeouts.
\end{itemize}
\item e
\begin{itemize}
\item This extension will substitute as a catchall for any of the
'i', 't', or 'T' extensions, if any of them do not exist and
catching the error in a single routine is desired. The
function EXCEPTION may be used to query the type of exception
or the location where it occurred.
\end{itemize}
2007-03-15 22:29:45 +00:00
\end{itemize}
1999-10-19 01:44:58 +00:00
2007-10-12 15:50:29 +00:00
And finally, the extension context "default" is used when either a) an
1999-10-19 01:44:58 +00:00
extension context is deleted while an extension is in use, or b) a specific
2004-02-15 07:48:46 +00:00
starting extension handler has not been defined (unless overridden by the
1999-10-19 01:44:58 +00:00
low level channel interface).