Lesson 2 introduced codecs as the language two endpoints agree to speak. This lesson goes further: how the common wholesale codecs compare, exactly how much bandwidth one call uses, and how to turn traffic numbers into a capacity plan for links, ports and channel limits. All figures are worked examples you can repeat with a calculator.
The codecs you will meet
| Codec | Payload bit rate | Typical use in wholesale | Notes |
|---|---|---|---|
| G.711 (PCMA / PCMU) | 64 kbps | Premium and CLI routes, fax, anything touching the fixed network | Best narrowband quality, no compression, light on CPU. PCMA (A-law) is used in most of the world, PCMU (μ-law) in North America and Japan. |
| G.729 (A / AB) | 8 kbps | Cost-sensitive routes and long-haul links | About one eighth of G.711’s payload. Slightly lower quality, poor for fax and in-band DTMF. |
| G.722 | 64 kbps | HD voice between IP endpoints | Wideband (“HD”) audio at the same bandwidth as G.711, but most wholesale paths still end in narrowband networks. |
| Opus | 6–510 kbps (voice typically 16–32) | Apps, WebRTC, modern SIP clients | Adaptive and very robust to loss. Appears at the edges; usually transcoded to G.711 or G.729 before the carrier core. |
Two other items travel with the codec list in SDP and matter just as much: telephone-event (DTMF sent as RFC 4733 packets) and T.38 (fax relay). If your partners disagree on DTMF method, IVR menus fail even though voice works.
Anatomy of a voice packet
A codec produces a frame of audio every few milliseconds. The sender bundles one or more frames into an RTP packet; the time covered by one packet is the packetization time, or ptime, usually 20 ms. Every packet then gets headers:
Calculating bandwidth per call, step by step
- Payload per packet = codec bit rate × ptime ÷ 8. G.711 at 20 ms: 64,000 × 0.02 ÷ 8 = 160 bytes. G.729: 8,000 × 0.02 ÷ 8 = 20 bytes.
- Packets per second = 1 ÷ ptime. At 20 ms that is 50 pps; at 30 ms, about 33.3 pps.
- Add headers. IP 20 + UDP 8 + RTP 12 = 40 bytes. On Ethernet add another 18 (header and checksum).
- Multiply: packet size × pps × 8 = bits per second, in each direction.
Bandwidth (bps) = (payload + headers) × 8 × packets per second
| Codec / ptime | Packet (IP) | IP bandwidth | On Ethernet |
|---|---|---|---|
| G.711, 20 ms | 200 bytes | 80.0 kbps | 87.2 kbps |
| G.711, 30 ms | 280 bytes | 74.7 kbps | 79.5 kbps |
| G.729, 20 ms | 60 bytes | 24.0 kbps | 31.2 kbps |
| G.729, 30 ms | 70 bytes | 18.7 kbps | 23.5 kbps |
| Opus at 24 kbps, 20 ms | 100 bytes | 40.0 kbps | 47.2 kbps |
Notice two things. First, G.729 saves a lot but not a factor of eight, because the headers stay the same. Second, a longer ptime saves bandwidth but adds delay and makes each lost packet more audible. Encryption (SRTP) adds an authentication tag of around 10 bytes per packet, and VLAN tags or tunnels add more; include them if you use them.
From one call to a whole link
Voice is symmetric: the figures above flow in both directions at once. Now the important wholesale detail: if your switch relays media (RTP passes through it rather than flowing directly between customer and vendor), every call has two legs on your server.
Worked example. You expect 300 simultaneous calls, half G.711 and half G.729, all relayed through the switch on Ethernet:
150 × 87.2 kbps = 13,080 kbps (G.711)
150 × 31.2 kbps = 4,680 kbps (G.729)
one leg, one direction = 17,760 kbps
two legs (media relay) = 35,520 kbps ≈ 35.5 Mbps in AND 35.5 Mbps out
+ about 5% for SIP signalling, monitoring and management
total planning figure ≈ 37.5 Mbps each direction
Keep links below roughly 70–80% busy-hour utilisation; queues start to add jitter well before a link is technically full. On a 100 Mbps port, that example leaves comfortable room. The same 300 calls all in G.711 would need about 55 Mbps per direction — still fine, but no longer “tiny”.
How many channels do you need?
Channel limits on gateways and vendor agreements are about concurrent calls, not bandwidth. Estimate them from busy-hour traffic in Erlangs: one Erlang is one channel busy for a full hour.
Erlangs = answered minutes in the busiest hour ÷ 60
Example: in the busiest hour you carry 18,000 answered minutes. 18,000 ÷ 60 = 300 Erlangs, meaning about 300 calls in progress on average during that hour. Then add headroom:
- Calls in setup and ringing also hold channels. With low ASR this can be a noticeable share.
- Traffic is never perfectly smooth within the hour. Planning formulas such as Erlang B give the exact number for a target blocking rate; as a rule of thumb, add 20–30% on top of the average.
- So 300 Erlangs → plan for roughly 375–400 channels, and set vendor and customer limits with that in mind.
Transcoding: when the two legs disagree
If a customer sends only G.729 and the vendor accepts only G.711, the switch must transcode: decode one and re-encode the other. That works, but it has costs:
- CPU or DSP capacity. Each transcoded call uses far more processing than a relayed one. Know how many transcoded calls your platform supports and keep a limit on them.
- Quality. Each compression step loses some quality; transcoding twice on one path (G.729 → G.711 → G.729) is audibly worse.
- Delay. A few extra milliseconds per conversion.
- DTMF and fax. In-band tones rarely survive G.729. Use RFC 4733 events for DTMF and T.38 or G.711 for fax.
The cleanest design is to agree codecs during onboarding so both legs share at least one codec, and keep transcoding for genuine exceptions.
A capacity-planning checklist
- Collect busy-hour answered minutes per customer and per vendor.
- Convert to Erlangs, add 20–30% headroom, and set channel limits.
- Note each partner’s codec and ptime, then calculate per-call bandwidth.
- Double the figure if your switch relays media.
- Add overhead for signalling, monitoring, recordings and backups.
- Check the result against port speed and your provider’s commit, keeping utilisation under about 75%.
- Review monthly; traffic grows quietly until the day it does not fit.
Key takeaways
- G.711 uses about 87 kbps per direction on Ethernet at 20 ms; G.729 about 31 kbps.
- Headers (40 bytes IP/UDP/RTP) are added to every packet, so small codecs save less than their bit rate suggests.
- With media relay, each call crosses the switch port twice in each direction.
- Channels come from busy-hour Erlangs plus 20–30% headroom.
- Transcoding costs CPU, quality and delay; agree common codecs during onboarding.
Quick quiz
1. How large is a G.711 RTP packet at 20 ms, including IP, UDP and RTP headers?
200 bytes: 160 bytes of payload plus 40 bytes of headers.
2. Your busiest hour carries 9,000 answered minutes. How many Erlangs is that?
150 Erlangs (9,000 ÷ 60). Plan for roughly 180–195 channels with headroom.
3. Why might 300 relayed G.711 calls need about twice the bandwidth you first calculated?
With media relay each call has two legs on the switch, so its port carries the audio twice in each direction.
Related reading
- Lesson 2: SIP fundamentals: call flow, SDP, RTP, codecs and NAT
- Lesson 6: Route quality KPIs
- VoxInspector – VoIP monitoring, FAS detection and route testing for VOS3000
- All training lessons · VoxComms home
Examples in this course use invented names (Vendor X, Customer Y, Country Z) and documentation IP ranges. Menu names and options differ between softswitch versions; always check your own system and vendor documentation.