Calls not working with a VPN: WhatsApp, Telegram and Discord voice

Voice and video calls travel over UDP, and a VPN breaks them when it doesn't carry UDP or carries it badly: a proxy mode that takes only part of the traffic, a server with UDP closed, or a protocol that packs UDP into TCP on a lossy line. WireGuard, AmneziaWG, Hysteria2 and TUIC carry UDP as it is; VLESS, VMess and Trojan carry it inside their TCP connection; Shadowsocks needs UDP open on the server. If calls work fine without the VPN, the quickest fix is to leave the messenger out of the tunnel.

Updated

NAT type: for games, calls and P2P

Calls in Veli. In Veli calls go through the tunnel along with everything else: on a computer every profile runs through a virtual network adapter (TUN), and there is no system-proxy mode that would leave UDP behind.

Download Veli for free
On this page

Why calls need UDP

A call is a stream of small packets, each a few milliseconds of sound or a piece of a frame. A packet that comes late is as useless as a lost one, so calling apps prefer UDP, which neither waits nor resends. Discord's developer documentation describes voice as a separate UDP connection next to the WebSocket that sets it up. Telegram's documentation describes its calls as built on WebRTC, going straight to the other person's address or through Telegram's relay servers.

WebRTC is also behind calls in browsers and many other apps. Its standard assumes UDP and keeps TCP as a way through firewalls that block UDP: a relay server (TURN) reached over TCP or TLS. Such a call connects, but every lost packet holds up the ones behind it, and the voice turns choppy or falls behind.

Before a call the apps also learn their public address and port from a STUN server, to try a direct path. With a VPN on, what they learn is the VPN server's address and its NAT, not your router's.

What breaks a call in a VPN

A proxy typed into Telegram itself is a separate thing: an MTProto proxy carries messages, not calls.

  • Messages go, calls hang on “Connecting”

    Likely causeNot everything goes into the tunnel: the client works as a proxy, or UDP isn't carried

    What to doSwitch the client to its TUN or VPN mode; check UDP on the server

  • Sites open on Shadowsocks, calls and games don't

    Likely causeThe server relays only TCP, or its UDP port is closed

    What to doTurn UDP on in the server's settings and open the port for UDP, at the host too

  • Calls connect, the voice is choppy and late

    Likely causeUDP travels inside TCP (VLESS, VMess, Trojan, OpenVPN over TCP) on a line that loses packets

    What to doA profile that carries UDP as UDP, or a server closer to you

  • WireGuard or Hysteria2 won't connect on this network, TCP profiles do

    Likely causeThe network lets no UDP out: some offices, hotels and guest Wi-Fi

    What to doA TCP protocol for this network; calls will work, but worse

  • A call connects only after a long wait and has more delay

    Likely causeThe VPN server's NAT gives a new port for every address, so the call goes through relays

    What to doCompare the NAT type with the VPN on and off; try another server

  • Calls drop every few minutes

    Likely causeThe tunnel itself reconnects

    What to doLook at the client's log at the moment of the drop

How each protocol carries UDP

  • WireGuard, AmneziaWG

    How UDP travelsWhole IP packets over UDP: a call goes as it is

    What to checkThe network must let UDP out to the server's port

  • Hysteria2

    How UDP travelsUDP packets in QUIC datagrams, over UDP

    What to checkThe same; port hopping helps where one long UDP flow gets slower

  • TUIC

    How UDP travelsAs UDP (udp_relay_mode native) or in QUIC streams (quic, with more overhead)

    What to checkNative usually suits calls better

  • VLESS

    How UDP travelsInside its TCP connection; sing-box encodes it as XUDP by default, which Xray servers understand

    What to checkWorks, but suffers on lossy lines

  • VMess, Trojan

    How UDP travelsInside the same TCP or TLS connection

    What to checkAs VLESS

  • Shadowsocks

    How UDP travelsSeparate encrypted UDP packets to the server's port

    What to checkUDP on in the server's settings and open in its firewall. UDP over TCP is an option of sing-box, and the server has to know it too

  • OpenVPN

    How UDP travelsWith proto udp as UDP, with proto tcp inside TCP

    What to checkUDP for calls

  • An HTTP proxy

    How UDP travelsNot at all: an ordinary HTTP proxy carries TCP connections

    What to checkNot for calls

  • SOCKS5

    How UDP travelsCan relay UDP (the UDP ASSOCIATE command), if the app and the proxy both use it

    What to checkAn app sends there only what it was written to send

TUN or system proxy

Many clients can work two ways. In proxy mode they set a system proxy, and only programs that read it use the VPN, mostly browsers, over TCP. A messenger may not read it at all: its messages and calls then go past the VPN, or nowhere if the network blocks them. In TUN mode the client creates a virtual network adapter, and everything the system sends, UDP included, goes into it. The switch is usually called TUN or VPN mode. On Android, an app that asks for the system's VPN permission works this way.

A browser call is a special case. With a proxy instead of a VPN, WebRTC can go around the proxy over UDP and show the other side your real address. A WebRTC leak test shows what a page sees.

The messenger inside the tunnel or outside it

Split tunneling decides it for one app. Which way depends on where calls work.

  • Calls work on this network without the VPN

    Do thisLeave the messenger out: “everything through the VPN except” this app

    What it costsIts messages go direct too; in a direct call the other side sees your real address

  • The messenger doesn't open without the VPN

    Do thisKeep it in, on a profile that carries UDP as UDP

    What it costsThe call is as good as the server: take a close one

  • Only the messenger needs the VPN

    Do this“Only through the VPN” with just this app

    What it costsEverything else goes as without a VPN

  • By app, not by address. A direct call goes to the other person's address, which is on no list of the service's networks. A rule by address catches the messages and the relays, not such a call.
  • Restart the app after changing the rule, and reconnect the VPN: connections that were open keep their old way.
  • One VPN at a time. Two clients fight over the routes, and calls are the first to suffer.

Check, step by step

  1. 1

    Call without the VPN

    On the same network. If it fails there too, the cause is the network or the app, not the VPN.

  2. 2

    See what the network does with UDP

    A NAT type test with the VPN off tells whether UDP gets out at all and what NAT you are behind. With the VPN on it shows the server's NAT.

  3. 3

    Change the protocol

    If the same server has a WireGuard, AmneziaWG or Hysteria2 profile next to VLESS, call on it. Better there: the trouble was UDP inside TCP.

  4. 4

    Check your own server

    For Shadowsocks the port must be open for UDP as well as TCP, in the server's firewall and in the host's panel. The commands are below.

  5. 5

    Take the app out, or put only it in

    Split tunneling as above, then restart the messenger and call again.

On a Shadowsocks server: is the port open for UDP
ss -lunp | grep 8388
ufw status | grep 8388

8388 is an example, put your port. An empty answer to the first line means nothing listens there on UDP. ufw allow 8388/udp opens it in ufw; the host's own firewall counts too.

Sources

How we write and check

In Veli

Calls in Veli

In Veli calls go through the tunnel along with everything else: on a computer every profile runs through a virtual network adapter (TUN), and there is no system-proxy mode that would leave UDP behind. On Android the app uses the system's VPN interface. How UDP travels then depends on the profile: WireGuard, AmneziaWG and Hysteria2 carry it as UDP, and so does TUIC, which connects on a computer only; VLESS, VMess and Trojan carry it inside their connection; Shadowsocks sends it to the server's UDP port. OpenVPN connects on Windows and Linux.

To leave a messenger out, or to send only it through: Apps and sites → “Everything through the VPN except…” or “Through the VPN only…” → “Pick apps”, then Save and Reconnect. On a computer rules by app work on VLESS, VMess, Trojan, Shadowsocks, Hysteria2, TUIC and Veli profiles; WireGuard, AmneziaWG and OpenVPN take only IP addresses. On Android an app can be picked on any protocol. With the VPN on, Diagnostics → Speed shows “Connection quality”: latency, jitter and loss through the tunnel, which is what a call feels. On your own server the app installs WireGuard, AmneziaWG, Shadowsocks with its port open for TCP and UDP, VLESS Reality, OpenVPN and Veli.

FAQ

Why do WhatsApp calls not work with a VPN?

Most often the VPN doesn't carry UDP or carries it inside TCP on a poor line: a proxy mode instead of TUN, a server with UDP closed, or a TCP-only protocol. Try a profile on WireGuard, AmneziaWG or Hysteria2, or leave WhatsApp out of the tunnel.

Why do Telegram calls not connect through a VPN?

Telegram calls run on WebRTC, directly or through Telegram's relays, and WebRTC wants UDP. If messages work and calls don't, UDP isn't getting through the VPN. An MTProto proxy in Telegram doesn't carry calls at all.

Does Discord voice work over a VPN?

Yes, if the VPN carries UDP: Discord's voice is a separate UDP connection. On a tunnel that packs UDP into TCP it works, but the voice lags on a lossy line.

Which VPN protocol is best for calls?

One that carries UDP as UDP: WireGuard, AmneziaWG, Hysteria2 or TUIC. Where the network blocks UDP, a TCP protocol such as VLESS still carries calls, with more delay.

Should I turn the VPN off for calls?

Not off: leave the messenger out of the tunnel by app, if calls work without the VPN on your network. Everything else stays protected.

Why is call quality worse with a VPN?

The call takes a detour through the server, and with a TCP protocol every lost packet delays the rest. A closer server and a protocol that carries UDP help.

Calls through the tunnel, or past it

Veli is a free client for Windows, macOS, Linux and Android. It takes UDP through a virtual adapter, and Apps and sites can leave a messenger out by app.