打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
Asterisk AGI commands
AGI commands
* answer: Asserts answer
* asyncagi break: Break Async AGI loop (since Asterisk 1.6)
* channel status: Returns status of the connected channel
* control stream file: Send the given file, allowing playback to be controlled by the given digits, if any. (since Asterisk 1.2)
* database del: Removes database key/value
* database deltree: Removes database keytree/value
* database get: Gets database value
* database put: Adds/updates database value
* exec: Executes a given Application. (Applications are the functions you use to create a dial plan in extensions.conf ).
* get data: Gets data on a channel
* get full variable: Gets a channel variable, but understands complex variable names and builtin variables. (since Asterisk 1.2)
* get option: Behaves similar to STREAM FILE but used with a timeout option. (since Asterisk 1.2)
* get variable: Gets a channel variable
* hangup: Hangup the current channel
* noop: Does nothing
* receive char: Receives one character from channels supporting it
* receive text: Receives text from channels supporting it
* record file: Records to a given file
* say alpha: Says a given character string (since Asterisk 1.2)
* say date: Say a date (since Asterisk 1.2)
* say datetime: Say a formatted date and time (since Asterisk 1.2)
* say digits: Says a given digit string
* say number: Says a given number
* say phonetic: Say the given character string.
* say time: Say a time
* send image: Sends images to channels supporting it
* send text: Sends text to channels supporting it
* set autohangup: Autohangup channel in some time
* set callerid: Sets callerid for the current channel
* set context: Sets channel context
* set extension: Changes channel extension
* set music: Enable/Disable Music on hold generator, example "SET MUSIC ON default"
* set priority: Prioritizes the channel
* set variable: Sets a channel variable
* speech activate grammar: Activates a grammar (since Asterisk 1.6)
* speech create: Creates a speech object (since Asterisk 1.6)
* speech deactivate grammar: Deactivates a grammar (since Asterisk 1.6)
* speech destroy: Destroys a speech object (since Asterisk 1.6)
* speech load grammar: Loads a grammar (since Asterisk 1.6)
* speech recognize: Recognizes speech (since Asterisk 1.6)
* speech set: Sets a speech engine setting (since Asterisk 1.6)
* speech unload grammar: Unloads a grammar (since Asterisk 1.6)
* stream file: Sends audio file on channel
* tdd mode: Activates TDD mode on channels supporting it, to enable communication with TDDs.
* verbose: Logs a message to the asterisk verbose log

* wait for digit: Waits for a digit to be pressed

When Asterisk starts an AGI script, it feeds the channel variables to the script on standard input. The variable names are prefixed with "agi_" and are separated from their values by a colon and a space. Though the actual channel variables may be in the upper case, the names passed to an AGI script are all lower case. Global variables are not passed to the AGI script in this manner.

* agi_request - The filename of your script
* agi_channel - The originating channel (your phone)
* agi_language - The language code (e.g. "en")
* agi_type - The originating channel type (e.g. "SIP" or "ZAP")
* agi_uniqueid - A unique ID for the call
* agi_version - The version of Asterisk (since Asterisk 1.6)
* agi_callerid - The caller ID number (or "unknown")
* agi_calleridname - The caller ID name (or "unknown")
* agi_callingpres - The presentation for the callerid in a ZAP channel
* agi_callingani2 - The number which is defined in ANI2 see Asterisk Detailed Variable List (only for PRI Channels)
* agi_callington - The type of number used in PRI Channels see Asterisk Detailed Variable List
* agi_callingtns - An optional 4 digit number (Transit Network Selector) used in PRI Channels see Asterisk Detailed Variable List
* agi_dnid - The dialed number id (or "unknown")
* agi_rdnis - The referring DNIS number (or "unknown")
* agi_context - Origin context in extensions.conf
* agi_extension - The called number
* agi_priority - The priority it was executed as in the dial plan
* agi_enhanced - The flag value is 1.0 if started as an EAGI script, 0.0 otherwise
* agi_accountcode - Account code of the origin channel
* agi_threadid - Thread ID of the AGI script (since Asterisk 1.6)

Using the "get variable" AGI command to get values above.


本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
asterisk agi应用编程入门
Asterisk AGI phpivr
HTML5之语音识别实例
Asterisk模块编写2
Robot Framework测试框架学习笔记
asterisk 音量控制
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服