How a call travels over the internet in small packets
VoIP, short for voice over internet protocol, is how a phone call travels over the internet. Your laptop or phone cuts your voice into small packets of data, usually 50 a second, and gives each one a number and an address. The packets cross the internet one by one, sharing its roads with everyone else's data, and the phone at the other end puts them back in order and plays them as sound. Some arrive late and a few never arrive, so that phone is built to cope.
Purple: your voiceKey
- Purple: your voice
- Grey parcels: other people's data
- Purple line: your copper path
0 of 8 packets heard on timecopper path, held for the whole call
Ready · your laptop to your friend's desk phone
Press Speak, or click your laptop, to send your voice. Make the internet busy to see packets wait and go missing.Press Speak, or tap your laptop, to send your voice. Make the internet busy to see packets wait and go missing.
Same streets. In the 1980s one copper path was yours for the whole call.
Anatomy of an internet call: your voice crossing a few city blocks as packets today, and as one copper path in the 1980s. The houses and trees are other homes on the same streets. The drawing is not to scale, and the call is slowed right down: one packet every half second stands for one every 20 ms.
-
Follow one call
Press Play to watch the call, or scroll down and the drawing follows you one step at a time. Try it, under the drawing, makes your own call.Press Play to watch the call, or Next to go one step at a time. Try it, under the drawing, makes your own call.
-
Step 1 of 6
Your laptop cuts your voice into packets
You call a friend from your laptop. Its microphone turns your voice into numbers, and every 20 thousandths of a second, written 20 ms, the laptop wraps the latest stretch of sound into a packet. That makes 50 packets a second in each direction, for as long as you talk.
Why 20 ms, and not longer?
It is the usual length set by the IETF, the body that writes the internet's standards. A longer packet would spend less of itself on labels, but each one would add delay, and a lost one would leave a longer hole in what your friend hears.
A standard call measures your voice 8,000 times a second and keeps each measurement in one byte. So 20 ms of sound fills 160 bytes.
Sources: IETF RFC 3551: the audio and video profile for RTP (2003); ITU-T G.711: pulse code modulation of voice frequencies (1988)
-
Step 2 of 6
Each packet gets a number and an address
Before a packet leaves, the laptop labels it. The address says where it is going. A number says where it comes in your call, and a time stamp says when its sound was recorded. Your home router then sends it out into the street. Look inside one below.
Inside a packet
- 1The address
- 2The door number
- 3The number and the time
- 4Your voice
40 of 200 bytes in each packet are labels, not voice
Why does a packet need a number?
Because the internet does not promise to deliver packets in order, or at all. The internet protocol, written in 1981, says so plainly: there are no acknowledgements and no retransmissions, and nothing keeps packets in sequence.
So the rules for sending voice add a number that goes up by one with every packet. The far end uses it to spot a missing packet and to put the others back in order.
Sources: IETF RFC 791: Internet Protocol (1981); IETF RFC 3550: RTP, a transport protocol for real-time applications (2003)
-
Step 3 of 6
Packets take different roads
At every corner, a router reads the address and sends the packet on towards it, one stop at a time. Nothing keeps a road free for your call. Your packets share the streets with everyone else's data, and a busy router makes packets wait in a line. So two packets sent one after the other can take different roads, or wait different times, and arrive out of order.
Do the packets of one call really split up?
They can. Each router decides for each packet on its own, the way Paul Baran described at RAND in the 1960s: it stores the packet, works out the best route to its destination and sends it to the next stop on that route.
In practice most packets of one call follow the same road, because routers that can choose between several roads keep each conversation on one of them. Order still goes wrong now and then, when a route changes or a busy router holds some packets back. The IETF puts it this way: the internet occasionally loses and reorders packets and delays them by variable amounts of time.
Sources: RAND: Paul Baran and the origins of the internet (2018); IETF RFC 2992: analysis of an equal-cost multi-path algorithm (2000); IETF RFC 3550: RTP, a transport protocol for real-time applications (2003)
-
Step 4 of 6
Your phone system passes them on
With a cloud phone system, the phone system itself runs in a data centre. It set up your call when you dialled. Many phone systems also pass the voice through the data centre, to connect it to the ordinary phone network or to record it. From there your packets take to the streets again, towards your friend's office.
What did the phone system do before you spoke?
It set the call up. Your laptop asked it to call your friend, the phone system found your friend's phone and made it ring, and the two ends agreed how to send the voice. Those messages follow SIP, the Session Initiation Protocol, which the IETF published in 2002.
Setting up takes a handful of messages. The voice itself then travels in the packets you are following.
Sources: IETF RFC 3261: SIP, the Session Initiation Protocol (2002)
-
Step 5 of 6
The far end puts them back in order
Your friend's desk phone keeps a tray with a place for every number. Each packet waits in its own place, and the phone plays them in turn, one every 20 ms, starting a moment after the first one lands. That moment gives a late packet time to catch up. Packet 4 landed before packet 3, and your friend never hears the difference.
How long can the phone afford to wait?
Not long. Every thousandth of a second in the tray adds to the delay from your mouth to your friend's ear, and phone engineers aim to keep that whole delay under 150 ms. A longer wait would catch more late packets, but the call would feel slow and you would talk over each other.
Engineers call this waiting place a jitter buffer. Jitter is the word for packets arriving at uneven gaps, and the rules for internet voice tell each end how to measure it.
Sources: ITU-T G.114: one-way transmission time (2003); IETF RFC 3550: RTP, a transport protocol for real-time applications (2003)
-
Step 6 of 6
Late or lost, the gap gets filled
A router with too long a line drops packets. Packet 7 never arrives. Packet 8 waits so long that its turn has passed, and the phone throws it away. Nobody sends a lost packet again, because it would come too late to help. Instead the phone fills the gap with a moment of made-up sound, so your friend hears no hole.
How does the phone fill a gap?
It invents a short stretch of sound from the voice just before it. The trick is called packet loss concealment, and the ITU, the United Nations agency for telecoms, published a way to do it for standard calls in 1999.
Short packets help too. The IETF notes that longer packets make a loss more noticeable, which is one reason calls send 20 ms at a time.
Sources: ITU-T G.711 Appendix I: packet loss concealment with G.711 (1999); IETF RFC 3551: the audio and video profile for RTP (2003)
The 1980s and today, side by side
Leonard Kleinrock showed in 1961 that sending data in packets uses a network better than holding a path for each call. The cost is the one you saw on the streets: a packet can come late, or not at all.
Phone line, 1980s
Internet call, today
The pathInternet Society; RAND
Reserved
One path, held for your call from start to end
Shared
Routers pass each packet on, stop by stop
Your voice travels asInternet Society; IETF RFC 3551
One stream
Unbroken, from the first word to the last
50 packets a second
Each carrying 20 ms of sound
Arrives in orderInternet Society; IETF RFC 3550
Always
One path, so nothing can overtake
Nearly always
Numbered, so the far end can sort them
VoIP in numbers
-
3,000
In a one-minute call your laptop sends 3,000 packets, and receives 3,000 more from your friend.
-
150 ms
Phone engineers aim to get your voice to the other ear in under 150 ms, the time the phone spends waiting for late packets included.
How it came to be
- 1964
A network with no centre
Paul Baran's group at RAND writes a paper on packet networks for secure military voice. The idea: send messages in small pieces, each one on its own, over a network with no centre to knock out.
- 1967
Two teams, one idea
At the conference where Larry Roberts presents his plan for the ARPANET, Donald Davies and Roger Scantlebury of the UK's National Physical Laboratory present a packet network of their own.
- 1969
The first link of the ARPANET
On 29 October, at 10:30 p.m., the University of California, Los Angeles, connects to the Stanford Research Institute. It is the first documented connection of the ARPANET, the packet network that grew into the internet.
- 1973
The first voice over a packet network
In December, the Network Voice Protocol carries live speech over the ARPANET for the first time. It links a handful of research sites in the United States.
IETF RFC 741: specifications for the Network Voice Protocol (1977)
- 1981
The internet protocol is written down
The Information Sciences Institute in California publishes the internet protocol as RFC 791. It sets out the address every packet still carries, and it promises to try to deliver each packet, nothing more.
- 1996
Numbers for every packet of sound
The IETF publishes RTP, the rules that give each packet of sound its number and its time stamp. Internet calls still use them.
IETF RFC 1889: RTP, a transport protocol for real-time applications (1996)
- 2002
A standard way to ring
The IETF publishes SIP in its current form, the messages that set up a call over the internet, make the far phone ring and hang up at the end.
Where Voxbi fits
Voxbi, a cloud phone system hosted in the European Union, carries your calls over the internet this way, from its apps on your laptop and mobile and from the desk phones on your desks.
See it in Voxbi