Troubleshooting FreePBX and Asterisk SIP trunk is an important process to ensure your phone system functions optimally. Common issues include registration errors, audio problems, and NAT-related questions. By using the Asterisk CLI and reviewing logs, you can effectively diagnose and solve these issues.
Check Trunk Status in FreePBX Dashboard
Step 1: Log in to FreePBX Dashboard
Go to
https://portal.internetport.com, navigate to Services and select My services. Find your SIP trunk and click on configuration details.Step 2: Check Trunk Status
In the FreePBX Dashboard, go to
Communication > Trunks. Select your SIP trunk and click on theStatustab to see if the trunk is registered.
Enable Asterisk CLI Debug asterisk -rvvvvv
Step 1: Open Terminal or SSH to Server
Connect to your FreePBX server via SSH.
Step 2: Start Asterisk CLI with Debug
Run the command
asterisk -rvvvvvto start CLI with maximum debug level. This provides detailed information about SIP communication.
Registration Fails with 401, 403, 408 Errors
Step 1: Check Credentials
For 401 (Unauthorized) and 403 (Forbidden) errors, verify that SIP username and password are correct. Find these in
Communication > Trunksunder your trunk.Step 2: Check Server Availability
For 408 (Request Timeout) errors, check that the SIP server
sip.internetport.seis up and reachable from your server.
No Audio or One-Way Audio RTP NAT
Step 1: Check RTP Ports
Go to
Communication > SIP Settings, ensure that the RTP port range is correctly configured.Step 2: Configure NAT in pjsip.conf
In
pjsip.conf, add or update settings forlocal_netandexternip. Example:[transport-udp] type=transport protocol=udp bind=0.0.0.0 local_net=192.168.1.0/24 external_media_address=your.external.ip.address
Codec Mismatch Check Allowed Codecs
Step 1: Check Allowed Codecs in FreePBX
In
Communication > Trunks, under your trunk, ensure that the supported codecs by Internetport (G.711 a-law, G.711 u-law, G.722, G.729) are marked.Step 2: Check Codec Settings in pjsip.conf
Check that codecs match in
pjsip.conf. Example:[endpoint-name] type=endpoint context=default disallow=all allow=ulaw allow=alaw allow=g722 allow=g729
NAT localnet and externip in pjsip.conf
Step 1: Identify Your Local Network
Use
ifconfigor equivalent to find your internal IP address and subnet mask.Step 2: Update pjsip.conf with NAT Settings
Add or update
local_netandexternal_media_addressin your transport settings. See example above.
Gather Diagnostics and Contact Support
- Check logs in FreePBX under
Status > Logs. - Use the command
sip show peersin Asterisk CLI to display SIP peer status. - Upload relevant logs and configuration files to Internetport support page.
For further assistance, visit support page on Internetport.