
FreePBX PJSIP Trunk Setup for a Flat-Rate SIP Provider
Connect your FreePBX system to an unlimited outbound calling network in under 30 minutes — no per-minute anxiety, no surprise invoices.
1. Why PJSIP Instead of chan_sip
FreePBX 15 and later default to PJSIP (chan_pjsip) for a reason: it handles multiple registrations per trunk, supports IPv6, and gives you per-transport TLS with SRTP without patching Asterisk. For outbound-heavy deployments — call centers running 20–200 simultaneous channels per seat — PJSIP's connection pooling under load outperforms chan_sip's single-socket model. If your FreePBX is still on chan_sip, see the companion article on chan_sip vs PJSIP for outbound workloads.
UnlimCall's network accepts both protocols, but PJSIP is the tested path for anything above 10 concurrent calls per trunk.
2. Prerequisites
Before touching FreePBX:
- FreePBX 15 or 16 with Asterisk 18 or 20
- A confirmed UnlimCall account — seat pricing starts at $99/seat/month in the US and Canada (flat, no overage)
- Outbound caller ID numbers provisioned for your target markets — UnlimCall generates them on demand across 33 live markets; there is no pre-bought pool sitting idle
- Your server's public IP allowlisted on the UnlimCall side (IP authentication is the default for trunks; SIP registration is available as a fallback)
3. Create the PJSIP Trunk in FreePBX
Navigate to Connectivity > Trunks > Add Trunk > Add SIP (chan_pjsip) Trunk.
General tab:
- Trunk Name:
unlimcall-us(or region-specific) - Outbound CallerID: leave blank here; set per outbound route or campaign instead
pjsip Settings — General tab:
- Username: your assigned SIP username
- SIP Server: your assigned SIP proxy hostname (do not hardcode an IP; use the DNS name so failover works)
- SIP Server Port: 5060 (UDP) or 5061 (TLS)
- Context:
from-trunk - Transport:
0.0.0.0-udpfor standard, or create a TLS transport if your compliance posture requires encrypted signaling
pjsip Settings — Advanced tab:
- From Domain: your SIP proxy hostname (match SIP Server)
- Contact User: your SIP username
- DTMF Mode: RFC 4733 (rfc2833)
- Qualify Frequency: 60 (sends OPTIONS every 60 seconds to verify trunk health)
Codecs tab:
Enable G.711 ulaw first (required for US/CA PSTN compatibility and STIR/SHAKEN pass-through). Add G.711 alaw for international legs. OPUS is supported on the UnlimCall network for compressed-bandwidth environments but adds transcoding overhead on the Asterisk side — benchmark before enabling in production.
Save and click Submit, then Apply Config.
4. Verify Registration or IP Auth
If you are using IP authentication (recommended for static-IP servers):
`` asterisk -rx "pjsip show endpoint unlimcall-us" ``
You should see state: Available within 60 seconds of the first OPTIONS exchange.
If you are using SIP registration:
`` asterisk -rx "pjsip show registrations" ``
Look for Status: Registered on your trunk endpoint.
5. Create an Outbound Route
Navigate to Connectivity > Outbound Routes > Add Outbound Route.
- Route Name:
unlimcall-outbound - Route CID: leave blank (caller ID set per DID assignment, not route — keeps it flexible for multi-campaign setups)
- Trunk Sequence: select
unlimcall-usas position 0; add a PSTN failover trunk at position 1 if you have one
Dial Patterns tab:
For US/Canada 10-digit dialing:
| prepend | prefix | match pattern | CallerID |
|---|---|---|---|
| 1 | NXXNXXXXXX | ||
| 1NXXNXXXXXX |
International patterns depend on which of the 33 markets you are dialing into — see multi-country outbound configuration for pattern tables.
6. Test an Outbound Call
From the Asterisk CLI:
`` asterisk -rx "channel originate PJSIP/unlimcall-us/15551234567 application Playback demo-congrats" ``
Confirm the call connects, the codec negotiated is ulaw, and the SIP trace shows your caller ID presented correctly. Check asterisk -rx "pjsip show channels" during the call to confirm the channel is up on your trunk.
Takeaways
PJSIP trunks on FreePBX are straightforward once you match the transport and authentication method to your network topology. IP authentication eliminates credential rotation overhead; PJSIP handles concurrent channels cleanly at scale. The flat-rate model means you can run load tests and burn-in dialing sessions without watching a per-minute meter — a meaningful operational difference when you are tuning pacing ratios or training new agent groups.
Ready to Connect Your FreePBX System
UnlimCall flat-rate seats cover unlimited outbound minutes on a single monthly fee. No per-minute rates, no DID rental fees on top. See per-country pricing and activate with LAUNCH50 for 50% off your first month at /pricing/.