PBX · FreePBX 16/17

Add a DIDHub SIP trunk in FreePBX (pjsip)

FreePBX 16+ uses pjsip as the default SIP driver. This tutorial creates a registration-mode trunk to DIDHub with inbound and outbound routes for a single DID.

Step 1: Create the trunk

Connectivity → Trunks → Add Trunk → pjsip.

FieldValue
Trunk Namedidhub
Outbound CallerID+15551234567
SIP Serversip.didhub.io
SIP Server Port5060
Usernametrunk_xxxxx (from DIDHub dashboard)
Secret<auto-generated>
AuthenticationOutbound
RegistrationSend
Codecsulaw, alaw, opus (in this order)
DTMF ModeRFC 4733

Step 2: Outbound route

Connectivity → Outbound Routes → Add.

Route Name          : did-outbound
Route CID           : +15551234567
Trunk Sequence      : didhub
Dial Patterns       :
  prepend: "+1"  prefix: 1   match: NXXNXXXXXX
  prepend: "+"   prefix: 011 match: .

Step 3: Inbound route

DID Number          : 15551234567
Set Destination     : Extension → 100 (your test extension)

Step 4: Verify registration via console

asterisk -rx "pjsip show registrations"

# Expected output:
<Registration/ServerURI..............................>  <Auth..........>  <Status.......>
==========================================================================================
didhub/sip:[email protected]                       trunk_xxxxx       Registered

Step 5: Test outbound

asterisk -rx "channel originate Local/15557654321@from-internal application Echo"

Common pitfalls

Ready to get a number?

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