ダイヤルプランのGROUPおよびGROUP_COUNT機能を使用できます。
AGIでは、あなたは行うことができを通じて
$agi->set_full_variable("new_var",'${GROUP_COUNT(group_name)}')
pro-sip*CLI> core show function GROUP
-= Info about function 'GROUP' =-
[Synopsis]
Gets or sets the channel group.
[Description]
<category> can be employed for more fine grained group management. Each channel
can only be member of exactly one group per <category>.
[Syntax]
GROUP([category])
[Arguments]
category
Category name.
[See Also]
Not available
pro-sip*CLI> core show function GROUP_COUNT
-= Info about function 'GROUP_COUNT' =-
[Synopsis]
Counts the number of channels in the specified group.
[Description]
Calculates the group count for the specified group, or uses the channel's
current group if not specifed (and non-empty).
[Syntax]
GROUP_COUNT([groupname][@category])
[Arguments]
groupname
Group name.
category
Category name
[See Also]
Not available
https://www.voip-info.org/wiki/view/Asterisk+func+group