I have a macro and when I call it I have something like this:
exten => s,1,NoOp(Group Count: ${GROUP_COUNT(MYGROUP)})
exten => s,n,Set(GROUP()=MYGROUP) ;Set Group
exten => s,n,NoOp(Group List: ${GROUP_LIST()})
exten => s,n,NoOp(Group Count: ${GROUP_COUNT(MYGROUP)})
The GROUP_COUNT returns zero before the call to GROUP but also returns 0 after
the call to GROUP.
If I make 2 calls then it returns 0 before and 1 after placing the 2nd call.
The weird portion is when I get incomming calls from the PSTN I set the
group to PSTN (GROUP()=PSTN). Then if I do a transfer and dial something
that goes out the above Macro GROUP_COUNT returns 0 before the call to
GROUP and 1 after the call to GROUP even though no calls are going
through it except the one call.
When making 1 outbound (not via transfer) call via the macro GROUP_COUNT
returns 0 before and after the call to GROUP.
I'm not sure if Im doing something wrong or not. Here are the portions of my
dialplan:
[macro-dialgoiax]
exten => s,1,NoOp(Group Count: ${GROUP_COUNT(GOIAX)})
exten => s,n,Set(GROUP()=GOIAX) ;Set Group
exten => s,n,NoOp(Group List: ${GROUP_LIST()})
exten => s,n,NoOp(Group Count: ${GROUP_COUNT()})
exten => s,n,NoOp(Group Count2: ${GROUP_COUNT(GOIAX)})
exten => s,n,NoOp(Group Count3: ${GROUP_COUNT(VBUZZER)})
exten => s,n,GotoIf($[${GROUP_COUNT(GOIAX)} > 0]?103) ;Exceeded?
exten => s,n(dial),Dial(IAX2/goiax/${ARG1},999,TW)
exten => s,n,NoOp(s-${DIALSTATUS})
exten => s,n,Goto(s-${DIALSTATUS},1)
exten => s,103,Macro(dialvoipjet,${ARG1})
[home]
exten => 1000,1,SETCIDNUM(${CALLERIDNUM:1})
;exten => 1000/,2,PrivacyManager
exten => 1000/_635.,2,Macro(startrecord,${EXTEN},${CALLERIDNUM})
exten => 1000,2,Wait(0)
exten => 1000,3,Wait(0) ; yes i know I dont need this
exten => 1000,4,Set(GROUP()=PSTN) ;Set Group
exten => 1000,5,Dial(SIP/spa-1,20,TWtw)
exten => 1000,6,Voicemail(u1000)
exten => 1000,7,Hangup
Thanks,
Ryan