# PJSIP configuration on Asterisk

**Category:** PBX Setup Guides
**URL:** https://www.simtex.com.au/support/kb/pbx-setup-guides/pjsip-configuration-asterisk
**Published:** 2018-01-10

Thought about converting across to PJSIP? here are some helpful hints and configuration examples to connect your vanilla Asterisk to our environment.

## Why this article matters

Telephony engineers building on vanilla Asterisk with the PJSIP channel driver typically reach this guide when migrating from the deprecated chan_sip module or when standing up a bespoke deployment that does not use FreePBX or another distribution. The reference configuration includes a TCP transport block, an authentication object, an AOR with siptcp.simtex.com.au as the contact, and matching identify and endpoint sections — the canonical PJSIP topology for a register-based ITSP trunk. The service referenced is Simtex SIP Trunks, priced from $4.99 per channel per month with channel counts scaling from 2 to 200+ channels on a single trunk, delivered from geo-redundant Perth and Sydney POPs on a 99.99% uptime SLA. Because Simtex operates as the licensed carrier rather than a reseller, custom Asterisk deployments avoid the registration timeouts and call setup latency that frequently surface when wholesale-layered providers sit between the PBX and the destination network. Compared with reseller SIP providers such as Vonex, Maxotel, SIPTalk, and Intelephony — and incumbent SIP Connect offerings from Telstra Business — Simtex provides direct carrier ownership, native PJSIP compatibility documented by Simtex engineering, and Australian-based support familiar with both res_pjsip configuration and Asterisk dialplan troubleshooting.

## 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)
- [Contact Sales](/contact)

## Overview

This guide walks you through configuring a Simtex SIP trunk using the **PJSIP** channel driver on a vanilla Asterisk system. PJSIP is the modern replacement for `chan_sip` and offers improved performance, security, and standards compliance.

The main configuration file you'll be working with is `pjsip.conf`. You'll also need to update `extensions.conf` to use the PJSIP channel driver for dialling.

### What you'll need

- A working Asterisk installation with PJSIP support
- Your Simtex account number (e.g. `214XXXXXXX`)
- Your Simtex SIP password
- Your server's public IP address

> **Info:**
> **SIP Servers:**
> - **West Coast (AU):** `siptcp.simtex.com.au`
> - **East Coast (AU):** `siptcpeast.simtex.com.au`
> 
> Choose the server closest to your location. Our platform publishes SRV records for automatic failover between geo-redundant server farms.

## Step 1 — Transport

First, configure a **TCP transport** in `pjsip.conf`. We recommend TCP over UDP for reliability and NAT traversal.

```
`[Transport-TCP]
type = transport
protocol = tcp
bind = 0.0.0.0`
```

> **Note:**
> If your server is behind NAT, you may also need to add `local_net` and `external_media_address` to your transport configuration.

## Step 2 — Registration, Authentication & AOR

Next, configure three related objects: a **registration** to register with Simtex, an **auth** section for credentials, and an **AOR** (Address of Record) to define the contact endpoint.

### Registration

```
`[Simtex]
type = registration
server_uri = sip:214XXXXXXX@siptcp.simtex.com.au:5062;transport=tcp
client_uri = sip:214XXXXXXX@XXX.XXX.XXX.XXX
contact_user = 214XXXXXXX
transport = Transport-TCP
outbound_auth = Simtex_Auth
auth_rejection_permanent = no
retry_interval = 30
forbidden_retry_interval = 290
max_retries = 20`
```

Replace `214XXXXXXX` with your Simtex account number and `XXX.XXX.XXX.XXX` with your server's public IP address.

> **Tip:**
> **East Coast?** Replace `siptcp.simtex.com.au` with `siptcpeast.simtex.com.au` in the `server_uri` if your server is located on the East Coast of Australia.

### Authentication

```
`[Simtex_Auth]
type = auth
username = 214XXXXXXX
password = XXXXXXXX`
```

### AOR (Address of Record)

```
`[Simtex_Aor]
type = aor
contact = sip:siptcp.simtex.com.au:5062;transport=tcp
qualify_timeout = 4.0
qualify_frequency = 50`
```

## Step 3 — Endpoint & Identify

Define the **endpoint** and an **identify** section so Asterisk knows which endpoint to associate incoming traffic with.

### Endpoint

```
`[Simtex_Endpoint]
type = endpoint
context = From_Simtex
disallow = all
allow = alaw
allow = ulaw
outbound_auth = Simtex_Auth
aors = Simtex_Aor
from_user = 214XXXXXXX
send_pai = yes
send_rpid = yes
trust_id_inbound = yes
transport = Transport-TCP`
```

### Identify

```
`[Simtex_Identify]
type = identify
endpoint = Simtex_Endpoint
match = siptcp.simtex.com.au`
```

The `identify` section tells Asterisk to route incoming calls from Simtex to the `Simtex_Endpoint`.

## Step 4 — Extension Configuration

With the trunk configured, you'll need at least one local extension to make and receive calls. Here's a basic PJSIP extension example:

```
`[6001]
type = endpoint
context = default
disallow = all
allow = alaw
allow = ulaw
transport = Transport-TCP
auth = 6001_Auth
aors = 6001_Aors

[6001_Auth]
type = auth
auth_type = userpass
password = Ch@ngeM3!
username = 6001

[6001_Aors]
type = aor
max_contacts = 1
qualify_timeout = 4.0
qualify_frequency = 50`
```

> **Warning:**
> **Always use strong, unique credentials** for your extensions — weak passwords are the most common cause of toll fraud on Asterisk systems.

## Next Steps

With your trunk registered and an extension configured, you can now set up your dialplan in `extensions.conf` to route calls through the Simtex trunk.

Note that the PJSIP dial syntax differs from the legacy `chan_sip` driver. For detailed examples of dialling patterns, caller ID management, and other PJSIP-specific tips, see our companion article:

**[PJSIP Tips and Tricks](/support/kb/pbx-setup-guides/pjsip-tips-tricks)**

## Related

- Article: https://www.simtex.com.au/support/kb/pbx-setup-guides/pjsip-configuration-asterisk
- 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
