What is Freeswitch?

Chetan Pandey
3 min readAug 21, 2021

If you are working in VOIP / Telecom domain you might have heard and worked on software likes Asterisk, Opensips, Kamailio, etc. All these are used to develop and build VOIP services and are heavily used in the telecommunication domain. If we look at some voice/video chat applications like Skype, Zoom, WhatsApp, Viber they all use some sort of VoIP stack in the backend.

Freeswitch

Freeswitch is a software that provides a fully configurable and customizable telecom stack for modern application

Freeswitch is open-source software that provides a production-grade telecom stack that has many applications like PBX, CallCenter Application, Sip Proxy, RTP Proxy, Audio / Video conference, etc.

As you are reading this blog Freeswitch running on cloud is serving many applications and people are using it to build complex modern telecommunication systems.

Freeswitch is so widely used because of the features and customization it offers.

Features:

  • Freeswitch support VoIP, WebRTC and PSTN
  • Freeswitch can run on a single core VM to a 32-core full dedicated server. It also supports a wide range of operating systems Linux, OsX, BSD, Solaris, and even windows.
  • Freeswitch has full encryption support ZRTP, DTLS, SIPS, WSS
  • Freeswitch has the support of a wide range of audio codecs like G722, PCMU, PCMA, Opus, Speex, AMR, GSM, VP8, VP9
  • Freeswitch has a lot of inbuilt modules which can be used in multiple use cases. For example mod_conference for video and audio conferencing.
  • Freeswitch is fully customizable you can use 3rd party open source modules or write your module. All modules are plug and play. It also supports a hot reload of modules.
  • Freeswitch also supports SMPP (SMS).
  • There is CLI support using fs_cli which gives access to a large number of commands executed on ESL.
  • Freeswitch also supports automatic speech recognition and text-to-speech features using ASR and TTS modules.

Freeswitch Architecture:

Freeswitch is written in C/C++ and has a modular architecture. There is Core that provides a base system that is used by all the modules. Core doesn't have many functionalities most of the features are achieved by stand-alone modules. This modular design makes Freeswitch fully customizable.

Freeswitch architecture

Freeswitch modules and their brief description.

Endpoint: Telephone protocols like WebRTC, SIP/H.323, and POTS lines

Application: Performs a task such as playing audio or setting data

Application Programming Interface (API): Exports a function that takes text input and returns text output, which could be used across modules or from an external connection

Automated Speech Recognition (ASR): Interfaces with speech recognition systems

Chat: Bridges and exchanges various chat protocols

Codec: Translates between audio formats

Dialplan: Parses the call details and decides where to route the call

Directory: Connects directory information services, such as LDAP, to a common core lookup API

Event handlers: Allows external programs to control FreeSWITCH

File: Provides an interface to extract and play sound from various audio file formats

Formats: Plays audio files in various formats

Languages: Programming language interfaces used for call control

Loggers: Controls logging to the console, system log, or log files

Text-To-Speech (TTS): Interfaces with text-to-speech engines

Timers: POSIX or Linux kernel timing in applications

XML Interfaces: Uses XML for Call Detail Records (CDRs), RADIUS, CURL, LDAP, RPC, and/or SCGI

Freeswitch provides a whole lot of modules with its package we will explore them in the upcoming blogs.

Who uses Freeswitch:

Freeswitch is Extensible, Scalable, Flexible, and Stable that's why it is used by industry-leading organizations.

signal wire

And a lot of organizations are also using Freeswitch to provide Communication as a Service (CAAS)

NOTE: There are many abbreviations and terms which may be unknown to someone who is new to the telecommunication domain, so don’t get confused a simple google search for these terms will clear their meaning.

Links:

Freeswitch docs: https://freeswitch.org/confluence/

Freeswitch Github: https://github.com/signalwire/freeswitch/

--

--

Chetan Pandey

A Software Engineer from New Delhi, India with interests in Data Science, GoLang, NodeJS, Python Development, Microservices, APIs, VOIP, Neural Networks, UI/UX