# FreePBX 17 SIP Trunk Configuration

**Category:** PBX Setup Guides
**URL:** https://www.simtex.com.au/support/kb/pbx-setup-guides/freepbx-17-sip-trunk-configuration
**Published:** 2026-03-26

Step-by-step guide to configuring a Simtex SIP trunk on FreePBX 17 with PJSIP. Covers trunk setup, TCP transport, SRV auto-discovery, outbound and inbound routing, codec configuration, and security hardening.

## Why this article matters

Australian businesses running FreePBX 17 on Asterisk 21 typically reach this guide when standing up a new open-source PBX or migrating from a chan_sip-era deployment to the PJSIP channel driver. The configuration uses TCP transport with PJSIP, registration-based authentication to siptcp.simtex.com.au, G.711 codecs, and security hardening steps that align with the Asterisk Security Council guidance for internet-facing trunks. The service referenced is Simtex SIP Trunks, priced from $4.99 per channel per month with channel counts scaling from 2 to 200+ on a single trunk, delivered from geo-redundant Perth and Sydney POPs on a 99.99% uptime SLA. Because Simtex is the licensed carrier rather than a reseller, FreePBX deployments avoid double-NAT and double-SBC topologies that frequently cause one-way audio and registration drops with wholesale-layered providers. FreePBX 17 deployments in Australia are commonly evaluated against 3CX, Yeastar P-Series, and hosted alternatives like Simtex Cloud PBX. When the decision is to retain the open-source platform, the SIP carrier choice typically comes down to Simtex versus reseller providers such as Vonex, Maxotel, SIPTalk, and Intelephony. Direct carrier ownership, AU-based engineering support, and a documented 10-business-day Category A port pathway for keeping existing numbers are the points of difference.

## 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.

- [View SIP Trunk Plans](/products/sip-trunks)

## 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 &mdash; 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 &mdash; [freepbx.org](https://www.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

> **Info:**
> **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 &mdash; set the port to `0` and FreePBX will automatically discover the optimal connection endpoint.

> **Warning:**
> **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](/contact) first.

## Step 1 &mdash; Enable TCP Transport

Before creating the trunk, ensure TCP transport is enabled in FreePBX. By default, only UDP is active.
1. Navigate to **Settings &rarr; 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**

> **Note:**
> **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 &mdash; Create the SIP Trunk
1. Navigate to **Connectivity &rarr; 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)`
```

> **Tip:**
> **Channel security:** Set **Maximum Channels** to the number of concurrent calls you actually need. This acts as a hard limit &mdash; if your system is compromised, attackers can't exceed this call count.

## Step 3 &mdash; 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`
```

> **Tip:**
> **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.

> **Note:**
> **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 &mdash; a cleaner codec list speeds up call negotiation.

> **Info:**
> **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 &mdash; you'll see a green indicator next to the trunk name in the Trunks list.

## Step 4 &mdash; Outbound Routes

Outbound routes tell FreePBX what numbers it's allowed to dial externally and which trunk to use.
1. Navigate to **Connectivity &rarr; 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

> **Tip:**
> **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 &mdash; standard practice in Australian PBX deployments.

## Recommended Dial Patterns for Australian Numbering

| Description | Prefix | Match Pattern | Prepend | Example Dialled |
| --- | --- | --- | --- | --- |
| Local (8-digit with area code) |  | `XXXXXXXX` |  | 94883344 |
| National / Mobile (leading 0) | 0 | `XXXXXXXXX` |  | 0412345678 |
| Emergency |  | `000` |  | 000 |
| 1300 / 1800 Numbers |  | `1[38]00XXXXXX` |  | 1300888519 |
| 13 Numbers (6-digit) |  | `13XXXX` |  | 131313 |
| International (0011) |  | `0011.` |  | 001161894883344 |

> **Warning:**
> **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 &mdash; Inbound Routes

Inbound routes direct incoming calls on your DIDs to the correct destination (extension, ring group, IVR, queue, etc.).
1. Navigate to **Connectivity &rarr; 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 &mdash; 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.

> **Note:**
> **Wildcard syntax:** FreePBX uses Asterisk dial pattern notation. Use `X` to match any digit 0&ndash;9, and prefix with an underscore: `_89488334X`

## Step 6 &mdash; Security Hardening

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

### Disable SIP Guest
1. Go to **Settings &rarr; Asterisk SIP Settings**
2. Under **General SIP Settings**, find **Allow SIP Guests**
3. Set to **No**

> **Warning:**
> **Always disable SIP Guests on production systems.** Leaving this enabled is one of the most common causes of toll fraud on FreePBX installations &mdash; attackers can place calls without any authentication.

### Additional security measures

- **Strong extension passwords** &mdash; FreePBX auto-generates these; do not simplify them
- **Responsive Firewall** &mdash; enable FreePBX's built-in responsive firewall module under **Connectivity &rarr; Firewall**
- **Intrusion Detection** &mdash; enable fail2ban integration to automatically block brute-force attacks
- **Keep FreePBX updated** &mdash; run **Admin &rarr; Module Admin &rarr; Check Online** regularly for security patches
- **Channel limits** &mdash; 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** &mdash; navigate to **Connectivity &rarr; Trunks** and confirm the trunk shows a green indicator
2. **Make an outbound call** &mdash; dial an external number from an extension and confirm two-way audio
3. **Receive an inbound call** &mdash; call one of your DIDs from a mobile and confirm it routes correctly
4. **Verify caller ID** &mdash; check your outbound caller ID displays correctly on the receiving end
5. **Check voicemail** &mdash; leave a voicemail to ensure DTMF tones are working correctly through the trunk

> **Note:**
> **Trunk not registering?** Check these common issues:
> - Verify your account number (`214XXXXXXX`) and password &mdash; 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 &rarr; 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 &mdash; you cannot present arbitrary numbers.

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

## Common Questions

## 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](/contact)**

## Related

- Article: https://www.simtex.com.au/support/kb/pbx-setup-guides/freepbx-17-sip-trunk-configuration
- Category: https://www.simtex.com.au/support/kb/pbx-setup-guides
- Knowledge Base: https://www.simtex.com.au/support/kb
- Full AI reference: https://www.simtex.com.au/llms-full.txt
