VOIP · 8 MIN READ

SIP trunking explained: channels, DIDs and codecs

Hassan Mamoon
Updated 17 October 2026

SIP trunking is a way to connect your phone system to the public phone network over the internet instead of over physical phone lines. If you run your own PBX or dialer (Asterisk and FreeSWITCH are common), a SIP trunk is how your calls get to and from ordinary phone numbers.

This guide explains what a SIP trunk is, the pieces you will hear about (channels, DIDs, codecs), how to size and price one, and what a call center should check before choosing a provider.

What is a SIP trunk?

A SIP trunk is a virtual connection between your phone system and a provider. SIP, the Session Initiation Protocol, handles the signalling: setting calls up, answering them and ending them. The audio itself travels separately, as RTP packets. The provider connects your trunk to the phone network, so you can place calls to anyone and receive calls on your numbers.

It replaces traditional digital phone lines such as PRI. Instead of a fixed number of physical circuits, you buy channels, and you can add or remove them without installing anything.

SIP trunk vs hosted VoIP vs contact center software

SIP trunk Hosted VoIP (cloud phone) Contact center software
What you get A connection to the phone network A complete phone system Phones plus queues, dialer, reporting
Who runs the phone system You The provider The provider
Best for Teams with their own PBX, dialer or IT skills Offices that want phones without running servers Teams that need routing and dialing built in
Control Highest Medium Lower

If you want to run your own call center on a PBX or dialer, a SIP trunk is the connection you need. If you would rather not run phone infrastructure, a cloud phone system covers the same ground, and our software comparison lists some.

How a call flows

For an outbound call, your dialer or PBX sends a SIP request to the provider, the provider connects it to the destination, and once it is answered the audio flows between your system and the provider as RTP. For an inbound call, the provider receives a call to one of your numbers and sends a SIP request to your system.

SIP signalling normally uses port 5060 (UDP or TCP), or 5061 for TLS. The audio uses RTP over a range of UDP ports your system is configured to use, so your firewall has to allow both.

The pieces

  • Channel. One simultaneous call. A trunk with 20 channels can carry 20 calls at once. This is the unit providers sell and the number that sets your capacity.
  • DID (direct inward dial). A phone number that routes calls to your trunk. You rent DIDs, usually monthly, in the countries you want to be reachable in.
  • Origination and termination. Origination is inbound: calls from the network to you. Termination is outbound: calls you send to the network. They are often priced differently.
  • Caller ID (CLI). The number shown on outbound calls. Rules about what you may show are strict, and carriers check it.

How the trunk is authenticated

  • IP authentication. The provider trusts calls from your server's fixed IP address. Simple, and no passwords on the wire.
  • Registration. Your system logs in with a username and password, like a phone does. It works behind changing IPs.

Either way, lock down who can place calls through your account. Fraud on trunks, where someone hijacks an account to dial expensive destinations, is common and costly.

Codecs

The codec decides how voice is compressed. G.711 is the universal choice: every provider supports it, it sounds good and it uses about 87 kbps per call each way. G.729 compresses much more, at about 31 kbps each way, but it gives up some audio quality and not every system supports it. If your system and your provider use different codecs, something must transcode between them, which uses CPU and adds delay. See how much bandwidth VoIP needs.

How many SIP trunk channels you need

Not one per agent. Calls bunch up in the busy hour, and the right number depends on how many calls arrive and how long they last. The Erlang B calculator turns calls per hour and call length into channels, for the blocking rate you can accept.

For example, 120 calls an hour of 3 minutes each is 6 erlangs of traffic, which needs 13 channels at 1% blocking (12 at 2%, 10 at 5%). Remember that a dialer making outbound calls uses channels for calls that ring and go unanswered, so an outbound campaign needs more channels than the number of conversations suggests. Our Erlang B vs Erlang C guide explains the maths.

How trunks are priced

  • Metered: you pay per minute. Good when volume is low or uneven.
  • Per channel: a flat monthly fee for each channel, with calling included. Good when channels stay busy.

Here is an example using placeholder prices, so use your own quotes. You make 20,000 minutes of calls a month and need 10 channels.

Model Calculation Monthly cost
Metered at 0.01 per minute 20,000 × 0.01 200
Per channel at 25 each 10 × 25 250

Metered is cheaper by 50. The break-even is 25,000 minutes a month (250 ÷ 0.01), above which the per-channel plan wins. At 20,000 minutes, ten channels would be busy only about 4.6% of the time if they ran all month, so the flat plan is paying for capacity you rarely use. Try your own numbers in the SIP trunk cost calculator, and read the fair-use terms on anything marked unlimited.

NAT and firewalls

SIP and NAT do not always get along. Common problems are one-way audio, calls that drop after 30 seconds, and registration that fails. Things that usually help are a static public IP, allowing the provider's addresses through the firewall, keep-alive settings, and turning off any "SIP ALG" feature in a router that rewrites SIP traffic, since it often does more harm than good.

A security checklist

  • Allow only your provider's IP ranges to reach your SIP service.
  • Use strong, unique passwords on every trunk and extension.
  • Set spend limits and destination restrictions on the account, so a hijack can't run up a huge bill.
  • Block countries you never call.
  • Rate-limit and log failed authentication attempts, and review the logs.
  • Keep your PBX or dialer software up to date.

Redundancy and failover

A single trunk is a single point of failure. Better setups use two providers, or two routes with one provider, and fail over automatically. Ask how the provider handles an outage on their side, whether they offer more than one signalling address, and how quickly your system detects a failed route and switches.

What a call center should check in a provider

  • Coverage in the countries you call and receive in, and the rates for mobiles and international destinations.
  • Route quality. Cheap routes can mean poor audio or lost caller ID. Ask how they deliver caller ID.
  • Calls per second (CPS) limits. Dialers place many calls at once, and providers cap how fast.
  • Concurrent channel limits and how quickly you can add more.
  • Spam handling. High-volume dialing attracts spam labels. Ask about caller ID reputation and number rotation.
  • Fraud controls, such as spend limits and destination restrictions.
  • Redundancy, and how failover works.
  • Number porting and DID availability where you need numbers.
  • Emergency calling. If your users can dial emergency numbers, the provider and your setup need to handle that properly.
  • Fax and DTMF. If you use IVRs or fax, check how touch-tones and T.38 are handled.

Where it fits

A SIP trunk is the right tool when you run your own phone system and want to choose your own carrier. It gives you the lowest per-minute cost and the most control, and it asks the most of you in return: security, monitoring and troubleshooting are yours. If that sounds like too much to look after, a hosted phone system or contact center platform trades some control for not having to run any of it.

FAQ

What is the difference between SIP trunking and hosted VoIP?

A SIP trunk connects your own phone system, such as a PBX or dialer, to the phone network. Hosted VoIP, or a cloud phone system, is the whole phone system run for you by a provider.

How many SIP channels do I need?

Enough for the simultaneous calls in your busiest hour. Work it out from calls per hour and call length with the Erlang B calculator, and leave room for growth.

Do I need a separate trunk for inbound and outbound?

Not usually. Most providers use one trunk for both, but pricing can differ: inbound numbers (DIDs) are often billed monthly and outbound calls by the minute.

What is a DID?

A direct inward dial number: an ordinary phone number that routes incoming calls to your trunk. You rent DIDs, usually monthly, in the countries you want to be reachable in.

Hassan Mamoon

Backend engineer who has built VoIP platforms on Asterisk, with years of Laravel and AWS work behind them. More about us

Keep reading