Vol. I · No. 46The protocol sectionSat, 10 Oct 2026
Layer 7 · Media · the protocol that rings the phone

SIP

Session Initiation Protocol

SIP sets up the call and then gets out of the way. It finds the person you are calling wherever they are registered, negotiates what media both ends can handle, and hands the actual audio and video to RTP — signalling, never the call itself.

SIP locates the callee and negotiates the session — then the media flows directly over RTP, without it.

Operates at
Layer 7
HTTP-like text
Ports
5060 · 5061
plain · TLS
Carries
Signalling
not the media
Describes with
SDP
codecs and ports

How it works

Ringing, answering, and then getting out of the way
CallerCallee
INVITE — with an SDP offer
INVITE sip:anna@example.com SIP/2.0
“I can do Opus and H.264, send media to 203.0.113.7:16384”
180 Ringing, then 200 OK with the answer
200 OK — SDP answer
“Opus it is; send mine to 198.51.100.4:24000” — the media path is now agreed
ACK — and the call is up
RTP flows directly between the endpoints — SIP is silent until BYE

SIP’s job ends once both sides know where to send media and in what codec. The audio never touches the signalling path — which is why a call can sound fine while the SIP server is somewhere else entirely.

The main points

What SIP does, step by step

1
Register a location

A phone REGISTERs its current address against its SIP URI, so it can be found later.

2
Invite with an offer

An INVITE carries an SDP offer listing codecs and the address media should be sent to.

3
Answer and agree

Provisional responses ring the phone; 200 OK returns the SDP answer choosing from the offer.

4
Talk, then hang up

RTP flows directly end to end; BYE ends the dialog, and re-INVITE changes it mid-call.

Methods and pieces
REGISTER — say where you are
INVITE / ACK — start a session
BYE / CANCEL — end or abandon it
Proxy / registrar — the servers that route it
SDP — the media description
ICE / STUN / TURN — getting through NAT

In cybersecurity

SIP is plain text on a well-known port and reaches the phone system, which makes it one of the most relentlessly scanned services on the internet.

Toll fraud

A cracked extension is used to place expensive international calls, often within hours of exposure.

Registration hijacking

A forged REGISTER points someone’s number at the attacker, who then receives their calls.

Use SIPS and SRTP

TLS on 5061 for signalling, SRTP for media — plain SIP reveals who called whom, and when.

Scanning and enumeration

Automated tools sweep 5060 constantly, probing extensions and default passwords.

Caller ID is a claim

The From header is set by the caller — the whole basis of spoofed calls and vishing.

Rate-limit and fail2ban

Lock accounts on repeated failures and never expose a PBX directly to the internet.

Rides in the stack

IPUDP / TCP / TLSSIPsets up RTP

Signalling and media take different paths — SIP may cross several proxies while RTP goes straight between the phones.

Works with

RTPWebRTC

Responses & roles

Response classes
1xxringing
2xxanswered
3xxmoved
4xx – 6xxfailed
Servers
Registrarwhere you are
Proxyroutes requests
Redirectpoints elsewhere
B2BUAsits in the middle