| DATABASE PUT <family> <key> <value> |
| Function | Adds or updates an entry in the Asterisk database for a given family, key, and value. |
| Returns | 1 if successful 0 otherwise |
| Notes | |
|
| DATABASE GET <family> <key> |
| Function | Retrieves an entry in the Asterisk database for a given family and key. |
| Returns | 0 if <key> is not set. 1 if <key> is set and returns the variable in parenthesis |
| Notes | example return code: 200 result=1 (testvariable) |
|
| DATABASE DEL <family> <key> |
| Function | Deletes an entry in the Asterisk database for a given family and key. |
| Returns | 1 if successful 0 otherwise |
| Notes | |
|
| DATABASE DELTREE <family> [keytree] |
| Function | Deletes a family or specific keytree within a family in the Asterisk database. |
| Returns | 1 if successful 0 otherwise |
| Notes | |
|
| VERBOSE <message> <level> |
| Function | Sends <message> to the console via verbose message system. |
| Returns | Always returns 1 |
| Notes | <level> is the the verbose level (1-4) |
|
| GET VARIABLE <variablename> |
| Function | |
| Returns | 0 if <variablename> is not set. 1 if <variablename> is set and returns the variable in parenthesis |
| Notes | example return code: 200 result=1 (testvariable) |
|
| SET VARIABLE <variablename> <value> |
| Function | |
| Returns | |
| Notes | |
|
| CHANNEL STATUS [<channelname>] |
| Function | Returns the status of the specified channel. If no channel name is given, returns the status of the current channel. |
| Returns | 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 |
| Notes | |
|
| SET CALLERID <number> |
| Function | Changes the callerid of the current channel. |
| Returns | |
| Notes | |
|
| EXEC <application> <options> |
| Function | Executes <application> with given <options>. |
| Returns | Whatever the application returns -2 on failure to find application |
| Notes | |
|
| HANGUP [<channelname>] |
| Function | Hangs up the specified channel. If no channel name is given, hangs up the current channel |
| Returns | |
| Notes | |
|
| ANSWER |
| Function | Answers channel if not already in answer state. |
| Returns | -1 on channel failure 0 if successful. |
| Notes | |
|
| WAIT FOR DIGIT <timeout> |
| Function | 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. |
| Notes | Use -1 for the timeout value if you desire the call to block indefinitely. |
|
| SEND TEXT "<text to send>" |
| Function | 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. -1 only on error/hangup. |
| Notes | Text consisting of greater than one word should be placed in quotes since the command only accepts a single argument. |
|
| RECEIVE CHAR <timeout> |
| Function | Receives a character of text on a channel. |
| Returns | the decimal value of the character if one is received 0 if the channel does not support text reception -1 only on error/hangup. |
| Notes | 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. |
|
| TDD MODE <on|off> |
| Function | Enable/Disable TDD transmission/reception on a channel |
| Returns | 1 if successful 0 if channel is not TDD-capable. |
| Notes | |
|
| SEND IMAGE <image> |
| Function | Sends the given image on a channel |
| Returns | 0 if image is sent, or if the channel does not support image transmission -1 only on error/hangup. |
| Notes | Most channels do not support the transmission of images. Image names should not include extensions |
|
| STREAM FILE <filename> <escape digits> |
| Function | Send the given file, allowing playback to be interrupted by the given digits, if any |
| Returns | 0 if playback completes without a digit being pressed the ASCII numerical value of the digit if one was pressed -1 on error or if the channel was disconnected |
| Notes | Use double quotes for the digits if you wish none to be permitted. The file extension must not be included in the filename. |
|
| SAY NUMBER <number> <escape digits> |
| Function | 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 the ASCII numerical value of the digit if one was pressed -1 on error/hangup |
| Notes | |
|
| GET DATA <file to be streamed> [timeout] [max digits] |
| Function | Stream the given file, and receive DTMF data |
| Returns | the digits received from the channel at the other end |
| Notes | |
|
| SET CONTEXT <desired context> |
| Function | Sets the context for continuation upon exiting the application |
| Returns | |
| Notes | |
|
| SET EXTENSION <new extension> |
| Function | Changes the extension for continuation upon exiting the application |
| Returns | |
| Notes | |
|
| SET PRIORITY <num> |
| Function | Changes the priority for continuation upon exiting the application |
| Returns | |
| Notes | |
|
| RECORD FILE <filename> <format> <escape digits> <timeout> [BEEP] |
| Function | Record to a file until a given dtmf digit in the sequence is received |
| Returns | -1 on hangup or error |
| Notes | 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 |
|