NAT and STUN in VoIP

Short answer: NAT (network address translation) lets many devices share one public IP address, and STUN (Session Traversal Utilities for NAT) is a protocol that tells a device what public IP and port it appears from. SIP clients use STUN so the other side sends audio to a reachable address.

Most home and office routers use NAT, which is why one-way audio and dropped calls are common first problems with a new softphone.

How it works

SIP messages include the IP address and port where media should be sent. Behind NAT, a device only knows its private address, so the far end may send RTP audio nowhere. A STUN server (RFC 8489) reflects the public mapping back, and the client advertises that instead. Keep-alives, rport and ICE help keep the mapping open.

NAT traversal at a glance

ItemRole
STUN server (RFC 8489)Reflects the public address and port so the client can advertise it
Keep-alives, rport and ICEHelp keep the NAT mapping open
One-way audioEnable STUN or NAT traversal in the SIP client
Browser web dialerNeeds no client setup

How it applies to ZuteSIP

When you register a ZuteSIP number in Zoiper, Linphone or MicroSIP behind a router, enable STUN or NAT traversal in the client if you hear one-way audio. Registration uses sip.zutesipdialer.com on UDP/TCP port 5060 or TLS port 5061. The browser web dialer needs no client setup.

Related terms

  • SIP
  • Softphone
  • G.711 codec
  • Web dialer

Frequently asked questions

What causes one-way audio?

Usually NAT or a firewall blocking RTP; enabling STUN or switching to TCP/TLS often helps.

Is STUN the same as TURN?

No, TURN relays media through a server, while STUN only discovers your public address.

Should I disable SIP ALG on my router?

SIP ALG often rewrites packets incorrectly, so many troubleshooting guides recommend turning it off.

Related pages

Sources