Many doc directory improvements, including:

- Added development section (backtrace.tex)
- Correct filesystem path formating
- Replace all "|" argument separator to ","
- Endless count of spaces at the end of line
- Using astlisting to make listings do not take so much place
- Take back ASTRISKVERSION on first page
- Make localchannel.tex readable by inserting extra end of lines

(closes issue #10962)
Reported by: IgorG
Patches: 
      texdoc-85177-1.patch uploaded by IgorG (license 20)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@85519 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.6.0
Russell Bryant 18 years ago
parent cd929dbd72
commit 8b8a42e61c

@ -201,7 +201,7 @@ be included on a single line. Whatever you think is best!
You can just as easily say, You can just as easily say,
\begin{verbatim} \begin{verbatim}
if(${x}=1) { NoOp(hello!); goto s|3; } else { NoOp(Goodbye!); goto s|12; } if(${x}=1) { NoOp(hello!); goto s,3; } else { NoOp(Goodbye!); goto s,12; }
\end{verbatim} \end{verbatim}
as you can say: as you can say:
@ -210,12 +210,12 @@ as you can say:
if(${x}=1) if(${x}=1)
{ {
NoOp(hello!); NoOp(hello!);
goto s|3; goto s,3;
} }
else else
{ {
NoOp(Goodbye!); NoOp(Goodbye!);
goto s|12; goto s,12;
} }
\end{verbatim} \end{verbatim}
@ -224,10 +224,10 @@ or:
\begin{verbatim} \begin{verbatim}
if(${x}=1) { if(${x}=1) {
NoOp(hello!); NoOp(hello!);
goto s|3; goto s,3;
} else { } else {
NoOp(Goodbye!); NoOp(Goodbye!);
goto s|12; goto s,12;
} }
\end{verbatim} \end{verbatim}
@ -235,9 +235,9 @@ or:
\begin{verbatim} \begin{verbatim}
if (${x}=1) { if (${x}=1) {
NoOp(hello!); goto s|3; NoOp(hello!); goto s,3;
} else { } else {
NoOp(Goodbye!); goto s|12; NoOp(Goodbye!); goto s,12;
} }
\end{verbatim} \end{verbatim}
@ -307,6 +307,7 @@ for developers to simplify apps to generate dialplan data.
First, some basic objects First, some basic objects
\begin{astlisting}
\begin{verbatim} \begin{verbatim}
------------------------ ------------------------
<word> a lexical token consisting of characters matching this pattern: [-a-zA-Z0-9"_/.\<\>\*\+!$#\[\]][-a-zA-Z0-9"_/.!\*\+\<\>\{\}$#\[\]]* <word> a lexical token consisting of characters matching this pattern: [-a-zA-Z0-9"_/.\<\>\*\+!$#\[\]][-a-zA-Z0-9"_/.!\*\+\<\>\{\}$#\[\]]*
@ -490,9 +491,8 @@ First, some basic objects
<includes> :== 'includes' '{' <includeslist> '}' <includes> :== 'includes' '{' <includeslist> '}'
| 'includes' '{' '}' | 'includes' '{' '}'
\end{verbatim} \end{verbatim}
\end{astlisting}
\section{AEL Example USAGE} \section{AEL Example USAGE}

@ -111,6 +111,8 @@
\section{extensions.conf} \section{extensions.conf}
The following contexts are recommended. The following contexts are recommended.
\begin{astlisting}
\begin{verbatim} \begin{verbatim}
; Mobile Terminated, RX. This is used when an incoming call from the SMS arrive ; Mobile Terminated, RX. This is used when an incoming call from the SMS arrive
s, with the queue (called number and sub address) in ${EXTEN} s, with the queue (called number and sub address) in ${EXTEN}
@ -120,7 +122,7 @@ in the queue and handle them, e.g. email them.
to run a command for each received message to run a command for each received message
; See below for usage ; See below for usage
[smsmtrx] [smsmtrx]
exten = _X.,1, SMS(${EXTEN}|a) exten = _X.,1, SMS(${EXTEN},a)
exten = _X.,2,System("someapptohandleincomingsms ${EXTEN}") exten = _X.,2,System("someapptohandleincomingsms ${EXTEN}")
exten = _X.,3,Hangup exten = _X.,3,Hangup
; Mobile originated, RX. This is receiving a message from a device, e.g. ; Mobile originated, RX. This is receiving a message from a device, e.g.
@ -131,10 +133,11 @@ exten = _X.,3,Hangup
; to run a command for each received message ; to run a command for each received message
; See below for example usage ; See below for example usage
[smsmorx] [smsmorx]
exten = _X.,1, SMS(${EXTEN}|sa) exten = _X.,1, SMS(${EXTEN},sa)
exten = _X.,2,System("someapptohandlelocalsms ${EXTEN}") exten = _X.,2,System("someapptohandlelocalsms ${EXTEN}")
exten = _X.,3,Hangup exten = _X.,3,Hangup
\end{verbatim} \end{verbatim}
\end{astlisting}
smsmtrx is normally accessed by an incoming call from the SMSC. In the smsmtrx is normally accessed by an incoming call from the SMSC. In the
UK this call is from a CLI of 080058752X0 where X is the sub address. UK this call is from a CLI of 080058752X0 where X is the sub address.

@ -32,7 +32,7 @@
\author{Asterisk Development Team \\ Asterisk.org} \author{Asterisk Development Team \\ Asterisk.org}
\title{Asterisk Reference Information \\ Version SVN-trunk-r72921M} \title{Asterisk Reference Information \\ Version ASTERISKVERSION}
\begin{document} \begin{document}
\maketitle \maketitle
@ -132,6 +132,12 @@ reference purposes.
\section{Queue Logs} \section{Queue Logs}
\input{queuelog.tex} \input{queuelog.tex}
\chapter{Development}
\section{Backtrace}
\input{backtrace.tex}
% This is a list of files not yet integrated into this document: % This is a list of files not yet integrated into this document:
% %
%Misc %Misc
@ -143,7 +149,6 @@ reference purposes.
%-------------- %--------------
%See http://www.asterisk.org/developers for more information %See http://www.asterisk.org/developers for more information
% %
%backtrace.txt How to produce a backtrace when Asterisk crashes
%callfiles.txt Asterisk callfiles using instruction %callfiles.txt Asterisk callfiles using instruction
%CODING-GUIDELINES Guidelines for developers %CODING-GUIDELINES Guidelines for developers
%externalivr.txt Documentation of the protocol used in externalivr() %externalivr.txt Documentation of the protocol used in externalivr()

@ -249,16 +249,19 @@ SQLite version 2 is supported in cdr\_sqlite.
\subsection{Steps to follow in order to have RADIUS support} \subsection{Steps to follow in order to have RADIUS support}
\subsubsection{Installation of the Radiusclient library} \subsubsection{Installation of the Radiusclient library}
Installation:
\begin{verbatim}
Download the sources from:
http://developer.berlios.de/projects/radiusclient-ng/ Download the sources from
\url{http://developer.berlios.de/projects/radiusclient-ng/}
Untar the source tarball:
Untar the source tarball. \begin{verbatim}
root@localhost:/usr/local/src# tar xvfz radiusclient-ng-0.5.2.tar.gz root@localhost:/usr/local/src# tar xvfz radiusclient-ng-0.5.2.tar.gz
\end{verbatim}
Compile and install the library:
Compile and install the library. \begin{verbatim}
root@localhost:/usr/local/src# cd radiusclient-ng-0.5.2 root@localhost:/usr/local/src# cd radiusclient-ng-0.5.2
root@localhost:/usr/local/src/radiusclient-ng-0.5.2# ./configure root@localhost:/usr/local/src/radiusclient-ng-0.5.2# ./configure
root@localhost:/usr/local/src/radiusclient-ng-0.5.2# make root@localhost:/usr/local/src/radiusclient-ng-0.5.2# make
@ -268,7 +271,7 @@ SQLite version 2 is supported in cdr\_sqlite.
\subsubsection{Configuration of the Radiusclient library} \subsubsection{Configuration of the Radiusclient library}
By default all the configuration files of the radiusclient library will By default all the configuration files of the radiusclient library will
be in /usr/local/etc/radiusclient-ng directory. be in \path{/usr/local/etc/radiusclient-ng} directory.
File "radiusclient.conf" File "radiusclient.conf"
Open the file and find lines containing the following: Open the file and find lines containing the following:
@ -280,11 +283,12 @@ SQLite version 2 is supported in cdr\_sqlite.
running on the same host as your Asterisk PBX. running on the same host as your Asterisk PBX.
acctserver localhost acctserver localhost
This is the hostname or IP address of the RADIUS server used for This is the hostname or IP address of the RADIUS server used for
accounting. You will have to change this unless the server is running accounting. You will have to change this unless the server is running
on the same host as your Asterisk PBX. on the same host as your Asterisk PBX.
File "servers" \textbf{File "servers"}
RADIUS protocol uses simple access control mechanism based on shared RADIUS protocol uses simple access control mechanism based on shared
secrets that allows RADIUS servers to limit access from RADIUS clients. secrets that allows RADIUS servers to limit access from RADIUS clients.
@ -294,25 +298,23 @@ SQLite version 2 is supported in cdr\_sqlite.
You need to configure a shared secret for each server you have You need to configure a shared secret for each server you have
configured in radiusclient.conf file in the previous step. The shared configured in radiusclient.conf file in the previous step. The shared
secrets are stored in /usr/local/etc/radiusclient-ng/servers file. secrets are stored in \path{/usr/local/etc/radiusclient-ng/servers} file.
Each line contains hostname of a RADIUS server and shared secret Each line contains hostname of a RADIUS server and shared secret
used in communication with that server. The two values are separated used in communication with that server. The two values are separated
by white spaces. Configure shared secrets for every RADIUS server you by white spaces. Configure shared secrets for every RADIUS server you
are going to use. are going to use.
File "dictionary" \textbf{File "dictionary"}
Asterisk uses some attributes that are not included in the Asterisk uses some attributes that are not included in the
dictionary of radiusclient library, therefore it is necessary to add dictionary of radiusclient library, therefore it is necessary to add
them. A file called dictionary.digium (kept in the contrib dir) them. A file called dictionary.digium (kept in the contrib dir)
was created to list all new attributes used by Asterisk. was created to list all new attributes used by Asterisk.
Add to the end of the main dictionary file Add to the end of the main dictionary file
/usr/local/etc/radiusclient-ng/dictionary \path{/usr/local/etc/radiusclient-ng/dictionary} the line:
the line:
\begin{verbatim}
\$INCLUDE /path/to/dictionary.digium \$INCLUDE /path/to/dictionary.digium
\end{verbatim}
\subsubsection{Install FreeRADIUS Server (Version 1.1.1)} \subsubsection{Install FreeRADIUS Server (Version 1.1.1)}
@ -341,7 +343,7 @@ SQLite version 2 is supported in cdr\_sqlite.
File "clients.conf" File "clients.conf"
File /usr/local/etc/raddb/clients.conf contains description of File \path{/usr/local/etc/raddb/clients.conf} contains description of
RADIUS clients that are allowed to use the server. For each of the RADIUS clients that are allowed to use the server. For each of the
clients you need to specify its hostname or IP address and also a clients you need to specify its hostname or IP address and also a
shared secret. The shared secret must be the same string you configured shared secret. The shared secret must be the same string you configured
@ -367,11 +369,11 @@ SQLite version 2 is supported in cdr\_sqlite.
The following procedure brings the dictionary.digium file to previous versions The following procedure brings the dictionary.digium file to previous versions
of FreeRADIUS. of FreeRADIUS.
File /usr/local/etc/raddb/dictionary contains the dictionary of File \path{/usr/local/etc/raddb/dictionary} contains the dictionary of
FreeRADIUS server. You have to add the same dictionary file FreeRADIUS server. You have to add the same dictionary file
(dictionary.digium), which you added to the dictionary of radiusclient-ng (dictionary.digium), which you added to the dictionary of radiusclient-ng
library. You can include it into the main file, adding the following line at the library. You can include it into the main file, adding the following line at the
end of file '/usr/local/etc/raddb/dictionary': end of file \path{/usr/local/etc/raddb/dictionary}:
\$INCLUDE /path/to/dictionary.digium \$INCLUDE /path/to/dictionary.digium
@ -388,17 +390,16 @@ SQLite version 2 is supported in cdr\_sqlite.
library has been detected on your system. library has been detected on your system.
By default FreeRADIUS server will log all accounting requests into By default FreeRADIUS server will log all accounting requests into
/usr/local/var/log/radius/radacct directory in form of plain text files. \path{/usr/local/var/log/radius/radacct} directory in form of plain text files.
The server will create one file for each hostname in the directory. The The server will create one file for each hostname in the directory. The
following example shows how the log files look like. following example shows how the log files look like.
Asterisk now generates Call Detail Records. See /include/asterisk/cdr.h Asterisk now generates Call Detail Records. See \path{/include/asterisk/cdr.h}
for all the fields which are recorded. By default, records in comma for all the fields which are recorded. By default, records in comma
separated values will be created in /var/log/asterisk/cdr-csv. separated values will be created in \path{/var/log/asterisk/cdr-csv}.
The configuration file for cdr\_radius.so module is : The configuration file for cdr\_radius.so module is \path{/etc/asterisk/cdr.conf}
/etc/asterisk/cdr.conf
This is where you can set CDR related parameters as well as the path to This is where you can set CDR related parameters as well as the path to
the radiusclient-ng library configuration file. the radiusclient-ng library configuration file.

@ -170,7 +170,7 @@ The double quotes will be counted as part of that lexical token.
As an example: As an example:
\begin{verbatim} \begin{verbatim}
exten => s,6,GotoIf($[ "${CALLERID(name)}" : "Privacy Manager" ]?callerid-liar|s|1:s|7) exten => s,6,GotoIf($[ "${CALLERID(name)}" : "Privacy Manager" ]?callerid-liar,s,1:s,7)
\end{verbatim} \end{verbatim}
The variable CALLERID(name) could evaluate to "DELOREAN MOTORS" (with a space) The variable CALLERID(name) could evaluate to "DELOREAN MOTORS" (with a space)
@ -294,7 +294,7 @@ To specify a floating point constant, the number has to have this format: D.D, w
a string of base 10 digits. So, you can say 0.10, but you can't say .10 or 20.-- we hope a string of base 10 digits. So, you can say 0.10, but you can't say .10 or 20.-- we hope
this is not an excessive restriction! this is not an excessive restriction!
Floating point numbers are turned into strings via the '%g'/'%Lg' format of the printf Floating point numbers are turned into strings via the '\%g'/'\%Lg' format of the printf
function set. This allows numbers to still 'look' like integers to those counting function set. This allows numbers to still 'look' like integers to those counting
on integer behavior. If you were counting on 1/4 evaluating to 0, you need to now say on integer behavior. If you were counting on 1/4 evaluating to 0, you need to now say
TRUNC(1/4). For a list of all the truncation/rounding capabilities, see the next section. TRUNC(1/4). For a list of all the truncation/rounding capabilities, see the next section.
@ -431,7 +431,6 @@ TRUNC(3.5)
TRUNC(-3.5) TRUNC(-3.5)
returns -3. returns -3.
\end{verbatim} \end{verbatim}
\end{astlisting} \end{astlisting}
@ -465,7 +464,7 @@ This is designed to be used together with the expression syntax described
above, eg : above, eg :
\begin{verbatim} \begin{verbatim}
exten => 1,2,GotoIf($[${CALLERID(all)} = 123456]?2|1:3|1) exten => 1,2,GotoIf($[${CALLERID(all)} = 123456]?2,1:3,1)
\end{verbatim} \end{verbatim}
Example of use : Example of use :
@ -474,7 +473,7 @@ Example of use :
exten => s,2,Set(vara=1) exten => s,2,Set(vara=1)
exten => s,3,Set(varb=$[${vara} + 2]) exten => s,3,Set(varb=$[${vara} + 2])
exten => s,4,Set(varc=$[${varb} * 2]) exten => s,4,Set(varc=$[${varb} * 2])
exten => s,5,GotoIf($[${varc} = 6]?99|1:s|6) exten => s,5,GotoIf($[${varc} = 6]?99,1:s,6)
\end{verbatim} \end{verbatim}
\subsection{Parse Errors} \subsection{Parse Errors}
@ -483,16 +482,20 @@ Syntax errors are now output with 3 lines.
If the extensions.conf file contains a line like: If the extensions.conf file contains a line like:
\begin{astlisting}
\begin{verbatim} \begin{verbatim}
exten => s,6,GotoIf($[ "${CALLERID(num)}" = "3071234567" & & "${CALLERID(name)}" : "Privacy Manager" ]?callerid-liar|s|1:s|7) exten => s,6,GotoIf($[ "${CALLERID(num)}" = "3071234567" & & "${CALLERID(name)}" : "Privacy Manager" ]?callerid-liar,s,1:s,7)
\end{verbatim} \end{verbatim}
\end{astlisting}
You may see an error in /var/log/asterisk/messages like this: You may see an error in /var/log/asterisk/messages like this:
\begin{astlisting}
\begin{verbatim} \begin{verbatim}
Jul 15 21:27:49 WARNING[1251240752]: ast_yyerror(): syntax error: parse error, unexpected TOK_AND, expecting TOK_MINUS or TOK_LP or TOKEN; Input: Jul 15 21:27:49 WARNING[1251240752]: ast_yyerror(): syntax error: parse error, unexpected TOK_AND, expecting TOK_MINUS or TOK_LP or TOKEN; Input:
"3072312154" = "3071234567" & & "Steves Extension" : "Privacy Manager" "3072312154" = "3071234567" & & "Steves Extension" : "Privacy Manager"
^ ^
\end{verbatim} \end{verbatim}
\end{astlisting}
The log line tells you that a syntax error was encountered. It now The log line tells you that a syntax error was encountered. It now
also tells you (in grand standard bison format) that it hit an "AND" also tells you (in grand standard bison format) that it hit an "AND"

@ -17,7 +17,7 @@ the current value by Asterisk:
%Cn[;n] Change terminal foreground (and optional background) color to specified %Cn[;n] Change terminal foreground (and optional background) color to specified
\end{verbatim} \end{verbatim}
A full list of colors may be found in include/asterisk/term.h A full list of colors may be found in \path{include/asterisk/term.h}
On Linux systems, you may also use: On Linux systems, you may also use:

@ -29,12 +29,12 @@ a DUNDi query from the dialplan, see how many results there are, and access
each one. Here is some example usage: each one. Here is some example usage:
\begin{verbatim} \begin{verbatim}
exten => 1,1,Set(ID=${DUNDIQUERY(1|dundi_test|b)}) exten => 1,1,Set(ID=${DUNDIQUERY(1,dundi_test,b)})
exten => 1,n,Set(NUM=${DUNDIRESULT(${ID}|getnum)}) exten => 1,n,Set(NUM=${DUNDIRESULT(${ID},getnum)})
exten => 1,n,NoOp(There are ${NUM} results) exten => 1,n,NoOp(There are ${NUM} results)
exten => 1,n,Set(X=1) exten => 1,n,Set(X=1)
exten => 1,n,While($[${X} <= ${NUM}]) exten => 1,n,While($[${X} <= ${NUM}])
exten => 1,n,NoOp(Result ${X} is ${DUNDIRESULT(${ID}|${X})}) exten => 1,n,NoOp(Result ${X} is ${DUNDIRESULT(${ID},${X})})
exten => 1,n,Set(X=$[${X} + 1]) exten => 1,n,Set(X=$[${X} + 1])
exten => 1,n,EndWhile exten => 1,n,EndWhile
\end{verbatim} \end{verbatim}

@ -24,7 +24,7 @@ function is then up to the administrator to implement in a way that
best suits their environment. best suits their environment.
\begin{verbatim} \begin{verbatim}
Function: ENUMLOOKUP(number[|Method-type[|options[|record#[|zone-suffix]]]]) Function: ENUMLOOKUP(number[,Method-type[,options[,record#[,zone-suffix]]]])
\end{verbatim} \end{verbatim}
Performs an ENUM tree lookup on the specified number, method type, and Performs an ENUM tree lookup on the specified number, method type, and

@ -30,7 +30,7 @@ functions in your Asterisk, use the "show functions" command.
\subsubsection{Example dialplan} \subsubsection{Example dialplan}
The example dial plan, in the configs/extensions.conf.sample file The example dial plan, in the \path{configs/extensions.conf.sample} file
is installed as extensions.conf if you run "make samples" after is installed as extensions.conf if you run "make samples" after
installation of Asterisk. This file includes many more instructions installation of Asterisk. This file includes many more instructions
and examples than this file, so it's worthwhile to read it. and examples than this file, so it's worthwhile to read it.

@ -3,5 +3,5 @@ a caller stream right into an ice-cast stream as well as using chan\_local
to place things like conferences, music on hold, etc. into the stream. to place things like conferences, music on hold, etc. into the stream.
You'll need to specify a config file for the ices encoder. An example is You'll need to specify a config file for the ices encoder. An example is
included in contrib/asterisk-ices.xml. included in \path{contrib/asterisk-ices.xml}.

@ -1,25 +1,50 @@
\subsection{Introduction} \subsection{Introduction}
chan\_local is a pseudo-channel. Use of this channel simply loops calls back into the dialplan in a different context. Useful for recursive routing. chan\_local is a pseudo-channel. Use of this channel simply loops calls back
into the dialplan in a different context. Useful for recursive routing.
\subsection{Syntax} \subsection{Syntax}
\begin{verbatim} \begin{verbatim}
Local/extension@context[/n] Local/extension@context[/n]
\end{verbatim} \end{verbatim}
Adding "/n" at the end of the string will make the Local channel not do a native transfer (the "n" stands for "n"o release) upon the remote end answering the line. This is an esoteric, but important feature if you expect the Local channel to handle calls exactly like a normal channel. If you do not have the "no release" feature set, then as soon as the destination (inside of the Local channel) answers the line, the variables and dial plan will revert back to that of the original call, and the Local channel will become a zombie and be removed from the active channels list. This is desirable in some circumstances, but can result in unexpected dialplan behavior if you are doing fancy things with variables in your call handling. Adding "/n" at the end of the string will make the Local channel not do a
native transfer (the "n" stands for "n"o release) upon the remote end answering
There is another option that can be used with local channels, which is the "j" option. The "j" option must be used with the "n" option to make sure that the local channel does not get optimized out of the call. This option will enable a jitterbuffer on the local channel. The jitterbuffer will be used to de-jitter audio that it receives from the channel that called the local channel. This is especially in the case of putting chan\_local in between an incoming SIP call and Asterisk applications, so that the incoming audio will be de-jittered. the line. This is an esoteric, but important feature if you expect the Local
channel to handle calls exactly like a normal channel. If you do not have the
"no release" feature set, then as soon as the destination (inside of the Local
channel) answers the line, the variables and dial plan will revert back to that
of the original call, and the Local channel will become a zombie and be removed
from the active channels list. This is desirable in some circumstances, but can
result in unexpected dialplan behavior if you are doing fancy things with
variables in your call handling.
There is another option that can be used with local channels, which is the "j"
option. The "j" option must be used with the "n" option to make sure that the
local channel does not get optimized out of the call. This option will enable
a jitterbuffer on the local channel. The jitterbuffer will be used to de-jitter
audio that it receives from the channel that called the local channel. This is
especially in the case of putting chan\_local in between an incoming SIP call
and Asterisk applications, so that the incoming audio will be de-jittered.
\subsection{Purpose} \subsection{Purpose}
The Local channel construct can be used to establish dialing into any part of the dialplan. The Local channel construct can be used to establish dialing into any part of
the dialplan.
Imagine you have a TE410P in your box. You want to do something for which you must use a Dial statement (for instance when dropping files in /var/spool/outgoing) but you do want to be able to use your dialplans least-cost-routes or other intelligent stuff. What you could do before we had chan\_local was create a cross-link between two ports of the TE410P and then Dial out one port and in the other. This way you could control where the call was going. Imagine you have a TE410P in your box. You want to do something for which you
must use a Dial statement (for instance when dropping files in
\path{/var/spool/outgoing}) but you do want to be able to use your dialplans
least-cost-routes or other intelligent stuff. What you could do before we had
chan\_local was create a cross-link between two ports of the TE410P and then
Dial out one port and in the other. This way you could control where the call
was going.
Of course, this was a nasty hack, and to make it more sensible, chan\_local was built. Of course, this was a nasty hack, and to make it more sensible, chan\_local was
built.
The "Local" channel driver allows you to convert an arbitrary extension into a channel. It is used in a variety of places, including agents, etc. The "Local" channel driver allows you to convert an arbitrary extension into a
channel. It is used in a variety of places, including agents, etc.
This also allows us to hop to contexts like a GoSub routine; See examples below. This also allows us to hop to contexts like a GoSub routine; See examples below.
@ -44,7 +69,10 @@ exten => _0.,1,Dial(Zap/g1/${EXTEN:1}) ; outgoing calls with 0+number
\subsection{Caveats} \subsection{Caveats}
If you use chan\_local from a call-file and you want to pass channel variables into your context, make sure you append the '/n', because otherwise chan\_local will 'optimize' itself out of the call-path, and the variables will get lost. i.e. If you use chan\_local from a call-file and you want to pass channel variables
into your context, make sure you append the '/n', because otherwise
chan\_local will 'optimize' itself out of the call-path, and the variables will
get lost. i.e.
\begin{verbatim} \begin{verbatim}
Local/00531234567@pbx becomes Local/00531234567@pbx/n Local/00531234567@pbx becomes Local/00531234567@pbx/n

@ -61,43 +61,50 @@ You can get more information about a manager command
with the "manager show command $<$command$>$" CLI command in Asterisk. with the "manager show command $<$command$>$" CLI command in Asterisk.
\section{Examples} \section{Examples}
\begin{verbatim}
Login - Log a user into the manager interface. Login - Log a user into the manager interface.
\begin{verbatim}
Action: Login Action: Login
Username: testuser Username: testuser
Secret: testsecret Secret: testsecret
\end{verbatim}
Originate - Originate a call from a channel to an extension. Originate - Originate a call from a channel to an extension.
\begin{verbatim}
Action: Originate Action: Originate
Channel: sip/12345 Channel: sip/12345
Exten: 1234 Exten: 1234
Context: default Context: default
\end{verbatim}
Originate - Originate a call from a channel to an extension without waiting Originate - Originate a call from a channel to an extension without waiting
for call to complete. for call to complete.
\begin{verbatim}
Action: Originate Action: Originate
Channel: sip/12345 Channel: sip/12345
Exten: 1234 Exten: 1234
Context: default Context: default
Async: yes Async: yes
\end{verbatim}
Redirect with ExtraChannel: Redirect with ExtraChannel:
Attempted goal: Attempted goal:
Have a 'robot' program Redirect both ends of an already-connected call Have a 'robot' program Redirect both ends of an already-connected call
to a meetme room using the ExtraChannel feature through the management interface. to a meetme room using the ExtraChannel feature through the management interface.
\begin{verbatim}
Action: Redirect Action: Redirect
Channel: Zap/1-1 Channel: Zap/1-1
ExtraChannel: SIP/3064-7e00 (varies) ExtraChannel: SIP/3064-7e00 (varies)
Exten: 680 Exten: 680
Priority: 1 Priority: 1
\end{verbatim}
Where 680 is an extension that sends you to a MeetMe room. Where 680 is an extension that sends you to a MeetMe room.
\end{verbatim}
There are a number of GUI tools that use the manager interface, please search There are a number of GUI tools that use the manager interface, please search
the mailing list archives and the documentation page on the the mailing list archives and the documentation page on the

@ -22,7 +22,7 @@ table is as follows:
+----------------+-------------+------+-----+---------+-------+ +----------------+-------------+------+-----+---------+-------+
\end{verbatim} \end{verbatim}
The database name (from /etc/asterisk/res\_odbc.conf) is in the The database name (from \path{/etc/asterisk/res_odbc.conf}) is in the
"odbcstorage" variable in the general section of voicemail.conf. "odbcstorage" variable in the general section of voicemail.conf.
You may modify the voicemessages table name by using You may modify the voicemessages table name by using

@ -65,6 +65,8 @@ This will also immediately foil all autodialers that simply belch a
message in your ear and hang up. message in your ear and hang up.
\subsubsection{Example usage of Zapateller and PrivacyManager} \subsubsection{Example usage of Zapateller and PrivacyManager}
\begin{astlisting}
\begin{verbatim} \begin{verbatim}
[homeline] [homeline]
exten => s,1,Answer exten => s,1,Answer
@ -78,8 +80,9 @@ exten => s,107,Background(tt-monkeysintro)
exten => s,108,Background(tt-monkeys) exten => s,108,Background(tt-monkeys)
exten => s,109,Background(tt-weasels) exten => s,109,Background(tt-weasels)
exten => s,110,Hangup exten => s,110,Hangup
exten => s,5,GotoIf($[ "${CALLERID(num)}" = "7773334444" & "${CALLERID(name)}" : "Privacy Manager" ]?callerid-liar|s|1:s|7) exten => s,5,GotoIf($[ "${CALLERID(num)}" = "7773334444" & "${CALLERID(name)}" : "Privacy Manager" ]?callerid-liar,s,1:s,7)
\end{verbatim} \end{verbatim}
\end{astlisting}
I suggest using Zapateller at the beginning of the context, before I suggest using Zapateller at the beginning of the context, before
anything else, on incoming calls.This can be followed by the anything else, on incoming calls.This can be followed by the
@ -163,15 +166,11 @@ There are some variations, and these will be explained in due course.
To use these options, set your Dial to something like: To use these options, set your Dial to something like:
\begin{verbatim} \begin{verbatim}
exten => 3,3,Dial(Zap/5r3&Zap/6r3|35|tmPA(beep)) exten => 3,3,Dial(Zap/5r3&Zap/6r3,35,tmPA(beep))
or or
exten => 3,3,Dial(Zap/5r3&Zap/6r3,35,tmP(something)A(beep))
exten => 3,3,Dial(Zap/5r3&Zap/6r3|35|tmP(something)A(beep))
or or
exten => 3,3,Dial(Zap/5r3&Zap/6r3,35,tmpA(beep))
exten => 3,3,Dial(Zap/5r3&Zap/6r3|35|tmpA(beep))
\end{verbatim} \end{verbatim}
The 't' allows the dialed party to transfer the call using '\#'. It's The 't' allows the dialed party to transfer the call using '\#'. It's
@ -197,7 +196,7 @@ helpful.
When there is no CallerID, P and p options will always record an intro When there is no CallerID, P and p options will always record an intro
for the incoming caller. This intro will be stored temporarily in the for the incoming caller. This intro will be stored temporarily in the
/var/lib/asterisk/sounds/priv-callerintros dir, under the name \path{/var/lib/asterisk/sounds/priv-callerintros} dir, under the name
NOCALLERID\_$<$extension$>$ $<$channelname$>$ and will be erased after the NOCALLERID\_$<$extension$>$ $<$channelname$>$ and will be erased after the
callee decides what to do with the call. callee decides what to do with the call.
@ -232,7 +231,7 @@ introductions are stored and re-used for the convenience of the CALLER.
\subsubsection{Introductions} \subsubsection{Introductions}
Unless instructed to not save introductions (see the 'n' option above), Unless instructed to not save introductions (see the 'n' option above),
the screening modes will save the recordings of the caller's names in the screening modes will save the recordings of the caller's names in
the directory /var/lib/asterisk/sounds/priv-callerintros, if they have the directory \path{/var/lib/asterisk/sounds/priv-callerintros}, if they have
a CallerID. Just the 10-digit callerid numbers are used as filenames, a CallerID. Just the 10-digit callerid numbers are used as filenames,
with a ".gsm" at the end. with a ".gsm" at the end.
@ -246,14 +245,15 @@ Next of all, these intros can be used in voicemail, played over
loudspeakers, and perhaps other nifty things. For instance: loudspeakers, and perhaps other nifty things. For instance:
\begin{verbatim} \begin{verbatim}
exten => s,7,System(/usr/bin/play /var/lib/asterisk/sounds/priv-callerintros/${CALLERID(num)}.gsm&|0) exten => s,6,Set(PATH=/var/lib/asterisk/sounds/priv-callerintros)
exten => s,7,System(/usr/bin/play ${PATH}/${CALLERID(num)}.gsm&,0)
\end{verbatim} \end{verbatim}
When a call comes in at the house, the above priority gets executed, When a call comes in at the house, the above priority gets executed,
and the callers intro is played over the phone systems speakers. This and the callers intro is played over the phone systems speakers. This
gives us a hint who is calling. gives us a hint who is calling.
(Note: the |0 option at the end of the System command above, is a (Note: the ,0 option at the end of the System command above, is a
local mod I made to the System command. It forces a 0 result code to local mod I made to the System command. It forces a 0 result code to
be returned, whether the play command successfully completed or be returned, whether the play command successfully completed or
not. Therefore, I don't have to ensure that the file exists or not. Therefore, I don't have to ensure that the file exists or
@ -264,12 +264,13 @@ handle it a little more intelligently)
And one other thing. You can easily supply your callers with an option And one other thing. You can easily supply your callers with an option
to listen to, and re-record their introductions. Here's what I did in to listen to, and re-record their introductions. Here's what I did in
the home system's extensions.conf. (assume that a the home system's extensions.conf. (assume that a
Goto(home-introduction|s|1) exists somewhere in your main menu as an Goto(home-introduction,s,1) exists somewhere in your main menu as an
option): option):
\begin{astlisting}
\begin{verbatim} \begin{verbatim}
[home-introduction] [home-introduction]
exten => s,1,Background,intro-options ;; Script: exten => s,1,Background(intro-options) ;; Script:
;; To hear your Introduction, dial 1. ;; To hear your Introduction, dial 1.
;; to record a new introduction, dial 2. ;; to record a new introduction, dial 2.
;; to return to the main menu, dial 3. ;; to return to the main menu, dial 3.
@ -278,7 +279,7 @@ exten => 1,1,Playback,priv-callerintros/${CALLERID(num)}
exten => 1,2,Goto(s,1) exten => 1,2,Goto(s,1)
exten => 2,1,Goto(home-introduction-record,s,1) exten => 2,1,Goto(home-introduction-record,s,1)
exten => 3,1,Goto(homeline,s,7) exten => 3,1,Goto(homeline,s,7)
exten => 4,1,Playback,intro-intro exten => 4,1,Playback(intro-intro)
;; Script: ;; Script:
;; This may seem a little strange, but it really is a neat ;; This may seem a little strange, but it really is a neat
;; thing, both for you and for us. I've taped a short introduction ;; thing, both for you and for us. I've taped a short introduction
@ -292,17 +293,17 @@ exten => 4,1,Playback,intro-intro
;; using this menu. ;; using this menu.
exten => 4,2,Goto(s,1) exten => 4,2,Goto(s,1)
exten => t,1,Goto(s,1) exten => t,1,Goto(s,1)
exten => i,1,Background,invalid exten => i,1,Background(invalid)
exten => i,2,Goto(s,1) exten => i,2,Goto(s,1)
exten => o,1,Goto(s,1) exten => o,1,Goto(s,1)
[home-introduction-record] [home-introduction-record]
exten => s,1,Background,intro-record-choices ;; Script: exten => s,1,Background(intro-record-choices) ;; Script:
;; If you want some advice about recording your ;; If you want some advice about recording your
;; introduction, dial 1. ;; introduction, dial 1.
;; otherwise, dial 2, and introduce yourself after ;; otherwise, dial 2, and introduce yourself after
;; the beep. ;; the beep.
exten => 1,1,Playback,intro-record exten => 1,1,Playback(intro-record)
;; Your introduction should be short and sweet and crisp. ;; Your introduction should be short and sweet and crisp.
;; Your introduction will be limited to 4 seconds. ;; Your introduction will be limited to 4 seconds.
;; This is NOT meant to be a voice mail message, so ;; This is NOT meant to be a voice mail message, so
@ -327,17 +328,18 @@ exten => 1,1,Playback,intro-record
;; ready. Remember, the # key will end the recording, and play back ;; ready. Remember, the # key will end the recording, and play back
;; your intro. Good Luck, and Thank you!" ;; your intro. Good Luck, and Thank you!"
exten => 1,2,Goto(2,1) exten => 1,2,Goto(2,1)
exten => 2,1,Background,intro-start exten => 2,1,Background(intro-start)
;; OK, here we go! After the beep, please give your introduction. ;; OK, here we go! After the beep, please give your introduction.
exten => 2,2,Background,beep exten => 2,2,Background(beep)
exten => 2,3,Record,priv-callerintros/${CALLERID(num)}:gsm|4 exten => 2,3,Record(priv-callerintros/${CALLERID(num)}:gsm,4)
exten => 2,4,Background,priv-callerintros/${CALLERID(num)} exten => 2,4,Background(priv-callerintros/${CALLERID(num)})
exten => 2,5,Goto(home-introduction,s,1) exten => 2,5,Goto(home-introduction,s,1)
exten => t,1,Goto(s,1) exten => t,1,Goto(s,1)
exten => i,1,Background,invalid exten => i,1,Background(invalid)
exten => i,2,Goto(s,1) exten => i,2,Goto(s,1)
exten => o,1,Goto(s,1) exten => o,1,Goto(s,1)
\end{verbatim} \end{verbatim}
\end{astlisting}
In the above, you'd most likely reword the messages to your liking, In the above, you'd most likely reword the messages to your liking,
and maybe do more advanced things with the 'error' conditions (i,o,t priorities), and maybe do more advanced things with the 'error' conditions (i,o,t priorities),

@ -15,6 +15,7 @@ First of all, set up call queues in queue.conf
Here is an example: Here is an example:
\begin{astlisting}
\begin{verbatim} \begin{verbatim}
=========== queues.conf =========== =========== queues.conf ===========
| ; Cool Digium Queues | | ; Cool Digium Queues |
@ -46,6 +47,7 @@ Here is an example:
| leavewhenempty=strict | | leavewhenempty=strict |
=================================== ===================================
\end{verbatim} \end{verbatim}
\end{astlisting}
In the above, we have defined 3 separate calling queues: In the above, we have defined 3 separate calling queues:
sales-general, customerservice, and dispatch. sales-general, customerservice, and dispatch.
@ -85,6 +87,7 @@ Then in extensions.ael, you can do these things:
At Digium, incoming callers are sent to the "mainmenu" context, where they At Digium, incoming callers are sent to the "mainmenu" context, where they
are greeted, and directed to the numbers they choose... are greeted, and directed to the numbers they choose...
\begin{astlisting}
\begin{verbatim} \begin{verbatim}
context mainmenu { context mainmenu {
@ -93,10 +96,10 @@ context mainmenu {
queues-loginout; queues-loginout;
} }
0 => goto dispatch|s|1; 0 => goto dispatch,s,1;
2 => goto sales|s|1; 2 => goto sales,s,1;
3 => goto customerservice|s|1; 3 => goto customerservice,s,1;
4 => goto dispatch|s|1; 4 => goto dispatch,s,1;
s => { s => {
Ringing(); Ringing();
@ -133,13 +136,15 @@ context mainmenu {
} }
} }
\end{verbatim} \end{verbatim}
\end{astlisting}
\subsubsection{The Contexts referenced from the queues.conf file} \subsubsection{The Contexts referenced from the queues.conf file}
\begin{astlisting}
\begin{verbatim} \begin{verbatim}
context sales { context sales {
0 => goto dispatch|s|1; 0 => goto dispatch,s,1;
8 => Voicemail(${SALESVM}); 8 => Voicemail(${SALESVM});
s => { s => {
@ -151,18 +156,20 @@ context sales {
WaitExten(0.3); WaitExten(0.3);
Background(digium/AtAnyTimeYouMayPress0ToSpeakWithAnOperatorOr8ToLeaveAMessage); Background(digium/AtAnyTimeYouMayPress0ToSpeakWithAnOperatorOr8ToLeaveAMessage);
Set(CALLERID(name)=Sales); Set(CALLERID(name)=Sales);
Queue(sales-general|t); Queue(sales-general,t);
Set(CALLERID(name)=EmptySalQ); Set(CALLERID(name)=EmptySalQ);
goto dispatch|s|1; goto dispatch,s,1;
Playback(goodbye); Playback(goodbye);
Hangup(); Hangup();
} }
} }
\end{verbatim} \end{verbatim}
\end{astlisting}
Please note that there is only one attempt to queue a call in the sales queue. All sales agents that Please note that there is only one attempt to queue a call in the sales queue. All sales agents that
are logged in will be rung. are logged in will be rung.
\begin{astlisting}
\begin{verbatim} \begin{verbatim}
context customerservice { context customerservice {
@ -183,11 +190,11 @@ context customerservice {
Background(digium/AtAnyTimeYouMayPress0ToSpeakWithAnOperatorOr8ToLeaveAMessage); Background(digium/AtAnyTimeYouMayPress0ToSpeakWithAnOperatorOr8ToLeaveAMessage);
Set(CALLERID(name)=Cust Svc); Set(CALLERID(name)=Cust Svc);
Set(QUEUE_MAX_PENALTY=10); Set(QUEUE_MAX_PENALTY=10);
Queue(customerservice|t); Queue(customerservice,t);
Set(QUEUE_MAX_PENALTY=0); Set(QUEUE_MAX_PENALTY=0);
Queue(customerservice|t); Queue(customerservice,t);
Set(CALLERID(name)=EmptyCSVQ); Set(CALLERID(name)=EmptyCSVQ);
goto dispatch|s|1; goto dispatch,s,1;
Background(digium/NoCustomerServiceRepresentativesAreAvailableAtThisTime); Background(digium/NoCustomerServiceRepresentativesAreAvailableAtThisTime);
Background(digium/PleaseLeaveAMessageInTheCustomerServiceVoiceMailBox); Background(digium/PleaseLeaveAMessageInTheCustomerServiceVoiceMailBox);
Voicemail(${CUSTSERVVM}); Voicemail(${CUSTSERVVM});
@ -196,11 +203,13 @@ context customerservice {
} }
} }
\end{verbatim} \end{verbatim}
\end{astlisting}
Note that calls coming into customerservice will first be try to queue Note that calls coming into customerservice will first be try to queue
calls to those agents with a QUEUE\_MAX\_PENALTY of 10, and if none are available, calls to those agents with a QUEUE\_MAX\_PENALTY of 10, and if none are available,
then all agents are rung. then all agents are rung.
\begin{astlisting}
\begin{verbatim} \begin{verbatim}
context dispatch context dispatch
{ {
@ -226,6 +235,7 @@ context dispatch
} }
} }
\end{verbatim} \end{verbatim}
\end{astlisting}
And in the dispatch context, first agents of priority 10 are tried, then And in the dispatch context, first agents of priority 10 are tried, then
20, and if none are available, all agents are tried. 20, and if none are available, all agents are tried.
@ -265,6 +275,7 @@ dialplan.
\subsubsection{Agents Log In and Out} \subsubsection{Agents Log In and Out}
\begin{astlisting}
\begin{verbatim} \begin{verbatim}
context queues-loginout context queues-loginout
{ {
@ -284,6 +295,7 @@ context queues-loginout
} }
} }
\end{verbatim} \end{verbatim}
\end{astlisting}
In the above contexts, the agents dial 6092 to log into their queues, In the above contexts, the agents dial 6092 to log into their queues,
and they dial 6093 to log out of their queues. The agent is prompted and they dial 6093 to log out of their queues. The agent is prompted
@ -292,6 +304,7 @@ and then they are transferred to the proper extension in the
queues-manip context. The queues-manip context does all the queues-manip context. The queues-manip context does all the
actual work: actual work:
\begin{astlisting}
\begin{verbatim} \begin{verbatim}
context queues-manip { context queues-manip {
@ -324,6 +337,7 @@ context queues-manip {
} }
} }
\end{verbatim} \end{verbatim}
\end{astlisting}
In the above extensions, note that the queue-addremove macro is used In the above extensions, note that the queue-addremove macro is used
to actually add or remove the agent from the applicable queue, to actually add or remove the agent from the applicable queue,
@ -345,6 +359,7 @@ which queue incoming calls are coming from.
The call to queue-success() gives some feedback to the agent The call to queue-success() gives some feedback to the agent
as they log in and out, that the process has completed. as they log in and out, that the process has completed.
\begin{astlisting}
\begin{verbatim} \begin{verbatim}
macro queue-success(exten) macro queue-success(exten)
{ {
@ -362,9 +377,11 @@ macro queue-success(exten)
} }
} }
\end{verbatim} \end{verbatim}
\end{astlisting}
The queue-addremove macro is defined in this manner: The queue-addremove macro is defined in this manner:
\begin{astlisting}
\begin{verbatim} \begin{verbatim}
macro queue-addremove(queuename,penalty,exten) macro queue-addremove(queuename,penalty,exten)
{ {
@ -397,6 +414,7 @@ macro queue-addremove(queuename,penalty,exten)
} }
} }
\end{verbatim} \end{verbatim}
\end{astlisting}
Basically, it uses the first character of the exten variable, to determine the Basically, it uses the first character of the exten variable, to determine the
proper actions to take. In the above dial plan code, only the cases I or O are used, proper actions to take. In the above dial plan code, only the cases I or O are used,
@ -408,6 +426,7 @@ which correspond to the Login and Logout actions.
Notice in the above, that the commands to manipulate agents in queues have Notice in the above, that the commands to manipulate agents in queues have
"@agents" in their arguments. This is a reference to the agents context: "@agents" in their arguments. This is a reference to the agents context:
\begin{astlisting}
\begin{verbatim} \begin{verbatim}
context agents context agents
{ {
@ -415,21 +434,21 @@ context agents
8010 => 8010 =>
{ {
Set(QUEUE_MAX_PENALTY=10); Set(QUEUE_MAX_PENALTY=10);
Queue(sales-general|t); Queue(sales-general,t);
Set(QUEUE_MAX_PENALTY=0); Set(QUEUE_MAX_PENALTY=0);
Queue(sales-general|t); Queue(sales-general,t);
Set(CALLERID(name)=EmptySalQ); Set(CALLERID(name)=EmptySalQ);
goto dispatch|s|1; goto dispatch,s,1;
} }
// Customer Service queue // Customer Service queue
8011 => 8011 =>
{ {
Set(QUEUE_MAX_PENALTY=10); Set(QUEUE_MAX_PENALTY=10);
Queue(customerservice|t); Queue(customerservice,t);
Set(QUEUE_MAX_PENALTY=0); Set(QUEUE_MAX_PENALTY=0);
Queue(customerservice|t); Queue(customerservice,t);
Set(CALLERID(name)=EMptyCSVQ); Set(CALLERID(name)=EMptyCSVQ);
goto dispatch|s|1; goto dispatch,s,1;
} }
8013 => 8013 =>
{ {
@ -442,7 +461,7 @@ context agents
Queue(support-dispatch,t); Queue(support-dispatch,t);
Set(QUEUE_MAX_PENALTY=0); // means no max Set(QUEUE_MAX_PENALTY=0); // means no max
Queue(support-dispatch,t); Queue(support-dispatch,t);
goto dispatch|s|1; goto dispatch,s,1;
} }
6121 => &callagent(${RAQUEL},${EXTEN}); 6121 => &callagent(${RAQUEL},${EXTEN});
6165 => &callagent(${SPEARS},${EXTEN}); 6165 => &callagent(${SPEARS},${EXTEN});
@ -450,6 +469,7 @@ context agents
6070 => &callagent(${SALINE},${EXTEN}); 6070 => &callagent(${SALINE},${EXTEN});
} }
\end{verbatim} \end{verbatim}
\end{astlisting}
In the above, the variables \${RAQUEL}, etc stand for In the above, the variables \${RAQUEL}, etc stand for
actual devices to ring that person's actual devices to ring that person's
@ -464,13 +484,14 @@ Here is the callagent macro, note that if a person in the
queue is called, but does not answer, then they are automatically queue is called, but does not answer, then they are automatically
removed from the queue. removed from the queue.
\begin{astlisting}
\begin{verbatim} \begin{verbatim}
macro callagent(device,exten) macro callagent(device,exten)
{ {
if( ${GROUP_COUNT(${exten}@agents)}=0 ) if( ${GROUP_COUNT(${exten}@agents)}=0 )
{ {
Set(OUTBOUND_GROUP=${exten}@agents); Set(OUTBOUND_GROUP=${exten}@agents);
Dial(${device}|300|t); Dial(${device},300,t);
switch(${DIALSTATUS}) switch(${DIALSTATUS})
{ {
case BUSY: case BUSY:
@ -478,7 +499,7 @@ macro callagent(device,exten)
break; break;
case NOANSWER: case NOANSWER:
Set(queue-announce-success=0); Set(queue-announce-success=0);
goto queues-manip|O${exten}|1; goto queues-manip,O${exten},1;
default: default:
Hangup(); Hangup();
break; break;
@ -490,6 +511,7 @@ macro callagent(device,exten)
} }
} }
\end{verbatim} \end{verbatim}
\end{astlisting}
In the callagent macro above, the \${exten} will In the callagent macro above, the \${exten} will
be 6121, or 6165, etc, which is the extension of the agent. be 6121, or 6165, etc, which is the extension of the agent.
@ -509,16 +531,17 @@ is returned without actually trying to dial the agent.
If you would like to have a pre acknowledge message with option to reject the message If you would like to have a pre acknowledge message with option to reject the message
you can use the following dialplan Macro as a base with the 'M' dial argument. you can use the following dialplan Macro as a base with the 'M' dial argument.
\begin{astlisting}
\begin{verbatim} \begin{verbatim}
[macro-screen] [macro-screen]
exten=>s,1,Wait(.25) exten=>s,1,Wait(.25)
exten=>s,2,Read(ACCEPT|screen-callee-options|1) exten=>s,2,Read(ACCEPT,screen-callee-options,1)
exten=>s,3,Gotoif($[${ACCEPT} = 1] ?50) exten=>s,3,Gotoif($[${ACCEPT} = 1] ?50)
exten=>s,4,Gotoif($[${ACCEPT} = 2] ?30) exten=>s,4,Gotoif($[${ACCEPT} = 2] ?30)
exten=>s,5,Gotoif($[${ACCEPT} = 3] ?40) exten=>s,5,Gotoif($[${ACCEPT} = 3] ?40)
exten=>s,6,Gotoif($[${ACCEPT} = 4] ?30:30) exten=>s,6,Gotoif($[${ACCEPT} = 4] ?30:30)
exten=>s,30,Set(MACRO_RESULT=CONTINUE) exten=>s,30,Set(MACRO_RESULT=CONTINUE)
exten=>s,40,Read(TEXTEN|custom/screen-exten|) exten=>s,40,Read(TEXTEN,custom/screen-exten,)
exten=>s,41,Gotoif($[${LEN(${TEXTEN})} = 3]?42:45) exten=>s,41,Gotoif($[${LEN(${TEXTEN})} = 3]?42:45)
exten=>s,42,Set(MACRO_RESULT=GOTO:from-internal^${TEXTEN}^1) exten=>s,42,Set(MACRO_RESULT=GOTO:from-internal^${TEXTEN}^1)
exten=>s,45,Gotoif($[${TEXTEN} = 0] ?46:4) exten=>s,45,Gotoif($[${TEXTEN} = 0] ?46:4)
@ -527,6 +550,7 @@ exten=>s,50,Playback(after-the-tone)
exten=>s,51,Playback(connected) exten=>s,51,Playback(connected)
exten=>s,52,Playback(beep) exten=>s,52,Playback(beep)
\end{verbatim} \end{verbatim}
\end{astlisting}
\subsection{Caveats} \subsection{Caveats}

@ -100,7 +100,7 @@ device=Local/disa@line4_outbound
exten => 12564286000,1,SLATrunk(line4) exten => 12564286000,1,SLATrunk(line4)
[line4_outbound] [line4_outbound]
exten => disa,1,Disa(no-password|line4_outbound) exten => disa,1,Disa(no-password,line4_outbound)
exten => _1NXXNXXXXXX,1,Dial(SIP/\${EXTEN}@mytrunk) exten => _1NXXNXXXXXX,1,Dial(SIP/\${EXTEN}@mytrunk)
\end{verbatim} \end{verbatim}
@ -277,18 +277,18 @@ extensions.conf:
\begin{verbatim} \begin{verbatim}
[macro-slaline] [macro-slaline]
exten => s,1,SLATrunk(${ARG1}) exten => s,1,SLATrunk(${ARG1})
exten => s,n,Goto(s-${SLATRUNK_STATUS}|1) exten => s,n,Goto(s-${SLATRUNK_STATUS},1)
exten => s-FAILURE,1,Voicemail(1234|u) exten => s-FAILURE,1,Voicemail(1234,u)
exten => s-UNANSWERED,1,Voicemail(1234|u) exten => s-UNANSWERED,1,Voicemail(1234,u)
[line1] [line1]
exten => s,1,Macro(slaline|line1) exten => s,1,Macro(slaline,line1)
[line2] [line2]
exten => s,2,Macro(slaline|line2) exten => s,2,Macro(slaline,line2)
[line1_outbound] [line1_outbound]
exten => disa,1,Disa(no-password|line1_outbound) exten => disa,1,Disa(no-password,line1_outbound)
exten => _1NXXNXXXXXX,1,Dial(Zap/1/${EXTEN}) exten => _1NXXNXXXXXX,1,Dial(Zap/1/${EXTEN})
exten => 8500,1,VoicemailMain(1234) exten => 8500,1,VoicemailMain(1234)

Loading…
Cancel
Save