Open-source PBX

DIDHub for FreePBX

Add DIDHub as a SIP trunk in FreePBX with the standard pjsip driver. Inbound routes, outbound routes, Caller ID, recording — all working on the standard FreePBX UI.

Why DIDHub + FreePBX

FreePBX is the most-deployed open-source PBX globally and the GUI on top of Asterisk. DIDHub plugs in as a standard SIP trunk via the chan_pjsip driver — no third-party modules needed. The same FreePBX UI you use for in-house extensions handles DIDHub DIDs identically: inbound routes map DIDs to destinations, outbound routes select trunks per dialed prefix, Caller ID is per-trunk or per-extension.

FreePBX users come to DIDHub for international expansion (most other SIP carriers are US-centric), for predictable per-DID flat pricing, and for the option to mix DIDHub with their existing carriers (FreePBX supports multiple SIP trunks per dial plan).

Setup — 10 minutes

FreePBX with chan_pjsip is the recommended setup. Six steps from buying a DID to first call.

Sign up + buy a number

Create a DIDHub account, buy a DID in your chosen country. Activates instantly on most markets.

Open FreePBX → Connectivity → Trunks

Add a new pjsip trunk. Name it didhub-{country}.

Fill the General + pjsip Settings tabs

DIDHub provides the host (sip.didhub.io), port (5061 TLS), authentication user, secret, and outbound registration values.

Add an Inbound Route

Connectivity → Inbound Routes → Add. DID = your DIDHub number, destination = an extension, queue, or IVR.

Add an Outbound Route

Connectivity → Outbound Routes → Add. Match dial pattern (e.g. country prefix), trunk sequence = your DIDHub trunk.

Apply config + test

Click Apply Config (red bar). Test inbound + outbound. Both should route via DIDHub.

SIP trunk configuration

The exact trunk values DIDHub provisions for your account. Pre-fill these in the FreePBX trunk-config UI:

# FreePBX pjsip trunk — General + pjsip Settings tab
Trunk Name: didhub-us
SIP Server: sip.didhub.io
SIP Server Port: 5061
Transport: 0.0.0.0-tls (or pjsip-tls)
Authentication: Outbound
Username: didhub_xxxxxx
Secret: (provisioned)
Auth Realm: sip.didhub.io
Send RPID/PAI: Send P-Asserted-Identity header
Outbound Caller ID: "Your Co" <+15551234567>
DTMF Mode: RFC 4733 (RFC 2833)
Media Encryption: SRTP via DTLS / SDES

Use chan_pjsip (not the legacy chan_sip). chan_sip is deprecated in modern Asterisk and FreePBX 16+. The pjsip transport must be TLS-enabled in /etc/asterisk/pjsip.transports.conf for the 5061 endpoint.

Capabilities verified with FreePBX

Standard pjsip driver

No custom modules. Works with the FreePBX UI you already know.

Inbound + outbound routes

Map DIDs to extensions/queues/IVRs; route outbound dialing through DIDHub trunks per country.

Caller ID handling

Per-trunk Outbound Caller ID; FreePBX's CID Superfecta enriches inbound CID.

Call recording

FreePBX call recording works on DIDHub trunks. MP3/WAV files saved to the FreePBX server.

Multi-tenant

DIDHub DIDs work alongside other SIP trunks in the same FreePBX dial plan.

Asterisk Manager + AGI

FreePBX exposes Asterisk Manager events for DIDHub trunks; AGI scripts work normally.

Frequently asked questions

Should I use chan_pjsip or chan_sip?

chan_pjsip. chan_sip is deprecated in Asterisk 18+ and removed in Asterisk 21. All modern FreePBX installs (16+) ship with pjsip enabled.

Does DIDHub work with FreePBX hosted (clearly.com / sangoma)?

Yes. The hosted FreePBX offerings use the same pjsip driver; DIDHub plugs in identically.

Can I use FreePBX with a chan_sip-only legacy install?

Yes, with reduced features. chan_sip works against DIDHub but lacks SRTP via DTLS and some modern NAT handling. We strongly recommend upgrading to pjsip.

How do I handle multiple country DIDs?

Either one trunk per country (cleanest) or one trunk with multiple DIDs assigned (lower trunk count). Both work; the former is easier for outbound routing rules.

Does DIDHub support FreePBX SIP REFER for transfers?

Yes. SIP REFER, attended transfers, and blind transfers all work through DIDHub's managed SBC.

Related

Asterisk · 3CX · FusionPBX · Softphones · Teams Direct Routing

Ready to get a number?

Pick a DID in 80+ countries from $1.99/month. Activates instantly on most numbers.