FreeSwitch Installation

How to Set Up Your First FreeSWITCH System – A Complete Beginner’s Guide

FreeSWITCH is a powerful, open-source telephony platform used to build everything from small office PBX systems to carrier-grade VoIP services. It’s modular, highly flexible, and can handle SIP, WebRTC, video, conferencing, and more.

In this guide, we’ll take you from zero to a fully functional FreeSWITCH PBX:

  • Installing FreeSWITCH (with a focus on our Marketplace Image)
  • Creating extensions (users)
  • Connecting a SIP client
  • Adding trunks and outbound routes
  • Making and receiving calls

Whether you’re new to VoIP or moving from another platform like FreePBX, this tutorial will get you up and running fast.

Step 0: Launch the Marketplace Image

While you can compile FreeSWITCH from source or install from packages, the quickest way to get started is with our FreeSWITCH Marketplace Image preconfigured, secure, and updated with all dependencies.

Why use it?

  • Saves hours of manual setup
  • Includes all recommended codecs
  • Hardened configuration for production use
  • Works on cloud providers like AWS, Azure, and more

To launch:

  1. Go to your cloud provider’s Marketplace.
  2. Search for FreeSWITCH by Solve DevOps.
  3. Deploy to your chosen region.
  4. Note the public IP and SSH credentials.

You can also click on your cloud below to access the images directly.

FreeSwitch
Select Your preferred version and Cloud

Step 1: Verify the Installation

Once your instance is running, SSH into it:

ssh admin@<your-server-ip>

Check that FreeSWITCH is installed and running:

freeswitch -version
fs_cli -x "version"
systemctl status freeswitch

You should see output similar to:

FreeSWITCH Version 1.10.x-release-...

If FreeSWITCH is active (running), you’re good to proceed.

Step 2: Secure ESL and FreeSWITCH

FreeSWITCH includes an Event Socket Layer (ESL) for remote management by default its locked down to only localhost. Should you need to change that, you can follow the guide below.

Edit ESL Config:

sudo nano /usr/local/freeswitch/conf/autoload_configs/event_socket.conf.xml
  • Change:
<param name="listen-ip" value="127.0.0.1"/>
<param name="password" value="choose-a-strong-password"/>
  • Save and restart:
sudo systemctl restart freeswitch

Firewall:
Allow only required ports:

sudo ufw allow 22/tcp
sudo ufw allow 5060,5061/tcp
sudo ufw allow 5060,5061/udp
sudo ufw allow 16384:32768/udp
sudo ufw enable

Step 3: Create Your First Extension

FreeSWITCH extensions are stored as XML files under /usr/local/freeswitch/conf/directory/default/. By default you have a number of extensions configured for testing. The default password can be found in /usr/local/freeswitch/conf/vars.xml

Example: Create extension 1000

sudo nano /etc/freeswitch/directory/default/1000.xml

Paste:

<include>
  <user id="1000">
    <params>
      <param name="password" value="StrongP@ssw0rd"/>
      <param name="vm-password" value="1000"/>
    </params>
    <variables>
      <variable name="toll_allow" value="domestic,international"/>
      <variable name="accountcode" value="1000"/>
      <variable name="user_context" value="default"/>
      <variable name="effective_caller_id_name" value="Extension 1000"/>
      <variable name="effective_caller_id_number" value="1000"/>
      <variable name="outbound_caller_id_name" value="${outbound_caller_name}"/>
      <variable name="outbound_caller_id_number" value="${outbound_caller_id}"/>
    </variables>
  </user>
</include>

Reload the config:

fs_cli -x "reloadxml"
#or restart freeswitch

systemctl restart freeswitch.service

Step 4: Connect a SIP Client

You can now connect a softphone like Zoiper, Linphone, or MicroSIP.

Settings:

  • Username: 1000
  • Password: StrongP@ssw0rd (from your XML)
  • Domain/Realm: your FreeSWITCH server’s IP

Check registration:

fs_cli -x "sofia status profile internal"

You should see REGISTRATIONS: 1.


Step 5: Add a SIP Trunk

To make and receive calls outside your PBX, you’ll need a trunk from an ITSP (VoIP provider).

Edit the external SIP profile:

sudo nano /etc/freeswitch/sip_profiles/external/mytrunk.xml

Example:

<include>
  <gateway name="my-itsp">
    <param name="username" value="trunkuser"/>
    <param name="password" value="trunkpassword"/>
    <param name="proxy" value="sip.myitsp.com"/>
    <param name="register" value="true"/>
  </gateway>
</include>

Reload:

fs_cli -x "sofia profile external rescan"

Step 6: Create an Outbound Route

Outbound routes live in the dialplan.

Example: Route numbers starting with 9 to your trunk:

sudo nano /etc/freeswitch/dialplan/default/09_outbound.xml
<extension name="outbound_to_myitsp">
  <condition field="destination_number" expression="^9(\d+)$">
    <action application="bridge" data="sofia/gateway/my-itsp/$1"/>
  </condition>
</extension>

Reload:

fs_cli -x "reloadxml"

Step 7: Test Your Setup

  • Outbound call: Dial 9 + external number from extension 1000.
  • Inbound call: Call your trunk’s DID (number from ITSP) and confirm it reaches your extension.

Use:

fs_cli -x "show channels"

to see active calls.


Step 8: Next Steps

You’ve now:

  • Installed FreeSWITCH
  • Secured it
  • Created extensions
  • Registered a SIP client
  • Added a trunk and outbound route
  • Made real calls

From here, you can:

  • Build IVRs
  • Add voicemail
  • Configure conferences
  • Enable WebRTC

Conclusion

Setting up FreeSWITCH from scratch might seem intimidating at first, but as you’ve seen, the process becomes straightforward when broken into simple, actionable steps.

In this guide, we took you from a clean server to a fully functional PBX system complete with extensions, SIP client registration, trunks, and working inbound/outbound call routing. You now have a flexible and scalable communication platform that can grow with your needs, whether for a small office, call center, or even carrier-grade applications.

For the fastest and most secure start, we recommend launching our pre-configured FreeSWITCH Marketplace Image. It saves hours of installation and security hardening, letting you focus on building features, not fixing dependencies.

From here, you can explore advanced features like IVR menus, conferencing, call recording, and WebRTC support. FreeSWITCH is incredibly powerful and now, you have the foundation to make it work for you.