Operations

Bandwidth per VICIdial agent: the codec math

Budget 80 to 90 kbps each way per agent on G.711 and 24 to 30 kbps on compressed codecs. The packet arithmetic, the server-side total, and what to measure.

By Published 5 min read
Close-up of illuminated fiber optic lights in blue and green colors, showcasing modern technology.

To the point

Budget about 80 kbps each way per agent on a G.711 call, and about 90 kbps with Ethernet and encryption overhead. A compressed codec such as G.729 or GSM cuts that to roughly 24 to 30 kbps. The server carries two legs per call, so its total is double.

  • 20 agents on G.711 need about 1.6 Mbps each way at the agents.
  • At the server, 20 connected calls need about 3.2 Mbps each way.
  • A budget with room for the browser page: 100 kbps each way per agent.
  • These are sums from packet sizes, not measurements from a live floor.

We say so up front because bandwidth numbers online are often quoted as findings when they are sums. A sum is fine, as long as you know it is one.

The arithmetic, packet by packet

VoIP sends a packet every 20 milliseconds, so 50 a second. Each has a payload and a header stack that does not shrink with the codec: 12 bytes of RTP, 8 of UDP and 20 of IPv4, 40 in all. Payload sizes come from RFC 3551.

Bar chart of IP-layer bandwidth per call direction: G.711 80 kbps, GSM 29.2, G.729 24
Compression saves less than the codec names suggest
CodecPayload per 20 msPacket at IP layerRate
G.711 (ulaw or alaw)160 bytes200 bytes80 kbps
GSM33 bytes73 bytes29.2 kbps
G.72920 bytes60 bytes24 kbps

Packet size times 8 bits times 50 gives the rate. Two additions apply to a real link:

  • Ethernet framing adds about 18 bytes a packet. G.711 becomes 218 bytes, about 87 kbps.
  • SRTP, which a browser phone uses, appends a tag, commonly 10 bytes. G.711 becomes about 84 kbps at the IP layer.

G.711 is called 64 kbps but the link carries 80. G.729 is called 8 kbps but carries 24, because three quarters of every packet is header. Figures are per direction. A phone sends and receives, so an agent needs 80 kbps down and 80 up, and upload runs out first on a home connection.

What an agent really needs

Add the browser page, which polls the server while the agent works. We did not measure that traffic and have no number. It is small next to voice, so test a real agent session before settling a figure. A sensible budget on G.711 is 100 kbps each way. For a compressed codec, 50 kbps.

A VPN adds dozens of bytes per packet, so a G.711 call on a tunnel can pass 100 kbps alone. On busy Wi-Fi a good 50 Mbps plan can still give a bad call. Plan for latency and loss before bandwidth: LAGGED agents and the network.

The server counts two legs

An outbound call has an agent leg and a carrier leg, and Asterisk is normally in the path of both.

Three numbers: 80 kbps per leg each way, 160 kbps each way per connected call at the server, 3.2 Mbps for 20 agents
Two legs per connected call on G.711

If the agent side is compressed and the carrier side is G.711, the server transcodes. That costs processor time, not bandwidth, and is a reason to keep codecs the same end to end. Recording writes to the server's own disk (recording storage). Listening in or barging adds a stream to the supervisor.

Lines are not agents

The dialer places more calls than there are agents. Lines wanted are the dial level times the agents counted, so a predictive campaign at level 3 can have about three lines per agent. The history we studied peaked at 62 concurrent calls with about 20 agents, one server and one mix, so an example, not a rule.

Most lines are ringing. Carriers commonly send ringback as audio, so some ringing calls carry RTP; we did not measure how many. The safe ceiling counts every line at full rate: 60 lines at 80 kbps is 4.8 Mbps each way, and the truth will be lower.

Set it up, step by step

The ceiling you can state exactly is the box-wide line limit. The picture is our test server.

VICIdial server page with Max Trunks marked
Admin, Servers, then the server: the line limit that caps carrier bandwidth
  1. Max Trunks (max_vicidial_trunks): ViciBox 12 ships 23. At 80 kbps that is 1.84 Mbps. If you raise the limit, raise the link estimate with it. See lines per agent.

A worked example

All arithmetic, for 25 agents on G.711 to browser phones:

ItemCalculationResult
Agent legs25 x 80 kbps2.0 Mbps each way
Carrier legs, 25 connected25 x 80 kbps2.0 Mbps each way
Server totalsum of both4.0 Mbps each way
50 unanswered lines at the ceiling50 x 80 kbpsup to 4.0 Mbps more
Margin of 30 percent8.0 Mbps x 1.3about 10.4 Mbps

A "100 Mbps" shared link is a ceiling, not a promise. A dedicated gigabit port has no problem with this. The constraint is almost always the agents' own connections.

Check your own floor

Stay with G.711 unless a link forces you off. Every carrier supports it. We did not test codecs against answering machine detection.

Questions people ask

How much upload does a home agent need?

About 80 kbps on G.711 for the call, so budget 100 kbps for the page and jitter.

Does a ringing call use bandwidth?

Sometimes, if the carrier sends ringback as audio. We did not measure how often.

Next steps

Compute the rate for your codec, multiply by connected agents and the line ceiling, add 30 percent, then measure one busy hour. Hosting near your carrier and agents helps call quality more than a cheaper codec: see VICIdial hosting and pricing.

VICIdial is a trademark of its owner. Trustane is an independent hosting provider.

Trustane

Managed VICIdial hosting

Run it on cores of your own

Managed VICIdial, billed by the hour against a balance you top up.

Or try one server free for 7 days, no top-up.