Asterisk agi-command: Difference between revisions

From 탱이의 잡동사니
Jump to navigation Jump to search
Line 81: Line 81:
* https://wiki.asterisk.org/wiki/display/AST/Asterisk+15+AGICommand_control+stream+file
* https://wiki.asterisk.org/wiki/display/AST/Asterisk+15+AGICommand_control+stream+file
* https://wiki.asterisk.org/wiki/display/AST/Asterisk+15+AGICommand_get+option
* https://wiki.asterisk.org/wiki/display/AST/Asterisk+15+AGICommand_get+option
* https://wiki.asterisk.org/wiki/display/AST/Asterisk+15+Application_AGI
== DATABASE DEL ==
Removes database key/value.
Deletes an entry in the Asterisk database for a given family and key.
Returns 1 if successful, 0 otherwise.
<pre>
DATABASE DEL FAMILY KEY
</pre>
* family
* key
=== See also ===
* https://wiki.asterisk.org/wiki/display/AST/Asterisk+15+AGICommand_database+del
* https://wiki.asterisk.org/wiki/display/AST/Asterisk+15+AGICommand_database+get
* https://wiki.asterisk.org/wiki/display/AST/Asterisk+15+AGICommand_database+put
* https://wiki.asterisk.org/wiki/display/AST/Asterisk+15+AGICommand_database+deltree
* https://wiki.asterisk.org/wiki/display/AST/Asterisk+15+Application_AGI
== DATABASE DELTREE ==
Removes database keytree/value
Deletes a family or specific keytree within a family in the Asterisk database.
Returns 1 if successful, 0 otherwise.
<pre>
DATABASE DELTREE FAMILY KEYTREE
</pre>
* family
* keytree
=== See also ===
* https://wiki.asterisk.org/wiki/display/AST/Asterisk+15+AGICommand_database+deltree
* https://wiki.asterisk.org/wiki/display/AST/Asterisk+15+AGICommand_database+get
* https://wiki.asterisk.org/wiki/display/AST/Asterisk+15+AGICommand_database+put
* https://wiki.asterisk.org/wiki/display/AST/Asterisk+15+AGICommand_database+del
* https://wiki.asterisk.org/wiki/display/AST/Asterisk+15+Application_AGI
* https://wiki.asterisk.org/wiki/display/AST/Asterisk+15+Application_AGI


[[category:Asterisk]]
[[category:Asterisk]]

Revision as of 10:21, 23 January 2018

Overview

Asterisk AGI(Asterisk Gateway Interface) Command 내용 정리

ANSWER

Answer channel.

Answers channel if not already in answer state. Returns -1 on channel failure, or 0 if successful.

ANSWER

See also

ASYNCAGI BREAK

Interrupts Async AGI.

Interrupts expected flow of Async AGI commands and returns control to previous source(typically, the PBX dialplan).

ASYNCAGI BREAK

See also

CHANNEL STATUS

Returns status of the connected channel.

Returns the status of the specified channelname. If no channel name is given then returns the status of the current channel.

CHANNEL STATUS CHANNELNAME
  • CHANNELNAME: Channel name.

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.

See also

CONTROL STREAM FILE

Sends audio file on channel and allows the listener to control the stream.

Send the given file, allowing playback to be controlled by the given digits, if any. Use double quotes for the digits if you wish none to be permitted. If offsetms is provided then the audio will seek to offsetms 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. Returns the position where playback was terminated as endpos.

It sets the following channel variables upon completion.

  • CPLAYBACKSTATUS: Contains the status of the attempt as a text string.
SUCCESS
USERSTOPPED
REMOTESTOPPED
ERROR
  • CPLAYBACKOFFSET: Contains the offset in ms into the file where playback was at when it stopped. -1 is end of file.
  • CPLAYBACKSTOPKEY: If the playback is stopped by the user, this variable contains the key that was pressed.
CONTROL STREAM FILE FILENAME ESCAPE_DIGITS SKIPMS FFCHAR REWCHR PAUSECHR OFFSETMS
  • filename: The file extension must not be included in the filename.
  • escape_digits
  • skipms
  • ffchar: Defaults to #
  • rewchr: Defaults to *
  • pausechr
  • offsetms: Offset, in milliseconds, to start the audio playback.

See also

DATABASE DEL

Removes database key/value.

Deletes an entry in the Asterisk database for a given family and key.

Returns 1 if successful, 0 otherwise.

DATABASE DEL FAMILY KEY 
  • family
  • key

See also

DATABASE DELTREE

Removes database keytree/value

Deletes a family or specific keytree within a family in the Asterisk database.

Returns 1 if successful, 0 otherwise.

DATABASE DELTREE FAMILY KEYTREE 
  • family
  • keytree

See also