Speak to a website designer — call Call 01793 239 239 Our team are here 9am to 4.30pm weekdays Client Connect

Count Calls From Asterisk Dialplan

For counting the calls in Asterisk , you can use the Group() dialplan function from Asterisk dialplan.

For counting the calls in Asterisk , you can use the Group() dialplan function from Asterisk dialplan.

To add a call to the group function, use this dialplan application

Set(GROUP()=call_count)

To view the call count, use following dialplan application

Noop(${GROUP_COUNT(call_count)})

Below dialplan example shows you how to use the group function to limit the total call count to 10 in your asterisk box


exten => _X.,1,Set(GROUP()=call_count)
exten => _X.,n, Noop(Total number of calls : ${GROUP_COUNT(call_count)})
exten => _X.,n,GotoIf($[${GROUP_COUNT(call_count)} < 11]?continue:hang)
exten => _X.,n(continue),Noop()
Add your dialplan here to handle calls when the call count is below 11
exten => _X.,n(hang),Hangup

Was this article helpful?

If it didn’t answer your question, contact our support team or call 01793 239 239 and we’ll be happy to help in any way we can.