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的更多相关文章

  1. openerp - asterisk connector(转载)

    原文:http://www.akretion.com/open-source-contributions/openerp-asterisk-voip-connector OpenERP - Aster ...

  2. Asterisk 未来之路3.0_0004

    原文:Asterisk 未来之路3.0_0004 Asterisk Wiki   asterisk 的Wiki是很多启迪和困惑的发源地,另外一个最重要的VOIP知识库www.voip-info.org ...

  3. go web framework gin group api 设计

    假如让你来设计group api, 你该怎么设计呢? group api 和普通api的区别在于前缀不同,如果group api的版本为v1.0 那么相对应的url为/v1.0/xxx, 如果是普通a ...

  4. 尝试封装适用于权限管理的通用API

    谈谈我对权限系统的简单理解 最近一段时间在研究权限系统,在园子里看到个很牛逼的开源的基于DDD-Lite的权限管理系统,并有幸加入了作者的QQ群,呵呵,受到了很大的影响.对于权限管理我有我自己的一些简 ...

  5. sphinx在c#.net平台下使用(一)

    Sphinx是由俄罗斯人Andrew Aksyonoff开发的一个可以结合MySQL,PostgreSQL全文检索引擎.意图为其他应用提供高速.低空间占用.高结果 相关度的全文搜索功能.是做站内全文搜 ...

  6. pandas中的分组技术

    目录 1  分组操作 1.1  按照列进行分组 1.2  按照字典进行分组 1.3  根据函数进行分组 1.4  按照list组合 1.5  按照索引级别进行分组 2  分组运算 2.1  agg 2 ...

  7. Gin框架源码解析

    Gin框架源码解析 Gin框架是golang的一个常用的web框架,最近一个项目中需要使用到它,所以对这个框架进行了学习.gin包非常短小精悍,不过主要包含的路由,中间件,日志都有了.我们可以追着代码 ...

  8. gin框架学习手册

    前言 gin框架是go语言的一个框架,框架的github地址是:https://github.com/gin-gonic/gin 转载本文,请标注原文地址:https://www.cnblogs.co ...

  9. 转载-reduceByKey和groupByKey的区别

    原文链接-https://www.cnblogs.com/0xcafedaddy/p/7625358.html 先来看一下在PairRDDFunctions.scala文件中reduceByKey和g ...

随机推荐

  1. 投资人王刚口述:滴滴如何用八十万成为百亿美金公司? zz

    作者|李好福布斯杂志中文版采编 阿里巴巴前高管.滴滴打车天使投资人王刚近日在杭州接受了<福布斯>独家专访,讲述了集齐“阿里的人.百度的技术.腾讯的钱”的滴滴如何从八十万启动资金,在三年内成 ...

  2. Android -- AsyncTask 使用和缺陷

    一.AsyncTask的基本用法 由于AsyncTask是一个抽象类,所以如果我们想使用它,就必须要创建一个子类去继承它.在继承时我们可以为AsyncTask类指定三个泛型参数,这三个参数的用途如下: ...

  3. Zen of Python(Python的19条哲学)

    The Zen of Python Beautiful is better than ugly. Explicit is better than implicit. Simple is better ...

  4. Odoo 养猪

    阶段 仔猪养成为肉猪 乳猪养成为仔猪 母猪繁殖乳猪     每一个饲养阶段,基本上在同一组笼舍,活动场所:进入到下一饲养阶段才会转换笼舍.在每一个饲养阶段,基本上经历以下过程 饲养 注射疫苗 饲养 投 ...

  5. pycharm5.0 激活方式

    Pycharm5注册方式   0x1 ,安装 0x2 , 调整时间到2038年. 0x3 ,申请30天试用 0x4, 退出pycharm 0x5, 时间调整回来. ##注册方法2### 注册方法:   ...

  6. HDU 3308 LCIS (线段树&#183;单点更新&#183;区间合并)

    题意  给你一个数组  有更新值和查询两种操作  对于每次查询  输出相应区间的最长连续递增子序列的长度 基础的线段树区间合并  线段树维护三个值  相应区间的LCIS长度(lcis)  相应区间以左 ...

  7. 【转】git在公司内部的使用实践

    版本定义: 版本号使用x.x.x进行定义,第一个x代表大版本只有在项目有重大变更时更新 第二个x代表常规版本有新需求会更新第三个x代表紧急BUG修正一个常见的版本号类似于:0.11.10 分支定义: ...

  8. 九度OJ 1127:简单密码 (翻译)

    时间限制:1 秒 内存限制:32 兆 特殊判题:否 提交:1218 解决:721 题目描述: Julius Caesar曾经使用过一种很简单的密码. 对于明文中的每个字符,将它用它字母表中后5位对应的 ...

  9. linux环境下启动tomcat7出现时间过长(已经编译完成的项目)问题解决!

    已经编译完成的项目,系统启动过程中,提示: INFO: Starting Servlet Engine: Apache Tomcat/7.0.81 Sep 20, 2017 3:17:32 PM or ...

  10. Boost 库编译总结

    1. 下载boost库源码,解压缩. 2. 打开vs2010 工具栏tools 下的visual studio command prompt,运行源码目录下的bootstrap.bat,生成bjam. ...