diff --git a/doc/ast_agi_commands.tex b/doc/ast_agi_commands.tex new file mode 100644 index 0000000000..a142657d39 --- /dev/null +++ b/doc/ast_agi_commands.tex @@ -0,0 +1,1583 @@ +% This file is automatically generated by the "manager dump actiondocs" CLI command. Any manual edits will be lost. +\section{answer} +\subsection{Summary} +\begin{verbatim} +Answer channel +\end{verbatim} +\subsection{Usage} +\begin{verbatim} + Usage: ANSWER + Answers channel if not already in answer state. Returns -1 on + channel failure, or 0 if successful. + +\end{verbatim} + + +\section{channel status} +\subsection{Summary} +\begin{verbatim} +Returns status of the connected channel +\end{verbatim} +\subsection{Usage} +\begin{verbatim} + Usage: CHANNEL STATUS [] + Returns the status of the specified channel. + If no channel name is given the returns the status of the + current channel. Return values: + 0 Channel is down and available + 1 Channel is down, but reserved + 2 Channel is off hook + 3 Digits (or equivalent) have been dialed + 4 Line is ringing + 5 Remote end is ringing + 6 Line is up + 7 Line is busy + +\end{verbatim} + + +\section{database del} +\subsection{Summary} +\begin{verbatim} +Removes database key/value +\end{verbatim} +\subsection{Usage} +\begin{verbatim} + Usage: DATABASE DEL + Deletes an entry in the Asterisk database for a + given family and key. + Returns 1 if successful, 0 otherwise. + +\end{verbatim} + + +\section{database deltree} +\subsection{Summary} +\begin{verbatim} +Removes database keytree/value +\end{verbatim} +\subsection{Usage} +\begin{verbatim} + Usage: DATABASE DELTREE [keytree] + Deletes a family or specific keytree within a family + in the Asterisk database. + Returns 1 if successful, 0 otherwise. + +\end{verbatim} + + +\section{database get} +\subsection{Summary} +\begin{verbatim} +Gets database value +\end{verbatim} +\subsection{Usage} +\begin{verbatim} + Usage: DATABASE GET + Retrieves an entry in the Asterisk database for a + given family and key. + Returns 0 if is not set. Returns 1 if + is set and returns the variable in parentheses. + Example return code: 200 result=1 (testvariable) + +\end{verbatim} + + +\section{database put} +\subsection{Summary} +\begin{verbatim} +Adds/updates database value +\end{verbatim} +\subsection{Usage} +\begin{verbatim} + Usage: DATABASE PUT + Adds or updates an entry in the Asterisk database for a + given family, key, and value. + Returns 1 if successful, 0 otherwise. + +\end{verbatim} + + +\section{exec} +\subsection{Summary} +\begin{verbatim} +Executes a given Application +\end{verbatim} +\subsection{Usage} +\begin{verbatim} + Usage: EXEC + Executes with given . + Returns whatever the application returns, or -2 on failure to find application + +\end{verbatim} + + +\section{get data} +\subsection{Summary} +\begin{verbatim} +Prompts for DTMF on a channel +\end{verbatim} +\subsection{Usage} +\begin{verbatim} + Usage: GET DATA [timeout] [max digits] + Stream the given file, and recieve DTMF data. Returns the digits received +from the channel at the other end. + +\end{verbatim} + + +\section{get full variable} +\subsection{Summary} +\begin{verbatim} +Evaluates a channel expression +\end{verbatim} +\subsection{Usage} +\begin{verbatim} + Usage: GET FULL VARIABLE [] + Returns 0 if is not set or channel does not exist. Returns 1 +if is set and returns the variable in parenthesis. Understands +complex variable names and builtin variables, unlike GET VARIABLE. + example return code: 200 result=1 (testvariable) + +\end{verbatim} + + +\section{get option} +\subsection{Summary} +\begin{verbatim} +Stream file, prompt for DTMF, with timeout +\end{verbatim} +\subsection{Usage} +\begin{verbatim} + Usage: GET OPTION [timeout] + Behaves similar to STREAM FILE but used with a timeout option. + +\end{verbatim} + + +\section{get variable} +\subsection{Summary} +\begin{verbatim} +Gets a channel variable +\end{verbatim} +\subsection{Usage} +\begin{verbatim} + Usage: GET VARIABLE + Returns 0 if is not set. Returns 1 if + is set and returns the variable in parentheses. + example return code: 200 result=1 (testvariable) + +\end{verbatim} + + +\section{hangup} +\subsection{Summary} +\begin{verbatim} +Hangup the current channel +\end{verbatim} +\subsection{Usage} +\begin{verbatim} + Usage: HANGUP [] + Hangs up the specified channel. + If no channel name is given, hangs up the current channel + +\end{verbatim} + + +\section{noop} +\subsection{Summary} +\begin{verbatim} +Does nothing +\end{verbatim} +\subsection{Usage} +\begin{verbatim} + Usage: NoOp + Does nothing. + +\end{verbatim} + + +\section{receive char} +\subsection{Summary} +\begin{verbatim} +Receives one character from channels supporting it +\end{verbatim} +\subsection{Usage} +\begin{verbatim} + Usage: RECEIVE CHAR + Receives a character of text on a channel. Specify timeout to be the + maximum time to wait for input in milliseconds, or 0 for infinite. Most channels + do not support the reception of text. Returns the decimal value of the character + if one is received, or 0 if the channel does not support text reception. Returns + -1 only on error/hangup. + +\end{verbatim} + + +\section{receive text} +\subsection{Summary} +\begin{verbatim} +Receives text from channels supporting it +\end{verbatim} +\subsection{Usage} +\begin{verbatim} + Usage: RECEIVE TEXT + Receives a string of text on a channel. Specify timeout to be the + maximum time to wait for input in milliseconds, or 0 for infinite. Most channels + do not support the reception of text. Returns -1 for failure or 1 for success, and the string in parentheses. + +\end{verbatim} + + +\section{record file} +\subsection{Summary} +\begin{verbatim} +Records to a given file +\end{verbatim} +\subsection{Usage} +\begin{verbatim} + Usage: RECORD FILE \ + [offset samples] [BEEP] [s=silence] + Record to a file until a given dtmf digit in the sequence is received + Returns -1 on hangup or error. The format will specify what kind of file + will be recorded. The timeout is the maximum record time in milliseconds, or + -1 for no timeout. "Offset samples" is optional, and, if provided, will seek + to the offset without exceeding the end of the file. "silence" is the number + of seconds of silence allowed before the function returns despite the + lack of dtmf digits or reaching timeout. Silence value must be + preceeded by "s=" and is also optional. + +\end{verbatim} + + +\section{say alpha} +\subsection{Summary} +\begin{verbatim} +Says a given character string +\end{verbatim} +\subsection{Usage} +\begin{verbatim} + Usage: SAY ALPHA + Say a given character string, returning early if any of the given DTMF digits + are received on the channel. Returns 0 if playback completes without a digit + being pressed, or the ASCII numerical value of the digit if one was pressed or + -1 on error/hangup. + +\end{verbatim} + + +\section{say digits} +\subsection{Summary} +\begin{verbatim} +Says a given digit string +\end{verbatim} +\subsection{Usage} +\begin{verbatim} + Usage: SAY DIGITS + Say a given digit string, returning early if any of the given DTMF digits + are received on the channel. Returns 0 if playback completes without a digit + being pressed, or the ASCII numerical value of the digit if one was pressed or + -1 on error/hangup. + +\end{verbatim} + + +\section{say number} +\subsection{Summary} +\begin{verbatim} +Says a given number +\end{verbatim} +\subsection{Usage} +\begin{verbatim} + Usage: SAY NUMBER [gender] + Say a given number, returning early if any of the given DTMF digits + are received on the channel. Returns 0 if playback completes without a digit + being pressed, or the ASCII numerical value of the digit if one was pressed or + -1 on error/hangup. + +\end{verbatim} + + +\section{say phonetic} +\subsection{Summary} +\begin{verbatim} +Says a given character string with phonetics +\end{verbatim} +\subsection{Usage} +\begin{verbatim} + Usage: SAY PHONETIC + Say a given character string with phonetics, returning early if any of the + given DTMF digits are received on the channel. Returns 0 if playback + completes without a digit pressed, the ASCII numerical value of the digit + if one was pressed, or -1 on error/hangup. + +\end{verbatim} + + +\section{say date} +\subsection{Summary} +\begin{verbatim} +Says a given date +\end{verbatim} +\subsection{Usage} +\begin{verbatim} + Usage: SAY DATE + Say a given date, returning early if any of the given DTMF digits are + received on the channel. is number of seconds elapsed since 00:00:00 + on January 1, 1970, Coordinated Universal Time (UTC). Returns 0 if playback + completes without a digit being pressed, or the ASCII numerical value of the + digit if one was pressed or -1 on error/hangup. + +\end{verbatim} + + +\section{say time} +\subsection{Summary} +\begin{verbatim} +Says a given time +\end{verbatim} +\subsection{Usage} +\begin{verbatim} + Usage: SAY TIME