Skip to content

Configuring FreePBX with AIVO Connect

Step-by-step FreePBX trunk setup, inbound/outbound routes, codec settings, and troubleshooting.

3 min readAIVO Connect

Prerequisites

  • A working FreePBX installation (version 14 or later recommended).
  • An AIVO Connect SIP connection with credentials (see SIP Trunking Getting Started).
  • Your SIP credentials: username, password, and SIP server address from the AIVO dashboard.

Step 1: Create the SIP Trunk

  1. In FreePBX, go to Connectivity > Trunks.
  2. Click Add Trunk > Add SIP (chan_pjsip) Trunk.
  3. On the General tab:
  • Trunk Name: AIVO-Connect
  • Outbound CallerID: Your AIVO number (e.g., +15551234567)
  1. On the pjsip Settings tab, under General:
  • Username: Your AIVO SIP username
  • Secret: Your AIVO SIP password
  • Authentication: Outbound
  • Registration: Send
  • SIP Server: sip.aivo.bz
  • SIP Server Port: 5060
  1. Under Advanced:
  • From Domain: sip.aivo.bz
  • From User: Your AIVO SIP username
  • DTMF Mode: RFC 4733
  • Media Encryption: SRTP (if supported by your setup, otherwise None)
  1. Click Submit and then Apply Config.

Step 2: Configure Inbound Routes

  1. Go to Connectivity > Inbound Routes.
  2. Click Add Incoming Route.
  3. Enter:
  • Description: AIVO Inbound
  • DID Number: Your AIVO phone number (digits only, e.g., 15551234567)
  1. Under Set Destination, choose where inbound calls should go:
  • Ring Group - Ring multiple extensions.
  • IVR - Play a menu.
  • Extension - Ring a specific phone.
  • Time Condition - Route based on business hours.
  1. Click Submit and Apply Config.

Step 3: Configure Outbound Routes

  1. Go to Connectivity > Outbound Routes.
  2. Click Add Outbound Route.
  3. Enter:
  • Route Name: AIVO-Outbound
  • Trunk Sequence: Select AIVO-Connect
  1. Under Dial Patterns, add patterns for the calls you want to route through AIVO:
  • US/Canada: Match pattern 1NXXNXXXXXX, prepend +
  • International: Match pattern 011., prepend +
  • Local: Match pattern NXXNXXXXXX, prepend +1
  1. Click Submit and Apply Config.

Step 4: Codec Settings

AIVO Connect supports these codecs (in order of preference):

  1. G.722 - Wideband, best quality.
  2. G.711u (PCMU) - Standard quality, widely compatible.
  3. G.711a (PCMA) - Standard quality, common in Europe.
  4. Opus - Modern, adaptive codec (if supported by your endpoints).

To configure in FreePBX:

  1. Go to Settings > Asterisk SIP Settings > Chan PJSIP.
  2. Under Codecs, enable the codecs above and disable others.
  3. Drag to reorder with G.722 at the top.
  4. Click Submit and Apply Config.

Troubleshooting Registration

Trunk Shows "Unavailable"

  1. Check your credentials match exactly (case-sensitive).
  2. Verify your firewall allows outbound UDP/TCP on port 5060 and UDP 10000-20000.
  3. Check Asterisk logs: Reports > Asterisk Logfiles or asterisk -rvvv from the command line.
  4. Try switching from UDP to TCP in the trunk settings.

One-Way Audio

  1. Check your NAT settings: Settings > Asterisk SIP Settings > NAT > External Address should be your public IP.
  2. Ensure RTP ports (10000-20000) are forwarded through your firewall.
  3. Enable Force rport and Rewrite Contact in the trunk's Advanced settings.

Registration Timeout

  1. Increase the Registration Expiry to 3600 seconds.
  2. Check that your ISP is not blocking SIP traffic (some do by default).
  3. If behind a SIP-aware firewall/router, disable SIP ALG.

Important: SIP ALG (Application Layer Gateway) on consumer routers frequently causes registration and audio problems. Disable it in your router settings.

Was this article helpful?