Asterisk agi-command: Difference between revisions
Line 28: | Line 28: | ||
* https://wiki.asterisk.org/wiki/display/AST/Asterisk+15+Application_AGI | * https://wiki.asterisk.org/wiki/display/AST/Asterisk+15+Application_AGI | ||
== 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. | |||
<pre> | |||
CHANNEL STATUS CHANNELNAME | |||
</pre> | |||
* 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 === | |||
* https://wiki.asterisk.org/wiki/display/AST/Asterisk+15+AGICommand_channel+status | |||
* https://wiki.asterisk.org/wiki/display/AST/Asterisk+15+Application_AGI | |||
== 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. | |||
<pre> | |||
CONTROL STREAM FILE FILENAME ESCAPE_DIGITS SKIPMS FFCHAR REWCHR PAUSECHR OFFSETMS | |||
</pre> | |||
* 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 === | |||
* 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+Application_AGI | |||
[[category:Asterisk]] | [[category:Asterisk]] |
Revision as of 10:12, 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
- https://wiki.asterisk.org/wiki/display/AST/Asterisk+15+AGICommand_answer
- https://wiki.asterisk.org/wiki/display/AST/Asterisk+15+AGICommand_hangup
- https://wiki.asterisk.org/wiki/display/AST/Asterisk+15+Application_AGI
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
- https://wiki.asterisk.org/wiki/display/AST/Asterisk+15+AGICommand_asyncagi+break
- https://wiki.asterisk.org/wiki/display/AST/Asterisk+15+AGICommand_hangup
- https://wiki.asterisk.org/wiki/display/AST/Asterisk+15+Application_AGI
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
- https://wiki.asterisk.org/wiki/display/AST/Asterisk+15+AGICommand_channel+status
- https://wiki.asterisk.org/wiki/display/AST/Asterisk+15+Application_AGI
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.