Freeswitch
Encyclopedia
FreeSWITCH is a free
and open source communications software for the creation of voice and messaging products. It is licensed under the Mozilla Public License
(MPL), a free software license. Its core library, libfreeswitch, is capable of being embedded into other projects, as well as being used as a stand-alone application.
's ETEL Conference. In June 2007, FreeSWITCH was selected by Truphone
for use, and in August 2007, Gaboogie announced that it selected FreeSWITCH as its conferencing platform.
FreeSWITCH's first official 1.0.0 release (Phoenix) was on May 26, 2008. A minor 1.0.1 patch release came out on July 24, 2008. Current release is 1.0.7 which came out on 14 January 2011.
that is built on top of a solid, state-machine driven core. The stated goals of the project include stability, scalability
, and abstraction
.
To eliminate complexity FreeSWITCH uses freely available software libraries that perform needed functions. Some dependencies are:
Not all of these software dependencies are required to build the core FreeSWITCH application, but are dependencies of various external modules, such as codecs. FreeSWITCH is a modular application, in which modules can extend the functionality but the abstraction layer prevents inter-module dependency. The goal is to ensure that one module is not required to load another.
, XML-RPC
control of live calls, Interactive voice response
(IVR), TTS
/ASR
(text to speech/automatic speech recognition), Public switched telephone network
(PSTN) interconnection ability supporting both analogue and digital circuits, Voice over IP
protocols including SIP
, SCCP
, H.323
, XMPP
, GoogleTalk, t.38
and others.
Applications using the FreeSWITCH library can be written in C
/C++
, Python
, Perl
, Lua, JavaScript
using Mozilla's SpiderMonkey
engine, Java
and Microsoft .NET via Microsoft's CLR or via Mono
. In each case, FreeSWITCH exposes primitives for call control and IVR functionality for the programmer to use.
Call control applications can use the Event Socket, which is a socket-based
connection to the FreeSWITCH software. Any programming language or software that is capable of communicating via sockets can be used to control activity on the FreeSWITCH server. FreeSWITCH also comes with an Event Socket Library (ESL) and "ESL-wrappers" for Erlang, JavaScript, Lua, Perl, PHP, Python, and Ruby
. The wrappers are libraries that abstract
away some of the mundane aspects of socket-level programming.
FreeSWITCH supports several video codecs:
Some codecs are implemented in pass-through mode only. This means that the raw compressed data is passed through between callers, without any processing. This allows some codecs to be supported which cannot be provided freely due to patent licensing issues, since the data is never encoded or decoded. However, these codecs cannot be transcoded (i.e. both callers must use the same codec when using a pass-through codec, and some recording and playback functions such as IVR are not supported).
The software supports hardware transcoding cards, such as produced by Sangoma. These implement codecs in hardware, reducing the CPU usage of the server. Some of these codecs are fully licensed, providing an alternative to the passthrough options above.
programs.
, and those which are primarily PABXes or IVR
s, such as Asterisk
and its derivatives. FreeSWITCH provides building blocks from which applications – such as a PABX, a voicemail
system, a conferencing
system or a calling card
– can be built using any of the supported languages.
Free software
Free software, software libre or libre software is software that can be used, studied, and modified without restriction, and which can be copied and redistributed in modified or unmodified form either without restriction, or with restrictions that only ensure that further recipients can also do...
and open source communications software for the creation of voice and messaging products. It is licensed under the Mozilla Public License
Mozilla Public License
The Mozilla Public License is a free and open source software license. Version 1.0 was developed by Mitchell Baker when she worked as a lawyer at Netscape Communications Corporation and version 1.1 at the Mozilla Foundation...
(MPL), a free software license. Its core library, libfreeswitch, is capable of being embedded into other projects, as well as being used as a stand-alone application.
History
The FreeSWITCH project was first announced in January 2006 at O'Reilly MediaO'Reilly Media
O'Reilly Media is an American media company established by Tim O'Reilly that publishes books and Web sites and produces conferences on computer technology topics...
's ETEL Conference. In June 2007, FreeSWITCH was selected by Truphone
Truphone
Tru is a mobile network that operates internationally. It has headquarters in London, and offices in the United States, Australia, Hong Kong, Philippines, Spain, the Netherlands and Portugal....
for use, and in August 2007, Gaboogie announced that it selected FreeSWITCH as its conferencing platform.
FreeSWITCH's first official 1.0.0 release (Phoenix) was on May 26, 2008. A minor 1.0.1 patch release came out on July 24, 2008. Current release is 1.0.7 which came out on 14 January 2011.
Design
According to the lead designer, Anthony Minessale, FreeSWITCH is intended to be a softswitchSoftswitch
A softswitch is a central device in a telecommunications network which connects telephone calls from one phone line to another, typically via the internet, entirely by means of software running on a general-purpose computer system...
that is built on top of a solid, state-machine driven core. The stated goals of the project include stability, scalability
Scalability
In electronics scalability is the ability of a system, network, or process, to handle growing amount of work in a graceful manner or its ability to be enlarged to accommodate that growth...
, and abstraction
Abstraction
Abstraction is a process by which higher concepts are derived from the usage and classification of literal concepts, first principles, or other methods....
.
To eliminate complexity FreeSWITCH uses freely available software libraries that perform needed functions. Some dependencies are:
- Apache Portable RuntimeApache Portable RuntimeThe Apache Portable Runtime is a supporting library for the Apache web server. It provides a set of APIs that map to the underlying operating system . Where the OS doesn't support a particular function, APR will provide an emulation...
(APR and APR-Util) - SQLiteSQLiteSQLite is an ACID-compliant embedded relational database management system contained in a relatively small C programming library. The source code for SQLite is in the public domain and implements most of the SQL standard...
– a lightweight implementation of an SQL engine - PCRE – Perl Compatible Regular Expressions
- Sofia-SIP – an open-source SIPSession Initiation ProtocolThe Session Initiation Protocol is an IETF-defined signaling protocol widely used for controlling communication sessions such as voice and video calls over Internet Protocol . The protocol can be used for creating, modifying and terminating two-party or multiparty sessions...
user agent library - libspeex – SpeexSpeexSpeex is a patent-free audio compression format designed for speech and also a free software speech codec that may be used on VoIP applications and podcasts. It is based on the CELP speech coding algorithm. Speex claims to be free of any patent restrictions and is licensed under the revised BSD...
DSP library (replaced libresample as of version 1.0.3) - mod_spandsp for T.38T.38T.38 is an ITU recommendation for allowing transmission of fax over IP networks in real time.- History :The T.38 fax relay standard was devised in 1998 as a way to permit faxes to be transported across IP networks between existing Group 3 fax terminals. T.4 and related fax standards were published...
fax fax gateway or passthrough are supported. - libSRTP – an open-source implementation of the Secure Real-time Transport ProtocolSecure Real-time Transport ProtocolThe Secure Real-time Transport Protocol defines a profile of RTP , intended to provide encryption, message authentication and integrity, and replay protection to the RTP data in both unicast and multicast applications...
Not all of these software dependencies are required to build the core FreeSWITCH application, but are dependencies of various external modules, such as codecs. FreeSWITCH is a modular application, in which modules can extend the functionality but the abstraction layer prevents inter-module dependency. The goal is to ensure that one module is not required to load another.
Features
FreeSWITCH includes many modules which provide applications by default including conferencingConference call
A conference call is a telephone call in which the calling party wishes to have more than one called party listen in to the audio portion of the call. The conference calls may be designed to allow the called party to participate during the call, or the call may be set up so that the called party...
, XML-RPC
XML-RPC
XML-RPC is a remote procedure call protocol which uses XML to encode its calls and HTTP as a transport mechanism. "XML-RPC" also refers generically to the use of XML for remote procedure call, independently of the specific protocol...
control of live calls, Interactive voice response
Interactive voice response
Interactive voice response is a technology that allows a computer to interact with humans through the use of voice and DTMF keypad inputs....
(IVR), TTS
Speech synthesis
Speech synthesis is the artificial production of human speech. A computer system used for this purpose is called a speech synthesizer, and can be implemented in software or hardware...
/ASR
Speech recognition
Speech recognition converts spoken words to text. The term "voice recognition" is sometimes used to refer to recognition systems that must be trained to a particular speaker—as is the case for most desktop recognition software...
(text to speech/automatic speech recognition), Public switched telephone network
Public switched telephone network
The public switched telephone network is the network of the world's public circuit-switched telephone networks. It consists of telephone lines, fiber optic cables, microwave transmission links, cellular networks, communications satellites, and undersea telephone cables, all inter-connected by...
(PSTN) interconnection ability supporting both analogue and digital circuits, Voice over IP
Voice over IP
Voice over Internet Protocol is a family of technologies, methodologies, communication protocols, and transmission techniques for the delivery of voice communications and multimedia sessions over Internet Protocol networks, such as the Internet...
protocols including SIP
Session Initiation Protocol
The Session Initiation Protocol is an IETF-defined signaling protocol widely used for controlling communication sessions such as voice and video calls over Internet Protocol . The protocol can be used for creating, modifying and terminating two-party or multiparty sessions...
, SCCP
Skinny Client Control Protocol
The Skinny Call Control Protocol is a proprietary network terminal control protocol originally developed by Selsius Systems....
, H.323
H.323
H.323 is a recommendation from the ITU Telecommunication Standardization Sector that defines the protocols to provide audio-visual communication sessions on any packet network...
, XMPP
Extensible Messaging and Presence Protocol
Extensible Messaging and Presence Protocol is an open-standard communications protocol for message-oriented middleware based on XML . The protocol was originally named Jabber, and was developed by the Jabber open-source community in 1999 for near-real-time, extensible instant messaging , presence...
, GoogleTalk, t.38
T.38
T.38 is an ITU recommendation for allowing transmission of fax over IP networks in real time.- History :The T.38 fax relay standard was devised in 1998 as a way to permit faxes to be transported across IP networks between existing Group 3 fax terminals. T.4 and related fax standards were published...
and others.
Applications using the FreeSWITCH library can be written in C
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....
/C++
C++
C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. It is regarded as an intermediate-level language, as it comprises a combination of both high-level and low-level language features. It was developed by Bjarne Stroustrup starting in 1979 at Bell...
, Python
Python (programming language)
Python is a general-purpose, high-level programming language whose design philosophy emphasizes code readability. Python claims to "[combine] remarkable power with very clear syntax", and its standard library is large and comprehensive...
, Perl
Perl
Perl is a high-level, general-purpose, interpreted, dynamic programming language. Perl was originally developed by Larry Wall in 1987 as a general-purpose Unix scripting language to make report processing easier. Since then, it has undergone many changes and revisions and become widely popular...
, Lua, JavaScript
JavaScript
JavaScript is a prototype-based scripting language that is dynamic, weakly typed and has first-class functions. It is a multi-paradigm language, supporting object-oriented, imperative, and functional programming styles....
using Mozilla's SpiderMonkey
SpiderMonkey
SpiderMonkey is the code name for the first-ever JavaScript engine, written by Brendan Eich at Netscape Communications, later released as open source and now maintained by the Mozilla Foundation.-History:Eich "wrote JavaScript in ten days" in 1995,...
engine, Java
Java (programming language)
Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities...
and Microsoft .NET via Microsoft's CLR or via Mono
Mono (software)
Mono, pronounced , is a free and open source project led by Xamarin to create an Ecma standard compliant .NET-compatible set of tools including, among others, a C# compiler and a Common Language Runtime....
. In each case, FreeSWITCH exposes primitives for call control and IVR functionality for the programmer to use.
Call control applications can use the Event Socket, which is a socket-based
Internet socket
In computer networking, an Internet socket or network socket is an endpoint of a bidirectional inter-process communication flow across an Internet Protocol-based computer network, such as the Internet....
connection to the FreeSWITCH software. Any programming language or software that is capable of communicating via sockets can be used to control activity on the FreeSWITCH server. FreeSWITCH also comes with an Event Socket Library (ESL) and "ESL-wrappers" for Erlang, JavaScript, Lua, Perl, PHP, Python, and Ruby
Ruby (programming language)
Ruby is a dynamic, reflective, general-purpose object-oriented programming language that combines syntax inspired by Perl with Smalltalk-like features. Ruby originated in Japan during the mid-1990s and was first developed and designed by Yukihiro "Matz" Matsumoto...
. The wrappers are libraries that abstract
Abstraction (computer science)
In computer science, abstraction is the process by which data and programs are defined with a representation similar to its pictorial meaning as rooted in the more complex realm of human life and language with their higher need of summarization and categorization , while hiding away the...
away some of the mundane aspects of socket-level programming.
Codec Support
FreeSWITCH supports a variety of audio codecs:- PCMU – G.711G.711G.711 is an ITU-T standard for audio companding. It is primarily used in telephony. The standard was released for usage in 1972. Its formal name is Pulse code modulation of voice frequencies. It is required standard in many technologies, for example in H.320 and H.323 specifications. It can also...
µ-law - PCMA – G.711G.711G.711 is an ITU-T standard for audio companding. It is primarily used in telephony. The standard was released for usage in 1972. Its formal name is Pulse code modulation of voice frequencies. It is required standard in many technologies, for example in H.320 and H.323 specifications. It can also...
A-law - G.722G.722G.722 is a ITU-T standard 7 kHz wideband speech codec operating at 48, 56 and 64 kbit/s. It was approved by ITU-T in November 1988. Technology of the codec is based on sub-band ADPCM ....
- G.722.1G.722.1G.722.1 is a licensed royalty-free ITU-T standard audio codec providing high quality, moderate bit rate wideband G.722.1 is a licensed royalty-free ITU-T standard audio codec providing high quality, moderate bit rate (24 and 32 kbit/s) wideband G.722.1 is a licensed royalty-free ITU-T standard...
- G.722.1G.722.1G.722.1 is a licensed royalty-free ITU-T standard audio codec providing high quality, moderate bit rate wideband G.722.1 is a licensed royalty-free ITU-T standard audio codec providing high quality, moderate bit rate (24 and 32 kbit/s) wideband G.722.1 is a licensed royalty-free ITU-T standard...
c - G.726G.726G.726 is an ITU-T ADPCM speech codec standard covering the transmission of voice at rates of 16, 24, 32, and 40 kbit/s. It was introduced to supersede both G.721, which covered ADPCM at 32 kbit/s, and G.723, which described ADPCM for 24 and 40 kbit/s. G.726 also introduced a new...
- G.726G.726G.726 is an ITU-T ADPCM speech codec standard covering the transmission of voice at rates of 16, 24, 32, and 40 kbit/s. It was introduced to supersede both G.721, which covered ADPCM at 32 kbit/s, and G.723, which described ADPCM for 24 and 40 kbit/s. G.726 also introduced a new...
with AAL2 packing - G.729G.729G.729 is an audio data compression algorithm for voice that compresses digital voice in packets of 10 milliseconds duration. It is officially described as Coding of speech at 8 kbit/s using conjugate-structure algebraic code-excited linear prediction .Because of its low bandwidth requirements,...
(passthrough) - G.729G.729G.729 is an audio data compression algorithm for voice that compresses digital voice in packets of 10 milliseconds duration. It is officially described as Coding of speech at 8 kbit/s using conjugate-structure algebraic code-excited linear prediction .Because of its low bandwidth requirements,...
(licensed, $10/channel) - GSMGlobal System for Mobile CommunicationsGSM , is a standard set developed by the European Telecommunications Standards Institute to describe technologies for second generation digital cellular networks...
- CELTCELTConstrained Energy Lapped Transform is an open, royalty-free audio compression format and a free software codec with especially low algorithmic delay for use in low-latency audio communication. It is a lossy codec, meaning quality is permanently degraded to reduce file size.The algorithms are...
- iLBC
- DVI4 (IMA ADPCM)
- BroadVoiceBroadVoiceBroadVoice is a Voice over IP telephone service provider that enables customers to conduct voice and video communications via a broadband Internet connection. Customers typically make and receive phone calls using an ordinary telephone connected to an analog telephony adapter or a digital...
- SILKSilkSilk is a natural protein fiber, some forms of which can be woven into textiles. The best-known type of silk is obtained from the cocoons of the larvae of the mulberry silkworm Bombyx mori reared in captivity...
- SpeexSpeexSpeex is a patent-free audio compression format designed for speech and also a free software speech codec that may be used on VoIP applications and podcasts. It is based on the CELP speech coding algorithm. Speex claims to be free of any patent restrictions and is licensed under the revised BSD...
- CODEC2
- SirenSiren CodecSiren is a family of patented, transform-based, wideband audio codecs developed and licensed by PictureTel Corporation . There are three Siren codecs: Siren 7, Siren 14 and Siren 22....
- LPC-10
- G.723.1G.723.1G.723.1 is an audio codec for voice that compresses voice audio in 30 ms frames. An algorithmic look-ahead of 7.5 ms duration means that total algorithmic delay is 37.5 ms...
(passthrough only) - AMR (passthrough only)
FreeSWITCH supports several video codecs:
- H261
- H263
- H263+ (H263-1998)
- H263++ (H263-2000)
- H264
- TheoraTheoraTheora is a free lossy video compression format. It is developed by the Xiph.Org Foundation and distributed without licensing fees alongside their other free and open media projects, including the Vorbis audio format and the Ogg container....
(passthrough) - MP4 (passthrough)
Some codecs are implemented in pass-through mode only. This means that the raw compressed data is passed through between callers, without any processing. This allows some codecs to be supported which cannot be provided freely due to patent licensing issues, since the data is never encoded or decoded. However, these codecs cannot be transcoded (i.e. both callers must use the same codec when using a pass-through codec, and some recording and playback functions such as IVR are not supported).
The software supports hardware transcoding cards, such as produced by Sangoma. These implement codecs in hardware, reducing the CPU usage of the server. Some of these codecs are fully licensed, providing an alternative to the passthrough options above.
Operating and build system support
- AuroraUXAuroraUXAuroraUX is a suite of high-integrity applications, libraries and user tools and an operating system distribution based on the DragonflyBSD kernel source base which serves as a reference implementation of the AuroraUX suite and other AUX projects....
(LLVM+Clang/gmake) - Sun Solaris 10 UNIX (Sun Studio)
- FreeBSDFreeBSDFreeBSD is a free Unix-like operating system descended from AT&T UNIX via BSD UNIX. Although for legal reasons FreeBSD cannot be called “UNIX”, as the direct descendant of BSD UNIX , FreeBSD’s internals and system APIs are UNIX-compliant...
(gmake) - Mac OS XMac OS XMac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...
(gmake) - Linux systems, such as Red Hat Enterprise LinuxRed Hat Enterprise LinuxRed Hat Enterprise Linux is a Linux-based operating system developed by Red Hat and targeted toward the commercial market. Red Hat Enterprise Linux is released in server versions for x86, x86-64, Itanium, PowerPC and IBM System z, and desktop versions for x86 and x86-64...
, CentOSCentOSCentOS is a free operating system based on Red Hat Enterprise Linux . It exists to provide a free enterprise class computing platform and strives to maintain 100% binary compatibility with its upstream distribution...
, DebianDebianDebian is a computer operating system composed of software packages released as free and open source software primarily under the GNU General Public License along with other free software licenses. Debian GNU/Linux, which includes the GNU OS tools and Linux kernel, is a popular and influential...
, UbuntuUbuntu (operating system)Ubuntu is a computer operating system based on the Debian Linux distribution and distributed as free and open source software. It is named after the Southern African philosophy of Ubuntu... - Microsoft WindowsMicrosoft WindowsMicrosoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...
(native) - PfsensePfSensepfSense is an open source firewall/router distribution based on FreeBSD. pfSense is meant to be installed on a personal computer and is noted for its reliability and offering features often only found in expensive commercial firewalls. It can be configured and upgraded through a web-based...
Issues
Many issues in FreeSWITCH deal with its unique configuration methods, or its significant differences from other popular PBX and SoftswitchSoftswitch
A softswitch is a central device in a telecommunications network which connects telephone calls from one phone line to another, typically via the internet, entirely by means of software running on a general-purpose computer system...
programs.
- BRIBasic rate interfaceBasic Rate Interface is an Integrated Services Digital Network configuration intended primarily for use in subscriber lines similar to those that have long been used for plain old telephone service...
support is currently limited to Sangoma interface cards
Comparison with other telephony software
FreeSWITCH occupies a space between pure switches which simply route calls, such as GnuGK and SERSIP Express Router (SER)
SIP Express Router is a SIP server licensed under the GNU General Public License. It can be configured to act as SIP registrar, proxy or redirect server...
, and those which are primarily PABXes or IVR
Interactive voice response
Interactive voice response is a technology that allows a computer to interact with humans through the use of voice and DTMF keypad inputs....
s, such as Asterisk
Asterisk PBX
Asterisk is a software implementation of a telephone private branch exchange ; it was created in 1999 by Mark Spencer of Digium. Like any PBX, it allows attached telephones to make calls to one another, and to connect to other telephone services including the public switched telephone network and...
and its derivatives. FreeSWITCH provides building blocks from which applications – such as a PABX, a voicemail
Voicemail
Voicemail is a computer based system that allows users and subscribers to exchange personal voice messages; to select and deliver voice information; and to process transactions relating to individuals, organizations, products and services, using an ordinary telephone...
system, a conferencing
Conference call
A conference call is a telephone call in which the calling party wishes to have more than one called party listen in to the audio portion of the call. The conference calls may be designed to allow the called party to participate during the call, or the call may be set up so that the called party...
system or a calling card
Telephone card
A telephone card, calling card or phone card for short, is a small plastic card, sized and shaped like a credit card, used to pay for telephone services. It is not necessary to have the physical card except with a stored-value system; knowledge of the access telephone number to dial and the PIN is...
– can be built using any of the supported languages.
External links
- FreeSWITCH Project Home Page – contains general information and documentation for the project itself
- FreeSWITCH Wiki – main source of documentation for FreeSWITCH
- [irc://irc.freenode.net/freeswitch #freeswitch] on freenode