PBX Integration
How to connect a DID to FreePBX
Use this guide to connect DIDfarm to FreePBX with a clean PJSIP setup, explicit routing, and a practical configuration flow for self-hosted PBX teams.
PJSIP
Platform focus
Routes
Setup style
7 min
Guide length
Ready
Connector status
FreePBX admin flow
Structured for admins working through trunks, inbound routes, and outbound routing in the FreePBX UI.
Clear route handling
Build dedicated inbound routes per DID and keep outbound routing simple and auditable.
PJSIP-first setup
Use a modern chan_pjsip trunk pattern with predictable registration and transport settings.
Before you begin
Make sure the PBX, network, and DIDfarm credentials are ready before you start the setup.
1
DIDfarm trunk values ready
Prepare the trunk username, secret, SIP server, and the DIDs you want to route.
2
FreePBX access confirmed
You need access to create trunks, inbound routes, and outbound routes in the PBX admin.
3
Firewall and NAT reviewed
Before testing audio, confirm signaling and RTP path behavior on the PBX host.
4
Destination plan mapped
Know which DID should go to which extension, queue, ring group, or IVR.
Setup flow
1
Create the trunk
Add a new SIP (chan_pjsip) trunk and enter the DIDfarm credentials, host, and transport settings.
2
Create inbound routes
Add one inbound route per DID and assign the appropriate destination for each number.
3
Create outbound routing
Update your outbound route so calls can leave through the DIDfarm trunk.
4
Apply and test
Reload the config, verify registration, and place inbound and outbound calls with audio checks.
Copy-paste example
Use this as the starter reference for your connector article or portal snippet output.
Example configuration
Trunk Name: didfarm-pjsip
Username: {didfarm_auth_id}
Secret: {generated_secret}
Authentication: Outbound
Registration: Send
SIP Server: sip.didfarm.com
Port: 5060 or 5061
Context: from-pstn
What to verify
- The trunk registers successfully after Apply Config.
- Each DID has a matching inbound route in the expected format.
- Outbound route order allows DIDfarm to be selected correctly.
- Audio works both directions across NAT and firewall boundaries.
Operational notes
| Check | What to confirm |
|---|---|
| Transport | Use the correct transport and port pair for UDP, TCP, or TLS. |
| Inbound routes | Number formatting must match exactly or calls may fall through to the wrong destination. |
| Outbound route order | Route precedence matters if other trunks exist in the PBX. |
| Audio path | If signaling works but audio fails, investigate RTP, NAT, and firewall settings. |
Turn FreePBX setup into a repeatable DIDfarm connector
A strong FreePBX guide helps technical buyers self-serve faster and reduces onboarding questions.
Open PBX Integration →