Limit the number of outbound calls for a group

I would like to limit the number of outbound calls in execution in Asterisk for a group of extensions, as for example 10 extensions.

I need to validate it when an extension try to make an outbound call. Can someone suggest any function I should use? Or should I create an specific AGI in SH, PHP, etc… to do that?

GROUP and GROUP_COUNT functions

1 Like

Thanks annusfictus, it solved my doubt.

My DIALPLAN is almost finished with this:

exten => s,1,Set(GROUP()=trunkrsl) ;Set Group
exten => s,2,Noop(Group Count = ${GROUP_COUNT(trunkrsl)})
exten => s,3,GotoIf($[${GROUP_COUNT(trunkrsl)} > 2]?103) ;Exceeded?
exten => s,4,Dial(PJSIP/39875*${ARG1}@gtgi,60/nj,tT) ;dial it
exten => s,5,Hangup()

exten => s,103,SetVar(DIALSTATUS=CHANUNAVAIL) ;deny call

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.