mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-17 07:18:15 +00:00
Fix escaping and some of the formattting (closes issue #10285)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76874 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -584,7 +584,7 @@ name/number with a slash (/) and the number to match against the Caller ID:
|
|||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
context zoombo
|
context zoombo
|
||||||
{
|
{
|
||||||
819/7079953345 => { NoOp(hello, 3345); }
|
819/7079953345 => { NoOp(hello, 3345); }
|
||||||
}
|
}
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|
||||||
@@ -727,8 +727,8 @@ You can declare variables in Macros, as so:
|
|||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
Macro myroutine(firstarg, secondarg)
|
Macro myroutine(firstarg, secondarg)
|
||||||
{
|
{
|
||||||
Myvar=1;
|
Myvar=1;
|
||||||
NoOp(Myvar is set to ${myvar});
|
NoOp(Myvar is set to ${myvar});
|
||||||
}
|
}
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|
||||||
@@ -747,8 +747,8 @@ before setting them to a value;
|
|||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
Macro myroutine(firstarg, secondarg)
|
Macro myroutine(firstarg, secondarg)
|
||||||
{
|
{
|
||||||
local Myvar=1;
|
local Myvar=1;
|
||||||
NoOp(Myvar is set to ${Myvar}, and firstarg is ${firstarg}, and secondarg is ${secondarg});
|
NoOp(Myvar is set to ${Myvar}, and firstarg is ${firstarg}, and secondarg is ${secondarg});
|
||||||
}
|
}
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|
||||||
@@ -760,8 +760,8 @@ If you need to make a local variable within the Set() application, you can do it
|
|||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
Macro myroutine(firstarg, secondarg)
|
Macro myroutine(firstarg, secondarg)
|
||||||
{
|
{
|
||||||
Set(LOCAL(Myvar)=1);
|
Set(LOCAL(Myvar)=1);
|
||||||
NoOp(Myvar is set to ${Myvar}, and firstarg is ${firstarg}, and secondarg is ${secondarg});
|
NoOp(Myvar is set to ${Myvar}, and firstarg is ${firstarg}, and secondarg is ${secondarg});
|
||||||
}
|
}
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|
||||||
@@ -787,9 +787,9 @@ context loops {
|
|||||||
}
|
}
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|
||||||
NOTE: The conditional expression (the "\${y} >= 0" above) is wrapped in
|
NOTE: The conditional expression (the "\${y} $>$= 0" above) is wrapped in
|
||||||
\$[ ] so it can be evaluated. NOTE: The for loop test expression
|
\$[ ] so it can be evaluated. NOTE: The for loop test expression
|
||||||
(the "\${x} < 3" above) is wrapped in \$[ ] so it can be evaluated.
|
(the "\${x} $<$ 3" above) is wrapped in \$[ ] so it can be evaluated.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1134,9 +1134,7 @@ These checks will be:
|
|||||||
currently known functions. A warning is issued if it is not.
|
currently known functions. A warning is issued if it is not.
|
||||||
\end{itemize}
|
\end{itemize}
|
||||||
|
|
||||||
|
\section{Differences with the original version of AEL}
|
||||||
Differences with the original version of AEL
|
|
||||||
============================================
|
|
||||||
|
|
||||||
\begin{enumerate}
|
\begin{enumerate}
|
||||||
\item The \$[...] expressions have been enhanced to include the ==, ||,
|
\item The \$[...] expressions have been enhanced to include the ==, ||,
|
||||||
@@ -1174,8 +1172,8 @@ Differences with the original version of AEL
|
|||||||
AEL README.
|
AEL README.
|
||||||
\item Added the "return" keyword, which will jump to the end of an
|
\item Added the "return" keyword, which will jump to the end of an
|
||||||
extension/Macro.
|
extension/Macro.
|
||||||
\item Added the ifTime (<time range>|<days of week>|<days of
|
\item Added the ifTime ($<$time range$>$|$<$days of week$>$|$<$days of
|
||||||
month>|<months> ) {} [else {}] construct, which executes much
|
month$>$|$<$months$>$ ) {} [else {}] construct, which executes much
|
||||||
like an if () statement, but the decision is based on the
|
like an if () statement, but the decision is based on the
|
||||||
current time, and the time spec provided in the ifTime. See the
|
current time, and the time spec provided in the ifTime. See the
|
||||||
example above. (Note: all the other time-dependent Applications
|
example above. (Note: all the other time-dependent Applications
|
||||||
@@ -1200,7 +1198,7 @@ Differences with the original version of AEL
|
|||||||
NoOp() added, to make sure the label exists in the extension on
|
NoOp() added, to make sure the label exists in the extension on
|
||||||
Asterisk. (0.6)
|
Asterisk. (0.6)
|
||||||
\item (0.9) the semicolon is no longer required after a closing brace!
|
\item (0.9) the semicolon is no longer required after a closing brace!
|
||||||
(i.e. "];" ===> "\}". You can have them there if you like, but
|
(i.e. "];" ===$>$ "\}". You can have them there if you like, but
|
||||||
they are not necessary. Someday they may be rejected as a syntax
|
they are not necessary. Someday they may be rejected as a syntax
|
||||||
error, maybe.
|
error, maybe.
|
||||||
\item (0.9) the // comments are not recognized and removed in the
|
\item (0.9) the // comments are not recognized and removed in the
|
||||||
@@ -1208,11 +1206,11 @@ Differences with the original version of AEL
|
|||||||
arguments. You may have to move a comment if you get errors in
|
arguments. You may have to move a comment if you get errors in
|
||||||
existing files.
|
existing files.
|
||||||
\item (0.10) the random statement has been added. Syntax: random (
|
\item (0.10) the random statement has been added. Syntax: random (
|
||||||
<expr> ) <lucky-statement> [ else <unlucky-statement> ]. The
|
$<$expr$>$ ) $<$lucky-statement$>$ [ else $<$unlucky-statement$>$ ]. The
|
||||||
probability of the lucky-statement getting executed is <expr>,
|
probability of the lucky-statement getting executed is $<$expr$>$,
|
||||||
which should evaluate to an integer between 0 and 100. If the
|
which should evaluate to an integer between 0 and 100. If the
|
||||||
<lucky-statement> isn't so lucky this time around, then the
|
$<$lucky-statement$>$ isn't so lucky this time around, then the
|
||||||
<unlucky-statement> gets executed, if it is present.
|
$<$unlucky-statement$>$ gets executed, if it is present.
|
||||||
\end{enumerate}
|
\end{enumerate}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -61,10 +61,10 @@ reference purposes.
|
|||||||
\chapter{Channel Variables}
|
\chapter{Channel Variables}
|
||||||
\input{channelvariables.tex}
|
\input{channelvariables.tex}
|
||||||
|
|
||||||
\chapter{AEL, Asterisk Extension Language}
|
\chapter{AEL: Asterisk Extension Language}
|
||||||
\input{ael.tex}
|
\input{ael.tex}
|
||||||
|
|
||||||
\chapter{SLA (Shared Line Appearances)}
|
\chapter{SLA: Shared Line Appearances}
|
||||||
\input{sla.tex}
|
\input{sla.tex}
|
||||||
|
|
||||||
\chapter{Channel Drivers}
|
\chapter{Channel Drivers}
|
||||||
@@ -96,6 +96,7 @@ reference purposes.
|
|||||||
|
|
||||||
\chapter{Voicemail}
|
\chapter{Voicemail}
|
||||||
\section{ODBC Storage}
|
\section{ODBC Storage}
|
||||||
|
\label{odbcstorage}
|
||||||
\input{odbcstorage.tex}
|
\input{odbcstorage.tex}
|
||||||
\section{IMAP Storage}
|
\section{IMAP Storage}
|
||||||
\input{imapstorage.tex}
|
\input{imapstorage.tex}
|
||||||
@@ -112,18 +113,19 @@ reference purposes.
|
|||||||
%
|
%
|
||||||
%Misc
|
%Misc
|
||||||
%----
|
%----
|
||||||
%asterisk-mib.txt SNMP mib for Asterisk (net-snmp)
|
%asterisk-mib.txt SNMP mib for Asterisk (net-snmp)
|
||||||
%digium-mib.txt SNMP mib for Asterisk (net-snmp)
|
%digium-mib.txt SNMP mib for Asterisk (net-snmp)
|
||||||
%
|
%
|
||||||
%For developers
|
%For developers
|
||||||
%--------------
|
%--------------
|
||||||
%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
|
%backtrace.txt How to produce a backtrace when Asterisk crashes
|
||||||
%CODING-GUIDELINES Guidelines for developers
|
%callfiles.txt Asterisk callfiles using instruction
|
||||||
%externalivr.txt Documentation of the protocol used in externalivr()
|
%CODING-GUIDELINES Guidelines for developers
|
||||||
%modules.txt How Asterisk modules work
|
%externalivr.txt Documentation of the protocol used in externalivr()
|
||||||
%datastores.txt About channel data stores
|
%modules.txt How Asterisk modules work
|
||||||
%speechrec.txt The Generic Speech Recognition API
|
%datastores.txt About channel data stores
|
||||||
|
%speechrec.txt The Generic Speech Recognition API
|
||||||
|
|
||||||
\enddocument
|
\end{document}
|
||||||
|
|||||||
@@ -1,48 +1,47 @@
|
|||||||
\section{Applications}
|
\section{Applications}
|
||||||
|
|
||||||
\begin{itemize}
|
\begin{itemize}
|
||||||
\item SetAccount - Set account code for billing
|
\item SetAccount - Set account code for billing
|
||||||
\item SetAMAFlags - Sets AMA flags
|
\item SetAMAFlags - Sets AMA flags
|
||||||
\item NoCDR - Make sure no CDR is saved for a specific call
|
\item NoCDR - Make sure no CDR is saved for a specific call
|
||||||
\item ResetCDR - Reset CDR
|
\item ResetCDR - Reset CDR
|
||||||
\item ForkCDR - Save current CDR and start a new CDR for this call
|
\item ForkCDR - Save current CDR and start a new CDR for this call
|
||||||
\item Authenticate - Authenticates and sets the account code
|
\item Authenticate - Authenticates and sets the account code
|
||||||
\item SetCDRUserField - Set CDR user field
|
\item SetCDRUserField - Set CDR user field
|
||||||
\item AppendCDRUserField - Append data to CDR User field
|
\item AppendCDRUserField - Append data to CDR User field
|
||||||
\end{itemize}
|
\end{itemize}
|
||||||
|
|
||||||
For more information, use the "core show application <application>" command.
|
For more information, use the "core show application <application>" command.
|
||||||
You can set default account codes and AMA flags for devices in
|
You can set default account codes and AMA flags for devices in
|
||||||
channel configuration files, like sip.conf, iax.conf etc.
|
channel configuration files, like sip.conf, iax.conf etc.
|
||||||
|
|
||||||
|
|
||||||
\section{Fields of the CDR in Asterisk}
|
\section{Fields of the CDR in Asterisk}
|
||||||
|
|
||||||
\begin{itemize}
|
\begin{itemize}
|
||||||
\item accountcode: What account number to use, (string, 20 characters)
|
\item accountcode: What account number to use, (string, 20 characters)
|
||||||
\item src: Caller*ID number (string, 80 characters)
|
\item src: Caller*ID number (string, 80 characters)
|
||||||
\item dst: Destination extension (string, 80 characters)
|
\item dst: Destination extension (string, 80 characters)
|
||||||
\item dcontext: Destination context (string, 80 characters)
|
\item dcontext: Destination context (string, 80 characters)
|
||||||
\item clid: Caller*ID with text (80 characters)
|
\item clid: Caller*ID with text (80 characters)
|
||||||
\item channel: Channel used (80 characters)
|
\item channel: Channel used (80 characters)
|
||||||
\item dstchannel: Destination channel if appropriate (80 characters)
|
\item dstchannel: Destination channel if appropriate (80 characters)
|
||||||
\item lastapp: Last application if appropriate (80 characters)
|
\item lastapp: Last application if appropriate (80 characters)
|
||||||
\item lastdata: Last application data (arguments) (80 characters)
|
\item lastdata: Last application data (arguments) (80 characters)
|
||||||
\item start: Start of call (date/time)
|
\item start: Start of call (date/time)
|
||||||
\item answer: Answer of call (date/time)
|
\item answer: Answer of call (date/time)
|
||||||
\item end: End of call (date/time)
|
\item end: End of call (date/time)
|
||||||
\item duration: Total time in system, in seconds (integer), from dial to hangup
|
\item duration: Total time in system, in seconds (integer), from dial to hangup
|
||||||
\item billsec: Total time call is up, in seconds (integer), from answer to hangup
|
\item billsec: Total time call is up, in seconds (integer), from answer to hangup
|
||||||
\item disposition: What happened to the call: ANSWERED, NO ANSWER, BUSY
|
\item disposition: What happened to the call: ANSWERED, NO ANSWER, BUSY
|
||||||
\item amaflags: What flags to use: DOCUMENTATION, BILL, IGNORE etc,
|
\item amaflags: What flags to use: DOCUMENTATION, BILL, IGNORE etc,
|
||||||
specified on a per channel basis like accountcode.
|
specified on a per channel basis like accountcode.
|
||||||
\item user field: A user-defined field, maximum 255 characters
|
\item user field: A user-defined field, maximum 255 characters
|
||||||
\end{itemize}
|
\end{itemize}
|
||||||
|
|
||||||
In some cases, uniqueid is appended:
|
In some cases, uniqueid is appended:
|
||||||
|
|
||||||
\begin{itemize}
|
\begin{itemize}
|
||||||
\item uniqueid: Unique Channel Identifier (32 characters)
|
\item uniqueid: Unique Channel Identifier (32 characters)
|
||||||
This needs to be enabled in the source code at compile time
|
This needs to be enabled in the source code at compile time
|
||||||
\end{itemize}
|
\end{itemize}
|
||||||
|
|
||||||
@@ -61,24 +60,24 @@ can be accessed just like channel variables. The following builtin variables
|
|||||||
are available.
|
are available.
|
||||||
|
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
${CDR(clid)} Caller ID
|
${CDR(clid)} Caller ID
|
||||||
${CDR(src)} Source
|
${CDR(src)} Source
|
||||||
${CDR(dst)} Destination
|
${CDR(dst)} Destination
|
||||||
${CDR(dcontext)} Destination context
|
${CDR(dcontext)} Destination context
|
||||||
${CDR(channel)} Channel name
|
${CDR(channel)} Channel name
|
||||||
${CDR(dstchannel)} Destination channel
|
${CDR(dstchannel)} Destination channel
|
||||||
${CDR(lastapp)} Last app executed
|
${CDR(lastapp)} Last app executed
|
||||||
${CDR(lastdata)} Last app's arguments
|
${CDR(lastdata)} Last app's arguments
|
||||||
${CDR(start)} Time the call started.
|
${CDR(start)} Time the call started.
|
||||||
${CDR(answer)} Time the call was answered.
|
${CDR(answer)} Time the call was answered.
|
||||||
${CDR(end)} Time the call ended.
|
${CDR(end)} Time the call ended.
|
||||||
${CDR(duration)} Duration of the call.
|
${CDR(duration)} Duration of the call.
|
||||||
${CDR(billsec)} Duration of the call once it was answered.
|
${CDR(billsec)} Duration of the call once it was answered.
|
||||||
${CDR(disposition)} ANSWERED, NO ANSWER, BUSY
|
${CDR(disposition)} ANSWERED, NO ANSWER, BUSY
|
||||||
${CDR(amaflags)} DOCUMENTATION, BILL, IGNORE etc
|
${CDR(amaflags)} DOCUMENTATION, BILL, IGNORE etc
|
||||||
${CDR(accountcode)} The channel's account code.
|
${CDR(accountcode)} The channel's account code.
|
||||||
${CDR(uniqueid)} The channel's unique id.
|
${CDR(uniqueid)} The channel's unique id.
|
||||||
${CDR(userfield)} The channels uses specified field.
|
${CDR(userfield)} The channels uses specified field.
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|
||||||
In addition, you can set your own extra variables by using Set(CDR(name)=value).
|
In addition, you can set your own extra variables by using Set(CDR(name)=value).
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ will be passed down to the Background command, in this example.
|
|||||||
|
|
||||||
Also, characters special to variable substitution, expression evaluation, etc
|
Also, characters special to variable substitution, expression evaluation, etc
|
||||||
(see below), can be quoted. For example, to literally use a \$ on the
|
(see below), can be quoted. For example, to literally use a \$ on the
|
||||||
string "\$1231", quote it with a preceding \\. Special characters that must
|
string "\$1231", quote it with a preceding \textbackslash. Special characters that must
|
||||||
be quoted to be used, are [ ] \$ " \\. (to write \\ itself, use \\).
|
be quoted to be used, are [ ] \$ " \textbackslash. (to write \textbackslash itself, use \textbackslash).
|
||||||
|
|
||||||
These Double quotes and escapes are evaluated at the level of the
|
These Double quotes and escapes are evaluated at the level of the
|
||||||
asterisk config file parser.
|
asterisk config file parser.
|
||||||
@@ -35,7 +35,7 @@ Double quotes can also be used inside expressions, as discussed below.
|
|||||||
Parameter strings can include variables. Variable names are arbitrary strings.
|
Parameter strings can include variables. Variable names are arbitrary strings.
|
||||||
They are stored in the respective channel structure.
|
They are stored in the respective channel structure.
|
||||||
|
|
||||||
To set a variable to a particular value, do :
|
To set a variable to a particular value, do:
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
exten => 1,2,Set(varname=value)
|
exten => 1,2,Set(varname=value)
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
@@ -52,8 +52,8 @@ requires a variable), just write the name. To refer to the variable's value,
|
|||||||
enclose it inside \${}. For example, Set takes as the first argument
|
enclose it inside \${}. For example, Set takes as the first argument
|
||||||
(before the =) a variable name, so:
|
(before the =) a variable name, so:
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
exten => 1,2,Set(koko=lala)
|
exten => 1,2,Set(koko=lala)
|
||||||
exten => 1,3,Set(${koko}=blabla)
|
exten => 1,3,Set(${koko}=blabla)
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
stores to the variable "koko" the value "lala" and to variable "lala" the
|
stores to the variable "koko" the value "lala" and to variable "lala" the
|
||||||
value "blabla".
|
value "blabla".
|
||||||
@@ -91,14 +91,14 @@ NoOp(${__FOO}) is identical to NoOp(${FOO})
|
|||||||
|
|
||||||
The format for selecting characters from a variable can be expressed as:
|
The format for selecting characters from a variable can be expressed as:
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
${variable_name[:offset[:length]]}
|
${variable_name[:offset[:length]]}
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
If you want to select the first N characters from the string assigned
|
If you want to select the first N characters from the string assigned
|
||||||
to a variable, simply append a colon and the number of characters to
|
to a variable, simply append a colon and the number of characters to
|
||||||
skip from the beginning of the string to the variable name.
|
skip from the beginning of the string to the variable name.
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
;Remove the first character of extension, save in "number" variable
|
; Remove the first character of extension, save in "number" variable
|
||||||
exten => _9X.,1,Set(number=${EXTEN:1})
|
exten => _9X.,1,Set(number=${EXTEN:1})
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
Assuming we've dialed 918005551234, the value saved to the 'number' variable
|
Assuming we've dialed 918005551234, the value saved to the 'number' variable
|
||||||
would be 18005551234. This is useful in situations when we require users to
|
would be 18005551234. This is useful in situations when we require users to
|
||||||
@@ -110,16 +110,16 @@ of the string and then selects everything after the new position. The following
|
|||||||
example will save the numbers 1234 to the 'number' variable, still assuming
|
example will save the numbers 1234 to the 'number' variable, still assuming
|
||||||
we've dialed 918005551234.
|
we've dialed 918005551234.
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
;Remove everything before the last four digits of the dialed string
|
; Remove everything before the last four digits of the dialed string
|
||||||
exten => _9X.,1,Set(number=${EXTEN:-4})
|
exten => _9X.,1,Set(number=${EXTEN:-4})
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
We can also limit the number of characters from our offset position that we
|
We can also limit the number of characters from our offset position that we
|
||||||
wish to use. This is done by appending a second colon and length value to the
|
wish to use. This is done by appending a second colon and length value to the
|
||||||
variable name. The following example will save the numbers 555 to the 'number'
|
variable name. The following example will save the numbers 555 to the 'number'
|
||||||
variable.
|
variable.
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
;Only save the middle numbers 555 from the string 918005551234
|
; Only save the middle numbers 555 from the string 918005551234
|
||||||
exten => _9X.,1,Set(number=${EXTEN:5:3})
|
exten => _9X.,1,Set(number=${EXTEN:5:3})
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
The length value can also be used in conjunction with a negative offset. This
|
The length value can also be used in conjunction with a negative offset. This
|
||||||
may be useful if the length of the string is unknown, but the trailing digits
|
may be useful if the length of the string is unknown, but the trailing digits
|
||||||
@@ -127,14 +127,14 @@ are. The following example will save the numbers 555 to the 'number' variable,
|
|||||||
even if the string starts with more characters than expected (unlike the
|
even if the string starts with more characters than expected (unlike the
|
||||||
previous example).
|
previous example).
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
;Save the numbers 555 to the 'number' variable
|
; Save the numbers 555 to the 'number' variable
|
||||||
exten => _9X.,1,Set(number=${EXTEN:-7:3})
|
exten => _9X.,1,Set(number=${EXTEN:-7:3})
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
If a negative length value is entered, Asterisk will remove that many characters
|
If a negative length value is entered, Asterisk will remove that many characters
|
||||||
from the end of the string.
|
from the end of the string.
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
;Set pin to everything but the trailing #.
|
; Set pin to everything but the trailing #.
|
||||||
exten => _XXXX#,1,Set(pin=${EXTEN:0:-1})
|
exten => _XXXX#,1,Set(pin=${EXTEN:0:-1})
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|
||||||
\section{Expressions}
|
\section{Expressions}
|
||||||
@@ -258,15 +258,15 @@ with equal precedence are grouped within { } symbols.
|
|||||||
|
|
||||||
expr1 ? expr2 :: expr3
|
expr1 ? expr2 :: expr3
|
||||||
Traditional Conditional operator. If expr1 is a number
|
Traditional Conditional operator. If expr1 is a number
|
||||||
that evaluates to 0 (false), expr3 is result of the this
|
that evaluates to 0 (false), expr3 is result of the this
|
||||||
expression evaluation. Otherwise, expr2 is the result.
|
expression evaluation. Otherwise, expr2 is the result.
|
||||||
If expr1 is a string, and evaluates to an empty string,
|
If expr1 is a string, and evaluates to an empty string,
|
||||||
or the two characters (""), then expr3 is the
|
or the two characters (""), then expr3 is the
|
||||||
result. Otherwise, expr2 is the result. In Asterisk, all
|
result. Otherwise, expr2 is the result. In Asterisk, all
|
||||||
3 exprs will be "evaluated"; if expr1 is "true", expr2
|
3 exprs will be "evaluated"; if expr1 is "true", expr2
|
||||||
will be the result of the "evaluation" of this
|
will be the result of the "evaluation" of this
|
||||||
expression. expr3 will be the result otherwise. This
|
expression. expr3 will be the result otherwise. This
|
||||||
operator has the lowest precedence.
|
operator has the lowest precedence.
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|
||||||
Parentheses are used for grouping in the usual manner.
|
Parentheses are used for grouping in the usual manner.
|
||||||
@@ -274,7 +274,7 @@ Parentheses are used for grouping in the usual manner.
|
|||||||
Operator precedence is applied as one would expect in any of the C
|
Operator precedence is applied as one would expect in any of the C
|
||||||
or C derived languages.
|
or C derived languages.
|
||||||
|
|
||||||
subsection{Floating Point Numbers}
|
\subsection{Floating Point Numbers}
|
||||||
|
|
||||||
In 1.6 and above, we shifted the \$\[...\] expressions to be calculated
|
In 1.6 and above, we shifted the \$\[...\] expressions to be calculated
|
||||||
via floating point numbers instead of integers. We use 'long double' numbers
|
via floating point numbers instead of integers. We use 'long double' numbers
|
||||||
@@ -290,13 +290,13 @@ on integer behavior. If you were counting on 1/4 evaluating to 0, you need to no
|
|||||||
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.
|
||||||
|
|
||||||
|
|
||||||
subsection{Functions}
|
\subsection{Functions}
|
||||||
|
|
||||||
In 1.6 and above, we upgraded the $[] expressions to handle floating point numbers.
|
In 1.6 and above, we upgraded the \$[] expressions to handle floating point numbers.
|
||||||
Because of this, folks counting on integer behavior would be disrupted. To make
|
Because of this, folks counting on integer behavior would be disrupted. To make
|
||||||
the same results possible, some rounding and integer truncation functions have been
|
the same results possible, some rounding and integer truncation functions have been
|
||||||
added to the core of the Expr2 parser. Indeed, dialplan functions can be called from
|
added to the core of the Expr2 parser. Indeed, dialplan functions can be called from
|
||||||
$[..] expressions without the ${...} operators. The only trouble might be in the fact that
|
\$[..] expressions without the \$\{...\} operators. The only trouble might be in the fact that
|
||||||
the arguments to these functions must be specified with a comma. If you try to call
|
the arguments to these functions must be specified with a comma. If you try to call
|
||||||
the MATH function, for example, and try to say 3 + MATH(7*8), the expression parser will
|
the MATH function, for example, and try to say 3 + MATH(7*8), the expression parser will
|
||||||
evaluate 7*8 for you into 56, and the MATH function will most likely complain that its
|
evaluate 7*8 for you into 56, and the MATH function will most likely complain that its
|
||||||
@@ -312,7 +312,7 @@ are available by simply calling them (read-only). In other words, you don't need
|
|||||||
surround function calls in \$\[...\] expressions with \$\{...\}. Don't jump to conclusions,
|
surround function calls in \$\[...\] expressions with \$\{...\}. Don't jump to conclusions,
|
||||||
though! -- you still need to wrap variable names in curly braces!
|
though! -- you still need to wrap variable names in curly braces!
|
||||||
|
|
||||||
\begin{Enumerate}
|
\begin{enumerate}
|
||||||
\item COS(x) x is in radians. Results vary from -1 to 1.
|
\item COS(x) x is in radians. Results vary from -1 to 1.
|
||||||
\item SIN(x) x is in radians. Results vary from -1 to 1.
|
\item SIN(x) x is in radians. Results vary from -1 to 1.
|
||||||
\item TAN(x) x is in radians.
|
\item TAN(x) x is in radians.
|
||||||
@@ -334,94 +334,94 @@ If this quotient is 1/2, it is rounded to the nearest even number.
|
|||||||
\item LOG(x) returns the natural logarithm of x.
|
\item LOG(x) returns the natural logarithm of x.
|
||||||
\item LOG2(x) returns the base 2 log of x.
|
\item LOG2(x) returns the base 2 log of x.
|
||||||
\item LOG10(x) returns the base 10 log of x.
|
\item LOG10(x) returns the base 10 log of x.
|
||||||
\end{Enumerate}
|
\end{enumerate}
|
||||||
|
|
||||||
subsection{Examples}
|
\subsection{Examples}
|
||||||
|
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
"One Thousand Five Hundred" =~ "(T[^ ]+)"
|
"One Thousand Five Hundred" =~ "(T[^ ]+)"
|
||||||
returns: Thousand
|
returns: Thousand
|
||||||
|
|
||||||
"One Thousand Five Hundred" =~ "T[^ ]+"
|
"One Thousand Five Hundred" =~ "T[^ ]+"
|
||||||
returns: 8
|
returns: 8
|
||||||
|
|
||||||
"One Thousand Five Hundred" : "T[^ ]+"
|
"One Thousand Five Hundred" : "T[^ ]+"
|
||||||
returns: 0
|
returns: 0
|
||||||
|
|
||||||
"8015551212" : "(...)"
|
"8015551212" : "(...)"
|
||||||
returns: 801
|
returns: 801
|
||||||
|
|
||||||
"3075551212":"...(...)"
|
"3075551212":"...(...)"
|
||||||
returns: 555
|
returns: 555
|
||||||
|
|
||||||
! "One Thousand Five Hundred" =~ "T[^ ]+"
|
! "One Thousand Five Hundred" =~ "T[^ ]+"
|
||||||
returns: 0 (because it applies to the string, which is non-null,
|
returns: 0 (because it applies to the string, which is non-null,
|
||||||
which it turns to "0", and then looks for the pattern
|
which it turns to "0", and then looks for the pattern
|
||||||
in the "0", and doesn't find it)
|
in the "0", and doesn't find it)
|
||||||
|
|
||||||
!( "One Thousand Five Hundred" : "T[^ ]+" )
|
!( "One Thousand Five Hundred" : "T[^ ]+" )
|
||||||
returns: 1 (because the string doesn't start with a word starting
|
returns: 1 (because the string doesn't start with a word starting
|
||||||
with T, so the match evals to 0, and the ! operator
|
with T, so the match evals to 0, and the ! operator
|
||||||
inverts it to 1 ).
|
inverts it to 1 ).
|
||||||
|
|
||||||
2 + 8 / 2
|
2 + 8 / 2
|
||||||
returns 6. (because of operator precedence; the division is done first, then the addition).
|
returns 6. (because of operator precedence; the division is done first, then the addition).
|
||||||
|
|
||||||
2+8/2
|
2+8/2
|
||||||
returns 6. Spaces aren't necessary.
|
returns 6. Spaces aren't necessary.
|
||||||
|
|
||||||
(2+8)/2
|
(2+8)/2
|
||||||
returns 5, of course.
|
returns 5, of course.
|
||||||
|
|
||||||
(3+8)/2
|
(3+8)/2
|
||||||
returns 5.5 now.
|
returns 5.5 now.
|
||||||
|
|
||||||
TRUNC((3+8)/2)
|
TRUNC((3+8)/2)
|
||||||
returns 5.
|
returns 5.
|
||||||
|
|
||||||
FLOOR(2.5)
|
FLOOR(2.5)
|
||||||
returns 2
|
returns 2
|
||||||
|
|
||||||
FLOOR(-2.5)
|
FLOOR(-2.5)
|
||||||
returns -3
|
returns -3
|
||||||
|
|
||||||
CEIL(2.5)
|
CEIL(2.5)
|
||||||
returns 3.
|
returns 3.
|
||||||
|
|
||||||
CEIL(-2.5)
|
CEIL(-2.5)
|
||||||
returns -2.
|
returns -2.
|
||||||
|
|
||||||
ROUND(2.5)
|
ROUND(2.5)
|
||||||
returns 3.
|
returns 3.
|
||||||
|
|
||||||
ROUND(3.5)
|
ROUND(3.5)
|
||||||
returns 4.
|
returns 4.
|
||||||
|
|
||||||
ROUND(-2.5)
|
ROUND(-2.5)
|
||||||
returns -3
|
returns -3
|
||||||
|
|
||||||
RINT(2.5)
|
RINT(2.5)
|
||||||
returns 2.
|
returns 2.
|
||||||
|
|
||||||
RINT(3.5)
|
RINT(3.5)
|
||||||
returns 4.
|
returns 4.
|
||||||
|
|
||||||
RINT(-2.5)
|
RINT(-2.5)
|
||||||
returns -2.
|
returns -2.
|
||||||
|
|
||||||
RINT(-3.5)
|
RINT(-3.5)
|
||||||
returns -4.
|
returns -4.
|
||||||
|
|
||||||
TRUNC(2.5)
|
TRUNC(2.5)
|
||||||
returns 2.
|
returns 2.
|
||||||
|
|
||||||
TRUNC(3.5)
|
TRUNC(3.5)
|
||||||
returns 3.
|
returns 3.
|
||||||
|
|
||||||
TRUNC(-3.5)
|
TRUNC(-3.5)
|
||||||
returns -3.
|
returns -3.
|
||||||
|
|
||||||
\begin{verbatim}
|
\end{verbatim}
|
||||||
|
|
||||||
Of course, all of the above examples use constants, but would work the
|
Of course, all of the above examples use constants, but would work the
|
||||||
same if any of the numeric or string constants were replaced with a
|
same if any of the numeric or string constants were replaced with a
|
||||||
@@ -441,7 +441,7 @@ case.
|
|||||||
There is one conditional application - the conditional goto :
|
There is one conditional application - the conditional goto :
|
||||||
|
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
exten => 1,2,gotoif(condition?label1:label2)
|
exten => 1,2,GotoIf(condition?label1:label2)
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|
||||||
If condition is true go to label1, else go to label2. Labels are interpreted
|
If condition is true go to label1, else go to label2. Labels are interpreted
|
||||||
@@ -453,7 +453,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} = 123456]?2|1:3|1)
|
exten => 1,2,GotoIf($[${CALLERID} = 123456]?2|1:3|1)
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|
||||||
Example of use :
|
Example of use :
|
||||||
@@ -494,9 +494,9 @@ marked with the "\^" character.
|
|||||||
\subsection{NULL Strings}
|
\subsection{NULL Strings}
|
||||||
Testing to see if a string is null can be done in one of two different ways:
|
Testing to see if a string is null can be done in one of two different ways:
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
exten => _XX.,1,GotoIf($["${calledid}" != ""]?3)
|
exten => _XX.,1,GotoIf($["${calledid}" != ""]?3)
|
||||||
|
|
||||||
exten => _XX.,1,GotoIf($[foo${calledid} != foo]?3)
|
exten => _XX.,1,GotoIf($[foo${calledid} != foo]?3)
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|
||||||
The second example above is the way suggested by the WIKI. It will
|
The second example above is the way suggested by the WIKI. It will
|
||||||
@@ -574,7 +574,7 @@ of possible concern with "legacy" extension.conf files:
|
|||||||
quotes, it was no reason for concern. It is now!
|
quotes, it was no reason for concern. It is now!
|
||||||
|
|
||||||
\item LE, GE, NE operators removed. The code supported these operators,
|
\item LE, GE, NE operators removed. The code supported these operators,
|
||||||
but they were not documented. The symbolic operators, <=, >=, and !=
|
but they were not documented. The symbolic operators, $<$=, $>$=, and !=
|
||||||
should be used instead.
|
should be used instead.
|
||||||
|
|
||||||
\item Added the unary '-' operator. So you can 3+ -4 and get -1.
|
\item Added the unary '-' operator. So you can 3+ -4 and get -1.
|
||||||
@@ -670,43 +670,45 @@ only read in the dialplan. Writes to such variables are silently
|
|||||||
ignored.
|
ignored.
|
||||||
|
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
${ACCOUNTCODE} * Account code (if specified) (Deprecated; use ${CDR(accountcode)})
|
${CDR(accountcode)} * Account code (if specified)
|
||||||
${BLINDTRANSFER} The name of the channel on the other side of a blind transfer
|
${BLINDTRANSFER} The name of the channel on the other side of a blind transfer
|
||||||
${BRIDGEPEER} Bridged peer
|
${BRIDGEPEER} Bridged peer
|
||||||
${CALLERANI} * Caller ANI (PRI channels) (Deprecated; use ${CALLERID(ani)})
|
${CALLERID(ani)} * Caller ANI (PRI channels)
|
||||||
${CALLERID} * Caller ID (Deprecated; use ${CALLERID(all)})
|
${CALLERID(all)} * Caller ID
|
||||||
${CALLERIDNAME} * Caller ID Name only (Deprecated; use ${CALLERID(name)})
|
${CALLERID(dnid)} * Dialed Number Identifier
|
||||||
${CALLERIDNUM} * Caller ID Number only (Deprecated; use ${CALLERID(num)})
|
${CALLERID(name)} * Caller ID Name only
|
||||||
${CALLINGANI2} * Caller ANI2 (PRI channels)
|
${CALLERID(num)} * Caller ID Number only
|
||||||
${CALLINGPRES} * Caller ID presentation for incoming calls (PRI channels)
|
${CALLERID(rdnis)} * Redirected Dial Number ID Service
|
||||||
${CALLINGTNS} * Transit Network Selector (PRI channels)
|
${CALLINGANI2} * Caller ANI2 (PRI channels)
|
||||||
${CALLINGTON} * Caller Type of Number (PRI channels)
|
${CALLINGPRES} * Caller ID presentation for incoming calls (PRI channels)
|
||||||
${CHANNEL} * Current channel name
|
${CALLINGTNS} * Transit Network Selector (PRI channels)
|
||||||
${CONTEXT} * Current context
|
${CALLINGTON} * Caller Type of Number (PRI channels)
|
||||||
${DATETIME} * Current date time in the format: DDMMYYYY-HH:MM:SS (Deprecated; use ${STRFTIME(${EPOCH},,%d%m%Y-%H:%M:%S)})
|
${CHANNEL} * Current channel name
|
||||||
${DB_RESULT} Result value of DB_EXISTS() dial plan function
|
${CONTEXT} * Current context
|
||||||
${DNID} * Dialed Number Identifier (Deprecated; use ${CALLERID(dnid)})
|
${DATETIME} * Current date time in the format: DDMMYYYY-HH:MM:SS
|
||||||
${EPOCH} * Current unix style epoch
|
(Deprecated; use ${STRFTIME(${EPOCH},,%d%m%Y-%H:%M:%S)})
|
||||||
${EXTEN} * Current extension
|
${DB_RESULT} Result value of DB_EXISTS() dial plan function
|
||||||
${ENV(VAR)} Environmental variable VAR
|
${EPOCH} * Current unix style epoch
|
||||||
${GOTO_ON_BLINDXFR} Transfer to the specified context/extension/priority
|
${EXTEN} * Current extension
|
||||||
after a blind transfer (use ^ characters in place of
|
${ENV(VAR)} Environmental variable VAR
|
||||||
| to separate context/extension/priority when setting
|
${GOTO_ON_BLINDXFR} Transfer to the specified context/extension/priority
|
||||||
this variable from the dialplan)
|
after a blind transfer (use ^ characters in place of
|
||||||
${HANGUPCAUSE} * Asterisk cause of hangup (inbound/outbound)
|
| to separate context/extension/priority when setting
|
||||||
${HINT} * Channel hints for this extension
|
this variable from the dialplan)
|
||||||
${HINTNAME} * Suggested Caller*ID name for this extension
|
${HANGUPCAUSE} * Asterisk cause of hangup (inbound/outbound)
|
||||||
${INVALID_EXTEN} The invalid called extension (used in the "i" extension)
|
${HINT} * Channel hints for this extension
|
||||||
${LANGUAGE} * Current language (Deprecated; use ${LANGUAGE()})
|
${HINTNAME} * Suggested Caller*ID name for this extension
|
||||||
${LEN(VAR)} * String length of VAR (integer)
|
${INVALID_EXTEN} The invalid called extension (used in the "i" extension)
|
||||||
${PRIORITY} * Current priority in the dialplan
|
${LANGUAGE} * Current language (Deprecated; use ${LANGUAGE()})
|
||||||
${PRIREDIRECTREASON} Reason for redirect on PRI, if a call was directed
|
${LEN(VAR)} * String length of VAR (integer)
|
||||||
${RDNIS} * Redirected Dial Number ID Service (Deprecated; use ${CALLERID(rdnis)})
|
${PRIORITY} * Current priority in the dialplan
|
||||||
${TIMESTAMP} * Current date time in the format: YYYYMMDD-HHMMSS (Deprecated; use ${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)})
|
${PRIREDIRECTREASON} Reason for redirect on PRI, if a call was directed
|
||||||
${TRANSFER_CONTEXT} Context for transferred calls
|
${TIMESTAMP} * Current date time in the format: YYYYMMDD-HHMMSS
|
||||||
${FORWARD_CONTEXT} Context for forwarded calls
|
(Deprecated; use ${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)})
|
||||||
${UNIQUEID} * Current call unique identifier
|
${TRANSFER_CONTEXT} Context for transferred calls
|
||||||
${SYSTEMNAME} * value of the systemname option of asterisk.conf
|
${FORWARD_CONTEXT} Context for forwarded calls
|
||||||
|
${UNIQUEID} * Current call unique identifier
|
||||||
|
${SYSTEMNAME} * value of the systemname option of asterisk.conf
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|
||||||
\subsection{Application return values}
|
\subsection{Application return values}
|
||||||
@@ -715,189 +717,189 @@ In Asterisk 1.2, many applications return the result in a variable
|
|||||||
instead of, as in Asterisk 1.0, changing the dial plan priority (+101).
|
instead of, as in Asterisk 1.0, changing the dial plan priority (+101).
|
||||||
For the various status values, see each application's help text.
|
For the various status values, see each application's help text.
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
${AGISTATUS} * agi()
|
${AGISTATUS} * agi()
|
||||||
${AQMSTATUS} * addqueuemember()
|
${AQMSTATUS} * addqueuemember()
|
||||||
${AVAILSTATUS} * chanisavail()
|
${AVAILSTATUS} * chanisavail()
|
||||||
${CHECKGROUPSTATUS} * checkgroup()
|
${CHECKGROUPSTATUS} * checkgroup()
|
||||||
${CHECKMD5STATUS} * checkmd5()
|
${CHECKMD5STATUS} * checkmd5()
|
||||||
${CPLAYBACKSTATUS} * controlplayback()
|
${CPLAYBACKSTATUS} * controlplayback()
|
||||||
${DIALSTATUS} * dial()
|
${DIALSTATUS} * dial()
|
||||||
${DBGETSTATUS} * dbget()
|
${DBGETSTATUS} * dbget()
|
||||||
${ENUMSTATUS} * enumlookup()
|
${ENUMSTATUS} * enumlookup()
|
||||||
${HASVMSTATUS} * hasnewvoicemail()
|
${HASVMSTATUS} * hasnewvoicemail()
|
||||||
${LOOKUPBLSTATUS} * lookupblacklist()
|
${LOOKUPBLSTATUS} * lookupblacklist()
|
||||||
${OSPAUTHSTATUS} * ospauth()
|
${OSPAUTHSTATUS} * ospauth()
|
||||||
${OSPLOOKUPSTATUS} * osplookup()
|
${OSPLOOKUPSTATUS} * osplookup()
|
||||||
${OSPNEXTSTATUS} * ospnext()
|
${OSPNEXTSTATUS} * ospnext()
|
||||||
${OSPFINISHSTATUS} * ospfinish()
|
${OSPFINISHSTATUS} * ospfinish()
|
||||||
${PARKEDAT} * parkandannounce()
|
${PARKEDAT} * parkandannounce()
|
||||||
${PLAYBACKSTATUS} * playback()
|
${PLAYBACKSTATUS} * playback()
|
||||||
${PQMSTATUS} * pausequeuemember()
|
${PQMSTATUS} * pausequeuemember()
|
||||||
${PRIVACYMGRSTATUS} * privacymanager()
|
${PRIVACYMGRSTATUS} * privacymanager()
|
||||||
${QUEUESTATUS} * queue()
|
${QUEUESTATUS} * queue()
|
||||||
${RQMSTATUS} * removequeuemember()
|
${RQMSTATUS} * removequeuemember()
|
||||||
${SENDIMAGESTATUS} * sendimage()
|
${SENDIMAGESTATUS} * sendimage()
|
||||||
${SENDTEXTSTATUS} * sendtext()
|
${SENDTEXTSTATUS} * sendtext()
|
||||||
${SENDURLSTATUS} * sendurl()
|
${SENDURLSTATUS} * sendurl()
|
||||||
${SYSTEMSTATUS} * system()
|
${SYSTEMSTATUS} * system()
|
||||||
${TRANSFERSTATUS} * transfer()
|
${TRANSFERSTATUS} * transfer()
|
||||||
${TXTCIDNAMESTATUS} * txtcidname()
|
${TXTCIDNAMESTATUS} * txtcidname()
|
||||||
${UPQMSTATUS} * unpausequeuemember()
|
${UPQMSTATUS} * unpausequeuemember()
|
||||||
${VMSTATUS} * voicmail()
|
${VMSTATUS} * voicmail()
|
||||||
${VMBOXEXISTSSTATUS} * vmboxexists()
|
${VMBOXEXISTSSTATUS} * vmboxexists()
|
||||||
${WAITSTATUS} * waitforsilence()
|
${WAITSTATUS} * waitforsilence()
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|
||||||
\subsection{Various application variables}
|
\subsection{Various application variables}
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
${CURL} * Resulting page content for curl()
|
${CURL} * Resulting page content for curl()
|
||||||
${ENUM} * Result of application EnumLookup
|
${ENUM} * Result of application EnumLookup
|
||||||
${EXITCONTEXT} Context to exit to in IVR menu (app background())
|
${EXITCONTEXT} Context to exit to in IVR menu (app background())
|
||||||
or in the RetryDial() application
|
or in the RetryDial() application
|
||||||
${MONITOR} * Set to "TRUE" if the channel is/has been monitored (app monitor())
|
${MONITOR} * Set to "TRUE" if the channel is/has been monitored (app monitor())
|
||||||
${MONITOR_EXEC} Application to execute after monitoring a call
|
${MONITOR_EXEC} Application to execute after monitoring a call
|
||||||
${MONITOR_EXEC_ARGS} Arguments to application
|
${MONITOR_EXEC_ARGS} Arguments to application
|
||||||
${MONITOR_FILENAME} File for monitoring (recording) calls in queue
|
${MONITOR_FILENAME} File for monitoring (recording) calls in queue
|
||||||
${QUEUE_PRIO} Queue priority
|
${QUEUE_PRIO} Queue priority
|
||||||
${QUEUE_MAX_PENALTY} Maximum member penalty allowed to answer caller
|
${QUEUE_MAX_PENALTY} Maximum member penalty allowed to answer caller
|
||||||
${QUEUESTATUS} Status of the call, one of:
|
${QUEUESTATUS} Status of the call, one of:
|
||||||
(TIMEOUT | FULL | JOINEMPTY | LEAVEEMPTY | JOINUNAVAIL | LEAVEUNAVAIL)
|
(TIMEOUT | FULL | JOINEMPTY | LEAVEEMPTY | JOINUNAVAIL | LEAVEUNAVAIL)
|
||||||
${RECORDED_FILE} * Recorded file in record()
|
${RECORDED_FILE} * Recorded file in record()
|
||||||
${TALK_DETECTED} * Result from talkdetect()
|
${TALK_DETECTED} * Result from talkdetect()
|
||||||
${TOUCH_MONITOR} The filename base to use with Touch Monitor (auto record)
|
${TOUCH_MONITOR} The filename base to use with Touch Monitor (auto record)
|
||||||
${TOUCH_MONITOR_FORMAT} The audio format to use with Touch Monitor (auto record)
|
${TOUCH_MONITOR_FORMAT} The audio format to use with Touch Monitor (auto record)
|
||||||
${TOUCH_MONITOR_OUTPUT} * Recorded file from Touch Monitor (auto record)
|
${TOUCH_MONITOR_OUTPUT} * Recorded file from Touch Monitor (auto record)
|
||||||
${TXTCIDNAME} * Result of application TXTCIDName
|
${TXTCIDNAME} * Result of application TXTCIDName
|
||||||
${VPB_GETDTMF} chan_vpb
|
${VPB_GETDTMF} chan_vpb
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|
||||||
\subsection{The MeetMe Conference Bridge}
|
\subsection{The MeetMe Conference Bridge}
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
${MEETME_RECORDINGFILE} Name of file for recording a conference with
|
${MEETME_RECORDINGFILE} Name of file for recording a conference with
|
||||||
the "r" option
|
the "r" option
|
||||||
${MEETME_RECORDINGFORMAT} Format of file to be recorded
|
${MEETME_RECORDINGFORMAT} Format of file to be recorded
|
||||||
${MEETME_EXIT_CONTEXT} Context for exit out of meetme meeting
|
${MEETME_EXIT_CONTEXT} Context for exit out of meetme meeting
|
||||||
${MEETME_AGI_BACKGROUND} AGI script for Meetme (zap only)
|
${MEETME_AGI_BACKGROUND} AGI script for Meetme (zap only)
|
||||||
${MEETMESECS} * Number of seconds a user participated in a MeetMe conference
|
${MEETMESECS} * Number of seconds a user participated in a MeetMe conference
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|
||||||
\subsection{The VoiceMail() application}
|
\subsection{The VoiceMail() application}
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
${VM_CATEGORY} Sets voicemail category
|
${VM_CATEGORY} Sets voicemail category
|
||||||
${VM_NAME} * Full name in voicemail
|
${VM_NAME} * Full name in voicemail
|
||||||
${VM_DUR} * Voicemail duration
|
${VM_DUR} * Voicemail duration
|
||||||
${VM_MSGNUM} * Number of voicemail message in mailbox
|
${VM_MSGNUM} * Number of voicemail message in mailbox
|
||||||
${VM_CALLERID} * Voicemail Caller ID (Person leaving vm)
|
${VM_CALLERID} * Voicemail Caller ID (Person leaving vm)
|
||||||
${VM_CIDNAME} * Voicemail Caller ID Name
|
${VM_CIDNAME} * Voicemail Caller ID Name
|
||||||
${VM_CIDNUM} * Voicemail Caller ID Number
|
${VM_CIDNUM} * Voicemail Caller ID Number
|
||||||
${VM_DATE} * Voicemail Date
|
${VM_DATE} * Voicemail Date
|
||||||
${VM_MESSAGEFILE} * Path to message left by caller
|
${VM_MESSAGEFILE} * Path to message left by caller
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|
||||||
\subsection{The VMAuthenticate() application}
|
\subsection{The VMAuthenticate() application}
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
${AUTH_MAILBOX} * Authenticated mailbox
|
${AUTH_MAILBOX} * Authenticated mailbox
|
||||||
${AUTH_CONTEXT} * Authenticated mailbox context
|
${AUTH_CONTEXT} * Authenticated mailbox context
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|
||||||
\subsection{DUNDiLookup()}
|
\subsection{DUNDiLookup()}
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
${DUNDTECH} * The Technology of the result from a call to DUNDiLookup()
|
${DUNDTECH} * The Technology of the result from a call to DUNDiLookup()
|
||||||
${DUNDDEST} * The Destination of the result from a call to DUNDiLookup()
|
${DUNDDEST} * The Destination of the result from a call to DUNDiLookup()
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|
||||||
\subsection{chan\_zap}
|
\subsection{chan\_zap}
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
${ANI2} * The ANI2 Code provided by the network on the incoming call.
|
${ANI2} * The ANI2 Code provided by the network on the incoming call.
|
||||||
(ie, Code 29 identifies call as a Prison/Inmate Call)
|
(ie, Code 29 identifies call as a Prison/Inmate Call)
|
||||||
${CALLTYPE} * Type of call (Speech, Digital, etc)
|
${CALLTYPE} * Type of call (Speech, Digital, etc)
|
||||||
${CALLEDTON} * Type of number for incoming PRI extension
|
${CALLEDTON} * Type of number for incoming PRI extension
|
||||||
i.e. 0=unknown, 1=international, 2=domestic, 3=net_specific,
|
i.e. 0=unknown, 1=international, 2=domestic, 3=net_specific,
|
||||||
4=subscriber, 6=abbreviated, 7=reserved
|
4=subscriber, 6=abbreviated, 7=reserved
|
||||||
${CALLINGSUBADDR} * Called PRI Subaddress
|
${CALLINGSUBADDR} * Called PRI Subaddress
|
||||||
${FAXEXTEN} * The extension called before being redirected to "fax"
|
${FAXEXTEN} * The extension called before being redirected to "fax"
|
||||||
${PRIREDIRECTREASON} * Reason for redirect, if a call was directed
|
${PRIREDIRECTREASON} * Reason for redirect, if a call was directed
|
||||||
${SMDI_VM_TYPE} * When an call is received with an SMDI message, the 'type'
|
${SMDI_VM_TYPE} * When an call is received with an SMDI message, the 'type'
|
||||||
of message 'b' or 'u'
|
of message 'b' or 'u'
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|
||||||
\subsection{chan\_sip}
|
\subsection{chan\_sip}
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
${SIPCALLID} * SIP Call-ID: header verbatim (for logging or CDR matching)
|
${SIPCALLID} * SIP Call-ID: header verbatim (for logging or CDR matching)
|
||||||
${SIPDOMAIN} * SIP destination domain of an inbound call (if appropriate)
|
${SIPDOMAIN} * SIP destination domain of an inbound call (if appropriate)
|
||||||
${SIPUSERAGENT} * SIP user agent (deprecated)
|
${SIPUSERAGENT} * SIP user agent (deprecated)
|
||||||
${SIPURI} * SIP uri
|
${SIPURI} * SIP uri
|
||||||
${SIP_CODEC} Set the SIP codec for a call
|
${SIP_CODEC} Set the SIP codec for a call
|
||||||
${SIP_URI_OPTIONS} * additional options to add to the URI for an outgoing call
|
${SIP_URI_OPTIONS} * additional options to add to the URI for an outgoing call
|
||||||
${RTPAUDIOQOS} RTCP QoS report for the audio of this call
|
${RTPAUDIOQOS} RTCP QoS report for the audio of this call
|
||||||
${RTPVIDEOQOS} RTCP QoS report for the video of this call
|
${RTPVIDEOQOS} RTCP QoS report for the video of this call
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|
||||||
\subsection{chan\_agent}
|
\subsection{chan\_agent}
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
${AGENTMAXLOGINTRIES} Set the maximum number of failed logins
|
${AGENTMAXLOGINTRIES} Set the maximum number of failed logins
|
||||||
${AGENTUPDATECDR} Whether to update the CDR record with Agent channel data
|
${AGENTUPDATECDR} Whether to update the CDR record with Agent channel data
|
||||||
${AGENTGOODBYE} Sound file to use for "Good Bye" when agent logs out
|
${AGENTGOODBYE} Sound file to use for "Good Bye" when agent logs out
|
||||||
${AGENTACKCALL} Whether the agent should acknowledge the incoming call
|
${AGENTACKCALL} Whether the agent should acknowledge the incoming call
|
||||||
${AGENTAUTOLOGOFF} Auto logging off for an agent
|
${AGENTAUTOLOGOFF} Auto logging off for an agent
|
||||||
${AGENTWRAPUPTIME} Setting the time for wrapup between incoming calls
|
${AGENTWRAPUPTIME} Setting the time for wrapup between incoming calls
|
||||||
${AGENTNUMBER} * Agent number (username) set at login
|
${AGENTNUMBER} * Agent number (username) set at login
|
||||||
${AGENTSTATUS} * Status of login ( fail | on | off )
|
${AGENTSTATUS} * Status of login ( fail | on | off )
|
||||||
${AGENTEXTEN} * Extension for logged in agent
|
${AGENTEXTEN} * Extension for logged in agent
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|
||||||
|
|
||||||
\subsection{The Dial() application}
|
\subsection{The Dial() application}
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
${DIALEDPEERNAME} * Dialed peer name
|
${DIALEDPEERNAME} * Dialed peer name
|
||||||
${DIALEDPEERNUMBER} * Dialed peer number
|
${DIALEDPEERNUMBER} * Dialed peer number
|
||||||
${DIALEDTIME} * Time for the call (seconds)
|
${DIALEDTIME} * Time for the call (seconds)
|
||||||
${ANSWEREDTIME} * Time from dial to answer (seconds)
|
${ANSWEREDTIME} * Time from dial to answer (seconds)
|
||||||
${DIALSTATUS} * Status of the call, one of:
|
${DIALSTATUS} * Status of the call, one of:
|
||||||
(CHANUNAVAIL | CONGESTION | BUSY | NOANSWER
|
(CHANUNAVAIL | CONGESTION | BUSY | NOANSWER
|
||||||
| ANSWER | CANCEL | DONTCALL | TORTURE)
|
| ANSWER | CANCEL | DONTCALL | TORTURE)
|
||||||
${DYNAMIC_FEATURES} * The list of features (from the [applicationmap] section of
|
${DYNAMIC_FEATURES} * The list of features (from the [applicationmap] section of
|
||||||
features.conf) to activate during the call, with feature
|
features.conf) to activate during the call, with feature
|
||||||
names separated by '#' characters
|
names separated by '#' characters
|
||||||
${LIMIT_PLAYAUDIO_CALLER} Soundfile for call limits
|
${LIMIT_PLAYAUDIO_CALLER} Soundfile for call limits
|
||||||
${LIMIT_PLAYAUDIO_CALLEE} Soundfile for call limits
|
${LIMIT_PLAYAUDIO_CALLEE} Soundfile for call limits
|
||||||
${LIMIT_WARNING_FILE} Soundfile for call limits
|
${LIMIT_WARNING_FILE} Soundfile for call limits
|
||||||
${LIMIT_TIMEOUT_FILE} Soundfile for call limits
|
${LIMIT_TIMEOUT_FILE} Soundfile for call limits
|
||||||
${LIMIT_CONNECT_FILE} Soundfile for call limits
|
${LIMIT_CONNECT_FILE} Soundfile for call limits
|
||||||
${OUTBOUND_GROUP} Default groups for peer channels (as in SetGroup)
|
${OUTBOUND_GROUP} Default groups for peer channels (as in SetGroup)
|
||||||
* See "show application dial" for more information
|
* See "show application dial" for more information
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|
||||||
\subsection{The chanisavail() application}
|
\subsection{The chanisavail() application}
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
${AVAILCHAN} * the name of the available channel if one was found
|
${AVAILCHAN} * the name of the available channel if one was found
|
||||||
${AVAILORIGCHAN} * the canonical channel name that was used to create the channel
|
${AVAILORIGCHAN} * the canonical channel name that was used to create the channel
|
||||||
${AVAILSTATUS} * Status of requested channel
|
${AVAILSTATUS} * Status of requested channel
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|
||||||
\subsection{Dialplan Macros}
|
\subsection{Dialplan Macros}
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
${MACRO_EXTEN} * The calling extensions
|
${MACRO_EXTEN} * The calling extensions
|
||||||
${MACRO_CONTEXT} * The calling context
|
${MACRO_CONTEXT} * The calling context
|
||||||
${MACRO_PRIORITY} * The calling priority
|
${MACRO_PRIORITY} * The calling priority
|
||||||
${MACRO_OFFSET} Offset to add to priority at return from macro
|
${MACRO_OFFSET} Offset to add to priority at return from macro
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|
||||||
\subsection{The ChanSpy() application}
|
\subsection{The ChanSpy() application}
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
${SPYGROUP} * A ':' (colon) separated list of group names.
|
${SPYGROUP} * A ':' (colon) separated list of group names.
|
||||||
(To be set on spied on channel and matched against the g(grp) option)
|
(To be set on spied on channel and matched against the g(grp) option)
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|
||||||
\subsection{OSP}
|
\subsection{OSP}
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
${OSPINHANDLE} OSP handle of in_bound call
|
${OSPINHANDLE} OSP handle of in_bound call
|
||||||
${OSPINTIMELIMIT} Duration limit for in_bound call
|
${OSPINTIMELIMIT} Duration limit for in_bound call
|
||||||
${OSPOUTHANDLE} OSP handle of out_bound call
|
${OSPOUTHANDLE} OSP handle of out_bound call
|
||||||
${OSPTECH} OSP technology
|
${OSPTECH} OSP technology
|
||||||
${OSPDEST} OSP destination
|
${OSPDEST} OSP destination
|
||||||
${OSPCALLING} OSP calling number
|
${OSPCALLING} OSP calling number
|
||||||
${OSPOUTTOKEN} OSP token to use for out_bound call
|
${OSPOUTTOKEN} OSP token to use for out_bound call
|
||||||
${OSPOUTTIMELIMIT} Duration limit for out_bound call
|
${OSPOUTTIMELIMIT} Duration limit for out_bound call
|
||||||
${OSPRESULTS} Number of remained destinations
|
${OSPRESULTS} Number of remained destinations
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
\subsection{Introduction}
|
\subsection{Introduction}
|
||||||
|
|
||||||
A PBX is only really useful if you can get calls into it. Of course, you
|
A PBX is only really useful if you can get calls into it. Of course, you
|
||||||
can use Asterisk with VoIP calls (SIP, H.323, IAX), but you can also talk
|
can use Asterisk with VoIP calls (SIP, H.323, IAX, etc.), but you can also
|
||||||
to the real PSTN through various cards.
|
talk to the real PSTN through various cards.
|
||||||
|
|
||||||
Supported Hardware is divided into two general groups: Zaptel devices and
|
Supported Hardware is divided into two general groups: Zaptel devices and
|
||||||
non-zaptel devices. The Zaptel compatible hardware supports pseudo-TDM
|
non-zaptel devices. The Zaptel compatible hardware supports pseudo-TDM
|
||||||
@@ -31,7 +31,7 @@ compatible hardware may have different features.
|
|||||||
\item TE210P - The TE210P improves performance and scalability through bus mastering architecture. It supports E1, T1, and J1 environments and is selectable on a per-card or per-port basis.
|
\item TE210P - The TE210P improves performance and scalability through bus mastering architecture. It supports E1, T1, and J1 environments and is selectable on a per-card or per-port basis.
|
||||||
\item TE207P - The TE207P offers an on-board DSP-based echo cancellation module. It supports E1, T1, and J1 environments and is selectable on a per-card or per-port basis.
|
\item TE207P - The TE207P offers an on-board DSP-based echo cancellation module. It supports E1, T1, and J1 environments and is selectable on a per-card or per-port basis.
|
||||||
\item TE205P - The TE205P improves performance and scalability through bus mastering architecture. It supports both E1 and T1/J1 environments and is selectable on a per-card or per-port basis.
|
\item TE205P - The TE205P improves performance and scalability through bus mastering architecture. It supports both E1 and T1/J1 environments and is selectable on a per-card or per-port basis.
|
||||||
\item TE120P - The TE120P is a single span, selectable T1, E1, or J1 card and utilizes Digium's VoiceBus™ technology. It supports both voice and data modes.
|
\item TE120P - The TE120P is a single span, selectable T1, E1, or J1 card and utilizes Digium's VoiceBus\texttrademark technology. It supports both voice and data modes.
|
||||||
\item TE110P - The TE110P brings a high-performance, cost-effective, and flexible single span togglable T1, E1, J1 interface to the Digium line-up of telephony interface devices.
|
\item TE110P - The TE110P brings a high-performance, cost-effective, and flexible single span togglable T1, E1, J1 interface to the Digium line-up of telephony interface devices.
|
||||||
\end{itemize}
|
\end{itemize}
|
||||||
\end{itemize}
|
\end{itemize}
|
||||||
@@ -60,7 +60,7 @@ chan\_misdn. See the mISDN section for more information.
|
|||||||
|
|
||||||
\begin{itemize}
|
\begin{itemize}
|
||||||
\item Digium, Inc. (Primary Developer of Asterisk)
|
\item Digium, Inc. (Primary Developer of Asterisk)
|
||||||
http://www.digium.com
|
http://www.digium.com
|
||||||
\begin{itemize}
|
\begin{itemize}
|
||||||
\item B410P - 4 Port BRI card (TE/NT)
|
\item B410P - 4 Port BRI card (TE/NT)
|
||||||
\end{itemize}
|
\end{itemize}
|
||||||
@@ -68,7 +68,7 @@ chan\_misdn. See the mISDN section for more information.
|
|||||||
|
|
||||||
\begin{itemize}
|
\begin{itemize}
|
||||||
\item beroNet
|
\item beroNet
|
||||||
http://www.beronet.com
|
http://www.beronet.com
|
||||||
\begin{itemize}
|
\begin{itemize}
|
||||||
\item BN4S0 - 4 Port BRI card (TE/NT)
|
\item BN4S0 - 4 Port BRI card (TE/NT)
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ backwards compatible architecture. Look in the source code for instructions.
|
|||||||
\subsubsection{Testing and monitoring}
|
\subsubsection{Testing and monitoring}
|
||||||
|
|
||||||
You can test the effectiveness of PLC and the new jitterbuffer's detection of loss by using
|
You can test the effectiveness of PLC and the new jitterbuffer's detection of loss by using
|
||||||
the new CLI command "iax2 test losspct <n>". This will simulate n percent packet loss
|
the new CLI command "iax2 test losspct $<$n$>$". This will simulate n percent packet loss
|
||||||
coming \_in\_ to chan\_iax2. You should find that with PLC and the new JB, 10 percent packet
|
coming \_in\_ to chan\_iax2. You should find that with PLC and the new JB, 10 percent packet
|
||||||
loss should lead to just a tiny amount of distortion, while without PLC, it would lead to
|
loss should lead to just a tiny amount of distortion, while without PLC, it would lead to
|
||||||
silent gaps in your audio.
|
silent gaps in your audio.
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ subscriptions and call limits)
|
|||||||
\section{Command Syntax}
|
\section{Command Syntax}
|
||||||
|
|
||||||
Management communication consists of tags of the form "header: value",
|
Management communication consists of tags of the form "header: value",
|
||||||
terminated with an empty newline (\\r\\n) in the style of SMTP, HTTP, and
|
terminated with an empty newline (\textbackslash r\textbackslash n) in the style of SMTP, HTTP, and
|
||||||
other headers.
|
other headers.
|
||||||
|
|
||||||
The first tag MUST be one of the following:
|
The first tag MUST be one of the following:
|
||||||
@@ -106,143 +106,143 @@ http://www.asterisk.org web site for more information.
|
|||||||
|
|
||||||
\section{Some standard AMI headers}
|
\section{Some standard AMI headers}
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
Account: -- Account Code (Status)
|
Account: -- Account Code (Status)
|
||||||
AccountCode: -- Account Code (cdr_manager)
|
AccountCode: -- Account Code (cdr_manager)
|
||||||
ACL: <Y | N> -- Does ACL exist for object ?
|
ACL: <Y | N> -- Does ACL exist for object ?
|
||||||
Action: <action> -- request or notification of a particular action
|
Action: <action> -- Request or notification of a particular action
|
||||||
Address-IP: -- IPaddress
|
Address-IP: -- IPaddress
|
||||||
Address-Port: -- IP port number
|
Address-Port: -- IP port number
|
||||||
Agent: <string> -- Agent name
|
Agent: <string> -- Agent name
|
||||||
AMAflags: -- AMA flag (cdr_manager, sippeers)
|
AMAflags: -- AMA flag (cdr_manager, sippeers)
|
||||||
AnswerTime: -- Time of answer (cdr_manager)
|
AnswerTime: -- Time of answer (cdr_manager)
|
||||||
Append: <bool> -- CDR userfield Append flag
|
Append: <bool> -- CDR userfield Append flag
|
||||||
Application: -- Application to use
|
Application: -- Application to use
|
||||||
Async: -- Whether or not to use fast setup
|
Async: -- Whether or not to use fast setup
|
||||||
AuthType: -- Authentication type (for login or challenge)
|
AuthType: -- Authentication type (for login or challenge)
|
||||||
"md5"
|
"md5"
|
||||||
BillableSeconds: -- Billable seconds for call (cdr_manager)
|
BillableSeconds: -- Billable seconds for call (cdr_manager)
|
||||||
CallerID: -- Caller id (name and number in Originate & cdr_manager)
|
CallerID: -- Caller id (name and number in Originate & cdr_manager)
|
||||||
CallerID: -- CallerID number
|
CallerID: -- CallerID number
|
||||||
Number or "<unknown>" or "unknown"
|
Number or "<unknown>" or "unknown"
|
||||||
(should change to "<unknown>" in app_queue)
|
(should change to "<unknown>" in app_queue)
|
||||||
CallerID1: -- Channel 1 CallerID (Link event)
|
CallerID1: -- Channel 1 CallerID (Link event)
|
||||||
CallerID2: -- Channel 2 CallerID (Link event)
|
CallerID2: -- Channel 2 CallerID (Link event)
|
||||||
CallerIDName: -- CallerID name
|
CallerIDName: -- CallerID name
|
||||||
Name or "<unknown>" or "unknown"
|
Name or "<unknown>" or "unknown"
|
||||||
(should change to "<unknown>" in app_queue)
|
(should change to "<unknown>" in app_queue)
|
||||||
Callgroup: -- Call group for peer/user
|
Callgroup: -- Call group for peer/user
|
||||||
CallsTaken: <num> -- Queue status variable
|
CallsTaken: <num> -- Queue status variable
|
||||||
Cause: <value> -- Event change cause - "Expired"
|
Cause: <value> -- Event change cause - "Expired"
|
||||||
Cause: <value> -- Hangupcause (channel.c)
|
Cause: <value> -- Hangupcause (channel.c)
|
||||||
CID-CallingPres: -- Caller ID calling presentation
|
CID-CallingPres: -- Caller ID calling presentation
|
||||||
Channel: <channel> -- Channel specifier
|
Channel: <channel> -- Channel specifier
|
||||||
Channel: <dialstring> -- Dialstring in Originate
|
Channel: <dialstring> -- Dialstring in Originate
|
||||||
Channel: <tech/[peer/username]> -- Channel in Registry events (SIP, IAX2)
|
Channel: <tech/[peer/username]> -- Channel in Registry events (SIP, IAX2)
|
||||||
Channel: <tech> -- Technology (SIP/IAX2 etc) in Registry events
|
Channel: <tech> -- Technology (SIP/IAX2 etc) in Registry events
|
||||||
ChannelType: -- Tech: SIP, IAX2, ZAP, MGCP etc
|
ChannelType: -- Tech: SIP, IAX2, ZAP, MGCP etc
|
||||||
Channel1: -- Link channel 1
|
Channel1: -- Link channel 1
|
||||||
Channel2: -- Link channel 2
|
Channel2: -- Link channel 2
|
||||||
ChanObjectType: -- "peer", "user"
|
ChanObjectType: -- "peer", "user"
|
||||||
Codecs: -- Codec list
|
Codecs: -- Codec list
|
||||||
CodecOrder: -- Codec order, separated with comma ","
|
CodecOrder: -- Codec order, separated with comma ","
|
||||||
Command: -- Cli command to run
|
Command: -- Cli command to run
|
||||||
Context: -- Context
|
Context: -- Context
|
||||||
Count: <num> -- Number of callers in queue
|
Count: <num> -- Number of callers in queue
|
||||||
Data: -- Application data
|
Data: -- Application data
|
||||||
Default-addr-IP: -- IP address to use before registration
|
Default-addr-IP: -- IP address to use before registration
|
||||||
Default-Username: -- Username part of URI to use before registration
|
Default-Username: -- Username part of URI to use before registration
|
||||||
Destination: -- Destination for call (Dialstring ) (dial, cdr_manager)
|
Destination: -- Destination for call (Dialstring ) (dial, cdr_manager)
|
||||||
DestinationContext: -- Destination context (cdr_manager)
|
DestinationContext: -- Destination context (cdr_manager)
|
||||||
DestinationChannel: -- Destination channel (cdr_manager)
|
DestinationChannel: -- Destination channel (cdr_manager)
|
||||||
DestUniqueID: -- UniqueID of destination (dial event)
|
DestUniqueID: -- UniqueID of destination (dial event)
|
||||||
Disposition: -- Call disposition (CDR manager)
|
Disposition: -- Call disposition (CDR manager)
|
||||||
Domain: <domain> -- DNS domain
|
Domain: <domain> -- DNS domain
|
||||||
Duration: <secs> -- Duration of call (cdr_manager)
|
Duration: <secs> -- Duration of call (cdr_manager)
|
||||||
Dynamic: <Y | N> -- Device registration supported?
|
Dynamic: <Y | N> -- Device registration supported?
|
||||||
Endtime: -- End time stamp of call (cdr_manager)
|
Endtime: -- End time stamp of call (cdr_manager)
|
||||||
EventList: <flag> -- Flag being "Start", "End", "Cancelled" or "ListObject"
|
EventList: <flag> -- Flag being "Start", "End", "Cancelled" or "ListObject"
|
||||||
Events: <eventmask> -- Eventmask filter ("on", "off", "system", "call", "log")
|
Events: <eventmask> -- Eventmask filter ("on", "off", "system", "call", "log")
|
||||||
Exten: -- Extension (Redirect command)
|
Exten: -- Extension (Redirect command)
|
||||||
Extension: -- Extension (Status)
|
Extension: -- Extension (Status)
|
||||||
Family: <string> -- ASTdb key family
|
Family: <string> -- ASTdb key family
|
||||||
File: <filename> -- Filename (monitor)
|
File: <filename> -- Filename (monitor)
|
||||||
Format: <format> -- Format of sound file (monitor)
|
Format: <format> -- Format of sound file (monitor)
|
||||||
From: <time> -- Parking time (ParkedCall event)
|
From: <time> -- Parking time (ParkedCall event)
|
||||||
Hint: -- Extension hint
|
Hint: -- Extension hint
|
||||||
Incominglimit: -- SIP Peer incoming limit
|
Incominglimit: -- SIP Peer incoming limit
|
||||||
Key:
|
Key:
|
||||||
Key: -- ASTdb Database key
|
Key: -- ASTdb Database key
|
||||||
LastApplication: -- Last application executed (cdr_manager)
|
LastApplication: -- Last application executed (cdr_manager)
|
||||||
LastCall: <num> -- Last call in queue
|
LastCall: <num> -- Last call in queue
|
||||||
LastData: -- Data for last application (cdr_manager)
|
LastData: -- Data for last application (cdr_manager)
|
||||||
Link: -- (Status)
|
Link: -- (Status)
|
||||||
ListItems: <number> -- Number of items in Eventlist (Optionally sent in "end" packet)
|
ListItems: <number> -- Number of items in Eventlist (Optionally sent in "end" packet)
|
||||||
Location: -- Interface (whatever that is -maybe tech/name in app_queue )
|
Location: -- Interface (whatever that is -maybe tech/name in app_queue )
|
||||||
Loginchan: -- Login channel for agent
|
Loginchan: -- Login channel for agent
|
||||||
Logintime: <number> -- Login time for agent
|
Logintime: <number> -- Login time for agent
|
||||||
Mailbox: -- VM Mailbox (id@vmcontext) (mailboxstatus, mailboxcount)
|
Mailbox: -- VM Mailbox (id@vmcontext) (mailboxstatus, mailboxcount)
|
||||||
MD5SecretExist: <Y | N> -- Whether secret exists in MD5 format
|
MD5SecretExist: <Y | N> -- Whether secret exists in MD5 format
|
||||||
Membership: <string> -- "Dynamic" or "static" member in queue
|
Membership: <string> -- "Dynamic" or "static" member in queue
|
||||||
Message: <text> -- Text message in ACKs, errors (explanation)
|
Message: <text> -- Text message in ACKs, errors (explanation)
|
||||||
Mix: <bool> -- Boolean parameter (monitor)
|
Mix: <bool> -- Boolean parameter (monitor)
|
||||||
NewMessages: <count> -- Count of new Mailbox messages (mailboxcount)
|
NewMessages: <count> -- Count of new Mailbox messages (mailboxcount)
|
||||||
Newname:
|
Newname:
|
||||||
ObjectName: -- Name of object in list
|
ObjectName: -- Name of object in list
|
||||||
OldName: -- Something in Rename (channel.c)
|
OldName: -- Something in Rename (channel.c)
|
||||||
OldMessages: <count> -- Count of old mailbox messages (mailboxcount)
|
OldMessages: <count> -- Count of old mailbox messages (mailboxcount)
|
||||||
Outgoinglimit: -- SIP Peer outgoing limit
|
Outgoinglimit: -- SIP Peer outgoing limit
|
||||||
Paused: <num> -- Queue member paused status
|
Paused: <num> -- Queue member paused status
|
||||||
Peer: <tech/name> -- "channel" specifier :-)
|
Peer: <tech/name> -- "channel" specifier :-)
|
||||||
PeerStatus: <tech/name> -- Peer status code
|
PeerStatus: <tech/name> -- Peer status code
|
||||||
"Unregistered", "Registered", "Lagged", "Reachable"
|
"Unregistered", "Registered", "Lagged", "Reachable"
|
||||||
Penalty: <num> -- Queue penalty
|
Penalty: <num> -- Queue penalty
|
||||||
Priority: -- Extension priority
|
Priority: -- Extension priority
|
||||||
Privilege: <privilege> -- AMI authorization class (system, call, log, verbose, command, agent, user)
|
Privilege: <privilege> -- AMI authorization class (system, call, log, verbose, command, agent, user)
|
||||||
Pickupgroup: -- Pickup group for peer
|
Pickupgroup: -- Pickup group for peer
|
||||||
Position: <num> -- Position in Queue
|
Position: <num> -- Position in Queue
|
||||||
Queue: -- Queue name
|
Queue: -- Queue name
|
||||||
Reason: -- "Autologoff"
|
Reason: -- "Autologoff"
|
||||||
Reason: -- "Chanunavail"
|
Reason: -- "Chanunavail"
|
||||||
Response: <response> -- response code, like "200 OK"
|
Response: <response> -- response code, like "200 OK"
|
||||||
"Success", "Error", "Follows"
|
"Success", "Error", "Follows"
|
||||||
Restart: -- "True", "False"
|
Restart: -- "True", "False"
|
||||||
RegExpire: -- SIP registry expire
|
RegExpire: -- SIP registry expire
|
||||||
RegExpiry: -- SIP registry expiry
|
RegExpiry: -- SIP registry expiry
|
||||||
Reason: -- Originate reason code
|
Reason: -- Originate reason code
|
||||||
Seconds: -- Seconds (Status)
|
Seconds: -- Seconds (Status)
|
||||||
Secret: <password> -- Authentication secret (for login)
|
Secret: <password> -- Authentication secret (for login)
|
||||||
SecretExist: <Y | N> -- Whether secret exists
|
SecretExist: <Y | N> -- Whether secret exists
|
||||||
Shutdown: -- "Uncleanly", "Cleanly"
|
Shutdown: -- "Uncleanly", "Cleanly"
|
||||||
SIP-AuthInsecure:
|
SIP-AuthInsecure:
|
||||||
SIP-FromDomain: -- Peer FromDomain
|
SIP-FromDomain: -- Peer FromDomain
|
||||||
SIP-FromUser: -- Peer FromUser
|
SIP-FromUser: -- Peer FromUser
|
||||||
SIP-NatSupport:
|
SIP-NatSupport:
|
||||||
SIPLastMsg:
|
SIPLastMsg:
|
||||||
Source: -- Source of call (dial event, cdr_manager)
|
Source: -- Source of call (dial event, cdr_manager)
|
||||||
SrcUniqueID: -- UniqueID of source (dial event)
|
SrcUniqueID: -- UniqueID of source (dial event)
|
||||||
StartTime: -- Start time of call (cdr_manager)
|
StartTime: -- Start time of call (cdr_manager)
|
||||||
State: -- Channel state
|
State: -- Channel state
|
||||||
Status: -- Registration status (Registry events SIP)
|
Status: -- Registration status (Registry events SIP)
|
||||||
Status: -- Extension status (Extensionstate)
|
Status: -- Extension status (Extensionstate)
|
||||||
Status: -- Peer status (if monitored) ** Will change name **
|
Status: -- Peer status (if monitored) ** Will change name **
|
||||||
"unknown", "lagged", "ok"
|
"unknown", "lagged", "ok"
|
||||||
Status: <num> -- Queue Status
|
Status: <num> -- Queue Status
|
||||||
Status: -- DND status (DNDState)
|
Status: -- DND status (DNDState)
|
||||||
Time: <sec> -- Roundtrip time (latency)
|
Time: <sec> -- Roundtrip time (latency)
|
||||||
Timeout: -- Parking timeout time
|
Timeout: -- Parking timeout time
|
||||||
Timeout: -- Timeout for call setup (Originate)
|
Timeout: -- Timeout for call setup (Originate)
|
||||||
Timeout: <seconds> -- Timeout for call
|
Timeout: <seconds> -- Timeout for call
|
||||||
Uniqueid: -- Channel Unique ID
|
Uniqueid: -- Channel Unique ID
|
||||||
Uniqueid1: -- Channel 1 Unique ID (Link event)
|
Uniqueid1: -- Channel 1 Unique ID (Link event)
|
||||||
Uniqueid2: -- Channel 2 Unique ID (Link event)
|
Uniqueid2: -- Channel 2 Unique ID (Link event)
|
||||||
User: -- Username (SIP registry)
|
User: -- Username (SIP registry)
|
||||||
UserField: -- CDR userfield (cdr_manager)
|
UserField: -- CDR userfield (cdr_manager)
|
||||||
Val: -- Value to set/read in ASTdb
|
Val: -- Value to set/read in ASTdb
|
||||||
Variable: -- Variable AND value to set (multiple separated with | in Originate)
|
Variable: -- Variable AND value to set (multiple separated with | in Originate)
|
||||||
Variable: <name> -- For channel variables
|
Variable: <name> -- For channel variables
|
||||||
Value: <value> -- Value to set
|
Value: <value> -- Value to set
|
||||||
VoiceMailbox: -- VM Mailbox in SIPpeers
|
VoiceMailbox: -- VM Mailbox in SIPpeers
|
||||||
Waiting: -- Count of mailbox messages (mailboxstatus)
|
Waiting: -- Count of mailbox messages (mailboxstatus)
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|
||||||
** Please try to re-use existing headers to simplify manager message parsing in clients.
|
** Please try to re-use existing headers to simplify manager message parsing in clients.
|
||||||
|
|||||||
@@ -129,15 +129,15 @@ The Optionsstring looks Like:
|
|||||||
the ":" character is the delimiter.
|
the ":" character is the delimiter.
|
||||||
|
|
||||||
The available Optchars are:
|
The available Optchars are:
|
||||||
d - Send display text on called phone, text is the optparam
|
d - Send display text on called phone, text is the optparam
|
||||||
n - don't detect dtmf tones on called channel
|
n - don't detect dtmf tones on called channel
|
||||||
h - make digital outgoing call
|
h - make digital outgoing call
|
||||||
c - make crypted outgoing call, param is keyindex
|
c - make crypted outgoing call, param is keyindex
|
||||||
e - perform echo cancellation on this channel,
|
e - perform echo cancellation on this channel,
|
||||||
takes taps as arguments (32,64,128,256)
|
takes taps as arguments (32,64,128,256)
|
||||||
s - send Non Inband DTMF as inband
|
s - send Non Inband DTMF as inband
|
||||||
vr - rxgain control
|
vr - rxgain control
|
||||||
vt - txgain control
|
vt - txgain control
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|
||||||
chan\_misdn registers a new dial plan application "misdn\_set\_opt" when
|
chan\_misdn registers a new dial plan application "misdn\_set\_opt" when
|
||||||
@@ -182,24 +182,24 @@ Now you should see the misdn cli commands:
|
|||||||
|
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
- clean
|
- clean
|
||||||
-> pid (cleans a broken call, use with care, leads often
|
-> pid (cleans a broken call, use with care, leads often
|
||||||
to a segmentation fault)
|
to a segmentation fault)
|
||||||
- send
|
- send
|
||||||
-> display (sends a Text Message to a Asterisk channel,
|
-> display (sends a Text Message to a Asterisk channel,
|
||||||
this channel must be an misdn channel)
|
this channel must be an misdn channel)
|
||||||
- set
|
- set
|
||||||
-> debug (sets debug level)
|
-> debug (sets debug level)
|
||||||
- show
|
- show
|
||||||
-> config (shows the configuration options)
|
-> config (shows the configuration options)
|
||||||
-> channels (shows the current active misdn channels)
|
-> channels (shows the current active misdn channels)
|
||||||
-> channel (shows details about the given misdn channels)
|
-> channel (shows details about the given misdn channels)
|
||||||
-> stacks (shows the current ports, their protocols and states)
|
-> stacks (shows the current ports, their protocols and states)
|
||||||
-> fullstacks (shows the current active and inactive misdn channels)
|
-> fullstacks (shows the current active and inactive misdn channels)
|
||||||
|
|
||||||
- restart
|
- restart
|
||||||
-> port (restarts given port (L2 Restart) )
|
-> port (restarts given port (L2 Restart) )
|
||||||
|
|
||||||
- reload (reloads misdn.conf)
|
- reload (reloads misdn.conf)
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|
||||||
You can only use "misdn send display" when an Asterisk channel is created and
|
You can only use "misdn send display" when an Asterisk channel is created and
|
||||||
@@ -218,8 +218,8 @@ msn (callerid) of the Phone to send the text to.
|
|||||||
mISDN Exports/Imports a few Variables:
|
mISDN Exports/Imports a few Variables:
|
||||||
|
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
- MISDN_ADDRESS_COMPLETE : Is either set to 1 from the Provider, or you
|
- MISDN_ADDRESS_COMPLETE : Is either set to 1 from the Provider, or you
|
||||||
can set it to 1 to force a sending complete.
|
can set it to 1 to force a sending complete.
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|
||||||
|
|
||||||
@@ -258,9 +258,7 @@ as Display Message to the Phone.
|
|||||||
|
|
||||||
\subsection{Known Problems}
|
\subsection{Known Problems}
|
||||||
|
|
||||||
\begin{verbatim}
|
Q: I cannot hear any tone after a successful CONNECT to the other end
|
||||||
* I cannot hear any tone after a successful CONNECT to the other end
|
|
||||||
|
|
||||||
-> you forgot to load mISDNdsp, which is now needed by chan\_misdn for switching
|
A: You forgot to load mISDNdsp, which is now needed by chan\_misdn for switching
|
||||||
and dtmf tone detection
|
and dtmf tone detection
|
||||||
\end{verbatim}
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
|
||||||
|
|
||||||
ODBC Storage allows you to store voicemail messages within a database
|
ODBC Storage allows you to store voicemail messages within a database
|
||||||
instead of using a file. This is *not* a full realtime engine and
|
instead of using a file. This is *not* a full realtime engine and
|
||||||
*only* supports ODBC. The table description for the "voicemessages"
|
*only* supports ODBC. The table description for the "voicemessages"
|
||||||
|
|||||||
@@ -268,25 +268,27 @@ option):
|
|||||||
|
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
[home-introduction]
|
[home-introduction]
|
||||||
exten => s,1,Background,intro-options ;; Script: To hear your Introduction, dial 1.
|
exten => s,1,Background,intro-options ;; Script:
|
||||||
;; to record a new introduction, dial 2.
|
;; To hear your Introduction, dial 1.
|
||||||
;; to return to the main menu, dial 3.
|
;; to record a new introduction, dial 2.
|
||||||
;; to hear what this is all about, dial 4.
|
;; to return to the main menu, dial 3.
|
||||||
|
;; to hear what this is all about, dial 4.
|
||||||
exten => 1,1,Playback,priv-callerintros/${CALLERIDNUM}
|
exten => 1,1,Playback,priv-callerintros/${CALLERIDNUM}
|
||||||
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 ;; Script:
|
exten => 4,1,Playback,intro-intro
|
||||||
;; This may seem a little strange, but it really is a neat
|
;; Script:
|
||||||
;; thing, both for you and for us. I've taped a short introduction
|
;; This may seem a little strange, but it really is a neat
|
||||||
;; for many of the folks who normally call us. Using the Caller ID
|
;; thing, both for you and for us. I've taped a short introduction
|
||||||
;; from each incoming call, the system plays the introduction
|
;; for many of the folks who normally call us. Using the Caller ID
|
||||||
;; for that phone number over a speaker, just as the call comes in.
|
;; from each incoming call, the system plays the introduction
|
||||||
;; This helps the folks
|
;; for that phone number over a speaker, just as the call comes in.
|
||||||
;; here in the house more quickly determine who is calling.
|
;; This helps the folks
|
||||||
;; and gets the right ones to gravitate to the phone.
|
;; here in the house more quickly determine who is calling.
|
||||||
;; You can listen to, and record a new intro for your phone number
|
;; and gets the right ones to gravitate to the phone.
|
||||||
;; using this menu.
|
;; You can listen to, and record a new intro for your phone number
|
||||||
|
;; 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
|
||||||
@@ -295,37 +297,37 @@ 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
|
||||||
;; please, don't say anything about why you are calling.
|
;; please, don't say anything about why you are calling.
|
||||||
;; After we are done making the recording, your introduction
|
;; After we are done making the recording, your introduction
|
||||||
;; will be saved for playback.
|
;; will be saved for playback.
|
||||||
;; If you are the only person that would call from this number,
|
;; If you are the only person that would call from this number,
|
||||||
;; please state your name. Otherwise, state your business
|
;; please state your name. Otherwise, state your business
|
||||||
;; or residence name instead. For instance, if you are
|
;; or residence name instead. For instance, if you are
|
||||||
;; friend of the family, say, Olie McPherson, and both
|
;; friend of the family, say, Olie McPherson, and both
|
||||||
;; you and your kids might call here a lot, you might
|
;; you and your kids might call here a lot, you might
|
||||||
;; say: "This is the distinguished Olie McPherson Residence!"
|
;; say: "This is the distinguished Olie McPherson Residence!"
|
||||||
;; If you are the only person calling, you might say this:
|
;; If you are the only person calling, you might say this:
|
||||||
;; "This is the illustrious Kermit McFrog! Pick up the Phone, someone!!"
|
;; "This is the illustrious Kermit McFrog! Pick up the Phone, someone!!"
|
||||||
;; If you are calling from a business, you might pronounce a more sedate introduction,like,
|
;; If you are calling from a business, you might pronounce a more sedate introduction,like,
|
||||||
;; "Fritz from McDonalds calling.", or perhaps the more original introduction:
|
;; "Fritz from McDonalds calling.", or perhaps the more original introduction:
|
||||||
;; "John, from the Park County Morgue. You stab 'em, we slab 'em!".
|
;; "John, from the Park County Morgue. You stab 'em, we slab 'em!".
|
||||||
;; Just one caution: the kids will hear what you record every time
|
;; Just one caution: the kids will hear what you record every time
|
||||||
;; you call. So watch your language!
|
;; you call. So watch your language!
|
||||||
;; I will begin recording after the tone.
|
;; I will begin recording after the tone.
|
||||||
;; When you are done, hit the # key. Gather your thoughts and get
|
;; When you are done, hit the # key. Gather your thoughts and get
|
||||||
;; 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/${CALLERIDNUM}:gsm|4
|
exten => 2,3,Record,priv-callerintros/${CALLERIDNUM}:gsm|4
|
||||||
exten => 2,4,Background,priv-callerintros/${CALLERIDNUM}
|
exten => 2,4,Background,priv-callerintros/${CALLERIDNUM}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ congested with other traffic.
|
|||||||
|
|
||||||
Also asterisk running on Linux can set 802.1p CoS marks in VLAN packets
|
Also asterisk running on Linux can set 802.1p CoS marks in VLAN packets
|
||||||
for all used VoIP protocols. It is useful when you are working in switched
|
for all used VoIP protocols. It is useful when you are working in switched
|
||||||
enviropment. For maping skb->priority and VLAN CoS mark you need to use
|
enviropment. For maping skb-$>$priority and VLAN CoS mark you need to use
|
||||||
command "vconfig set\_egress\_map [vlan-device] [skb-priority] [vlan-qos]".
|
command "vconfig set\_egress\_map [vlan-device] [skb-priority] [vlan-qos]".
|
||||||
|
|
||||||
\subsubsection{SIP}
|
\subsubsection{SIP}
|
||||||
@@ -64,30 +64,30 @@ integer values from 0 to 7.
|
|||||||
|
|
||||||
|
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
===========================================
|
+==============+============+==============+
|
||||||
Configuration Parameter Recommended
|
|Configuration | Parameter | Recommended |
|
||||||
File Setting
|
|File | Setting | |
|
||||||
-------------------------------------------
|
+--------------+------------+--------------+
|
||||||
sip.conf tos\_sip cs3
|
| | tos_sip | cs3 |
|
||||||
sip.conf tos\_audio ef
|
| | tos_audio | ef |
|
||||||
sip.conf tos\_video af41
|
| | tos_video | af41 |
|
||||||
sip.conf tos\_text af41
|
| sip.conf | tos_text | af41 |
|
||||||
sip.conf cos\_sip 4
|
| | cos_sip | 4 |
|
||||||
sip.conf cos\_audio 6
|
| | cos_audio | 6 |
|
||||||
sip.conf cos\_video 5
|
| | cos_video | 5 |
|
||||||
sip.conf cos\_text 0
|
| | cos_text | 0 |
|
||||||
-------------------------------------------
|
+--------------+------------+--------------+
|
||||||
iax.conf tos ef
|
| iax.conf | tos | ef |
|
||||||
iax.conf cos 6
|
| | cos | 6 |
|
||||||
-------------------------------------------
|
+--------------+------------+--------------+
|
||||||
iaxprov.conf tos ef
|
| iaxprov.conf | tos | ef |
|
||||||
-------------------------------------------
|
+--------------+------------+--------------+
|
||||||
mgcp.conf tos ef
|
| mgcp.conf | tos | ef |
|
||||||
mgcp.conf cos 6
|
| | cos | 6 |
|
||||||
-------------------------------------------
|
+--------------+------------+--------------+
|
||||||
h323.conf tos ef
|
| h323.conf | tos | ef |
|
||||||
h323.conf cos 6
|
| | cos | 6 |
|
||||||
===========================================
|
+==============+============+==============+
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|
||||||
\subsubsection{Reference}
|
\subsubsection{Reference}
|
||||||
@@ -109,11 +109,10 @@ Asterisk, you will need to ensure that your network handles packets
|
|||||||
with a TOS properly. For Cisco devices, see the previously mentioned
|
with a TOS properly. For Cisco devices, see the previously mentioned
|
||||||
"Enterprise QoS Solution Reference Network Design Guide". For Linux
|
"Enterprise QoS Solution Reference Network Design Guide". For Linux
|
||||||
systems see the "Linux Advanced Routing \& Traffic Control HOWTO" at
|
systems see the "Linux Advanced Routing \& Traffic Control HOWTO" at
|
||||||
<http://www.lartc.org/>.
|
http://www.lartc.org/.
|
||||||
|
|
||||||
For more information on Quality of
|
For more information on Quality of
|
||||||
Service for VoIP networks see the "Enterprise QoS Solution Reference
|
Service for VoIP networks see the "Enterprise QoS Solution Reference
|
||||||
Network Design Guide" version 3.3 from Cisco at:
|
Network Design Guide" version 3.3 from Cisco at:
|
||||||
|
http://www.cisco.com/application/pdf/en/us/guest/netsol/ns432/c649/ccmigration\_09186a008049b062.pdf
|
||||||
<http://www.cisco.com/application/pdf/en/us/guest/netsol/ns432/c649/ccmigration\_09186a008049b062.pdf>
|
|
||||||
|
|
||||||
|
|||||||
@@ -6,59 +6,71 @@ queue log, located (by default) in /var/log/asterisk/queue\_log.
|
|||||||
|
|
||||||
These are the events (and associated information) in the queue log:
|
These are the events (and associated information) in the queue log:
|
||||||
|
|
||||||
ABANDON(position|origposition|waittime)
|
\textbf{ABANDON(position|origposition|waittime)}
|
||||||
|
|
||||||
The caller abandoned their position in the queue. The position is the
|
The caller abandoned their position in the queue. The position is the
|
||||||
caller's position in the queue when they hungup, the origposition is
|
caller's position in the queue when they hungup, the origposition is
|
||||||
the original position the caller was when they first entered the
|
the original position the caller was when they first entered the
|
||||||
queue, and the waittime is how long the call had been waiting in the
|
queue, and the waittime is how long the call had been waiting in the
|
||||||
queue at the time of disconnect.
|
queue at the time of disconnect.
|
||||||
|
|
||||||
AGENTDUMP
|
\textbf{AGENTDUMP}
|
||||||
|
|
||||||
The agent dumped the caller while listening to the queue announcement.
|
The agent dumped the caller while listening to the queue announcement.
|
||||||
|
|
||||||
AGENTLOGIN(channel)
|
\textbf{AGENTLOGIN(channel)}
|
||||||
|
|
||||||
The agent logged in. The channel is recorded.
|
The agent logged in. The channel is recorded.
|
||||||
|
|
||||||
AGENTCALLBACKLOGIN(exten@context)
|
\textbf{AGENTCALLBACKLOGIN(exten@context)}
|
||||||
|
|
||||||
The callback agent logged in. The login extension and context is recorded.
|
The callback agent logged in. The login extension and context is recorded.
|
||||||
|
|
||||||
AGENTLOGOFF(channel|logintime)
|
\textbf{AGENTLOGOFF(channel|logintime)}
|
||||||
|
|
||||||
The agent logged off. The channel is recorded, along with the total time
|
The agent logged off. The channel is recorded, along with the total time
|
||||||
the agent was logged in.
|
the agent was logged in.
|
||||||
|
|
||||||
AGENTCALLBACKLOGOFF(exten@context|logintime|reason)
|
\textbf{AGENTCALLBACKLOGOFF(exten@context|logintime|reason)}
|
||||||
|
|
||||||
The callback agent logged off. The last login extension and context is
|
The callback agent logged off. The last login extension and context is
|
||||||
recorded, along with the total time the agent was logged in, and the
|
recorded, along with the total time the agent was logged in, and the
|
||||||
reason for the logoff if it was not a normal logoff
|
reason for the logoff if it was not a normal logoff
|
||||||
(e.g., Autologoff, Chanunavail)
|
(e.g., Autologoff, Chanunavail)
|
||||||
|
|
||||||
COMPLETEAGENT(holdtime|calltime|origposition)
|
\textbf{COMPLETEAGENT(holdtime|calltime|origposition)}
|
||||||
|
|
||||||
The caller was connected to an agent, and the call was terminated normally
|
The caller was connected to an agent, and the call was terminated normally
|
||||||
by the *agent*. The caller's hold time and the length of the call are both
|
by the *agent*. The caller's hold time and the length of the call are both
|
||||||
recorded. The caller's original position in the queue is recorded in
|
recorded. The caller's original position in the queue is recorded in
|
||||||
origposition.
|
origposition.
|
||||||
|
|
||||||
COMPLETECALLER(holdtime|calltime|origposition)
|
\textbf{COMPLETECALLER(holdtime|calltime|origposition)}
|
||||||
|
|
||||||
The caller was connected to an agent, and the call was terminated normally
|
The caller was connected to an agent, and the call was terminated normally
|
||||||
by the *caller*. The caller's hold time and the length of the call are both
|
by the *caller*. The caller's hold time and the length of the call are both
|
||||||
recorded. The caller's original position in the queue is recorded in
|
recorded. The caller's original position in the queue is recorded in
|
||||||
origposition.
|
origposition.
|
||||||
|
|
||||||
CONFIGRELOAD
|
\textbf{CONFIGRELOAD}
|
||||||
|
|
||||||
The configuration has been reloaded (e.g. with asterisk -rx reload)
|
The configuration has been reloaded (e.g. with asterisk -rx reload)
|
||||||
|
|
||||||
CONNECT(holdtime|bridgedchanneluniqueid)
|
\textbf{CONNECT(holdtime|bridgedchanneluniqueid)}
|
||||||
|
|
||||||
The caller was connected to an agent. Hold time represents the amount
|
The caller was connected to an agent. Hold time represents the amount
|
||||||
of time the caller was on hold. The bridged channel unique ID contains
|
of time the caller was on hold. The bridged channel unique ID contains
|
||||||
the unique ID of the queue member channel that is taking the call. This
|
the unique ID of the queue member channel that is taking the call. This
|
||||||
is useful when trying to link recording filenames to a particular
|
is useful when trying to link recording filenames to a particular
|
||||||
call in the queue.
|
call in the queue.
|
||||||
|
|
||||||
ENTERQUEUE(url|callerid)
|
\textbf{ENTERQUEUE(url|callerid)}
|
||||||
|
|
||||||
A call has entered the queue. URL (if specified) and Caller*ID are placed
|
A call has entered the queue. URL (if specified) and Caller*ID are placed
|
||||||
in the log.
|
in the log.
|
||||||
|
|
||||||
EXITEMPTY(position|origposition|waittime)
|
\textbf{EXITEMPTY(position|origposition|waittime)}
|
||||||
|
|
||||||
The caller was exited from the queue forcefully because the queue had no
|
The caller was exited from the queue forcefully because the queue had no
|
||||||
reachable members and it's configured to do that to callers when there
|
reachable members and it's configured to do that to callers when there
|
||||||
are no reachable members. The position is the caller's position in the
|
are no reachable members. The position is the caller's position in the
|
||||||
@@ -66,29 +78,35 @@ queue when they hungup, the origposition is the original position the
|
|||||||
caller was when they first entered the queue, and the waittime is how
|
caller was when they first entered the queue, and the waittime is how
|
||||||
long the call had been waiting in the queue at the time of disconnect.
|
long the call had been waiting in the queue at the time of disconnect.
|
||||||
|
|
||||||
EXITWITHKEY(key|position|origposition|waittime)
|
\textbf{EXITWITHKEY(key|position|origposition|waittime)}
|
||||||
|
|
||||||
The caller elected to use a menu key to exit the queue. The key and
|
The caller elected to use a menu key to exit the queue. The key and
|
||||||
the caller's position in the queue are recorded. The caller's entry
|
the caller's position in the queue are recorded. The caller's entry
|
||||||
position and amoutn of time waited is also recorded.
|
position and amoutn of time waited is also recorded.
|
||||||
|
|
||||||
EXITWITHTIMEOUT(position|origposition|waittime)
|
\textbf{EXITWITHTIMEOUT(position|origposition|waittime)}
|
||||||
|
|
||||||
The caller was on hold too long and the timeout expired. The position in the
|
The caller was on hold too long and the timeout expired. The position in the
|
||||||
queue when the timeout occurred, the entry position, and the amount of time
|
queue when the timeout occurred, the entry position, and the amount of time
|
||||||
waited are logged.
|
waited are logged.
|
||||||
|
|
||||||
QUEUESTART
|
\textbf{QUEUESTART}
|
||||||
|
|
||||||
The queueing system has been started for the first time this session.
|
The queueing system has been started for the first time this session.
|
||||||
|
|
||||||
RINGNOANSWER(ringtime)
|
\textbf{RINGNOANSWER(ringtime)}
|
||||||
|
|
||||||
After trying for ringtime ms to connect to the available queue member,
|
After trying for ringtime ms to connect to the available queue member,
|
||||||
the attempt ended without the member picking up the call. Bad queue
|
the attempt ended without the member picking up the call. Bad queue
|
||||||
member!
|
member!
|
||||||
|
|
||||||
SYSCOMPAT
|
\textbf{SYSCOMPAT}
|
||||||
|
|
||||||
A call was answered by an agent, but the call was dropped because the
|
A call was answered by an agent, but the call was dropped because the
|
||||||
channels were not compatible.
|
channels were not compatible.
|
||||||
|
|
||||||
TRANSFER(extension|context|holdtime|calltime)
|
\textbf{TRANSFER(extension|context|holdtime|calltime)}
|
||||||
|
|
||||||
Caller was transferred to a different extension. Context and extension
|
Caller was transferred to a different extension. Context and extension
|
||||||
are recorded. The caller's hold time and the length of the call are both
|
are recorded. The caller's hold time and the length of the call are both
|
||||||
recorded. PLEASE remember that transfers performed by SIP UA's by way
|
recorded. PLEASE remember that transfers performed by SIP UA's by way
|
||||||
|
|||||||
@@ -6,9 +6,6 @@ functions implemented in Asterisk.
|
|||||||
The benefits of this architecture are many, both from a code management
|
The benefits of this architecture are many, both from a code management
|
||||||
standpoint and from an installation perspective.
|
standpoint and from an installation perspective.
|
||||||
|
|
||||||
Additional information on the configuration of Realtime with Asterisk
|
|
||||||
can be found in doc/extconfig.txt
|
|
||||||
|
|
||||||
The ARA is designed to be independent of storage. Currently, most
|
The ARA is designed to be independent of storage. Currently, most
|
||||||
drivers are based on SQL, but the architecture should be able to handle
|
drivers are based on SQL, but the architecture should be able to handle
|
||||||
other storage methods in the future, like LDAP.
|
other storage methods in the future, like LDAP.
|
||||||
@@ -77,7 +74,7 @@ databases and reload it whenever you want. You can force a reload over
|
|||||||
the AMI, Asterisk Manager Interface or by calling Asterisk from a
|
the AMI, Asterisk Manager Interface or by calling Asterisk from a
|
||||||
shell script with
|
shell script with
|
||||||
|
|
||||||
asterisk -rx "reload"
|
asterisk -rx "reload"
|
||||||
|
|
||||||
You may also dynamically add SIP and IAX devices and extensions
|
You may also dynamically add SIP and IAX devices and extensions
|
||||||
and making them available without a reload, by using the realtime
|
and making them available without a reload, by using the realtime
|
||||||
@@ -87,7 +84,7 @@ objects and the realtime switch.
|
|||||||
|
|
||||||
You configure the ARA in extconfig.conf (yes, it's a strange name, but
|
You configure the ARA in extconfig.conf (yes, it's a strange name, but
|
||||||
is was defined in the early days of the realtime architecture and kind
|
is was defined in the early days of the realtime architecture and kind
|
||||||
of stuck). Please see doc/extconfig.txt for database schemas.
|
of stuck).
|
||||||
|
|
||||||
The part of Asterisk that connects to the ARA use a well defined family
|
The part of Asterisk that connects to the ARA use a well defined family
|
||||||
name to find the proper database driver. The syntax is easy:
|
name to find the proper database driver. The syntax is easy:
|
||||||
@@ -110,11 +107,8 @@ Defined well-known family names are:
|
|||||||
\item extensions - Realtime extensions (switch)
|
\item extensions - Realtime extensions (switch)
|
||||||
\end{itemize}
|
\end{itemize}
|
||||||
|
|
||||||
There is documentation of the SQL database in the file
|
Voicemail storage with the support of ODBC described in file
|
||||||
doc/extconfig.txt in your Asterisk source code tree.
|
docs/odbcstorage.tex (\ref{odbcstorage}).
|
||||||
|
|
||||||
For voicemail storage with the support of ODBC, there is a
|
|
||||||
doc/odbcstorage.txt documentation file.
|
|
||||||
|
|
||||||
\subsubsection{Limitations}
|
\subsubsection{Limitations}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user