Audience: FreePBX admin. Time: 10 to 15 minutes. Driver: chan_pjsip (recommended, not legacy chan_sip).
Prerequisites
- FreePBX admin access
- Outbound UDP 5060 allowed on the firewall
- SIP ALG disabled on the router (mandatory)
- PBX SIP Domain (FreePBX’s public FQDN or IP)
Step 1: create the trunk in SmartAlex
Phone Numbers, then Connect Your Carrier, then SIP Trunk, then pick FreePBX. Save, copy the credentials.Step 2: add the pjsip trunk in FreePBX
1
Open Trunks
FreePBX admin, then Connectivity, then Trunks, then Add SIP (chan_pjsip) Trunk.
2
General tab
- Trunk Name:
smartalex - Hide CallerID: No
- Outbound CallerID: your DID
- Maximum Channels: match the concurrent-call limit in SmartAlex (default 10)
3
pjsip Settings: General tab
- Username: (from SmartAlex)
- Secret: (from SmartAlex)
- Authentication: Outbound
- Registration: Send
- SIP Server:
sip.voice.getsmartalex.com - SIP Server Port:
5060 - Context:
from-pstn - Transport:
0.0.0.0-udp
4
Codecs tab
Enable
ulaw and alaw. Disable g729 unless licensed.5
Submit and Apply Config
Click Submit, then the Apply Config button in the red bar at the top.
6
Verify registration
Admin, then Reports, then Asterisk Info, then Registrations. The trunk should show Registered.
Step 3: inbound route
Connectivity, then Inbound Routes, then Add. Set the DID, destination as your SmartAlex trunk (outbound leg). Alternatively if using a SmartAlex DID, skip this step.Step 4: outbound route (optional)
Only if FreePBX extensions should dial out through SmartAlex. Connectivity, then Outbound Routes, then add a dial pattern that strips the prefix and uses the SmartAlex trunk.Step 5: extensions and agent linking
Add extensions in SmartAlex Settings, then PBX. Link agent in Agent Studio.Step 6: test
Dial the DID. Ask for a transfer.Alternative: Native Extension Mode
The flow above has FreePBX register out to SmartAlex via a trunk. The inverse, SmartAlex registers as an extension on YOUR FreePBX, is often simpler when FreePBX is your source-of-truth. Provision a normal pjsip extension in Applications → Extensions, give it to SmartAlex, and we register exactly like any softphone. From there, route DIDs through your usual inbound-route + ring-group rules. See Native Extension Mode.FreePBX-specific notes
- SIP Debug: Admin, then Asterisk CLI. Run
pjsip set logger onto trace SIP messages in real time. - NAT handling: pjsip handles NAT well when
rewrite_contactis enabled (default). - Call recording conflicts: if FreePBX records calls at the trunk level, it will record the SmartAlex leg separately. Decide whether that’s wanted.
- Distro vs Incredible PBX vs stock FreePBX: configuration is identical across distributions.
Next steps
Asterisk
Raw Asterisk setup if you don’t run FreePBX.
Troubleshooting
Error reference.

