SIP trunk: definition and a practical example
Short answer: A SIP trunk is the voice connection between a company's PBX and the carrier over an IP network, with SIP signaling and audio in RTP, in place of physical lines or E1.
In Portuguese: Tronco SIP
What is a SIP trunk?
A SIP trunk is the connection between the company’s IP PBX and the carrier over the data network, either across the internet or over a dedicated link. Signaling uses SIP and voice travels in RTP packets. It replaces analog lines and the E1 trunk: channels stop being physical and are set by contract instead.
The carrier identifies the trunk in one of two ways: by SIP registration, with a username and password, or by IP address, when it only accepts calls from known IPs. Between the PBX and the internet there is usually a firewall or an SBC, which handles NAT, security and message normalization.
Every call depends on several things at once: the internet link, authentication, the channel limit, codec negotiation and RTP getting through in both directions. That is why a SIP trunk can show as registered on the PBX and still fail to complete calls, or complete them with no audio. The final SIP response of each call shows at which of these stages the failure happened.
In practice
Common SIP trunk failures and the response they tend to produce:
| Symptom | Typical SIP response | Likely cause |
|---|---|---|
| Call rejected right at the start | 401 Unauthorized | Credentials or authentication challenge |
| Rejected at peak time | 503 Service Unavailable | Channel limit or carrier unavailable |
| Rejected right after the offer | 488 Not Acceptable Here | No codec in common |
| Answers, but one side cannot hear | 200 OK | NAT or SIP ALG altering the SDP |
| Destination does not answer | 480 Temporarily Unavailable | Extension or destination down |
The full list is in SIP codes.
How Monitor uses this
A real test call to a number on the trunk goes through everything at once: authentication, routing, the channel limit, codecs and audio in both directions. The final SIP response of that call says where it stopped. See SIP trunk monitoring.
Frequently asked questions
How do I know whether the SIP trunk is working?
Make a real call over it and check three things: the final SIP response, audio in both directions and voice quality. A registered status on the PBX only shows that signaling reached the registrar. The trunk can be registered and still reject calls because of a channel limit, an incompatible codec or a routing error at the carrier.
How many channels do I need on a SIP trunk?
The number of simultaneous calls at peak time, with headroom. If the real peak is 18 calls at once, a 20-channel contract is at its limit; once that limit is hit, the carrier rejects the next call, often with 503 or 486. The PBX call log shows the real peak for each day.