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
- In FreePBX, go to Connectivity > Trunks.
- Click Add Trunk > Add SIP (chan_pjsip) Trunk.
- On the General tab:
- Trunk Name: AIVO-Connect
- Outbound CallerID: Your AIVO number (e.g., +15551234567)
- 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
- 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)
- Click Submit and then Apply Config.
Step 2: Configure Inbound Routes
- Go to Connectivity > Inbound Routes.
- Click Add Incoming Route.
- Enter:
- Description: AIVO Inbound
- DID Number: Your AIVO phone number (digits only, e.g., 15551234567)
- 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.
- Click Submit and Apply Config.
Step 3: Configure Outbound Routes
- Go to Connectivity > Outbound Routes.
- Click Add Outbound Route.
- Enter:
- Route Name: AIVO-Outbound
- Trunk Sequence: Select AIVO-Connect
- 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
- Click Submit and Apply Config.
Step 4: Codec Settings
AIVO Connect supports these codecs (in order of preference):
- G.722 - Wideband, best quality.
- G.711u (PCMU) - Standard quality, widely compatible.
- G.711a (PCMA) - Standard quality, common in Europe.
- Opus - Modern, adaptive codec (if supported by your endpoints).
To configure in FreePBX:
- Go to Settings > Asterisk SIP Settings > Chan PJSIP.
- Under Codecs, enable the codecs above and disable others.
- Drag to reorder with G.722 at the top.
- Click Submit and Apply Config.
Troubleshooting Registration
Trunk Shows "Unavailable"
- Check your credentials match exactly (case-sensitive).
- Verify your firewall allows outbound UDP/TCP on port 5060 and UDP 10000-20000.
- Check Asterisk logs: Reports > Asterisk Logfiles or
asterisk -rvvvfrom the command line. - Try switching from UDP to TCP in the trunk settings.
One-Way Audio
- Check your NAT settings: Settings > Asterisk SIP Settings > NAT > External Address should be your public IP.
- Ensure RTP ports (10000-20000) are forwarded through your firewall.
- Enable Force rport and Rewrite Contact in the trunk's Advanced settings.
Registration Timeout
- Increase the Registration Expiry to 3600 seconds.
- Check that your ISP is not blocking SIP traffic (some do by default).
- 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?