There are several codecs with varying degrees of compression, with G.711 (no compression, 64kb/s) and G.729 (8kb/s) being the most commonly used.
However the internet doesn’t provide a dedicated physical wire between the two endpoints to send the digitised data over. Instead it must be broken into discrete packets (or frames) and merged with all the other data packets going through the internet.
When dealing with voice we don’t want to introduce too much latency (delay). That’s why we choose for example to send voice frames every 20 ms. That means that we have to send 50 frames a second.
When you divide 8 kb/s (assuming G.729) by 50 frames/second and then by 8 bits/byte it’ll give 20 bytes per frame. So we’re sending 20 bytes of voice data per frame (packet). But that’s not it yet. We have to add IP header (20 bytes a packet), UDP header (8 bytes a packet) plus RTP protocol with SIP (12 bytes a packet). So now we have (20+20+8+12=) 60 bytes per packet x 50 packets/second x 8 bits/byte and you end up with 24.0 kb/s. Now if you’re using Ethernet you have to add Ethernet header to the whole business.
In practice, expect a G.729 call to take 31.2kbps, and a G.711 call to take 87.2kbps.
31.2kbps to send 8kbps of G.729 encoded data seems outrageous until you put it into perspective. The amount of overhead (23.2kbps) is the same for each codec, but seems a much greater proportion of the compressed codecs, so G.729 is still a much more bandwidth-friendly option than G.711.
What can I do to reduce the amount of overhead ?
Increasing the packet size reduces the number of packets, and so decreases the overhead. For example increasing the packet size to 40ms halves the number of packets (now 25/second) and so halves the overhead (to 8kb/s). There is of course an trade-off – in this case, that loss of only a few packets will noticeably affect sound quality.
Quality of Service (QoS) actually adds more header information but can be used to give VoIP packets higher priority than web pages or email. Now most ISP and backbone providers’ routers will act on QoS packet headers.