Before you start
- FusionPBX superadmin access.
- The external profile bound to your public IP (
ext-sip-ipandext-rtp-ipset). - Your public IP on the CLIRoutes endpoint, or SIP credentials.
Placeholders in angle brackets, such as <ACCOUNT_ID>, come from your portal. The host shown is a placeholder; use the one listed under Portal → Network.
Set up FusionPBX
- 01
Create the gateway
Go to Accounts → Gateways → Add. Use the values below. For IP authentication set Register to *false* and leave username and password as placeholders FusionPBX requires.
Gateway fields Gateway ............ cliroutes Username ........... <ACCOUNT_ID> Password ........... <SIP_PASSWORD> From User .......... <ACCOUNT_ID> From Domain ........ sip.example-carrier.net Proxy .............. sip.example-carrier.net Register ........... true (false for IP auth) Caller ID In From .. true Profile ............ external - 02
Start the gateway
Save, then click Start on the gateway list, or rescan the profile from the console.
fs_cli fs_cli -x "sofia profile external rescan" fs_cli -x "sofia status gateway cliroutes" - 03
Add an outbound route
Go to Dialplan → Outbound Routes → Add, pick the gateway, and enter a dialplan expression. The expression below accepts
00or+prefixed numbers and sends country code plus number.Dialplan expression ^(?:\+|00)(\d{7,15})$ - 04
Set the caller ID
Set Outbound Caller ID Number on each extension, or add a
setaction on the route so every call uses an authorised number regardless of extension.Route actions set effective_caller_id_number=<AUTHORISED_CLI> set sip_cid_type=pid bridge sofia/gateway/cliroutes/$1 - 05
Test the call
Dial a mobile you control. If it fails, enable SIP tracing on the external profile and repeat; the trace shows the INVITE we received and our response.
fs_cli fs_cli -x "sofia profile external siptrace on"
Plain FreeSWITCH XML equivalent
<include>
<gateway name="cliroutes">
<param name="username" value="<ACCOUNT_ID>"/>
<param name="password" value="<SIP_PASSWORD>"/>
<param name="realm" value="sip.example-carrier.net"/>
<param name="proxy" value="sip.example-carrier.net"/>
<param name="register" value="true"/>
<param name="caller-id-in-from" value="true"/>
<param name="ping" value="30"/>
</gateway>
</include>sip_cid_type=pid makes FreeSWITCH send a P-Asserted-Identity header. Keep it on so caller ID validation matches what you configured.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
403 Forbidden | Source IP not allow-listed, wrong credentials, or caller ID not authorised | Check Portal → Endpoints and Caller IDs |
484 Address Incomplete | Number sent in national format or with a leftover prefix | Send country code + number, no + or 00 |
| One-way or no audio | NAT not handled or RTP blocked | Set external address, open the RTP range |
| Gateway state FAIL_WAIT | Registration rejected | Check credentials and that the external profile can reach the proxy |
Last verified by the CLIRoutes routing team. Menus can change between releases; if a field has moved, tell us.