Files
asterisk/doc/tex/ast_agi_commands.tex
Russell Bryant df1a340774 * Move LaTeX docs into a tex/ subdirectory of the doc/ dir
* Add a Makefile in doc/tex/ for generating PDF and HTML
* Add a README.txt file to doc/tex/ to document which tools are used and what
  web sites to visit for getting them.
* Update build_tools/prep_tarball to put the proper Asterisk version string
  in the automatically generated PDF for release tarballs


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@72982 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-02 22:27:46 +00:00

583 lines
15 KiB
TeX

% 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 [<channelname>]
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 <family> <key>
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 <family> [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 <family> <key>
Retrieves an entry in the Asterisk database for a
given family and key.
Returns 0 if <key> is not set. Returns 1 if <key>
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 <family> <key> <value>
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 <application> <options>
Executes <application> with given <options>.
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 <file to be streamed> [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 <variablename> [<channel name>]
Returns 0 if <variablename> is not set or channel does not exist. Returns 1
if <variablename> 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 <filename> <escape_digits> [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 <variablename>
Returns 0 if <variablename> is not set. Returns 1 if <variablename>
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 [<channelname>]
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 <timeout>
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 <timeout>
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 <filename> <format> <escape digits> <timeout> \
[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 <number> <escape digits>
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 <number> <escape 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 <number> <escape digits> [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 <string> <escape digits>
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 <date> <escape digits>
Say a given date, returning early if any of the given DTMF digits are
received on the channel. <date> 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 <time> <escape digits>
Say a given time, returning early if any of the given DTMF digits are
received on the channel. <time> 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 datetime}
\subsection{Summary}
\begin{verbatim}
Says a given time as specfied by the format given
\end{verbatim}
\subsection{Usage}
\begin{verbatim}
Usage: SAY DATETIME <time> <escape digits> [format] [timezone]
Say a given time, returning early if any of the given DTMF digits are
received on the channel. <time> is number of seconds elapsed since 00:00:00
on January 1, 1970, Coordinated Universal Time (UTC). [format] is the format
the time should be said in. See voicemail.conf (defaults to "ABdY
'digits/at' IMp"). Acceptable values for [timezone] can be found in
/usr/share/zoneinfo. Defaults to machine default. 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{send image}
\subsection{Summary}
\begin{verbatim}
Sends images to channels supporting it
\end{verbatim}
\subsection{Usage}
\begin{verbatim}
Usage: SEND IMAGE <image>
Sends the given image on a channel. Most channels do not support the
transmission of images. Returns 0 if image is sent, or if the channel does not
support image transmission. Returns -1 only on error/hangup. Image names
should not include extensions.
\end{verbatim}
\section{send text}
\subsection{Summary}
\begin{verbatim}
Sends text to channels supporting it
\end{verbatim}
\subsection{Usage}
\begin{verbatim}
Usage: SEND TEXT "<text to send>"
Sends the given text on a channel. Most channels do not support the
transmission of text. Returns 0 if text is sent, or if the channel does not
support text transmission. Returns -1 only on error/hangup. Text
consisting of greater than one word should be placed in quotes since the
command only accepts a single argument.
\end{verbatim}
\section{set autohangup}
\subsection{Summary}
\begin{verbatim}
Autohangup channel in some time
\end{verbatim}
\subsection{Usage}
\begin{verbatim}
Usage: SET AUTOHANGUP <time>
Cause the channel to automatically hangup at <time> seconds in the
future. Of course it can be hungup before then as well. Setting to 0 will
cause the autohangup feature to be disabled on this channel.
\end{verbatim}
\section{set callerid}
\subsection{Summary}
\begin{verbatim}
Sets callerid for the current channel
\end{verbatim}
\subsection{Usage}
\begin{verbatim}
Usage: SET CALLERID <number>
Changes the callerid of the current channel.
\end{verbatim}
\section{set context}
\subsection{Summary}
\begin{verbatim}
Sets channel context
\end{verbatim}
\subsection{Usage}
\begin{verbatim}
Usage: SET CONTEXT <desired context>
Sets the context for continuation upon exiting the application.
\end{verbatim}
\section{set extension}
\subsection{Summary}
\begin{verbatim}
Changes channel extension
\end{verbatim}
\subsection{Usage}
\begin{verbatim}
Usage: SET EXTENSION <new extension>
Changes the extension for continuation upon exiting the application.
\end{verbatim}
\section{set music}
\subsection{Summary}
\begin{verbatim}
Enable/Disable Music on hold generator
\end{verbatim}
\subsection{Usage}
\begin{verbatim}
Usage: SET MUSIC ON <on|off> <class>
Enables/Disables the music on hold generator. If <class> is
not specified, then the default music on hold class will be used.
Always returns 0.
\end{verbatim}
\section{set priority}
\subsection{Summary}
\begin{verbatim}
Set channel dialplan priority
\end{verbatim}
\subsection{Usage}
\begin{verbatim}
Usage: SET PRIORITY <priority>
Changes the priority for continuation upon exiting the application.
The priority must be a valid priority or label.
\end{verbatim}
\section{set variable}
\subsection{Summary}
\begin{verbatim}
Sets a channel variable
\end{verbatim}
\subsection{Usage}
\begin{verbatim}
Usage: SET VARIABLE <variablename> <value>
\end{verbatim}
\section{stream file}
\subsection{Summary}
\begin{verbatim}
Sends audio file on channel
\end{verbatim}
\subsection{Usage}
\begin{verbatim}
Usage: STREAM FILE <filename> <escape digits> [sample offset]
Send the given file, allowing playback to be interrupted by the given
digits, if any. Use double quotes for the digits if you wish none to be
permitted. If sample offset is provided then the audio will seek to sample
offset before play starts. 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 or if the channel was disconnected. Remember, the file
extension must not be included in the filename.
\end{verbatim}
\section{control stream file}
\subsection{Summary}
\begin{verbatim}
Sends audio file on channel and allows the listner to control the stream
\end{verbatim}
\subsection{Usage}
\begin{verbatim}
Usage: CONTROL STREAM FILE <filename> <escape digits> [skipms] [ffchar] [rewchr] [pausechr]
Send the given file, allowing playback to be controled by the given
digits, if any. Use double quotes for the digits if you wish none to be
permitted. 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 or if the channel was disconnected. Remember, the file
extension must not be included in the filename.
Note: ffchar and rewchar default to * and # respectively.
\end{verbatim}
\section{tdd mode}
\subsection{Summary}
\begin{verbatim}
Toggles TDD mode (for the deaf)
\end{verbatim}
\subsection{Usage}
\begin{verbatim}
Usage: TDD MODE <on|off>
Enable/Disable TDD transmission/reception on a channel. Returns 1 if
successful, or 0 if channel is not TDD-capable.
\end{verbatim}
\section{verbose}
\subsection{Summary}
\begin{verbatim}
Logs a message to the asterisk verbose log
\end{verbatim}
\subsection{Usage}
\begin{verbatim}
Usage: VERBOSE <message> <level>
Sends <message> to the console via verbose message system.
<level> is the the verbose level (1-4)
Always returns 1.
\end{verbatim}
\section{wait for digit}
\subsection{Summary}
\begin{verbatim}
Waits for a digit to be pressed
\end{verbatim}
\subsection{Usage}
\begin{verbatim}
Usage: WAIT FOR DIGIT <timeout>
Waits up to 'timeout' milliseconds for channel to receive a DTMF digit.
Returns -1 on channel failure, 0 if no digit is received in the timeout, or
the numerical value of the ascii of the digit if one is received. Use -1
for the timeout value if you desire the call to block indefinitely.
\end{verbatim}