Skip to content
Back to PBX Guides
Difficulty: Moderate · ~15 min

FreePBX / Asterisk SIP Trunk Setup

Configure a chan_pjsip trunk in FreePBX to route calls through AIVO Connect. This guide works with FreePBX 15+ and Asterisk 16+.

Prerequisites

  • FreePBX 15+ with Asterisk 16+ (chan_pjsip enabled)
  • An active AIVO Connect SIP trunking account with credentials
  • Admin access to the FreePBX web admin panel
  • Your AIVO Connect SIP username and password (from the Connect dashboard)

AIVO Connect SIP Settings

SIP Configuration Reference

SIP Server: sip.aivo.bz

Port: 5060 (UDP/TCP) or 5061 (TLS)

Codecs: G.722, G.711u, G.711a, Opus

DTMF: RFC 2833

Registration: Not required (IP auth) / Required (credential auth)

Auth Methods: Credential (username/password) or IP-based

1

Create a New pjsip Trunk

Log in to the FreePBX admin panel. Navigate to Connectivity > Trunks.

Click Add Trunk and select Add SIP (chan_pjsip) Trunk.

Enter a trunk name such as AIVO-Connect and set the Outbound CallerID to one of your AIVO Connect DID numbers.

2

Configure pjsip Settings

Click the pjsip Settings tab. Under the General sub-tab, set:

Username: (your AIVO Connect SIP username)

Secret: (your AIVO Connect SIP password)

Authentication: Outbound

Registration: Send

SIP Server: sip.aivo.bz

SIP Server Port: 5060

Context: from-pstn

Transport: 0.0.0.0-udp (or TLS transport if using port 5061)

If you are using IP-based authentication instead, leave the Username and Secret fields blank, set Registration to None, and ensure your server's public IP is whitelisted in the AIVO Connect dashboard.

3

Configure Registration String (Advanced)

Under the Advanced sub-tab of pjsip Settings, verify or set these values:

DTMF Mode: RFC 4733 (RFC 2833)

Maximum Channels: (your channel limit, e.g. 30)

From Domain: sip.aivo.bz

From User: (your AIVO Connect SIP username)

Qualify Frequency: 60

Match (Inbound): sip.aivo.bz

The registration string format for Asterisk CLI is:

register => your_username:your_password@sip.aivo.bz/your_username
4

Set Codec Priority

Under the Codecs sub-tab, enable and order the codecs as follows:

1. G.722 (wideband, recommended for HD voice)

2. G.711u (ulaw) (narrowband, universal compatibility)

3. G.711a (alaw) (narrowband, common internationally)

4. Opus (wideband, requires Asterisk 16+ with codec_opus)

Disable any codecs that are not in this list (e.g., GSM, iLBC, Speex) to prevent codec negotiation issues.

5

Create Outbound Route

Navigate to Connectivity > Outbound Routes and click Add Outbound Route.

Route Name: AIVO-Outbound

Trunk Sequence: AIVO-Connect (priority 0)

Under the Dial Patterns tab, add patterns for the calls you want to route through this trunk. Common patterns:

# Local Belize calls

Match Pattern: NXXXXXX

# International calls with 011 prefix

Match Pattern: 011.

Prepend: +

Prefix: 011

# E.164 format (+ prefix)

Match Pattern: +.

6

Apply Configuration

Click Submit to save your trunk and outbound route settings.

A red Apply Config bar will appear at the top of the FreePBX interface. Click it to reload the Asterisk dialplan and apply all changes.

To verify registration from the command line, SSH into your server and run:

# Check trunk registration status

asterisk -rx "pjsip show registrations"

You should see the AIVO-Connect trunk with a status of Registered.

Test Your Connection

After applying the configuration, verify everything works:

  1. Check trunk registration — In the FreePBX dashboard, go to Connectivity > Trunks. The AIVO-Connect trunk should show a green status badge.
  2. Place a test outbound call — Dial an external number from a registered extension. Confirm two-way audio is established.
  3. Test an inbound call — Call one of your AIVO Connect DID numbers from a mobile phone. Verify it reaches the correct destination (extension, ring group, or IVR).
  4. Check the Asterisk CLI — Run asterisk -rvvv and watch the call flow in real time to confirm SIP messaging is correct.
  5. Verify DTMF — During a call, press keypad digits and confirm they transmit correctly (test with an IVR or voicemail).

Troubleshooting

Registration fails: Verify username and password match your AIVO Connect credentials exactly. Check the Asterisk log with tail -f /var/log/asterisk/full for specific error messages.

One-way or no audio: This is usually a NAT issue. In FreePBX, go to Settings > Asterisk SIP Settings and configure your External Address and Local Networks. Ensure RTP ports (10000–20000 UDP) are forwarded through your firewall.

Calls fail with “503 Service Unavailable”: Ensure the trunk context is set to from-pstn. Check that your AIVO Connect account is active and has available channels.

DTMF not working: Confirm DTMF mode is set to RFC 4733 on the trunk. Avoid using SIP INFO or in-band DTMF as these are not supported.

Need help? Contact our team at contact-sales or check the SIP network information page for full technical details.