VoIP firewall configuration is where most deployments go wrong. Wrong ports, SIP ALG enabled, or asymmetric rules cause registration failures, one-way audio, and dropped calls. Here is how to get it right.
VoIP requires two separate port ranges for SIP signaling and RTP media:
| Protocol | Port/Range | Direction | Purpose |
|---|---|---|---|
| UDP/TCP | 5060 | Both | SIP signaling (unencrypted) |
| TCP | 5061 | Both | SIP over TLS (encrypted) |
| UDP | 10000-20000 | Both | RTP media (audio/video) |
| UDP | 3478, 5349 | Both | STUN/TURN (NAT traversal) |
The RTP port range varies by platform. Asterisk defaults to 10000-20000. FreeSWITCH uses 16384-32768. Check your PBX settings and open the matching range bidirectionally — both inbound AND outbound.
SIP ALG (Application Layer Gateway) inspects and modifies SIP packets to help with NAT traversal. In practice it almost always breaks VoIP by rewriting headers incorrectly, breaking authentication, dropping packets it does not understand, and corrupting REGISTER packets.
Disable SIP ALG on every router and firewall in the call path.
NAT breaks VoIP because SIP endpoints advertise their private IP addresses in SDP and Contact headers. Solutions:
Capture SIP on both sides of the firewall. If Contact header IPs differ between captures, SIP ALG is rewriting packets.
Mark SIP and RTP with DSCP EF (46) to give voice packets priority over data traffic on shared links.
VoIP uses UDP/TCP port 5060 for SIP signaling, TCP port 5061 for SIP over TLS, and UDP ports 10000-20000 for RTP media. STUN uses UDP port 3478. All ports must be open bidirectionally on every firewall in the call path.
Yes — disable SIP ALG on every router and firewall in the call path. SIP ALG attempts to rewrite SIP headers for NAT but almost always corrupts them, causing registration failures, one-way audio, and dropped calls.
Most common VoIP firewall issues: SIP ALG enabled, RTP port range not open bidirectionally, asymmetric rules allowing outbound but blocking inbound RTP, or UDP state timeout too short. Capture SIP on both sides of the firewall to find exactly where packets are being dropped.
Paste your SIP trace into SIPSymposium. The analyzer detects NAT issues in Contact and SDP headers, identifies missing ACKs caused by firewall drops, and checks for SIP ALG interference.