Question

What is the difference between SIP over UDP and SIP over TCP?

What does "SIP over TCP" really means? Does it mean:

both SIP and RTP use TCP

or

SIP use TCP and RTP use UDP

Was it helpful?

Solution

"SIP over TCP" just means "send the SIP messages over a TCP stream". SIP is largely transport protocol agnostic, so the same protocol can run over SCTP, DTLS, and so on.

From the user's perspective there's no difference.

From the perspective of someone using a SIP stack/writing a SIP application, there's little difference: SIP over UDP implements various reliability mechanisms (resend+backoff for starters).

The session descriptions MAY use RTP for the media streams, but SDP is not tied to using RTP. You may use plain TCP streams if you wish, or any other protocol (provided there's a way of describing the protocol in SDP, and only useful for those clients that understand that transport protocol, of course).

RTP itself is a transport protocol that usually runs over UDP (because timeliness is more important in a real-time transport protocol than reliability), but can run over TCP (provided the media is framed - RFC 4103 data is not, for instance).

So usually people will run SIP over TCP and RTP over UDP, but neither protocol is limited to this particular setup.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top