FreePBX 15+ (PJSIP trunk)
Configure the SIP Trunk on FreePBX
Adding the PortalPBX SIP trunk in FreePBX with chan_pjsip, plus inbound and outbound routes.

Before you start
- FreePBX 15 or later and an admin user.
- Trunk details provided by PortalPBX.
- NAT reviewed in Settings → Asterisk SIP Settings.
Your trunk details
PortalPBX sends them when the trunk is activated. Replace each placeholder with your real value.
- SIP server (host or domain)
- <servidor-sip>
- Port and transport
- <puerto> · UDP / TCP / TLS
- SIP username
- <usuario>
- SIP password
- <contraseña>
- Assigned DID number(s)
- <DID>
- Authentication mode
- Registro / IP
- Enabled codecs
- G.711 (alaw/ulaw) · G.729*
* G.729 only if enabled on your trunk.
Step by step
- 1
Create a PJSIP trunk
Connectivity → Trunks → Add Trunk → Add SIP (chan_pjsip) Trunk. In General: name portalpbx and Outbound CallerID with your DID.
- 2
pjsip Settings → General
Username <usuario>, Secret <contraseña>, Authentication: Outbound, Registration: Send (or None for IP auth), SIP Server <servidor-sip>, SIP Server Port <puerto>, Context from-pstn.
- 3
pjsip Settings → Advanced
From Domain <servidor-sip>, From User <usuario>, Qualify Frequency 60, Contact User <usuario>. In Codecs put alaw and ulaw first.
- 4
Routes
Connectivity → Inbound Routes: DID Number <DID> → destination. Outbound Routes: dial patterns and Trunk Sequence = portalpbx.
- 5
Apply and verify
Click Apply Config and check Reports → Asterisk Info → Registries, or via console:
asterisk -rx "pjsip show registrations"
Recommendations
- In Asterisk SIP Settings use “Detect Network Settings” to load the external IP and local networks.
- Prefer G.711 alaw/ulaw; use G.729 only if it is enabled on your trunk and supported by your equipment.
- Disable SIP ALG on your router or firewall: it is the most common cause of one-way audio and dropped registrations.
- If your PBX is behind NAT, set the public IP and local network, and open the RTP range your system uses.
- Restrict SIP access with a firewall and use long extension passwords to prevent toll fraud.
- Dial numbers in the format stated in your activation sheet (national or international) and check the caller ID.
Common errors
Registration Rejected
Check username, password and that Registration is “Send”.
Llamadas entrantes no llegan
The inbound route DID does not match the received format; test with “Any DID” to diagnose.
488 / sin audio
Codecs or NAT: check codec order and NAT settings.
Need a hand?
We configure it with you, remotely
If the manual setup does not work, contact support or open a ticket. We review registration, routes, codecs and NAT with you through a secure remote session.