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. open-falcon的邮件报警

    mail-provider提供http邮件服务,和邮件服务器打通 falcon-sender 负责收集falcon的邮件,然后通过mail-provider发送出去 mail-provider 把sm ...

  2. python(35)- 异常处理

    一 错误和异常 part1:程序中难免出现错误,而错误分成两种 1.语法错误(这种错误,根本过不了python解释器的语法检测,必须在程序执行前就改正)   #语法错误示范一 if #语法错误示范二 ...

  3. 线程安全使用(四) [.NET] 简单接入微信公众号开发:实现自动回复 [C#]C#中字符串的操作 自行实现比dotcore/dotnet更方便更高性能的对象二进制序列化 自已动手做高性能消息队列 自行实现高性能MVC WebAPI 面试题随笔 字符串反转

    线程安全使用(四)   这是时隔多年第四篇,主要是因为身在东软受内网限制,好多文章就只好发到东软内部网站,懒的发到外面,现在一点点把在东软写的文章给转移出来. 这里主要讲解下CancellationT ...

  4. 华为P7电信4G版刷机包 EMUI2.3 官方B125 第3版 精简 ROOT

    ROM介绍 基于底包至 B125 SP03解包制作 增加自己订制的超美丽EMUI 2.3专用的全局主题 自调刷机脚本,全部权限完美百分百与官方原版相贴合. 加入Root权限并使用SuperSU 2.0 ...

  5. *Android 多线程下载 仿下载助手(改进版)

    首先声明一点: 这里的多线程下载 并非指的 多个线程下载一个 文件.而是 每一个线程 负责一个文件. 真正的多线程 希望后面能给大家带来.  -------------  欢迎 爱学习的小伙伴 加群 ...

  6. Canvas学习笔记——动画中摩擦力的运用

    摩擦力是与物体运动方向相反的力.我们在处理物体运动时,常把物体分解水平(X轴)方向和竖直(Y轴)方向的运动(比如平抛运动),但在处理摩擦力时,如果把摩擦力分解为X轴和Y轴上的阻力,就会出现某条轴上速度 ...

  7. 目标检测之harr---点角检测harr

    Haar特征与积分图 1. Adaboost方法的引入 1.1 Boosting方法的提出和发展 在了解Adaboost方法之前,先了解一下Boosting方法. 回答一个是与否的问题,随机猜测可以获 ...

  8. Hybrid--WebView中使用Ajax

    Hybrid框架下的app,使用的Ajax.须要注意的是UIWebViewDelegate不会监測到Ajax的request.也就是再运行Ajax代码时.shouldStartLoadWithReuq ...

  9. IOS8 通知中心(Notification Center)新特性

     本文转载至 http://blog.csdn.net/jinkaiouyang/article/details/30029441   ios手机apple通知中心notificationCenter ...

  10. C# wince 实现软件忙鼠标状态改变

    eg: Cursor.Current = Cursors.WaitCursor; dosomething(); Cursor.Current = Cursors.Default; Cursor.Cur ...