What You Will Need

Before starting, make sure you have:

  • A running 3CX Phone System (v18 or v20) — on-premises or hosted
  • A DIDfarm account with at least one DID number
  • Your server's public IP address (3CX needs this for the provisioning wizard)
  • Administrator access to 3CX Management Console

If you do not have a DIDfarm account yet, sign up for free — you can follow this guide on a trial account with a single number.

Step 1: Create a SIP Trunk in DIDfarm

Log in to your DIDfarm portal and open the SIP Trunks tab. Click Create Trunk and give it a descriptive name like 3cx-production. DIDfarm will generate a unique username (df_xxxx) and a password — write both down now, because the password is only shown once.

Your trunk is now live on sip.didfarm.com:5060 over UDP. If you need a full walkthrough, see the Getting Started guide.

Step 2: Add DIDfarm as a SIP Provider in 3CX

In the 3CX Management Console, go to SIP Trunks → Add SIP Trunk. Pick Generic SIP Trunk and enter the following settings:

  • Trunk Name: DIDfarm
  • Registrar / Server: sip.didfarm.com
  • Port: 5060
  • Transport: UDP
  • Authentication ID: the df_xxxx username from step 1
  • Authentication Password: the password from step 1
  • Main Trunk Number: your DID in E.164 format (e.g. +4920211234567)

Save the trunk. Within 10 seconds 3CX will show a green "Registered" badge.

Step 3: Assign Your DID Number

Back in DIDfarm, open the My Numbers tab, click the number you want to use, and pick your 3cx-production trunk from the Assign Trunk dropdown. This creates the inbound route — the next call to that number will be forwarded to 3CX.

If you have multiple numbers, you can assign each one to a different extension or queue in 3CX. For more complex routing (business hours, IVR, voicemail) use the Visual Call Flow Builder.

Step 4: Configure Inbound Rules

In 3CX, open SIP Trunks → DIDfarm → Inbound Parameters. Set the destination for office hours (and after hours) to an extension or a ring group. 3CX will automatically use the To header to match multi-DID setups, so you can add additional DIDs with Add DID.

Step 5: Test a Call

Place a call to your DID from your mobile phone. You should hear the extension ring within a second or two. For outbound testing, dial an external number from a softphone registered to 3CX — the call will route out via DIDfarm.

Troubleshooting

  • Trunk not registering? Check that UDP 5060 is open on your firewall. DIDfarm also supports TCP 5060.
  • Calls ring but no audio? You likely have a NAT/RTP problem. Forward UDP 10000–20000 to your 3CX server, or enable 3CX's Use my IP setting.
  • Outbound calls fail? Verify your caller ID is a DID you own on DIDfarm. The P-Asserted-Identity must match an owned number.

For more detailed 3CX-specific notes (SBC, hosted instances, TLS), see the 3CX setup documentation.

Next Steps

Once your trunk is working, check out: