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. android studio 在线更新android sdk,遇到无法Fetching https://dl-ssl.google.com/...的解决方案

    最近实在受不了eclipse的“迟钝”,准备入手Android studio开发环境,但是貌似不太顺利,成功安装了Android studio,在线更新Android adk的时候,总是遇到如下错误: ...

  2. python(2)- python程序的编写简单介绍

    一.语句和语法 # 注释 \ 转译回车,继续上一行,在一行语句较长的情况下可以使用其来切分成多行,因其可读性差所以不建议使用 : 将两个语句连接到一行,可读性差,不建议使用 : 将代码的头和体分开 语 ...

  3. C#基础关键字

    1:override & new public class A { public virtual void Test() { Console.WriteLine("A Test()& ...

  4. 牛顿迭代法(Newton's Method)

    牛顿迭代法(简称牛顿法)由英国著名的数学家牛顿爵士最早提出.可是,这 一方法在牛顿生前并未公开发表(讨厌的数学家们还是鼓捣出来了) 牛顿法的作用是使用迭代的方法来求解函数方程的根. 简单地说,牛顿法就 ...

  5. Django+uwsgi+nginx+angular.js项目部署

    这次部署的前后端分离的项目: 前端采用angular.js,后端采用Django(restframework),他俩之间主要以json数据作为交互 Django+uwsgi的配置可以参考我之前的博客: ...

  6. kubernetes之多容器pod以及通信

    系列目录 容器经常是为了解决单一的,窄范围的问题,比如说微服务.然而现实中,一些复杂问题的完成往往需要多个容器.这里我们讨论一下如何把多个容器放在同一个pod里以及容器间的通信 什么是pod pod是 ...

  7. 总结一下vue调试的方法

    1.最推荐使用的是vue的chrome插件: 2.平时开发中常用到的调试代码:console.log().alert():此外还有console.error()这个我用的比较少,感觉跟console. ...

  8. 一段经典的 Java 风格程序 ( 类,包 )

    前言 本文给出一段经典的 Java 风格程序,请读者初步体会 Java 和 C++ 程序的不同. 第一步:编写一个类 // 将这个类打包至 testpackage 包中 package testpac ...

  9. Html5的placeholder属性(IE兼容)

    HTML5对Web Form做了很多增强,比方input新增的type类型.Form Validation等. Placeholder是HTML5新增的还有一个属性,当input或者textarea设 ...

  10. Find out when memory leaks are a concern and how to prevent them

    Handling memory leaks in Java programs Find out when memory leaks are a concern and how to prevent t ...