Skip to main content
You will finish with calls to a FreePBX number answered by your SmartAlex agent. Pick Use as PBX extension (the simplest, with attended transfers) or Forward calls over a chan_pjsip trunk. These steps follow FreePBX 16 and 17.
In the app: Sidebar → Calls → PBX Extensions (/settings/pbx) → Connect a PBX → PBX platform → FreePBX. The tile starts on UDP, digest authentication and G.711 u-law and A-law.

What you need first

  • Admin access to the FreePBX web interface.
  • A SmartAlex agent that is ready to answer calls.
  • Someone who can change the firewalls. For extension mode they allow 34.233.117.97 and 15.240.176.215 on the FreePBX firewall and any firewall in front of it. For Forward calls they allow outbound SIP to sip.voice.getsmartalex.com; this host has no fixed IP list, so use a hostname rule.
  • The number callers dial, in international form, such as +27 11 555 1234.

How it connects

This sequence shows SmartAlex signing in to FreePBX as an extension, answering a call and transferring it.

Option A: Use as PBX extension

In FreePBX

1

Open Extensions

In the FreePBX web interface, go to Applications > Extensions.
2

Add a chan_pjsip extension

Click Add Extension, then Add New SIP [chan_pjsip] Extension.
3

Fill in the extension

Enter a User Extension such as 850, a Display Name such as “SmartAlex AI”, and a strong Secret. Click Submit.
4

Trust the first SmartAlex address

Go to Connectivity > Firewall and open the Networks tab, then add 34.233.117.97 and assign it to the Trusted zone.
5

Trust the second SmartAlex address

Add 15.240.176.215 the same way.
6

Apply the config

Click Apply Config. If another firewall sits in front of FreePBX, allow UDP from both addresses to your SIP port and RTP range.
7

Send calls to the AI

Go to Connectivity > Inbound Routes, open your number’s route, set its destination to Extensions and choose the AI’s extension. Click Submit, then Apply Config. You can also add the extension to a ring group or IVR option.

In SmartAlex

1

Open PBX Extensions

In the sidebar, click Calls, then PBX Extensions (/settings/pbx). Click Connect a PBX.
2

Pick FreePBX

Under PBX platform, click the FreePBX tile.
3

Choose Use as PBX extension

Under Connection Type, choose Use as PBX extension.
The FreePBX tile with Use as PBX extension chosenThe FreePBX tile with Use as PBX extension chosen

Pick FreePBX, then Use as PBX extension.

4

Fill in the form

Fill in the fields in the table below, then click Connect to PBX. The app says “Connected. SmartAlex is registering to your PBX now.”
5

Link the agent

Under Finish the connection, find Which agent answers?, choose your agent and click Link agent.
6

Set up the inbound route

Under Which number rings it?, click Set up the inbound route. The Connect a PBX Extension dialog already knows the connection and the linked agent. It asks only for the Extension, the Number callers dial in full international form, such as +27 11 555 1234, and an optional Label. Click Connect.

Option B: Forward calls (chan_pjsip trunk)

In SmartAlex

1

Open PBX Extensions

In the sidebar, click Calls, then PBX Extensions (/settings/pbx). Click Connect a PBX.
2

Pick FreePBX

Under PBX platform, click the FreePBX tile.
3

Choose Forward calls

Under Connection Type, choose Forward calls.
4

Fill in the form

Fill in the fields in the table below.
5

Create the trunk and copy the details

Click Create SIP Trunk. The app says “SIP trunk created. Configure your PBX with these details.” Copy the Username and Password. The password is not shown again.

In FreePBX

1

Add the trunk

Go to Connectivity > Trunks, click Add Trunk, then Add SIP (chan_pjsip) Trunk.
2

Name it

On the General tab, enter a Trunk Name such as SmartAlex.
3

Point it at SmartAlex

Open the pjsip Settings tab. Under General, set SIP Server to sip.voice.getsmartalex.com and SIP Server Port to 5060.
4

Enter the sign-in details

Still under General, enter the Username and Secret SmartAlex showed you. Set Registration to None.
5

Set the codecs and DTMF

In the trunk’s pjsip settings, enable ulaw and alaw under the codecs, and set DTMF Mode to RFC 2833.
6

Save and apply

Click Submit, then Apply Config.
7

Route calls to the trunk

Go to Connectivity > Outbound Routes and create a route that uses this trunk for the number the AI answers. To send an inbound number there, point its inbound route at a Misc Destination that dials that number.
Make sure the number is in Sidebar → Calls → Numbers (/phone-numbers) with an agent assigned. If it lives with your own carrier, email support@getsmartalex.com about adding it. The AI transfers with a SIP REFER to sip:<extension>@<your FreePBX host>, so the trunk must accept REFER.

Check it worked

1

The status turns green

Under Sidebar → Calls → PBX Extensions, the card shows Connected as ext 850 in extension mode; for anything else, see Connection status.
2

Diagnostics pass (extension connections)

For an extension connection, open the card’s menu, choose Show diagnostics, and check Registration, PBX reachable and Inbound routing all pass.
3

FreePBX sees the sign-in

In FreePBX, open Reports > Asterisk Logfiles > Full log and search for your AI extension. Each REGISTER from our addresses and FreePBX’s reply are there.
4

A call reaches the AI

Call the number from a mobile phone. Your agent answers.
5

A transfer works

Ask the agent to put you through to a colleague, and the call rings that person’s extension.

Next

Fill the extension directory

So the AI can put callers through to your team.

Test before go-live

The full test plan.

Questions people ask

Extension mode, which gives attended transfers and needs no outbound route, unless your security policy forbids an outside system registering to FreePBX. See Connection modes.
Open Reports > Asterisk Logfiles > Full log and search for your AI extension; each REGISTER from our addresses and FreePBX’s reply are there.
The username is the User Extension and the password is the extension’s Secret; fix them with Edit connection. See Connection status.
Add both addresses as Trusted under Connectivity > Firewall > Networks. SmartAlex stops signing in after a refusal, so a wrong password does not keep hitting the firewall.

Asterisk

Raw Asterisk with pjsip.conf.

PBX extension mode

How extension mode works.

SIP trunk (Forward calls)

All trunk settings explained.

Network requirements

Addresses, ports and SIP ALG.
Last modified on November 27, 2026