Erlangs or circuit in use by hour

hi, i need to calculate the number of circuits used by hour, in erlangs if possible, is it posible to obtain that value from the cdr records?,

i don’t believe that number is actively calculated or stored in the system anywhere, but i don’t see why you could not use the CDR records to determine your erlang values.

note: i had to get on wikipedia to figure out what an erlang was first.

the cdr records contain the start time of the call, which channel it was on, and the duration of the call. based on those three numbers, i would THINK you would be able to somehow calculate the number of concurrently active lines and arrive at something that approximated the number of erlangs.

from wikipedia:

so, if we can sum up the overall usage for each individual trunk (zap/1, zap/2, etc) or sip device over a given time period, make the usage into a percentage (ie trunk 1 was 15% in use throughout the day) then sum the averages, you’d get the erlang number, would you not? so if you had 10 trunks, each at 20% usage for the entire day, you’d have 200% usage, or an erlang of 2. yes, no?

my interest is piqued now - if i am wrong on the above, please let me know - i’m curious as to what this might entail…

damn it, now you’ve got me wanting to figure this out…

okay, here is my query for a typical day at our shop. phones open at 8:00, close at 4:30. this equals 30600 seconds in a business day for us.

that query gives me this:

Summing all of those percentages equals 11.47, according to my math. That means that 11 and one half of our circuits are constantly in use, or just under 50% of our overall capacity.

Am I right on this? I can see how this would be an INCREDIBLY powerful number, especially if you were to break it down by differing time periods…


Here is a very simple calc I wrote some years ago, It will work out the erlangs required and lines also will work the approx bandwidth required.

It was designed to be used when specing out IP trunks on Mitel systems so it maxs out at 200 lines and only has G711 and G729. … pcalc.html

Have fun :smiley:

Oh and if you do want to find out more have a look at

Hi, i found this while googling around, … /aid/33074

can someone confirm that the operation described there is accurate?, it seems too easy, compare it with the original (academic) definition of erlang B:

if the first formula is ok, this will be a lot easier than i thought

ok, i’m trying to get this sorted out again…

changing patterns - from 8:00 till noon, figured both ways (my original way above and b4nsh33’s link)

my way (which is probably incorrect, just posting for comparison purposes)

select sum(duration)/ TIME_TO_SEC(TIMEDIFF('2006-08-21 12:00:00','2006-08-21 08:00:00')) from cdr calldate between '2006-08-21 08:00:00' and '2006-08-21 12:00:00'

this equals 13.01 on my system. what i’m doing is adding the duration of all the calls on the system in seconds, then dividing by the number of seconds in that period.

faqts way:

average duration in minutes: 1.930
total calls = 1618 divided by 4 hours = 404.50 calls per hour = 6.74 calls per minute

so, we should have (6.74 calls/minute) * 1.93 (minutes/call) = 13.002

the calls cancel each other out, as do the minutes - this is nothing more than a ratio, but of what to what?

i dunno, this seems too simple. could this be right?

found this:

doesn’t give us an Erlang, but seems to be calculating one on the backend…

EDIT: found this one too, and it gave me the same results as my two manual methods … pcalc.html

OK, it seems that the faqt and whoiswes methods give you accurate values, thanks.

regarding the erlangs meaning, i asked the same question to our switch guys, they told me that the erlangs give you an idea of how busy are your channels (they call them routes), especially at peak hours,
if you have an E1 (30 channels) and at peak hours you got 30 erlangs, it means you are lossing calls (circuit busy tone), and you cannot route more calls through it, in the other hand if you have at peak hours 20 erlangs, you know that you can handle more calls in that route. You cant take these type of decisions base on the number of calls per hour or any arbitrary period of time, because the calls have diferent duration time, start and stop time intervals,etc.


Personaly I use erlangs when sizing call centres and switches. This is why my carc gives lines and bandwidth.
For example:

For a call centre I would use the lines figure as the number of agents and the bandwidth as, well the bandwidth (also use the lines figure to make sure the ITSP can handle the bandwidth.

For a switch its for sizing the number of TDM trunks that users will be needing for out and inbound.

I do also have the macros for excel somewhere as well as a small standalon app that can break it down into peaks and troughs


hi, i discovered that the results are not accurate. we are only considering the calls that started and finished in the same hour, which is not always the case, how does the switch do to calculate it?
with our formulas: 436
switch value: 522


Not sure what you mean by inaccurate.

But you have to base the calculations on either the Busy hour or an average.

And you have to include all calls in that period. for calls starting before or ending after if doing busy hour you have to include the parts that fall within the hour.

The formula should also include some level of blocking and compensate for setup and teardown of calls.

YOu will need to ask the switch guys what they are basing their calcs on.

they may be based on total call time, where as you are basing it on talk time.