Asterisk func group
Synopsis
Gets, sets or clears the channel group. Each channel can only be member of exactly one group per category; categories can be employed for more fine grained group management, and thus can help to assign more than one group name per channel.
Description
GROUP([category])
Notes
A channel may belong to one group per category only. So, if one wants to make a channel belong both to Zap and SIP groups because two such channels are being bridged, one would have to use GROUP(in)=Zap and GROUP(out)=SIP (creating the categories in and out).
This function may be both read from and written to. The category argument is optional; if empty you need to use GROUP() in your dialplan (note the empty brackets) *CLI> show function GROUP
Also note the existence of the special variable $OUTBOUND_GROUP: that group will be assigned to the channels created by the dial() app. There is also OUTBOUND_GROUP_ONCE which is unset after use. Both OUTBOUND_GROUP and OUTBOUND_GROUP_ONCE supports group@category (for exampe OUTBOUND_GROUP=mygroup@mycategory). Return value
Returns the resulting string.
Examples
Example 1
; set the group name of the current channel to '3', and in addition assign the category 'cat8' exten => s,1,Set(GROUP(cat8)=3) exten => s,n,Set(GROUP(cat9)=hurray) exten => s,n,Set(foo1=${GROUP(cat8)}) exten => s,n,Set(foo2=${GROUP(cat9)})
; the use of categories is optional exten => s,1,Set(GROUP()=MyGroup) exten => s,n,NoOp(This channel is member of group: ${GROUP()})
; clear the channels group for category 'cat8' (requires Asterisk 1.4.12 or later) exten => s,1,Set(GROUP(cat8)=) Example 2
${VOIPMAX} is a user-set Global which limits the concurrent number of outbound VOIP calls
[macro-stdvoip] ; ${ARG1} - full dial string ; Return ${DIALSTATUS} = CHANUNAVAIL if ${VOIPMAX} exceeded exten => s,1,Set(GROUP()=trunkgroup1) ;Set Group exten => s,2,GotoIf($[${GROUP_COUNT(trunkgroup1)} > ${VOIPMAX}]?103) ;Exceeded? exten => s,3,Dial(${ARG1}) ;dial it exten => s,103,SetVar(DIALSTATUS=CHANUNAVAIL) ;deny call
Asterisk func group的更多相关文章
- openerp - asterisk connector(转载)
原文:http://www.akretion.com/open-source-contributions/openerp-asterisk-voip-connector OpenERP - Aster ...
- Asterisk 未来之路3.0_0004
原文:Asterisk 未来之路3.0_0004 Asterisk Wiki asterisk 的Wiki是很多启迪和困惑的发源地,另外一个最重要的VOIP知识库www.voip-info.org ...
- go web framework gin group api 设计
假如让你来设计group api, 你该怎么设计呢? group api 和普通api的区别在于前缀不同,如果group api的版本为v1.0 那么相对应的url为/v1.0/xxx, 如果是普通a ...
- 尝试封装适用于权限管理的通用API
谈谈我对权限系统的简单理解 最近一段时间在研究权限系统,在园子里看到个很牛逼的开源的基于DDD-Lite的权限管理系统,并有幸加入了作者的QQ群,呵呵,受到了很大的影响.对于权限管理我有我自己的一些简 ...
- sphinx在c#.net平台下使用(一)
Sphinx是由俄罗斯人Andrew Aksyonoff开发的一个可以结合MySQL,PostgreSQL全文检索引擎.意图为其他应用提供高速.低空间占用.高结果 相关度的全文搜索功能.是做站内全文搜 ...
- pandas中的分组技术
目录 1 分组操作 1.1 按照列进行分组 1.2 按照字典进行分组 1.3 根据函数进行分组 1.4 按照list组合 1.5 按照索引级别进行分组 2 分组运算 2.1 agg 2 ...
- Gin框架源码解析
Gin框架源码解析 Gin框架是golang的一个常用的web框架,最近一个项目中需要使用到它,所以对这个框架进行了学习.gin包非常短小精悍,不过主要包含的路由,中间件,日志都有了.我们可以追着代码 ...
- gin框架学习手册
前言 gin框架是go语言的一个框架,框架的github地址是:https://github.com/gin-gonic/gin 转载本文,请标注原文地址:https://www.cnblogs.co ...
- 转载-reduceByKey和groupByKey的区别
原文链接-https://www.cnblogs.com/0xcafedaddy/p/7625358.html 先来看一下在PairRDDFunctions.scala文件中reduceByKey和g ...
随机推荐
- DICOM医学图像处理:深入剖析Orthanc的SQLite,了解WADO & RESTful API
背景: 上一篇博文简单翻译了Orthanc官网给出的CodeProject上“利用Orthanc Plugin SDK开发WADO插件”的博文,其中提到了Orthanc从0.8.0版本之后支持快速查询 ...
- 【Todo】Java并发学习 & 示例练习及代码
接上一篇:http://www.cnblogs.com/charlesblc/p/6097111.html <Java并发学习 & Executor学习 & 异常逃逸 & ...
- 转: 多版本并发控制(MVCC)在分布式系统中的应用 (from coolshell)
from: http://coolshell.cn/articles/6790.html 问题 最近项目中遇到了一个分布式系统的并发控制问题.该问题可以抽象为:某分布式系统由一个数据中心D和若干业务 ...
- python读取txt、csv和excel文件
一.python读取txt文件:(思路:先打开文件,读取文件,最后用for循环输出内容) fp = open('test.txt','r') lines = fp.readlines() fp.clo ...
- c++对象内存模型【内存布局】(转)
总结:1.按1继承顺序先排布基于每个父类结构.2.该结构包括:基于该父类的虚表.该父类的虚基类表.父类的父类的成员变量.父类的成员变量.3.多重继承且连续继承时,虚函数表按继承顺序排布函数与虚函数.4 ...
- python(16)- python内置函数
python内置了一系列的常用函数,以便于我们使用,python英文官方文档详细说明:https://docs.python.org/3/library/functions.html Buil ...
- PHP框架的基本原理以及选择标准
PHP框架的原理 说到PHP框架,可能很多PHP新手会感到有些胆怯.其实,PHP框架也不是那么深不可测的,框架就是别人使用PHP基础只是为你写好了的东西,只是封装在一起:这就好比我们使用PHP的函数, ...
- makefile编写---.c .cpp 混合编译makefile 模板
# c.cpp混合编译的makefile模板 # # BIN = client_system BASE_INSTALL_DIR := /opt/arm-2009q1 BUILD_TOOL_DIR := ...
- 左儿子右兄弟Trie UVA 11732 strcmp() Anyone?
题目地址: option=com_onlinejudge&Itemid=8&category=117&page=show_problem&problem=2832&qu ...
- 在“云基础设施即服务的魔力象限”报告中,AWS 连续三年被评为领导者
在"2014 云基础设施即服务的魔力象限"中.Gartner 将 Amazon Web Services 定位在"领导者象限"中,并评价 AWS 拥有最完整.最 ...