Home/FreePBX 17 SIP Trunk Configuration

FreePBX 17 SIP Trunk Configuration

Simtex SIP Trunks from $4.99/month

Business-grade SIP trunking with geo-redundant infrastructure, crystal-clear audio, and Australian-based support. Pay-as-you-go or unlimited plans available.

Overview

This guide walks you through configuring a Simtex SIP trunk on FreePBX 17 using the PJSIP (chan_pjsip) channel driver. FreePBX 17 is built on Asterisk 21 and ships with PJSIP as the default SIP stack — the legacy chan_sip driver is no longer available.

FreePBX is the most widely deployed open-source PBX platform, offering a full-featured web GUI for Asterisk — freepbx.org

What you'll need

  • Your Simtex account number (e.g. 214XXXXXXX)
  • Your Simtex SIP password
  • Your allocated DIDs (phone numbers)
  • FreePBX 17 installed with web GUI access
SIP Servers:
  • West Coast (AU): siptcp.simtex.com.au
  • East Coast (AU): siptcpeast.simtex.com.au

Choose the server closest to your FreePBX instance. PJSIP fully supports SRV record resolution — set the port to 0 and FreePBX will automatically discover the optimal connection endpoint.

Do not deploy FreePBX with a public IP address. In 99.9% of cases you do not need any ports forwarded on your router or firewall to connect to Simtex. If you are unsure, speak to us first.

Step 1 — Enable TCP Transport

Before creating the trunk, ensure TCP transport is enabled in FreePBX. By default, only UDP is active.

  1. Navigate to Settings → Asterisk SIP Settings
  2. Click the SIP Settings [chan_pjsip] tab
  3. Scroll down to the Transports section
  4. Click Yes next to TCP to enable it
  5. Click Submit, then Apply Config
Why TCP? TCP provides reliable message delivery, handles NAT traversal better than UDP, and supports larger SIP messages. Our platform is optimised for TCP connections.

Step 2 — Create the SIP Trunk

  1. Navigate to Connectivity → Trunks
  2. Click Add Trunk
  3. Select Add SIP (chan_pjsip) Trunk from the dropdown

General Settings

On the General tab, configure:

Trunk Name:              Simtex SIP
Outbound CallerID:       (your main DID, e.g. 61894883344)
Maximum Channels:        (your purchased channel count)
Channel security: Set Maximum Channels to the number of concurrent calls you actually need. This acts as a hard limit — if your system is compromised, attackers can't exceed this call count.

Step 3 — PJSIP Settings

Click the PJSIP Settings tab and configure the connection to Simtex:

General Tab

Username:          214XXXXXXX
Secret:            XXXXXXXX
Authentication:    Outbound
Registration:      Send
Language Code:     en
SIP Server:        siptcp.simtex.com.au
SIP Server Port:   0
Transport:         0.0.0.0-tcp
Port 0 = automatic discovery. When the port is set to 0, FreePBX's PJSIP driver queries DNS for SRV records and automatically discovers the correct port and failover endpoints. This gives you automatic high-availability across our geo-redundant server farms.
East Coast? Replace siptcp.simtex.com.au with siptcpeast.simtex.com.au in the SIP Server field if your FreePBX instance is located on the East Coast of Australia (NSW, VIC, QLD).

Advanced Tab

Click the Advanced tab and configure caller ID passthrough:

Contact User:      214XXXXXXX  (same as username)
From User:         214XXXXXXX  (same as username)
From Domain:       siptcp.simtex.com.au
Trust RPID/PAI:    Yes
Send RPID/PAI:     Both

These settings ensure your outbound caller ID is correctly transmitted via the RPID and P-Asserted-Identity SIP headers, and that Simtex can pass caller ID information back to you on inbound calls.

Codecs Tab

Click the Codecs tab and reorder the codec priority list. Drag to reorder:

Priority 1:  G.711 A-Law  (alaw)
Priority 2:  G.711 U-Law  (ulaw)

Remove any codecs you don't intend to use — a cleaner codec list speeds up call negotiation.

G.711 A-Law is the standard codec for Australian PSTN interconnection. It provides toll-quality audio at 64kbps with zero transcoding overhead. Always place it first.

Click Submit, then Apply Config. The trunk should register within a few seconds — you'll see a green indicator next to the trunk name in the Trunks list.

Step 4 — Outbound Routes

Outbound routes tell FreePBX what numbers it's allowed to dial externally and which trunk to use.

  1. Navigate to Connectivity → Outbound Routes
  2. Click Add Outbound Route
  3. Enter a Route Name (e.g. "Simtex Outbound")
  4. Under Trunk Sequence, select your Simtex SIP trunk as Route 1
  5. Click the Dial Patterns tab to configure what numbers this route handles
Prefix for external calls: Configure a prefix (e.g. 0) in the Dial Patterns to require a leading digit before external numbers. This prevents internal extension numbers from overlapping with external destinations — standard practice in Australian PBX deployments.

Recommended Dial Patterns for Australian Numbering

DescriptionPrefixMatch PatternPrependExample Dialled
Local (8-digit with area code)XXXXXXXX94883344
National / Mobile (leading 0)0XXXXXXXXX0412345678
Emergency000000
1300 / 1800 Numbers1[38]00XXXXXX1300888519
13 Numbers (6-digit)13XXXX131313
International (0011)0011.001161894883344
International dialling: If you do not need international calls, simply leave out the 0011 dial pattern. This is the simplest way to prevent unauthorised international dialling and potential toll fraud.

Step 5 — Inbound Routes

Inbound routes direct incoming calls on your DIDs to the correct destination (extension, ring group, IVR, queue, etc.).

  1. Navigate to Connectivity → Inbound Routes
  2. Click Add Incoming Route

Create a catch-all route first

Leave the DID Number field blank to create a catch-all route. This handles any inbound DID that doesn't have a specific route — point it at your receptionist or main ring group.

Then add DID-specific routes

Create additional inbound routes for individual DIDs or DID ranges that need specific routing:

  • DID Number: enter the number in E.164 format (e.g. 61894883344)
  • Set Destination: choose the target extension, ring group, IVR, or queue

You can use wildcard patterns for blocks of numbers, e.g. _89488334X to match a range.

Wildcard syntax: FreePBX uses Asterisk dial pattern notation. Use X to match any digit 0–9, and prefix with an underscore: _89488334X

Step 6 — Security Hardening

After configuring your trunk, take these essential steps to secure your FreePBX installation:

Disable SIP Guest

  1. Go to Settings → Asterisk SIP Settings
  2. Under General SIP Settings, find Allow SIP Guests
  3. Set to No
Always disable SIP Guests on production systems. Leaving this enabled is one of the most common causes of toll fraud on FreePBX installations — attackers can place calls without any authentication.

Additional security measures

  • Strong extension passwords — FreePBX auto-generates these; do not simplify them
  • Responsive Firewall — enable FreePBX's built-in responsive firewall module under Connectivity → Firewall
  • Intrusion Detection — enable fail2ban integration to automatically block brute-force attacks
  • Keep FreePBX updated — run Admin → Module Admin → Check Online regularly for security patches
  • Channel limits — keep Maximum Channels on the trunk set to your actual concurrent call requirement

Testing Your Trunk

Once configured, verify everything works:

  1. Check trunk status — navigate to Connectivity → Trunks and confirm the trunk shows a green indicator
  2. Make an outbound call — dial an external number from an extension and confirm two-way audio
  3. Receive an inbound call — call one of your DIDs from a mobile and confirm it routes correctly
  4. Verify caller ID — check your outbound caller ID displays correctly on the receiving end
  5. Check voicemail — leave a voicemail to ensure DTMF tones are working correctly through the trunk
Trunk not registering? Check these common issues:
  • Verify your account number (214XXXXXXX) and password — copy/paste to avoid typos
  • Ensure TCP transport is enabled (Step 1) and selected on the trunk
  • Confirm SIP Server Port is 0 (not 5060)
  • Check your firewall allows outbound TCP connections
  • Verify DNS resolution: dig SRV _sip._tcp.siptcp.simtex.com.au should return records
  • Try the alternate server (siptcpeast / siptcp) in case of regional issues

Extension-Level Caller ID

By default, outbound calls present the Outbound CallerID set on the trunk. To override per extension:

  1. Navigate to Applications → Extensions
  2. Edit the extension
  3. Set Outbound CID to the DID you want that extension to present in E.164 format (e.g. 61894883344)

The DID must be allocated to your Simtex account — you cannot present arbitrary numbers.

Caller ID validation: Simtex validates outbound caller IDs against your account. Only DIDs allocated to your trunk will be transmitted — any other number is replaced with your main trunk number automatically.

Need Help?

If you run into any issues configuring your FreePBX trunk, our support team can verify your trunk registration status from our side and assist with troubleshooting.

Contact Simtex Support

Last updated 26 March 2026