GSMCalls
Guides7 min readUpdated

SIP Trunks, DIDs and DOD Explained

By GSMCalls Engineering

A SIP trunk is a virtual phone line that carries calls between your phone system and a carrier over IP using SIP. A DID (Direct Inward Dialing) number is a public number that routes inbound calls to a specific destination on that trunk, and DOD (Direct Outward Dialing) is the ability to place outbound calls to the public network.

These three terms appear on every carrier quote, every PBX configuration screen and every gateway manual. This guide explains what each one means, how inbound and outbound calls actually flow, what the rules are for porting numbers and presenting caller ID, and where a mobile GSM gateway fits alongside a conventional trunk.

What is a SIP trunk?

A SIP trunk replaces the physical ISDN PRI or analogue lines that once connected a business PBX to the telephone company. Instead of copper channels, calls are set up with the Session Initiation Protocol (IETF RFC 3261) and the audio is carried as RTP packets (RFC 3550). The “trunk” is really a logical agreement: the provider accepts calls from your system, delivers calls to it, and bills you for the traffic.

A trunk is usually defined by a handful of parameters:

  • Signalling endpoint — the provider’s SIP proxy or session border controller hostname and port.
  • Transport — UDP, TCP or TLS. TLS on port 5061 encrypts the signalling; see securing SIP with TLS and SRTP.
  • Authentication — either registration with a username and password, or IP-based authentication.
  • Channels or concurrent calls — how many simultaneous calls the trunk allows.
  • Codecs — typically G.711 A-law or µ-law, sometimes G.729; see G.711 A-law vs µ-law.
  • Numbers — the DIDs assigned to the trunk and the caller IDs you are allowed to present.

The SIP Forum’s SIPconnect technical recommendation is a useful reference for how enterprise PBXs and service providers are expected to interoperate, and many providers publish configuration guides based on it.

DID vs DOD: inbound and outbound

DID — Direct Inward Dialing

A DID is a phone number that terminates on your trunk. When someone dials it, the carrier sends a SIP INVITE to your system with the dialled number in the Request-URI or the To header. Your PBX then matches that number against an inbound route and sends the call to an extension, a ring group, an IVR or a queue. DIDs are what let a company with one trunk give every employee or department a directly reachable number.

DOD — Direct Outward Dialing

DOD is the outbound side: a user dials an external number, the PBX selects an outbound route and sends the call to the provider, which completes it on the public network. In modern systems DOD is simply “outbound calling on the trunk”, but the term survives in carrier price lists, where outbound minutes are rated per destination.

DID (inbound)DOD (outbound)
DirectionPublic network → your systemYour system → public network
What you configureInbound route per numberOutbound route and dial pattern
Typical billingMonthly fee per number, sometimes per-minute for toll-freePer-minute rate by destination
Key identifierDialled number (DNIS)Presented caller ID (CLI)
Wholesale termCall originationCall termination

In wholesale language, delivering inbound calls to a number is call origination and completing outbound calls to a destination is call termination. Our guide to wholesale VoIP call termination covers how that market works and how licensed carriers route traffic between each other.

Number porting

Number porting moves an existing number from one provider to another without changing it. Porting is regulated nationally — for example by the FCC in the United States, the CRTC in Canada and Ofcom in the United Kingdom — and each country has its own process and timelines. In general you should expect:

  1. A letter of authorisation signed by the account holder, naming the numbers to port.
  2. A recent bill or customer service record from the losing provider so the details can be matched.
  3. A port date agreed between providers, often with a short window when the number switches over.
  4. A test plan so inbound routes on the new trunk are ready before the port completes.

Do not cancel the old service before the port completes: in most regimes a cancelled number can be lost. Mobile numbers can usually be ported between mobile operators, but whether a mobile number can be ported to a fixed or VoIP provider depends on local rules.

Caller ID and CLI rules

The caller ID you present on outbound calls is called the CLI (calling line identity). In SIP it appears in the From header and, between trusted networks, in the P-Asserted-Identity header defined in RFC 3325; privacy requests use RFC 3323. Regulators treat CLI seriously because spoofed caller IDs drive fraud and nuisance calls.

  • Present only numbers that you own or are authorised to use, such as your DIDs or a number assigned to you by the provider.
  • In the US and Canada, carriers sign calls using STIR/SHAKEN (RFC 8224, RFC 8225 and RFC 8588), and unsigned or poorly attested calls are more likely to be labelled or blocked.
  • In the UK, Ofcom’s CLI guidance requires a valid, diallable number that identifies the caller.
  • Many other regulators have similar rules. Check your provider’s acceptable-use policy and local law before changing caller ID settings.

GSMCalls does not support caller ID manipulation. A call placed through a phone on the GSMCalls platform presents the number of the SIM in that phone, exactly as the mobile operator issued it. See the acceptable use policy.

Registration vs IP authentication

Providers authenticate your system in one of two ways, and many support both.

RegistrationIP authentication
How it worksYour PBX sends REGISTER with a username and password (digest authentication)The provider accepts calls only from your allow-listed public IP addresses
Best forDynamic IPs, small sites, systems behind NATStatic IPs, data centres, high-volume trunks
Inbound deliveryTo the contact address you registeredTo a fixed IP and port agreed in advance
Main riskWeak or leaked credentialsAnyone who controls the allow-listed IP

Registration handles NAT traversal more gracefully because the PBX opens the path from the inside. IP authentication avoids storing credentials but requires a static address. Either way, pair it with an access-control list on your own side so only your provider’s addresses can reach your SIP port.

How a mobile SIP gateway plugs in

A mobile SIP gateway looks like just another SIP trunk to your PBX. Instead of reaching the public network through a carrier interconnect, calls leave and arrive through mobile lines in phones you control. That is useful when you need a local mobile presence at a branch, a backup path when fixed lines fail, or mobile-to-mobile calling that follows the tariffs on your own plans.

On GSMCalls you create a trunk in the portal (UDP, TCP or TLS, with registration or IP authentication and SIP ACLs), point your PBX at it, and route calls to a site, a group of phones or a single device. Inbound calls to a phone’s mobile number are delivered to your PBX with the caller’s number and the line they arrived on. Step-by-step guides exist for FreePBX, Asterisk and 3CX, and the FreePBX setup walkthrough shows the full configuration. For the underlying concept, start with what a GSM gateway is.

Mobile lines are subject to the operator’s terms of service. Confirm that your plans permit gateway use, and keep a conventional SIP trunk for services such as emergency calling where local rules require it.

Choosing a SIP trunk provider

  • Coverage — DIDs in the countries and cities you need, and a porting process you can live with.
  • Quality — published codec support, transparent routing and the ability to see ASR and PDD on your own traffic.
  • Security — TLS and SRTP, IP allow-lists on their side, and spending limits.
  • Compliance — clear CLI rules, STIR/SHAKEN where applicable, and a licensed presence in the markets you call.
  • Billing — per-second or per-minute rating, CDR export and alerts before you hit a limit.
  • Support — a way to open a ticket with SIP traces attached and get an engineer, not a script.

Wholesale SIP trunks

Wholesale SIP trunks are sold to other carriers, resellers and contact centres rather than end users. They are rated per destination, often with several quality tiers, and are carried on Class 4 softswitches built for high call volumes. Buyers should expect to pass know-your-customer checks and to sign acceptable-use terms, because licensed wholesale carriers are responsible for the traffic they carry.

Putting it together

A SIP trunk is the pipe, DIDs are the numbers that bring calls in, and DOD is the outbound calling you pay for per minute. Get authentication, caller ID and porting right and most trunks behave predictably. If you also want managed mobile lines on the same PBX, see pricing — plans start at $100 per month for 10 phones — or request a demo.

Frequently asked questions

What is the difference between a SIP trunk and a DID?

A SIP trunk is the connection that carries calls between your phone system and a provider. A DID is a phone number assigned to that trunk so that inbound calls to it reach a particular destination. One trunk can carry many DIDs.

Is DOD the same as outbound calling?

In practice, yes. DOD (Direct Outward Dialing) means users can dial external numbers directly from the phone system. On a SIP trunk it is simply the outbound calling service, billed per minute by destination.

Can I keep my existing number when I move to a SIP trunk?

Usually, through number porting. You submit a letter of authorisation and account details to the new provider, which coordinates a port date with the old one. Rules and timelines are set by the national regulator.

Can I set any caller ID on a SIP trunk?

No. You should only present numbers you own or are authorised to use. Regulators such as the FCC, CRTC and Ofcom restrict caller ID, and North American carriers sign calls with STIR/SHAKEN. On GSMCalls, mobile calls present the SIM’s own number.

Should I use registration or IP authentication?

Use registration when your public IP changes or the PBX is behind NAT. Use IP authentication when you have a static IP and want to avoid stored credentials. Add an access-control list on your side either way.