How to Setup SIP Trunk in 3CX: Step-by-Step Guide | NetviaVoice

๐Ÿ”ง How to Setup SIP Trunk in 3CX: Step-by-Step Guide

Summary: Setting up a SIP trunk in 3CX is straightforward when you follow the right steps. This comprehensive guide walks you through the entire process โ€“ from preparing your provider details and adding the trunk, to configuring inbound/outbound rules and troubleshooting common issues. Whether you're using a supported provider or a generic SIP carrier, you'll have your 3CX system making and receiving calls in no time.

๐Ÿ“‹ Prerequisites & Preparation

Before you begin setting up your SIP trunk in 3CX, make sure you have the following:

โœ… What You Need

  • 3CX PBX installed and running (on-premises or cloud)
  • Administrative access to the 3CX Management Console
  • A SIP trunk account from a provider (e.g., NetviaVoice, Telnyx, Twilio)
  • Provider credentials (hostname, username, password) or IP whitelist
  • At least one DID (Direct Inward Dialing) number assigned to your trunk
  • Firewall ports open: UDP/TCP 5060 (SIP), UDP 9000-10999 (RTP)
  • Static public IP or dynamic DNS (if using IP-based authentication)

๐Ÿ” Important Checks

  • Firewall: Ensure your firewall allows SIP and RTP traffic. 3CX's firewall checker (under Dashboard) can help.
  • NAT: If your PBX is behind NAT, configure STUN or set the external IP correctly.
  • Provider Compatibility: Check if your provider is in 3CX's supported list. If not, use the "Generic VoIP Provider" option.
  • DID Numbers: Have your DID(s) ready โ€“ you'll need them for inbound routing.

๐Ÿ“„ Gather Your SIP Provider Details

Your SIP provider will give you the following information. Keep these handy:

ParameterDescriptionExample
Provider NameThe name of your SIP trunk providerNetviaVoice, Telnyx, Twilio
Hostname / DomainThe SIP server address for registrationsip.netviavoice.com
UsernameYour account username (for registration-based trunks)user12345
PasswordYour account password (for registration-based trunks)โ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ข
Authentication TypeRegistration-based or IP-basedRegister / IP Auth
DID NumbersYour assigned Direct Inward Dialing numbers+1 212 555 1234

๐Ÿ’ก Pro Tip: If you're using NetviaVoice as your provider, we provide all these details in your welcome email. For IP-based authentication, you'll need to whitelist your 3CX server's public IP address.

โž• Step 1: Add SIP Trunk in 3CX

Follow these steps to add your SIP trunk to the 3CX Management Console:

  • 1 Log in to the 3CX Management Console as an administrator.
  • 2 Navigate to Voice & Chat โ†’ SIP Trunks.
  • 3 Click the "Add SIP Trunk" button.
  • 4 Under the "Select Country" dropdown, choose your country. Then select your provider from the list. If your provider isn't listed, choose "Generic VoIP Provider".
  • 5 In the "General" tab:
    • Trunk Name: Enter a descriptive name (e.g., "NetviaVoice SIP Trunk").
    • DID Numbers: Enter your assigned DID(s), one per line.
    • Provider Hostname / IP: Enter the SIP server address from your provider.
  • 6 In the "Authentication" tab:
    • Type: Choose "Register" if you have a username/password, or "IP Based" if your provider whitelists your IP.
    • For "Register" mode: enter your Username and Password.
    • For "IP Based" mode: no credentials needed.
  • 7 Click "OK" to save the trunk. 3CX will attempt to register with your provider.
๐Ÿ“ธ [Screenshot: 3CX Management Console showing the "Add SIP Trunk" screen with fields filled]

๐Ÿ’ก Quick Tip: After adding the trunk, check the status in the SIP Trunks list. A green checkmark indicates successful registration. If you see an error, check the Activity Log for details.

๐Ÿ“ž Step 2: Configure Inbound Rules

Inbound rules tell 3CX what to do when a call comes in on your DID number. Here's how to set them up:

  • 1 Go to Voice & Chat โ†’ Inbound Rules.
  • 2 Click "Add Inbound Rule".
  • 3 In the "General" section:
    • Rule Name: Give it a descriptive name (e.g., "Main Line").
    • DID / DDI: Enter the DID number that this rule applies to.
    • Trunk: Select the SIP trunk you just added.
  • 4 In the "Destination" section:
    • Destination Type: Choose where to route the call โ€“ Extension, Ring Group, IVR, Queue, or Voicemail.
    • Destination: Select the specific extension, group, or queue.
  • 5 Click "OK" to save the rule.

๐Ÿ”น Example Inbound Rule

  • Rule Name: Sales Line
  • DID: +1 212 555 1000
  • Trunk: NetviaVoice SIP Trunk
  • Destination: Sales Ring Group (extensions 101, 102, 103)

๐Ÿ”น Multiple DIDs

If you have multiple DIDs, create a separate inbound rule for each one. This allows you to route calls from different numbers to different departments or extensions.

๐Ÿ“ค Step 3: Configure Outbound Rules

Outbound rules define how calls made from internal extensions are routed to the outside world via your SIP trunk.

  • 1 Go to Voice & Chat โ†’ Outbound Rules.
  • 2 Click "Add Outbound Rule".
  • 3 In the "General" section:
    • Rule Name: Give it a name (e.g., "Local Calls").
    • Dial Patterns: Define the number patterns this rule applies to (e.g., "1" for US/Canada numbers, "0" for international).
    • Trunk: Select your SIP trunk.
  • 4 In the "Options" section, you can set:
    • Strip Digits: Remove digits before sending (e.g., strip the "9" if users dial 9 to get an outside line).
    • Prepend Digits: Add digits to the number before sending.
  • 5 Click "OK" to save the rule.
Dial PatternDescriptionExample
1 (NXX) NXX XXXXUS/Canada 10-digit numbers (area code + 7 digits)1 212 555 1234
011 (X)International calls (011 + country code + number)011 44 20 1234 5678
9 (1XXXXXXXXXX)User dials 9 first to get a line, then US number9 1 212 555 1234

๐Ÿงช Step 4: Test Your SIP Trunk

After configuring your trunk and rules, it's time to test:

๐Ÿ“ž Inbound Test

  • Dial your DID number from an external phone (mobile or landline).
  • Check if the call reaches the destination you set in the inbound rule.
  • Verify caller ID display and audio quality.

๐Ÿ“ค Outbound Test

  • Dial an external number from any extension in your 3CX system.
  • Confirm the call connects and audio works both ways.
  • Check that the correct outbound rule is applied.

โš ๏ธ Note: If you're testing with a provider that charges per minute, be mindful of test call durations to avoid unexpected charges.

๐Ÿ”ง Common Issues & Troubleshooting

IssuePossible CauseSolution
Trunk not registeringIncorrect username/password, firewall blocking SIP, wrong hostnameDouble-check credentials. Run 3CX Firewall Checker. Verify hostname is correct.
Inbound calls not reaching extensionsDID not configured correctly, inbound rule missing or misconfiguredVerify DID number in trunk and inbound rule. Check that the trunk is assigned to the rule.
Outbound calls failDial pattern mismatch, outbound rule not assigned to correct trunkReview dial patterns. Ensure trunk is selected in the outbound rule.
Audio issues (one-way or no audio)Firewall blocking RTP ports, NAT issuesOpen RTP ports (9000-10999). Configure STUN or set external IP.
Call quality problemsBandwidth issues, codec mismatchCheck internet speed. Ensure codec preferences align with provider.

๐Ÿ’ก Quick Troubleshooting: Always check the Activity Log in 3CX (under Dashboard โ†’ Activity Log) for detailed error messages. This is the best place to start when diagnosing issues.

โš–๏ธ SIP Trunk Setup Options Comparison

FeatureRegistration-BasedIP-Based
AuthenticationUsername + PasswordIP Address Whitelist
Provider RequirementSIP registrar serverStatic public IP needed
Setup ComplexitySimple โ€“ just enter credentialsRequires IP configuration
SecurityPassword-basedIP-based (more secure)
Best ForDynamic IP environments, most usersStatic IP, enterprise deployments

๐Ÿš€ Need Help Setting Up Your SIP Trunk? NetviaVoice Has You Covered

Our team of experts can help you configure your 3CX SIP trunk, troubleshoot issues, and optimize your phone system for crystal-clear voice quality.

๐Ÿ“ž +1 201 979 3825
๐Ÿ’ฌ WhatsApp US
๐Ÿ“ž +92 333 5908806 (Global)
๐ŸŒ Our Services
Visit NetviaVoice

โ“ Frequently Asked Questions

1. How do I add a SIP trunk to 3CX?

In the 3CX Management Console, go to Voice & Chat โ†’ SIP Trunks. Click 'Add SIP Trunk', select your country and provider (or Generic VoIP Provider), then fill in the authentication details provided by your carrier (hostname, username, password, and DID numbers). Click 'OK' to save.

2. What SIP trunk providers are supported by 3CX?

3CX supports a wide range of providers including Telnyx, Twilio, Flowroute, Bandwidth, and many local providers. You can also use the 'Generic VoIP Provider' option for any SIP carrier that supports standard SIP registration or IP-based authentication.

3. What is the difference between registration-based and IP-based SIP trunk in 3CX?

Registration-based trunks require a username and password to authenticate with the provider's SIP server. IP-based trunks authenticate using your public IP address โ€“ the provider whitelists your IP, and you don't need credentials. 3CX supports both.

4. How do I route incoming calls from my SIP trunk to extensions in 3CX?

After adding the trunk, go to Voice & Chat โ†’ Inbound Rules. Create a new rule, set the DID/DDI number (the incoming number), and select the destination โ€“ extension, ring group, IVR, or queue. Save the rule and test by calling your DID number.

5. Why is my 3CX SIP trunk not registering?

Common causes: incorrect username/password, wrong SIP port (default is 5060), firewall blocking SIP traffic, or IP address not whitelisted by provider. Check the 3CX Activity Log for error messages. Also verify that your PBX can reach the provider's SIP server via ping or traceroute.

๐Ÿ“ข Ready to set up your SIP trunk in 3CX? Let NetviaVoice help you get started today.

ยฉ 2025 NetviaVoice โ€” 3CX SIP Trunk Setup Experts, VoIP Solutions & Cloud Communications.

3CX is a registered trademark of 3CX Ltd. NetviaVoice provides SIP trunk services and integration support for 3CX and other PBX systems.