Which ports SIP, TLS, RTP and STUN use by default, which ones are only conventions, and where each number comes from.
| Service | Port | Protocol | Kind | Notes and source |
|---|---|---|---|---|
| SIP (unencrypted) | 5060 | UDP, TCP | Standard default | Default for sip: URIs when no port is given. Servers can listen anywhere; always check the server's own setting. RFC 3261 section 19.1.1 |
| SIP over TLS | 5061 | TCP (TLS) | Standard default | Default for sips: and for transport=tls. Some networks block it; providers often offer an alternative such as 443 or 5091. RFC 3261 section 19.1.2 and RFC 5630 |
| SIP over WebSocket | 80 / 443 | TCP (WS / WSS) | Configurable | Used by browser softphones. Not used by SIPdia. RFC 7118 |
| RTP / SRTP media | Dynamic, even ports | UDP | Dynamic range | RTP has no fixed port; each side announces its port in SDP. RTCP is traditionally the next odd port. Open the range your server and clients use. RFC 3550 section 11 |
| Asterisk RTP range (default) | 10000-20000 | UDP | Configurable | Set in rtp.conf (rtpstart / rtpend). FreePBX and Issabel use this default; it can be narrowed. Asterisk documentation |
| STUN | 3478 | UDP, TCP | Standard default | Public STUN servers listen here; Google's listens on 19302. Outbound only from the client. RFC 5389 section 9 |
| STUN over TLS / TURN over TLS | 5349 | TCP (TLS) | Standard default | TURN relays media when direct paths fail. SIPdia uses STUN and ICE, not TURN. RFC 5389 section 9 and RFC 5766 |
| DNS | 53 | UDP, TCP | Standard default | SRV lookups (_sip._udp, _sip._tcp, _sips._tcp) tell clients which host and port to use when no port is configured. RFC 3263 |
| FreePBX chan_sip (legacy) | 5160 | UDP, TCP | Configurable | FreePBX moved legacy chan_sip to 5160 so chan_pjsip could take 5060. Check Settings > Asterisk SIP Settings. FreePBX documentation |
| IAX2 (Asterisk trunking) | 4569 | UDP | Standard default | Asterisk-to-Asterisk protocol, not SIP. Listed because PBX firewalls often show it. RFC 5456 |
Only a few numbers in SIP are true protocol defaults: 5060 for sip over UDP or TCP, 5061 for TLS, 3478 for STUN. Everything else, especially RTP ranges and PBX-specific ports, is configuration that varies by product and by site. The table marks each row so you know which numbers to verify.
RFC 3263 describes the procedure: if the host is a domain name, look up NAPTR and SRV records (for example _sip._udp.example.com or _sips._tcp.example.com). The SRV record names the host and port. If there is no SRV record, use the default port for the transport. SIPdia follows this when the server address has no port.
No. 5060 is the default a client assumes when no port is given and DNS SRV has no answer. Servers can listen on any port, and many providers deliberately use another one to reduce scanning noise. Always check the server's own configuration.
Outbound: the SIP port (5060 or 5061, or the server's custom port) and UDP for the RTP range your server uses. Inbound rules are normally not needed on the client side because NAT keeps the outbound mappings open. On the PBX side, open SIP and the RTP range from the client networks only.
Each call uses a pair of ports (RTP and RTCP) per media stream, and the range must cover the maximum number of concurrent calls plus some slack. Asterisk defaults to 10000 to 20000, which is far more than most sites need and can be narrowed.
Yes. Append it to the server address as host:port on the Account page. Without a port SIPdia uses DNS SRV, then the default for the chosen transport.