Asterisk标准通道变量

asterisk中,定义了许多变量,或是有些变量能够被其读取。下面给出了它们的列表。在每一个application的帮助文档中,你可以获得更多的信息。所有这些变量都是大写的。

*标记的变量是内建函数,不能在拨号方案中被设置,只能被读取。对这些变量的赋值将被忽略。

${CDR(accountcode)}    * Account code (if specified)

${BLINDTRANSFER}         The name of the channel on the other side of a blind transfer

${BRIDGEPEER}            Bridged peer

${BRIDGEPVTCALLID}       Bridged peer PVT call ID (SIP Call ID if a SIP call)

${CALLERID(ani)}       * Caller ANI (PRI channels)

${CALLERID(ani2)}      * ANI2 (Info digits) also called Originating line information or OLI

${CALLERID(all)}       * Caller ID

${CALLERID(dnid)}      * Dialed Number Identifier

${CALLERID(name)}      * Caller ID Name only

${CALLERID(num)}       * Caller ID Number only

${CALLERID(rdnis)}     * Redirected Dial Number ID Service

${CALLINGANI2}         * Caller ANI2 (PRI channels)

${CALLINGPRES}         * Caller ID presentation for incoming calls (PRI channels)

${CALLINGTNS}          * Transit Network Selector (PRI channels)

${CALLINGTON}          * Caller Type of Number (PRI channels)

${CHANNEL}             * Current channel name

${CONTEXT}             * Current context

${DATETIME}            * Current date time in the format: DDMMYYYY-HH:MM:SS

                         (Deprecated; use ${STRFTIME(${EPOCH},,%d%m%Y-%H:%M:%S)})

${DB_RESULT}             Result value of DB_EXISTS() dial plan function

${EPOCH}               * Current unix style epoch

${EXTEN}               * Current extension

${ENV(VAR)}              Environmental variable VAR

${GOTO_ON_BLINDXFR}      Transfer to the specified context/extension/priority

                         after a blind transfer (use ^ characters in place of

                         | to separate context/extension/priority when setting

                         this variable from the dialplan)

${HANGUPCAUSE}         * Asterisk cause of hangup (inbound/outbound)

${HINT}                * Channel hints for this extension

${HINTNAME}            * Suggested Caller*ID name for this extension

${INVALID_EXTEN}         The invalid called extension (used in the "i" extension)

${LANGUAGE}            * Current language (Deprecated; use ${LANGUAGE()})

${LEN(VAR)}            * String length of VAR (integer)

${PRIORITY}            * Current priority in the dialplan

${PRIREDIRECTREASON}     Reason for redirect on PRI, if a call was directed

${TIMESTAMP}           * Current date time in the format: YYYYMMDD-HHMMSS

                         (Deprecated; use ${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)})

${TRANSFER_CONTEXT}      Context for transferred calls

${FORWARD_CONTEXT}       Context for forwarded calls

${UNIQUEID}            * Current call unique identifier

${SYSTEMNAME}          * value of the systemname option of asterisk.conf

${ENTITYID}            * Global Entity ID set automatically, or from asterisk.conf

Application的返回值(Application return values

当你调用有些application的时候,它们会返回一个值供你读取。对于每一个application,这些状态字段是唯一的。各种状态值,前参考每个application的帮助文档。

${AGISTATUS}         * agi()

${AQMSTATUS}         * addqueuemember()

${AVAILSTATUS}       * chanisavail()

${CHECKGROUPSTATUS}  * checkgroup()

${CHECKMD5STATUS}    * checkmd5()

${CPLAYBACKSTATUS}   * controlplayback()

${DIALSTATUS}        * dial()

${DBGETSTATUS}       * dbget()

${ENUMSTATUS}        * enumlookup()

${HASVMSTATUS}       * hasnewvoicemail()

${LOOKUPBLSTATUS}    * lookupblacklist()

${OSPAUTHSTATUS}     * ospauth()

${OSPLOOKUPSTATUS}   * osplookup()

${OSPNEXTSTATUS}     * ospnext()

${OSPFINISHSTATUS}   * ospfinish()

${PARKEDAT}          * parkandannounce()

${PLAYBACKSTATUS}    * playback()

${PQMSTATUS}         * pausequeuemember()

${PRIVACYMGRSTATUS}  * privacymanager()

${QUEUESTATUS}       * queue()

${RQMSTATUS}         * removequeuemember()

${SENDIMAGESTATUS}   * sendimage()

${SENDTEXTSTATUS}    * sendtext()

${SENDURLSTATUS}     * sendurl()

${SYSTEMSTATUS}      * system()

${TRANSFERSTATUS}    * transfer()

${TXTCIDNAMESTATUS}  * txtcidname()

${UPQMSTATUS}        * unpausequeuemember()

${VMSTATUS}          * voicmail()

${VMBOXEXISTSSTATUS} * vmboxexists()

${WAITSTATUS}        * waitforsilence()

各种application的相关变量(Various application variables

${CURL}                 * Resulting page content for curl()

${ENUM}                 * Result of application EnumLookup

${EXITCONTEXT}            Context to exit to in IVR menu (app background())

                          or in the RetryDial() application

${MONITOR}              * Set to "TRUE" if the channel is/has been monitored (app monitor())

${MONITOR_EXEC}           Application to execute after monitoring a call

${MONITOR_EXEC_ARGS}      Arguments to application

${MONITOR_FILENAME}       File for monitoring (recording) calls in queue

${QUEUE_PRIO}             Queue priority

${QUEUE_MAX_PENALTY}      Maximum member penalty allowed to answer caller

${QUEUE_MIN_PENALTY}      Minimum member penalty allowed to answer caller

${QUEUESTATUS}            Status of the call, one of:

                          (TIMEOUT | FULL | JOINEMPTY | LEAVEEMPTY | JOINUNAVAIL | LEAVEUNAVAIL)

${RECORDED_FILE}        * Recorded file in record()

${TALK_DETECTED}        * Result from talkdetect()

${TOUCH_MONITOR}          The filename base to use with Touch Monitor (auto record)

${TOUCH_MONITOR_PREF}   * The prefix for automonitor recording filenames.

${TOUCH_MONITOR_FORMAT}   The audio format to use with Touch Monitor (auto record)

${TOUCH_MONITOR_OUTPUT} * Recorded file from Touch Monitor (auto record)

${TOUCH_MONITOR_MESSAGE_START} Recorded file to play for both channels at start of monitoring session

${TOUCH_MONITOR_MESSAGE_STOP} Recorded file to play for both channels at end of monitoring session

${TXTCIDNAME}           * Result of application TXTCIDName

${VPB_GETDTMF}            chan_vpb

MeetMe会议桥[会议电话桥分器]The MeetMe Conference Bridge

${MEETME_RECORDINGFILE}      Name of file for recording a conference with the "r" option

${MEETME_RECORDINGFORMAT}    Format of file to be recorded

${MEETME_EXIT_CONTEXT}       Context for exit out of meetme meeting

${MEETME_AGI_BACKGROUND}     AGI script for Meetme (DAHDI only)

${MEETMESECS}              * Number of seconds a user participated in a MeetMe conference

${CONF_LIMIT_TIMEOUT_FILE}   File to play when time is up. Used with the L() option.

${CONF_LIMIT_WARNING_FILE}   File to play as warning if 'y' is defined. The default is to say the time remaining.  Used with the L() option.

The VoiceMail() application

${VM_CATEGORY}      Sets voicemail category

${VM_NAME}        * Full name in voicemail

${VM_DUR}         * Voicemail duration

${VM_MSGNUM}      * Number of voicemail message in mailbox

${VM_CALLERID}    * Voicemail Caller ID (Person leaving vm)

${VM_CIDNAME}     * Voicemail Caller ID Name

${VM_CIDNUM}      * Voicemail Caller ID Number

${VM_DATE}        * Voicemail Date

${VM_MESSAGEFILE} * Path to message left by caller

The VMAuthenticate() application

${AUTH_MAILBOX}   * Authenticated mailbox

${AUTH_CONTEXT}   * Authenticated mailbox context

DUNDiLookup()

${DUNDTECH}       * The Technology of the result from a call to DUNDiLookup()

${DUNDDEST}       * The Destination of the result from a call to DUNDiLookup()

chan_dahdi

${ANI2}               * The ANI2 Code provided by the network on the incoming call. (ie, Code 29 identifies call as a Prison/Inmate Call)

${CALLTYPE}           * Type of call (Speech, Digital, etc)

${CALLEDTON}          * Type of number for incoming PRI extension i.e. 0=unknown, 1=international, 2=domestic, 3=net_specific, 4=subscriber, 6=abbreviated, 7=reserved

${CALLINGSUBADDR}     * Called PRI Subaddress

${FAXEXTEN}           * The extension called before being redirected to "fax"

${PRIREDIRECTREASON}  * Reason for redirect, if a call was directed

${SMDI_VM_TYPE}       * When an call is received with an SMDI message, the 'type' of message 'b' or 'u'

chan_sip

${SIPCALLID}         * SIP Call-ID: header verbatim (for logging or CDR matching)

${SIPDOMAIN}         * SIP destination domain of an inbound call (if appropriate)

${SIPUSERAGENT}      * SIP user agent (deprecated)

${SIPURI}            * SIP uri

${SIP_CODEC}           Set the SIP codec for a call

${SIP_URI_OPTIONS}   * additional options to add to the URI for an outgoing call

${RTPAUDIOQOS}         RTCP QoS report for the audio of this call

${RTPVIDEOQOS}         RTCP QoS report for the video of this call

chan_agent

${AGENTMAXLOGINTRIES}  Set the maximum number of failed logins

${AGENTUPDATECDR}      Whether to update the CDR record with Agent channel data

${AGENTGOODBYE}        Sound file to use for "Good Bye" when agent logs out

${AGENTACKCALL}        Whether the agent should acknowledge the incoming call

${AGENTAUTOLOGOFF}     Auto logging off for an agent

${AGENTWRAPUPTIME}     Setting the time for wrapup between incoming calls

${AGENTNUMBER}       * Agent number (username) set at login

${AGENTSTATUS}       * Status of login ( fail | on | off )

${AGENTEXTEN}        * Extension for logged in agent

The Dial() application

${DIALEDPEERNAME}     * Dialed peer name

${DIALEDPEERNUMBER}   * Dialed peer number

${DIALEDTIME}         * Time for the call (seconds). Is only set if call was answered.

${ANSWEREDTIME}       * Time from answer to hangup (seconds)

${DIALSTATUS}         * Status of the call, one of: (CHANUNAVAIL | CONGESTION | BUSY | NOANSWER | ANSWER | CANCEL | DONTCALL | TORTURE)

${DYNAMIC_FEATURES}   * The list of features (from the [applicationmap] section of features.conf) to activate during the call, with feature names separated by '#' characters

${LIMIT_PLAYAUDIO_CALLER}  Soundfile for call limits

${LIMIT_PLAYAUDIO_CALLEE}  Soundfile for call limits

${LIMIT_WARNING_FILE}      Soundfile for call limits

${LIMIT_TIMEOUT_FILE}      Soundfile for call limits

${LIMIT_CONNECT_FILE}      Soundfile for call limits

${OUTBOUND_GROUP}          Default groups for peer channels (as in SetGroup)  * See "show application dial" for more information

The chanisavail() application

${AVAILCHAN}          * the name of the available channel if one was found

${AVAILORIGCHAN}      * the canonical channel name that was used to create the channel

${AVAILSTATUS}        * Status of requested channel

拨号方案宏(Dialplan Macros

${MACRO_EXTEN}        * The calling extensions

${MACRO_CONTEXT}      * The calling context

${MACRO_PRIORITY}     * The calling priority

${MACRO_OFFSET}         Offset to add to priority at return from macro

The ChanSpy() application

${SPYGROUP}           * A ':' (colon) separated list of group names. (To be set on spied on channel and matched against the g(grp) option)

OSP

${OSPINHANDLE}          OSP handle of in_bound call

${OSPINTIMELIMIT}       Duration limit for in_bound call

${OSPOUTHANDLE}         OSP handle of out_bound call

${OSPTECH}              OSP technology

${OSPDEST}              OSP destination

${OSPCALLING}           OSP calling number

${OSPOUTTOKEN}          OSP token to use for out_bound call

${OSPOUTTIMELIMIT}      Duration limit for out_bound call

${OSPRESULTS}           Number of remained destinations

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/433718.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

angular4输入有效性_Angular 2 用户输入

Angular 2 用户输入用户点击链接、按下按钮或者输入文字时,这些用户的交互行为都会触发 DOM 事件。本章中,我们将学习如何使用 Angular 事件绑定语法来绑定这些事件。以下Gif图演示了该实例的操作:源代码可以在文章末尾下载。绑定到用户输入事…

用python画国旗的程序_用Python的Turtle模块绘制五星红旗

Turtle官方文档 turtle的基本操作 # 初始化屏幕 window turtle.Screen() # 新建turtle对象实例 import turtle aTurtle turtle.Turtle() # 海龟设置 aTurtle.hideturtle() # 隐藏箭头 aTurtle.speed(10) # 设置速度 # 前进后退,左转右转 aTurtle.fd(100) # 前进10…

Java学习笔记——函数式接口

一、函数式接口概述 函数式接口:有且仅有一个抽象方法的接口。 Java中的函数式编程体现就是Lambda表达式,所以函数式接口就是可以适用于 Lambda表达式使用的接口。只有确保接口中有且仅有一个抽象方法,Java中的 Lambda表达式才能顺利地进行推…

windows快捷键

F1 显示当前程序或者windows的帮助内容。 F2 当你选中一个文件的话,这意味着“重命名” F3 当你在桌面上的时候是打开“查找:所有文件” 对话框 F10或ALT 激活当前程序的菜单栏 windows键或CTRLESC 打开开始菜单 CTRLALTDELETE 在win9x中打开关闭程序对话…

最简单的拨号方案

使用模式匹配和通道变量可以构建一个最简单的最通用的拨号方案。 如下: exten > _XXXX,1,Dial(SIP/${EXTEN}) exten > _XXXX,2,Hangup() 模式匹配规则: 模式总是用一个下划线 _开始,它告诉 Asterisk 要做模式匹配,这不是…

tortoisegit图标消失_TortoiseGit文件夹和文件图标不显示解决方法

今天下载一个demo导入之后发现一个问题,提示导入的R包只有系统默认的 没有项目的,可以看下图 这种情况出现呢不多,但是出现了我就记录下,这个先看看R文件是不是还在 点击Gen包 查看 看看R文件是不是还在,打开一看果然不…

丰田pcs可以关闭吗_丰田新款卡罗拉变化这么大 让老车主陷入沉思

【太平洋汽车网 导购频道】小胖是一名95后的汽车编辑,年纪轻轻又从事汽车编辑这一岗位,大家可能会觉得他肯定是一位充满热血、喜欢驾驶、热爱汽车的年轻人,那如果我告诉你小胖的座驾是一辆老卡罗拉(询底价|查参配),你还会觉得小胖…

Java学习笔记——Stream流

一、Stream流的生成方式 1、collection集合可以用默认方法stream生成流。 如 ArrayList<String> list new ArrayList<String>();list.stream().forEach(); 2、Map集合间接生成 3、数组通过Stream接口的静态方法of(T... values)生成流。二、Stream流的中间操作方法…

Excel VBA遍历文件

休息日&#xff0c;无聊的上Excel Home看看有啥东东可学习&#xff0c;有啥问题能帮帮忙。看到很多帖子都是求助遍历特定文件夹下文件的实现方法。有朋友说03版Excel有FileSearch对象可以遍历文件夹下文件&#xff0c;07版中没有了FileSearch对象&#xff0c;不知如何遍历文件。…

C++中的explicit关键字

在C程序中很少有人去使用explicit关键字&#xff0c;不可否认&#xff0c;在平时的实践中确实很少能用的上。再说C的功能强大&#xff0c;往往一个问题可以利用好几种C特性去解决。但稍微留心一下就会发现现有的MFC库或者C标准库中的相关类声明中explicit出现的频率是很高的。了…

pline加点lisp_用Autolisp 在AutoCAD中实现多种曲线的绘制

用Autolisp 在AutoCAD中实现多种曲线的绘制一、引言&#xff1a;AutoCAD自1982年由Autodesk公司推出以来&#xff0c;经历了20年的发展更新&#xff0c;目前&#xff0c;已深入到包括机械、建筑、服装、航天航空、地质气象等等的众多领域中。AutoCAD已成为众多工程设计人员的首…

python从小白到大牛pdf 下载 资源共享_Kotlin从小白到大牛 (关东升著) 中文pdf高清版[12MB]...

本书是一本Kotlin语言学习立体教程&#xff0c;主要内容包括&#xff1a;Kotlin语法基础、Kotlin编码规范、数据类型、字符串、运算符、程序流程控制、函数、面向对象基础、继承与多态、抽象类与接口、高阶函数、Lambda表达式、数组、集合、函数式编程API、异常处理、线程、协程…

MySQL——基本配置

一、新建配置文件 在MySQL的安装目录下D:\Mysql\mysql-8.0.28-winx64\bin中新建一个文本文件&#xff0c;文件内容如下&#xff1a; [mysql] default-character-setutf8[mysqld] character-set-serverutf8 default-storage-engineINNODB sql_modeSTRICT_TRANS_TABLES,NO_ZERO_…

iphone win7无法识别_win7系统电脑不能识别iphone苹果设备的解决方法

win7系统使用久了&#xff0c;好多网友反馈说win7系统电脑不能识别iphone苹果设备的问题&#xff0c;非常不方便。有什么办法可以永久解决win7系统电脑不能识别iphone苹果设备的问题&#xff0c;面对win7系统电脑不能识别iphone苹果设备故障问题&#xff0c;我们只需要1)你的苹…

SOCKET bind INADDR_LOOPBACK和INADDR_ANY的区别

今天写程序时候&#xff0c;服务器端启动了&#xff0c;然后客户端总是连接不上&#xff0c;connect返回错误号是10061&#xff0c;服务器积极拒绝请求。 用telnet连接一下端口&#xff0c;发现服务端服务没有开启&#xff0c;但是我程序是启动的&#xff0c;用netstat -a 命令…

在mac上用文本编辑器写python_Mac系统Python解释器、PyCharm编辑器安装及使用方法详解...

『环境配置』- 工欲善其事&#xff0c;必先利其器 视频讲解教程&#xff1a;[Mac系统Python开发环境配置教程详解&#xff08;Python技术客栈&#xff09;](https://www.bilibili.com/video/av80761677)【开发环境配置】Mac系统Python开发环境配置教程详解&#xff08;Python技…

hdu 2149 巴什博弈

http://acm.hdu.edu.cn/showproblem.php?pid2149 分析&#xff1a;就是巴什博弈的概念。 题目要求&#xff1a;对于每组数据&#xff0c;在一行里按递增的顺序输出Lele第一次可以加的价。两个数据之间用空格隔开。如果Lele在第一次无论如何出价都无法买到这块土地&#xff0c;…

MySQL——数据库和表的增删改查

1、DDL操作数据库 ①查询 SHOW DATABASES;②创建 创建数据库 CREATE DATABASE 数据库名称; 创建数据库(判断&#xff0c;如果则创建) CREATE DATABASE IF NOT EXISTS 数据库名称;③删除 删除数据库 DROP DATABASE 数据库名称; 删除数据库(判断&#xff0c;如果存在则删除) DRO…

c_str()

1.string类成员函数c_str()的原型: const char *c_str()const;//返回一个以null终止的c字符串 2.c_str()函数返回一个指向正规c字符串的指针,内容和string类的本身对象是一样的,通过string类的c_str()函数能够把string对象转换成c中的字符串的样式; c_str()函数返回一个指向正规…

45个极具冲击力的WordPress摄影网站模板

原文地址&#xff1a;http://www.goodfav.com/zh/wordpress-photography-website-templates-3577.html 互联网为摄影师和有创意的人想向世界展示自己最好的作品提供了最好的平台。你可以整合社会化媒体可以分享你的世界各地的图片。很多人都会认为&#xff0c;美丽的图画应该有…