Fun at zangOOr Click Here
0 like 0 dislike
in Education & Reference by (1.4k points)

1 Answer

0 like 0 dislike

Under asterisk, from your dialplan or an agi script you canput your calls (that has the same purpose)
in the same group.
This can be done using the GROUP* functions under asterisk.
- With GROUP() you can retrieve or set a group for the current channel
- With GROUP_COUNT() you can retrieve the total of live channel in that group
- With GROUP_LIST, you will get a list of group where the current channel is. So you can set put the same channel in multiple group to classify them.
- With GROUP_MATCH_COUNT, you can retrieve the number of live channels in that group matching the specifed regular expression.
Example :

A nice application for this is, if you have multiple inbound DIDs that reach a same context and want to limit calls to DID 8800 to 10 for example. Your dialplan should go like this :

exten => 8800,1,Noop(Recd call to ${EXTEN})
exten => 8800,n,Set(GROUP()=trunk1)
exten => 8800,n,NoOP(Group Count = ${GROUP_COUNT(trunk1)} for Group = trunk1)
exten => 8800,n,GotoIf($[${GROUP_COUNT(trunk1)}<11]?Dial1,999,1:Dial2,999,1)
exten => 8800,n,Wait(120)
exten => 8800,n,Hangup

exten => 999,1,Wait(120)
exten => h,n,hangup()

exten => 999,1,Wait(120)
exten => h,n,hangup()

-= Info about function 'GROUP' =-

Gets or sets the channel group.

can be employed for more fine grained group management. Each channel
can only be member of exactly one group per .



Category name.

-= Info about function 'GROUP_COUNT' =-

Counts the number of channels in the specified group.

Calculates the group count for the specified group, or uses the channel's
current group if not specifed (and non-empty).



Group name.


Category name

Related questions

1 like 0 dislike
1 answer 270 views
0 like 0 dislike
1 answer 828 views
1 like 0 dislike
1 answer 413 views
1 like 0 dislike
1 answer 204 views
asked Jan 21, 2016 in Education & Reference by Sam (1.4k points)
0 like 0 dislike
1 answer 178 views
1 like 0 dislike
2 answers 401 views

Where your donation goes
Technology: We will utilize your donation for development, server maintenance and bandwidth management, etc for our site.

Employee and Projects: We have only 15 employees. They are involved in a wide sort of project works. Your valuable donation will definitely boost their work efficiency.

How can I earn points?
Awarded a Best Answer 10 points
Answer questions 10 points
Asking Question -20 points