PROTOCOL • LAYERS
Signaling, negotiation, media and encoding
VoIP is not one protocol. A typical call uses signaling to locate endpoints and manage the session, a session description to negotiate media details, a real-time transport for packet delivery and a codec to convert between sound and digital data.
| Layer | Common technology | Responsibility |
|---|---|---|
| Signaling | SIP | Starts, changes and ends communication sessions. |
| Session description | SDP | Advertises media addresses, ports, codecs and capabilities. |
| Media transport | RTP and RTCP | Carries real-time packets and reports delivery information. |
| Audio encoding | G.711, Opus, G.729, iLBC and others | Defines how sampled voice is compressed and reconstructed. |
SESSION • CONTROL
What SIP does in a VoIP call
Session Initiation Protocol identifies participants and manages session state. An endpoint can register an address with a server, send an invitation to a destination, acknowledge a successful response, modify an established session and end it. Proxies and PBX systems use SIP information to authenticate users and apply routing policies.
SIP does not normally carry the voice samples. Its messages describe and control the session while a media protocol carries the audio.
MEDIA • NEGOTIATION
How SDP describes the media session
Session Description Protocol is commonly included in SIP message bodies. It can advertise the IP address and port where media should be sent, available codecs, payload mappings and media directions such as send-and-receive or hold.
The offer-and-answer exchange must produce a compatible result. A call can be accepted at the signaling level yet have no usable audio when the advertised address is unreachable or no codec is shared.
REAL-TIME • TRANSPORT
RTP and RTCP carry and describe media delivery
Real-time Transport Protocol adds sequence numbers, timestamps and payload identifiers to media packets. The receiver uses this information to order packets, detect loss and play audio at the correct rate. RTP usually uses UDP because timely delivery is more valuable than retransmitting late voice packets.
RTCP can report packet counts, loss, jitter and timing information associated with an RTP session. Implementations can use these reports for monitoring, adaptation and diagnostics.
AUDIO • ENCODING
Audio codec selection affects quality and capacity
A codec converts sampled audio into a digital representation and back again. G.711 provides uncompressed narrowband telephony audio at a comparatively high bit rate. Opus supports a broad range of bit rates and audio bandwidths. Other codecs may reduce bandwidth, provide specific loss behavior or meet interoperability requirements.
Codec selection should consider endpoint and provider support, audio quality, bandwidth, processing load, packetization interval, licensing where applicable and whether transcoding will be required. Repeated transcoding can add delay and reduce quality.
NETWORK • REACHABILITY
Ports, NAT and firewall behavior
SIP commonly uses UDP or TCP, and it can use TLS over TCP. Exact ports are configurable. RTP normally uses a negotiated UDP port range rather than the same port as signaling. This is why permitting a SIP port alone does not guarantee two-way audio.
NAT rewrites network addresses and can make the address inside an SDP message different from the address visible to the remote system. SBCs, media relays, traversal services and symmetric media handling are common ways to manage this boundary.
PROTOCOL • PROTECTION
Protect signaling and media separately
SIP over TLS can provide confidentiality and integrity for signaling on each TLS connection. SRTP can protect media packets. Authentication verifies users or peers, while firewall policy and rate controls limit which systems can reach the service.
Encryption is not automatically end-to-end. A PBX, SBC, recorder, gateway or transcoder may terminate and re-establish protected sessions. Document every trust and decryption boundary.
EXAMPLE • SEQUENCE
Example SIP and RTP call flow
- The caller sends a SIP invitation containing an SDP offer.
- The call-control server authenticates and routes the request.
- The destination returns a provisional response while alerting the user.
- A successful response contains an SDP answer with compatible media details.
- The caller acknowledges the response and RTP audio begins.
- RTCP reports may describe media delivery during the session.
- Either participant sends a SIP termination request and receives confirmation.
INTEROPERABILITY • TESTING
Test more than successful call setup
- Verify registration, authentication and expiration behavior.
- Test offered codecs, payload mappings and media directions.
- Confirm two-way audio through every NAT and firewall path.
- Test hold, resume, transfer, DTMF and call termination.
- Inspect behavior for unsupported codecs and malformed messages.
- Measure jitter, loss and call setup time under realistic load.
FREQUENTLY • ASKED • QUESTIONS
VoIP protocol questions
Is SIP required for every VoIP call?
No. SIP is widely used, but other signaling protocols and proprietary methods also exist. VoIP is the broader category.
Does RTP use the same port as SIP?
Normally no. SIP uses signaling ports, while RTP uses media ports negotiated for the session.
Why does a call connect but have no sound?
A signaling exchange can complete even when the RTP address or port is unreachable, translated incorrectly or blocked.
Which codec has the best voice quality?
There is no universal choice. Quality depends on audio bandwidth, bit rate, packet loss, endpoint implementation, transcoding and network conditions.
What is the difference between RTP and SRTP?
RTP transports real-time media. SRTP adds protection such as encryption and authentication to the RTP media stream.