Iscriviti   Guestbook   Immagini   Forum   Download   Mappa   63 utenti on line 
Italiano
MENU
CONFIGURAZIONI
RISORSE
INFO
Login

DOWNLOAD
Device
Suggerimenti

 
Asterisk Docs: AGI

DATABASE PUT
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
Function Retrieves an entry in the Asterisk database for a given family and key. 
Returns 0 if is not set.
1 if is set and returns the variable in parenthesis 
Notes example return code: 200 result=1 (testvariable) 
DATABASE DEL
Function Deletes an entry in the Asterisk database for a given family and key. 
Returns 1 if successful
0 otherwise 
Notes  
DATABASE DELTREE [keytree]
Function Deletes a family or specific keytree within a family in the Asterisk database. 
Returns 1 if successful
0 otherwise 
Notes  
VERBOSE
Function Sends to the console via verbose message system. 
Returns Always returns 1 
Notes is the the verbose level (1-4) 
GET VARIABLE
Function  
Returns 0 if is not set.
1 if is set and returns the variable in parenthesis 
Notes example return code: 200 result=1 (testvariable) 
SET VARIABLE
Function  
Returns  
Notes  
CHANNEL STATUS []
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
Function Changes the callerid of the current channel. 
Returns  
Notes  
EXEC
Function Executes with given
Returns Whatever the application returns
-2 on failure to find application 
Notes  
HANGUP []
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
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 ""
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
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
Function Enable/Disable TDD transmission/reception on a channel 
Returns 1 if successful
0 if channel is not TDD-capable. 
Notes  
SEND 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
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
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 [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
Function Sets the context for continuation upon exiting the application 
Returns  
Notes  
SET EXTENSION
Function Changes the extension for continuation upon exiting the application 
Returns  
Notes  
SET PRIORITY
Function Changes the priority for continuation upon exiting the application 
Returns  
Notes  
RECORD FILE [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 



 

Valid CSS!