How do I find the max call load?

I have an Asterisk box running several hundred SIP phones. Everything is working normally and I’m very happy with it so far.

However, I’ve been asked to find out what is the maximum number of simultaneous calls we’ve had so far. This is so that we can figure out if we need a bigger Internet pipe or if we need to move to another codec, like G729.

Is there any way to determine this from within Asterisk?


From what I know there is no easy way to determine the max call load. Please check this topic in which we advertised one of our article, presenting a method to be used in order to evaluate an Asterisk server.

If you decide to give a try please use that topic for questions and some help.

Best regards,

Thanks very much for your reply. However, I’m not sure if I worded my question in the right way.

I would like to see what the max number of simultaneous calls has been so far on the server. I’m not really too fussed with calculating the theoretical maximum that can be achieved by the server…

We use an mrtg script, that I will not post here because is a dirty hack, that collects the numer of concurrent calls every 5 minutes, sending to the Asterisk server, through the AMI interface, the command “show channels” and parsing the output.


Marco Bruni

i am not sure there is an easy answer to looking backwards if you have not been regularly collecting data. as a matter of current tracking, i am using munin to gather assorted load data every five minutes and display it in a somewhat friendly way. if you google asterisk plugins for munin, you will find a number of packages designed to gather/display asterisk data

You could also implement GROUP_COUNT and store the variable somewhere. This would give you
the max calls from now on; just update your stored value with the new count each time you get over that same stored value.

Would this be the definitive solution ?

I’ve been thinking a bit about this, and I believe I have a pretty good solution, with minimal CPU load. Works in shell, and if the calls are in a db, very easy to do as well.

The idea is to list all call times, followed by 1 if its a call setup, and -1 if its a call hangup. Then loop & sum !

There it goes, on Master.csv:

awk ‘BEGIN{FS=",""} /ANSWERED/{split($11, a, “”"); split($12, b, “”");printf ("%s,1\n%s,-1\n", a[1],b[1]); }’ Master.csv | sort | awk -F , ‘{cpt=cpt+$2; printf ("%s %03d\n", $1, cpt);}’

Only issue, it does not take in consideration non established calls, that still take up some resources, but it can be easily adapted. Obviously, further selection can be done on a trunk name or any part of the CDR !

Let me know if it works for you,


Keywords for search: concurrent simultaneous calls

I have found munin is the easiest tool …have it track assorted asterisk metrics every five minutes and give you handy dandy graphs. its pretty straight forward to write a little munin plugin to count active channels.

Just enable all CDRs, and analyse them with whatever tools.