KuberEva Book a call

Home/Documentation/SIP trunking & SBCs

SIP trunking & session border controllers

A SIP trunk crosses a border where dialects differ, addresses need hiding, codecs may not match, and inbound traffic cannot be trusted. The SBC is the component that mediates all of it.

SIP in one paragraph

SIP — the Session Initiation Protocol, defined in RFC 3261 — establishes, modifies and terminates sessions. It does not carry audio. The media travels separately over RTP, and the two endpoints negotiate what codec to use and where to send it via SDP carried inside the SIP messages. That separation of signaling and media is the source of most of SIP's flexibility and most of its operational difficulty.

MethodPurpose
INVITEStart a session, or modify one already in progress (re-INVITE)
ACKConfirm a final response to an INVITE
BYEEnd the session
CANCELAbandon a request still in progress
REGISTERBind a user to a contact address
OPTIONSQuery capabilities — in practice, the standard trunk heartbeat
REFERAsk the far end to transfer the call elsewhere

Responses are numbered like HTTP: 1xx provisional, 2xx success, 3xx redirection, 4xx client error (486 Busy Here, 404 Not Found), 5xx server error, 6xx global failure.

What a SIP trunk actually is

A SIP trunk is a commercial and logical arrangement between your network and a service provider's, carrying a contracted number of concurrent sessions. It is not a physical circuit. Two consequences follow, and they surprise people coming from PRI:

The session border controller

An SBC sits at the boundary between your network and the provider's. Formally it operates as a back-to-back user agent (B2BUA) as defined in RFC 3261: it terminates the inbound SIP session completely, inspects and transforms both the signaling and the media, and then initiates a fresh outbound session toward the destination.

That full termination is what makes everything else possible. The SBC is not forwarding packets — it is re-originating the call, which means it can change anything.

Fig. 1 — the SBC terminates and re-originates B2BUA, RFC 3261
Your PBX / CCaaS internal addressing your SIP dialect Session border controller back-to-back user agent session A session B terminated originated topology hiding SIP normalization call admission control transcoding · SRTP Carrier their addressing their SIP dialect SIP signaling SIP signaling RTP media RTP media CAC — your only capacity ceiling On a PRI, 23 channels was physics. On SIP it is a setting — and nothing stops session 500 without it.
Because the SBC fully terminates one call and starts another, it can change anything in between — headers, codecs, addressing. That is what makes two incompatible SIP dialects interoperate, and it is where most of the configuration effort in a migration actually goes.

What it does

FunctionWhat it solves
Topology hiding Internal addresses, hostnames and network structure never leave your boundary. Without it, your SIP headers advertise your internal architecture to anyone who receives a call.
SIP normalization Every vendor and carrier implements SIP with its own dialect. The SBC rewrites headers so your PBX sees what it expects and the carrier sees what it expects. In practice this is the function that consumes most configuration effort.
Call admission control (CAC) Per-trunk-group enforcement of concurrent session limits, stopping calls that would exceed contracted capacity from ever reaching the PBX. This is your capacity ceiling — the closest equivalent to "we only have 23 channels."
Transcoding Converts between codecs when the two sides cannot agree. Useful, expensive in resources, and quality-degrading — so design to avoid needing it rather than relying on it.
Media handling & NAT traversal Anchors or relays RTP so media flows correctly across address boundaries and firewalls.
Security Registration and INVITE flood protection, malformed-message rejection, access control, and encryption via TLS for signaling and SRTP for media.
Routing & failover Least-cost routing, carrier failover, and load distribution across multiple providers.
Why you cannot skip the SBC It is occasionally suggested that a firewall with SIP ALG is enough. It is not. A firewall does not normalize dialects, does not enforce session limits per trunk group, does not hide topology, and does not transcode. SIP ALG implementations in particular are a well-known source of subtle call failures — the first troubleshooting step on most SIP problems is turning it off.

Media anchoring: the decision that costs money

An SBC can either anchor the media — RTP flows through it in both directions — or let the endpoints send media directly to each other while only the signaling passes through.

ModeAdvantagesCosts
Anchored Full control: recording, transcoding, quality measurement, topology hiding of media, consistent NAT behavior. Every concurrent call consumes SBC media capacity, which sizes the hardware. Adds a hop of latency.
Direct media Lower latency, far lower SBC resource consumption. No recording, no transcoding, no independent quality measurement, and NAT complications.

Most enterprises anchor, because recording and measurement are non-negotiable. The important part is knowing you have made that choice, because it determines SBC sizing — and because a transfer scenario where the carrier does not support REFER leaves media anchored on your SBC for the entire duration of the onward call, consuming capacity you may not have planned for.

Sizing a SIP trunk

Two steps, as covered in TDM to IP migration: determine concurrent session requirement using Erlang B against a stated grade of service, then calculate the bandwidth to carry it.

Bandwidth per session is codec payload plus IP, UDP and RTP header overhead, and the overhead is not trivial — for low-bitrate codecs the headers can approach the size of the payload. Calculate it rather than estimating, and calculate it for the actual WAN links the media will traverse, including any VPN encapsulation.

Security, briefly but seriously

An internet-facing SIP interface is scanned continuously. Toll fraud is automated and relentless, and a misconfigured trunk can accumulate a very large bill overnight.

Deployment patterns

Related reading

SBC normalization is where most SIP migrations are actually won or lost.

Book a call