GROUP_COUNT issues

Hi All

I’m struggling with the GROUP() and GROUP_COUNT() features and Asterisk 13.19.1

I need to count inbound calls, I thought I was doing this correctly, the inbound call is assigned to a GROUP

[from-trunk-sip]
exten => _.,1,Set(GROUP()=OUT_6)
exten => _.,n,NoOp(>>>>>>>>>>>>>>>>>>>> Trunk Group : ${GROUP()})
exten => _.,n,NoOp(>>>>>>>>>>>>>>>>>>>> Number of Calls on Trunk: ${GROUP_COUNT()})

Using external lines, I place three calls concurrently to the Asterisk platform…

asterisk -rvvvvvvvvvvvvvvvvvvvvv | grep ‘>>>>>>>>>>>>>>>>>>’

NoOp("SIP/66555555-000094fb", ">>>>>>>>>>>>>>>>>>>> Trunk Group             : OUT_6") in new stack
NoOp("SIP/66555555-000094fb", ">>>>>>>>>>>>>>>>>>>> Number of Calls on Trunk: 1") in new stack
NoOp("SIP/66555555-000094fc", ">>>>>>>>>>>>>>>>>>>> Trunk Group             : OUT_6") in new stack
NoOp("SIP/66555555-000094fc", ">>>>>>>>>>>>>>>>>>>> Number of Calls on Trunk: 1") in new stack
NoOp("SIP/66555555-000094fd", ">>>>>>>>>>>>>>>>>>>> Trunk Group             : OUT_6") in new stack
NoOp("SIP/66555555-000094fd", ">>>>>>>>>>>>>>>>>>>> Number of Calls on Trunk: 1") in new stack

I was expecting the Number of Calls on Trunk to increase with each additional, concurrent call…

Any ideas what I have got wrong here?

Cheers

I think you need to specify what group inside the SET.

exten => _.,1,Set(GROUP(OUT_6)=${EXTEN})
 same => n,NoOp(>>>>>>>>>>>>>>>>>>>> Trunk Group : ${GROUP()})
 same => n,NoOp(>>>>>>>>>>>>>>>>>>>> Number of Calls on Trunk: ${GROUP_COUNT(${EXTEN}@OUT_6)})