`

asterisk dialplan可用函数

阅读更多

--------------------------------------------------------------------------------

AES_DECRYPT           AES_DECRYPT(key,string)              Decrypt a string encoded in base64 with AES given a 16 character key.

AES_ENCRYPT           AES_ENCRYPT(key,string)              Encrypt a string with AES given a 16 character key.

AGC                   AGC(channeldirection)                Apply automatic gain control to audio on a channel.

AGENT                 AGENT(agentid[:item])                Gets information about an Agent

ARRAY                 ARRAY(var1[,var2[,...][,varN]])      Allows setting multiple variables at once.

AST_CONFIG            AST_CONFIG(config_file,category,var  Retrieve a variable from a configuration file.

AUDIOHOOK_INHERIT     AUDIOHOOK_INHERIT(source)            Set whether an audiohook may be inherited to another channel

BASE64_DECODE         BASE64_DECODE(string)                Decode a base64 string.

BASE64_ENCODE         BASE64_ENCODE(string)                Encode a string in base64.

BLACKLIST             BLACKLIST()                          Check if the callerid is on the blacklist.

CALLERID              CALLERID(datatype[,CID])             Gets or sets Caller*ID data on the channel.

CALLERPRES            CALLERPRES()                         Gets or sets Caller*ID presentation on the channel.

CDR                   CDR(name[,options])                  Gets or sets a CDR variable.

CHANNEL               CHANNEL(item)                        Gets/sets various pieces of information about the channel.

CHANNELS              CHANNELS([regular_expression])       Gets the list of channels, optionally filtering by a regular expression.

CHECKSIPDOMAIN        CHECKSIPDOMAIN(domain)               Checks if domain is a local domain.

CSV_QUOTE             CSV_QUOTE(string)                    Quotes a given string for use in a CSV file, escaping embedded quotes as necessary

CURL                  CURL(url[,post-data])                Retrieves the contents of a URL

CURLOPT               CURLOPT(<option>)                    Set options for use with the CURL() function

CUT                   CUT(varname,char-delim,range-spec)   Slices and dices strings, based upon a named delimiter.

DB                    DB(family/key)                       Read from or write to the Asterisk database.

DB_DELETE             DB_DELETE(family/key)                Return a value from the database and delete it.

DB_EXISTS             DB_EXISTS(family/key)                Check to see if a key exists in the Asterisk database.

DENOISE               DENOISE(channeldirection)            Apply noise reduction to audio on a channel.

DEVICE_STATE          DEVICE_STATE(device)                 Get or Set a device state.

DIALGROUP             DIALGROUP(group[,op])                Manages a group of users for dialing.

DIALPLAN_EXISTS       DIALPLAN_EXISTS(context[,extension[  Checks the existence of a dialplan target.

DUNDILOOKUP           DUNDILOOKUP(number[,context[,option  Do a DUNDi lookup of a phone number.

DUNDIQUERY            DUNDIQUERY(number[,context[,options  Initiate a DUNDi query.

DUNDIRESULT           DUNDIRESULT(id[,resultnum])          Retrieve results from a DUNDIQUERY.

ENUMLOOKUP            ENUMLOOKUP(number[,method-type[,opt  General or specific querying of NAPTR records for ENUM or ENUM-like DNS pointers.

ENUMQUERY             ENUMQUERY(number[,method-type[,zone  Initiate an ENUM query.

ENUMRESULT            ENUMRESULT(id,resultnum)             Retrieve results from a ENUMQUERY.

ENV                   ENV(varname)                         Gets or sets the environment variable specified.

EVAL                  EVAL(variable)                       Evaluate stored variables

EXCEPTION             EXCEPTION(field)                     Retrieve the details of the current dialplan exception.

EXISTS                EXISTS(data)                         Test the existence of a value.

EXTENSION_STATE       EXTENSION_STATE(extension[@context]  Get an extension's state.

FIELDQTY              FIELDQTY(varname,delim)              Count the fields with an arbitrary delimiter

FILE                  FILE(filename,offset,length)         Obtains the contents of a file.

FILTER                FILTER(allowed-chars,string)         Filter the string to include only the allowed characters

GLOBAL                GLOBAL(varname)                      Gets or sets the global variable specified.

GROUP                 GROUP([category])                    Gets or sets the channel group.

GROUP_COUNT           GROUP_COUNT([groupname][@category])  Counts the number of channels in the specified group.

GROUP_LIST            GROUP_LIST()                         Gets a list of the groups set on a channel.

GROUP_MATCH_COUNT     GROUP_MATCH_COUNT(groupmatch[@categ  Counts the number of channels in the groups matching the specified pattern.

HASH                  HASH(hashname[,hashkey])             Implementation of a dialplan associative array

HASHKEYS              HASHKEYS(hashname)                   Retrieve the keys of the HASH() function.

HINT                  HINT(extension[@context][,options])  Get the devices set for a dialplan hint.

IAXPEER               IAXPEER(peername[,item])             Gets IAX peer information.

IAXVAR                IAXVAR(varname)                      Sets or retrieves a remote variable.

ICONV                 ICONV(in-charset,out-charset,string  Converts charsets of strings.

IF                    IF(expresion?[true][:false])         Check for an expresion.

IFMODULE              IFMODULE(modulename.so)              Checks if an Asterisk module is loaded in memory.

IFTIME                IFTIME(timespec?[true][:false])      Temporal Conditional.

IMPORT                IMPORT(channel,variable)             Retrieve the value of a variable from another channel.

ISNULL                ISNULL(data)                         Check if a value is NULL.

KEYPADHASH            KEYPADHASH(string)                   Hash the letters in string into equivalent keypad numbers.

LEN                   LEN(string)                          Return the length of the string given.

LISTFILTER            LISTFILTER(varname,delim,value)      Remove an item from a list, by name.

LOCAL                 LOCAL(varname)                       Manage variables local to the gosub stack frame.

LOCAL_PEEK            LOCAL_PEEK(n,varname)                Retrieve variables hidden by the local gosub stack frame.

LOCK                  LOCK(lockname)                       Attempt to obtain a named mutex.

MAILBOX_EXISTS        MAILBOX_EXISTS(mailbox[@context])    Tell if a mailbox is configured.

MATH                  MATH(expression[,type])              Performs Mathematical Functions.

MD5                   MD5(data)                            Computes an MD5 digest.

MEETME_INFO           MEETME_INFO(<keyword>,<confno>)      Query a given conference of various properties.

MINIVMACCOUNT         MINIVMACCOUNT(<account>:item)        Gets MiniVoicemail account information

MINIVMCOUNTER         MINIVMCOUNTER(<account>:name[:opera  Reads or sets counters for MiniVoicemail message

PP_EACH_EXTENSION     PP_EACH_EXTENSION(<mac>|<template>)  Execute specified template for each extension

PP_EACH_USER          PP_EACH_USER(<string>|<exclude_mac>  Generate a string for each phoneprov user

QUEUE_MEMBER          QUEUE_MEMBER(queuename,option)       Count number of members answering a queue.

QUEUE_MEMBER_COUNT    QUEUE_MEMBER_COUNT(queuename)        Count number of members answering a queue.

QUEUE_MEMBER_LIST     QUEUE_MEMBER_LIST(queuename)         Returns a list of interfaces on a queue.

QUEUE_MEMBER_PENALTY  QUEUE_MEMBER_PENALTY(queuename,inte  Gets or sets queue members penalty.

QUEUE_VARIABLES       QUEUE_VARIABLES(queuename)           Return Queue information in variables.

QUEUE_WAITING_COUNT   QUEUE_WAITING_COUNT([queuename])     Count number of calls currently waiting in a queue.

QUOTE                 QUOTE(string)                        Quotes a given string, escaping embedded quotes as necessary

RAND                  RAND([min][,max])                    Choose a random number in a range.

REALTIME              REALTIME(family,fieldmatch[,value[,  RealTime Read/Write Functions.

REALTIME_DESTROY      REALTIME_DESTROY(family,fieldmatch[  RealTime Destroy Function.

REALTIME_FIELD        REALTIME_FIELD(family,fieldmatch,va  RealTime query function.

REALTIME_HASH         REALTIME_HASH(family,fieldmatch,val  RealTime query function.

REALTIME_STORE        REALTIME_STORE(family,field1,fieldN  RealTime Store Function.

REGEX                 REGEX("regular expression" string)   Check string against a regular expression.

SET                   SET(varname[=value])                 SET assigns a value to a channel variable.

SHA1                  SHA1(data)                           Computes a SHA1 digest.

SHARED                SHARED(varname[,channel])            Gets or sets the shared variable specified.

SHELL                 SHELL(command)                       Executes a command as if you were at a shell.

SIP_HEADER            SIP_HEADER(name[,number])            Gets the specified SIP header.

SIPCHANINFO           SIPCHANINFO(item)                    Gets the specified SIP parameter from the current channel.

SIPPEER               SIPPEER(peername[,item])             Gets SIP peer information.

SORT                  SORT(key1:val1[,key2:val2[,...]])    Sorts a list of key/vals into a list of keys, based upon the vals.

SPEECH                SPEECH(argument)                     Gets information about speech recognition results.

SPEECH_ENGINE         SPEECH_ENGINE(name)                  Change a speech engine specific attribute.

SPEECH_GRAMMAR        SPEECH_GRAMMAR([nbest_number/]resul  Gets the matched grammar of a result if available.

SPEECH_RESULTS_TYPE   SPEECH_RESULTS_TYPE()                Sets the type of results that will be returned.

SPEECH_SCORE          SPEECH_SCORE([nbest_number/]result_  Gets the confidence score of a result.

SPEECH_TEXT           SPEECH_TEXT([nbest_number/]result_n  Gets the recognized text of a result.

SPRINTF               SPRINTF(format,arg1[,arg2[,...][,ar  Format a variable according to a format string.

STAT                  STAT(flag,filename)                  Does a check on the specified file.

STRFTIME              STRFTIME([epoch][,timezone[,format]  Returns the current date/time in the specified format.

STRPTIME              STRPTIME(datetime,timezone,format)   Returns the epoch of the arbitrary date/time string structured as described by the format.

SYSINFO               SYSINFO(<parameter>)                 Returns system information specified by parameter.

TIMEOUT               TIMEOUT(timeouttype)                 Gets or sets timeouts on the channel. Timeout values are in seconds.

TOLOWER               TOLOWER(string)                      Convert string to all lowercase letters.

TOUPPER               TOUPPER(string)                      Convert string to all uppercase letters.

TRYLOCK               TRYLOCK(lockname)                    Attempt to obtain a named mutex.

TXTCIDNAME            TXTCIDNAME(number[,zone-suffix])     TXTCIDNAME looks up a caller name via DNS.

UNLOCK                UNLOCK(lockname)                     Unlocks a named mutex.

URIDECODE             URIDECODE(data)                      Decodes a URI-encoded string according to RFC 2396.

URIENCODE             URIENCODE(data)                      Encodes a string to URI-safe encoding according to RFC 2396.

VALID_EXTEN           VALID_EXTEN([context],extension[,pr  Determine whether an extension exists or not.

VERSION               VERSION([info])                      Return the Version info for this Asterisk.

VMCOUNT               VMCOUNT(vmbox[@context][,folder])    Count the voicemails in a specified mailbox.

VOLUME                VOLUME(direction)                    Set the TX or RX volume of a channel.


分享到:
评论

相关推荐

    asterisk dialplan中文版

    Dialplan函数是Asterisk提供的内置函数,用于扩展Dialplan的功能。函数的调用通常遵循以下格式: ```plaintext FunctionName(arg1, arg2, ...) ``` 其中`FunctionName`是函数名称,而`arg1, arg2, ...`是传递给...

    Asterisk Dialplan命令中文翻译

    Asterisk Dialplan是 Asterisk VoIP 服务器中的核心组件之一,它负责处理呼叫路由、通话控制和多种功能。Asterisk的拨号计划由一系列命令组成,这些命令用于定义呼叫流程并决定如何处理不同类型的呼叫事件。以下是...

    asterisk_dialplan学习笔记

    Asterisk Dialplan 学习笔记 Asterisk 是一个开源的自动交换机软件,主要用于Voice over Internet Protocol(VoIP)和传统电话网络之间的通讯。Asterisk 的配置文件中最重要的两个文件是sip.conf和extensions.conf...

    asterisk info 录音实现方案

    5. MixMonitor函数:Asterisk中用于启动和停止录音的函数。配置中通过MixMonitor启动录音,并用其文件名变量存储录音文件路径。 6. 代码修改说明:文档中提到要替换原有的chan_sip.so模块,使用func_channel.so和...

    Asterisk 中dialplan实现去电黑名单

    "Asterisk 中dialplan实现去电黑名单" 在 Asterisk 电话系统中,实现去电黑名单功能可以防止业务人员重发拨打该电话,造成骚扰客户。本文将介绍如何使用 Asterisk 的 dialplan 实现去电黑名单功能。 首先,我们...

    Asterisk拨号方案常用函数

    在Asterisk中,拨号方案(Dialplan)是控制通话流程的核心元素,它由一系列的函数组成,这些函数用于处理从接听电话到挂断的整个过程。以下是一些常见的拨号方案函数的详细说明: 1. Answer():此函数用于接听一个...

    Asterisk CookBook.pdf

    and implementers, then show solutions to those problems using the Asterisk dialplan. As you go through the recipes and start looking at the solutions, you may think, “Oh, that’s a neat idea, but ...

    asterisk app函数中文说明

    Asterisk是一个开源的PBX软件,它提供了丰富的应用程序接口(API)和函数,用于构建和定制通信系统。本文将详细介绍一些Asterisk的app函数,帮助你理解和应用这些功能。 1. Authenticate: 此函数用于鉴别用户,通常...

    Asterisk权威指南中文

    Asterisk权威指南(第3版)第06章Dialplan基础 Asterisk权威指南(第3版)第07章外线连接 Asterisk权威指南(第3版)第08章语音邮件 Asterisk权威指南(第3版)第10章深入Dialplan Asterisk权威指南(第3版)第11章Parking&...

    Asterisk Cookbook.pdf

    Dialplan是Asterisk的核心组件之一,它决定了来电如何被路由和处理。这部分内容深入讲解了Dialplan的一些基础但重要的概念和技术。 #### 1.1 Counting and Conditionals 在Dialplan中,能够执行基于计数和条件判断...

    通过asterisk-java操作asterisk

    5. **使用通道(Channels)和拨号计划(Dialplan)**:Asterisk-java提供了对通道和拨号计划的操作,你可以查询现有的通道状态,修改拨号计划,甚至在运行时动态改变Asterisk的行为。 6. **实时监控**:通过...

    最全Asterisk代码学习笔记

    2. **架构概述**:Asterisk的核心架构包括通道(Channels)、拨号计划(DialPlan)、应用程序(Apps)和管理接口(Manager API)。通道处理实际的通信连接,DialPlan定义了如何处理呼叫,应用程序执行特定的通话操作...

    Asterisk 之数据库配置方案 asterisk数据库

    Asterisk 之数据库配置方案 Asterisk 是一个开源的 PBX(Private Branch Exchange)系统,可以实现电话交换和语音网关的功能。在传统的 Asterisk 配置中,配置文件都是存储在文件系统中的,但是随着系统的复杂度和...

    Asterisk 简介 Asterisk 架构 Asterisk程序框图

    Asterisk是一款开源的电话交换机软件,它允许用户创建高度自定义的通信系统,包括VoIP(Voice over IP)电话、会议桥、自动呼叫分配(ACD)以及许多其他电信功能。Asterisk的核心设计理念是灵活性和可扩展性,这使得...

    Asterisk常用命令

    - `core show functions`:显示所有可用的功能函数,这些函数可以在拨号计划中使用,实现复杂的逻辑操作。 4. **模块管理**: - 模块管理是Asterisk的一大特色,允许动态加载、卸载和重载功能模块,以适应不同的...

    asterisk拨号方案的配置

    asterisk拨号方案的配置 Asterisk拨号方案的配置是Voice over Internet Protocol(VoIP)技术中的一个关键组件,它控制着呼入和呼出电话的处理和路由。配置文件“extensions.conf”是Asterisk拨号方案的核心,它...

    Asterisk.NET 1.6.3 控制Asterisk

    Asterisk.NET 1.6.3 是一个专门为.NET开发者设计的开源库,它提供了对Asterisk PBX系统的编程接口,使得用户可以方便地在C#、VB.NET或其他.NET支持的语言中控制和扩展Asterisk功能。这个库是基于Asterisk Manager ...

    asterisk 参考手册(Asterisk Administrator Guide)

    “AsteriskConcepts”部分详细地解释了Asterisk的核心概念,比如PBX功能、拨号计划(Dialplan)以及自动接待员(Auto-attendant)和交互式语音响应(IVR)菜单的创建。拨号计划是Asterisk系统的核心,它决定了电话...

    FreeSwitch的mod_dialplan_xml模块分析

    Freeswitch系统提供了多种拨号计划模块,包括mod_dialplan_directory、mod_dialplan_asterisk、mod_dialplan_xml以及mod_dialplan_yaml,但默认启用的是mod_dialplan_xml,因为XML格式的配置文件具有灵活性、易于...

    asterisk函数说明

    在该文档中对asterisk的各个功能模块的实现经行了详细的说明,对于学习asterisk的朋友是一份很好的工具。

Global site tag (gtag.js) - Google Analytics