Welcome To FreeSWITCH

The World's First Cross-Platform Scalable FREE Multi-Protocol Soft Switch

FreeSWITCH is a scalable open source cross-platform telephony platform designed to route and interconnect popular communication protocols using audio, video, text or any other form of media.  It was created in 2006 to fill the void left by proprietary commercial solutions. FreeSWITCH also provides a stable telephony platform on which many telephony applications can be developed using a wide range of free tools. More

FreeSWITCH development Week in Review March 16th-22nd

Submitted by kathleen on Thu, 04/03/2014 - 00:17

Hello, again. This week in the FreeSWITCH master branch we had an amazing amount of work done with the majority of it going toward build support. The week ended with a total of 159 commits! Some big changes came with Freeswitch attempting to use the system versions of pcre, sqlite, speex, and curl rather than automatically using the in tree version. Also, there have been fixes to be able to run configure specifying the srcdir which allows you to build Freeswitch outside of the source directory.
The following bugs were squashed:
8d67246 FS-6374 --resolve mod_rayo sendfax was using uninitialized memory pool
Jira: http://jira.freeswitch.org/browse/FS-6374
bd1492e FS-6287 fixed regression from 6e818216e2e615f3241a34253cdea8ee316d9e88 which caused 'operation has no matching challenge' error on outbound invites that are challenged in mod_sofia
Jira: http://jira.freeswitch.org/browse/FS-6287
19fc943 FS-6360 Mitigate the CRIME TLS flaw
New features that were added:
6d0e684 Upgrade windows build to use pcre 8.34 via getlib and to use speex 1.2rc1 via getlib
Jira: http://jira.freeswitch.org/browse/FS-6348
dd242f3 Upgrade windows build to use curl 7.35.0 via getlib
Jira: http://jira.freeswitch.org/browse/FS-6346
741cb88 FS-6349 Upgrade windows build to use sqlite via getlib
Jira: http://jira.freeswitch.org/browse/FS-6349
714e313 FS-353: add testing hack to use system xmlrpc-c
Jira: http://jira.freeswitch.org/browse/FS-353
Improvements in cross platform build supports:
09811b5 FS-6369: fix uninstall on mod_managed
Jira: http://jira.freeswitch.org/browse/FS-6369
e85f06e Completely unbundle pcre
9df1727 fix uninitialized variables in mod_translate
cba9af4 Drop mod_perl from the debian build temporarily
aeebd71 FS-6375 exclude sun from modem support in spandsp
Jira: http://jira.freeswitch.org/browse/FS-6375
1470622 Require libcurl as a system dependency
9f7399c FS-6293: fix lua to build using automake, so it works right with srcdir, and avoids the linking to .a is not portable warning
Jira: http://jira.freeswitch.org/browse/FS-6293
9a94235 FS-6379: --resolve fix ldns bootstrap/build on solaris
Jira: http://jira.freeswitch.org/browse/FS-6379
f6d9027 FS-6375 adjust ifdef for sun to allow for different hep_ipheader struct in libsofia
Jira: http://jira.freeswitch.org/browse/FS-6375
3eb7862 FS-6293: fix mod_shout srcdir build
Jira: http://jira.freeswitch.org/browse/FS-6293
3b1278a FS-353 Add curl auto PKG_CONFIG_PATH handling for OS X
bf611fc Pull mod_v8 out of the default build
And many more!
In terms of stability these were the use cases that were fixed:
f3acb03 FS-6341 fixed deadlock in mod_sofia introduced in commit 340b697
Some packaging updates:
fb2c587 Add debian build-deps for mod_opal
6261e5a Drop mod_v8 from debian build for now
90404d5 Purge mod_voipcodecs from debian/control-modules
046df6b Export V=1 for debian builds
54cd0df Support change to system libspeex in debian
83125da update Debian packaging to use configure.ac files

Back to BASICs

Submitted by anthm on Mon, 03/31/2014 - 23:43

FreeSWITCH is proud to announce that on April 1st 2014, we now have a new language module 'mod_basic'  That allows you to write dialplan applications in the BASIC programming language!  Now users from the golden era of home computing can join the ranks of the FreeSWITCH users!
Here is a demo IVR:
s$ = "hello "
s$ = s$ + "world "
s$ = s$ + "Happy April Fool's Day!"
FS_LOG "WARNING" s$ + "!"
FS_EXECUTE "answer"
FS_EXECUTE "sleep" "1000"
FS_EXECUTE "playback" "misc/misc-cluecon_is_premier_conference.wav"

FreeSWITCH week in review March 9th-15th

Submitted by tc on Tue, 03/18/2014 - 16:57

Kathleen King kindly reports on the state of FreeSWITCH development:
Hello, again. This week in the FreeSWITCH master branch we had a total of 88 commits submitted. Most of the commits went toward miscellaneous features and bug fixes, such as the support improvements for Cisco 7925G in mod_skinny, a new web UI called Portal, and FS-353 using system libraries instead of bundled libraries.
The following bugs were squashed:
89f9490 add ability to parse named params out of P-Asserted-Identity header in mod_sofia
Jira: http://jira.freeswitch.org/browse/FS-6350
9fd30a2 work toward improvements in PRACK support
Jira: http://jira.freeswitch.org/browse/FS-6339
7a6e8f4 add realm to sofia::expires event
Jira: http://jira.freeswitch.org/browse/FS-6354
1727213 fixed support for 7925G with mod_skinny
9f804d2 mod_skinny: remove unknown field from access_status for Cisco 7925g
0f93cc2 FS-6281 mod_rayo: don't add timestamp to presence event that already has one.
Jira: http://jira.freeswitch.org/browse/FS-6281
New features that were added:
88fda8c upgrade Windows build to use curl 7.35.0
Jira: http://jira.freeswitch.org/browse/FS-6346
f80404c added experimental create user on portal
3055438 mod_skinny: wait up to 5 seconds for OpenRecvChannelAck for improved connection to WiFi phones such as the 7925G
69a65aa add create user and gateway lua scripts to Portal
40c56c6 adding ussd capabilities to mod_gsmopen, thanks Boris.
Jira: http://jira.freeswitch.org/browse/FS-5078
Improvements in cross platform build supports:
ce78c14 fix mod_dingaling build
87af4d3 fix mod_enum install
4ee5d1f don't automatically override CFLAGS when building spandsp
Jira: http://jira.freeswitch.org/browse/FS-6293
df9256d update windows build to use downloaded pcre
Jira: http://jira.freeswitch.org/browse/FS-6347
d755b34 added -fPIC flag to libapr when building with clang to fix the build of mod_lua
In terms of stability these were the use cases that were fixed:
db22d28 fixed deadlock in mod_rayo when creating input voice component
Jira: http://jira.freeswitch.org/browse/FS-6334

FreeSWITCH development week in review March 2nd-8th

Submitted by tc on Tue, 03/11/2014 - 21:34

Kathleen King kindly reports on our development activity over the past week:
Hello, again. This week in the FreeSWITCH master branch we had 90 commits this week. We also saw the addition of two cool new features: support for gzip encoding with mod_sofia and support for configuring crypto.
The following bugs were squashed:
46c5268 fixed a regression introduced by FS-5755
Jira: http://jira.freeswitch.org/browse/FS-6319
8d2c6b3 fixed misc bug with Chrome WebRTC
138224d fixed heap-buffer-overflow
Jira: http://jira.freeswitch.org/browse/FS-6303
286d2ae mod_rayo- fix race condition on outbound calls
Jira: http://jira.freeswitch.org/browse/FS-6304
New features that were added:
7cb9146 added support for gzip encoding with mod_sofia
Jira: http://jira.freeswitch.org/browse/FS-5814
4cf14bc more work toward supporting gzip encoding with mod_sofia
Jira: http://jira.freeswitch.org/browse/FS-5814
87e0dda setting the default to allow inbound secure crypto but not offer by default
ea31303 setting default configs to accept the strongest crypto suite offered
4d8866a gsmopen: added driver_usb_dongle directory, for building a working and stable \'option\' modem serial driver for 2.6.32 kernels
fe2a4bf more work toward support for gzip encoding for mod_sofia
Jira: http://jira.freeswitch.org/browse/FS-5814
Improvements in cross platform build supports:
49fe796 removed invalid configure options for apr-util
039f28d removed cpp lib from pcre because no longer in use
5de8d62 move configure.in to configure.ac
783a408 fixed NetBSD detection error of 64-bit integer types
bcd9f49 major improvements for building modules
e6ec9b3 Add automake subdir-options for modules
6ed4ad7 Pass down into esl the LDFLAGS, fixes finding libncurses on NetBSD too.
2fdaa1c Fix use of out of scope declaration
ab35096 Fix FHS default sysconfdir
In terms of stability these were the use cases that were fixed:
75a00bd Fix memory leak in mod_json_cdr
f9f3699 FS-6282 mod_rayo: fix memory leak in previous commit
Jira: http://jira.freeswitch.org/browse/FS-6282
e650939 fixed crash on <prompt> bad request in mod_rayo
Jira: http://jira.freeswitch.org/browse/FS-6296
a491df0 fixing a deadlock from jitterbuffer rework

FreeSWITCH week in review February 23rd - March 1st

Submitted by tc on Wed, 03/05/2014 - 06:08

Kathleen King reports on FreeSWITCH development over the past week:
Hello, again. This week in the FreeSWITCH master branch we had 137 commits! That is an average of ten commits per day and roughly an average of one commit every hour over the entire week! Awesome! We had a neat new feature added with TLS and SRTP support for AES-GCM. This feature allows for fully encrypting calls(both signaling, and media) in a higher density and with latest TLS 1.2 so it's secure against some of the recent TLS security issues. More about this new feature can be found here on the wiki: http://en.wikipedia.org/wiki/Galois/Counter_Mode
The following bugs were squashed:
1d36f5b fixed so that max_registrations_per_extension does no limit concurrent call counts
Jira: http://jira.freeswitch.org/browse/FS-5915
f862c34 fixed bug in Freeswitch core dealing with calls not hanging up after hold
Jira: http://jira.freeswitch.org/browse/FS-6272
f751455 fix race condition where a transferring leg could be hungup on by the bridge partner from the previous bridge
fa92f81 fixed bug in delay retry and clarified log line in mod_json_cdr
Jira: http://jira.freeswitch.org/browse/FS-5888
New features that were added:
8862fbc added 'join-only' conference flag
Jira: http://jira.freeswitch.org/browse/FS-5461
5b26558 add json support for mod_event_sockets event_sink
Jira: http://jira.freeswitch.org/browse/FS-5207
aa78006 Added Windows equivalent of Linux's fail2ban. Thanks, drk.
Jira: http://jira.freeswitch.org/browse/FS-3588
463f32c Support AES-GCM mode in SRTP
Jira: http://jira.freeswitch.org/browse/FS-5937
5646957 more work to support AES-GCM mode in SRTP
Jira: http://jira.freeswitch.org/browse/FS-5937
a900ead added Support AES-GCM mode in SRTP
Jira: http://jira.freeswitch.org/browse/FS-5937
Improvements in cross platform build supports:
ffa14f3 remove python requirement for libsndfile build
727ce93 more work getting FS-6271 to compile on Windows
Jira: http://jira.freeswitch.org/browse/FS-6271
0c7946b improve srtp build on Dragonfly and NetBSD
44410b7 work towards building on smartos
Jira: http://jira.freeswitch.org/browse/FS-6227
691c454 tagged Freeswitch 1.5.10
d86bb20 added support for DESTDIR to modcheck
62a2898 update the version string
378caeb fixed building without SRTP
d7794af improved build support for Dragonfly
645ab80 tagged Freeswitch version 1.5.8
d97b163 upgraded mod_ruby to SWIG 2.0
In terms of stability these were the use cases that were fixed:
68692d9 fixed segfault in mod_voicemail_ivr related to profile naming
Jira: http://jira.freeswitch.org/browse/FS-5154
e398ede fixed memory corruption and leak in mod_erlang
Jira: http://jira.freeswitch.org/browse/FS-5975
827c5ac fixed segfault on second call of gsm remove 1 in mod_gsmopen
Jira: http://jira.freeswitch.org/browse/FS-5908

FreeSWITCH week in review Feb 16 - 23

Submitted by tc on Wed, 03/05/2014 - 06:05

Hello, again. This week in the FreeSWITCH master branch we had heck of a lot of activity with 89 commits and most of those commits were touching BSD and libsndfile. And we also saw new additions to language support with the form of adding Swedish to mod_say and improvements to Spanish phrase macros.
The following bugs were squashed:
c945584 FS-6237 --resolve
-- fixed a regression from December in inherit_codec
-- http://jira.freeswitch.org/browse/FS-6237
81f9303 FS-6219 --resolve
-- bug: update mod_cidlookup to properly handle unknown and unavailable
-- http://jira.freeswitch.org/browse/FS-6219
New features that were added:
0521493 Add man page for freeswitch
-- Added a man page for FreeSWITCH
9d30007 FS-6231 add support for sending call waiting tone when a simultaneous call is received --resolve
-- feature: added support for sending call waiting tone when a simultaneous call is received in mod_skinny
-- http://jira.freeswitch.org/browse/FS-6231
1c3001f FS-2999 --resolve
-- misc: in spanish phrase macros fixed some translations and added others
-- http://jira.freeswitch.org/browse/FS-2999
97e2340 FS-6204 refactor some dtls code to generate a 1024 bit cert suitable for dtls in all version of chrome
-- feature: updated FreeSWITCH_core to support new Chrome DTLS requirements
-- http://jira.freeswitch.org/browse/FS-6204
bd72cd9 Allow setting late margin on register expirations
-- feature: in mod_sofia added parameter to allow for configuration of register expiration late margin
-- Thanks, Emmanuel Schmidbauer.
19dbd07 Allow access to headers from INVITE
-- feature: copies all INVITE headers to channel variables on the a leg for inbound calls
-- http://jira.freeswitch.org/browse/FS-6075
-- Thanks, Peter Olsson.
Libsndfile was updated from a version from March 3rd 2009 to a version from April 5th 2013.
Improvements in cross platform build supports:
e209b1a left line in that breaks mod_dingaling build update and run sh config.status from build root or do a clean build to correct
-- build: fixed build issue that broke mod_dingaling requires a clean build to correct
f206700 FS-6189 --resolve
-- build: fixed compilation issue in Ubuntu 14.04
-- http://jira.freeswitch.org/browse/FS-6189
There were many commits for FreeBSD and OpenBSD build support.
In terms of stability these were the use cases that were fixed:
f826b4b FS-5845 --resolve
-- fixed a memory leak in mod_lcr related to switch_channel_expand_variables
-- http://jira.freeswitch.org/browse/FS-5845

FreeSWITCH week in review 2014 Feb 9-15

Submitted by tc on Tue, 02/18/2014 - 16:46

Kathleen King has been awesome enough to summarize our work on FreeSWITCH last week. Here's her report:
This week in the FreeSWITCH master branch we had 55 commits. Most of the commits this week were miscellaneous and several of those were related to promoting the speex codec to the core. We also got some new features, including additional options for voicemail storage organization. All in all, it was a good week and 18 Jira tickets were resolved.
The following bugs were squashed:
- fixed bug to allow for comma separation of email addresses in mod_voicemail
- fixed bug with AWS S3 URL validation in mod_http_cache
- fixed bug by removing a hard coded timezone in mod_xml_radius
- work around the Zoiper bug were all subscribes have an expires of 0
New features that were added:
- added a parameter vm-domain-storage-dir to mod_voicemail
- added a parameter storage-dir-shared to mod_voicemail
- added SIP dialing to just a domain
Improvements in cross platform build supports:
- fixed bug SRTP audio issue on Windows 7
- disabled the SRTP warning for Windows
- build fix for hostname lookups in mod_sofia and mod_command's gethost
- updated to OpenSSL 1.0.1f in Windows build
- fixed compiler issue on Windows with mod_managed
In terms of stability these were the use cases that were fixed:
- fixed segfault in mod_sofia related to SIP presence when the presence domain could not be found
- fixed segfault in sofia related to inbound SIP registrations

FreeSWITCH development weekly update

Submitted by tc on Fri, 02/14/2014 - 20:35

Kathleen King was kind enough to summarize the changes in FreeSWITCH this week from our git repository. Here's her state of the state of FS:
This past week was productive for the Freeswitch master branch with many new changes and bug fixes. On the packaging front, .zip joined tar.xz in the default source release archives. Located here: http://files.freeswitch.org/
In terms of stability there were several use cases that were fixed:
-- Fixed mod_lua crashes related to build symbols introduced during upgrade from lua 5.1 to lua 5.2
-- Fixed a crash in mod_conference related to whisper tones
-- Fixed a crash in mod_shell_stream
-- Fixed a crash involving T-38 in mod_sofia when the call in bridged between TDM and SIP
Several new features were added:
-- New command 'gethost' allows for a DNS lookup from the Freeswitch console
-- Added bypass-media-after-hold to complement the existing parameter resume-media-on-hold with more information located at:
-- Added capability to record conference with a single participant
-- Added support for Sofia to configure accepted TLS versions and enabled support for perfect forward secrecy.
-- Expanded Sofia profile status to include websockets
Improvements in cross platform build supports:
-- Spandsp improvements for BSD
-- Some initial build fixes for Ubuntu 14.04
-- Fixing some compiler optimization snafus

A git tip: cherry-picking patches across projects

Submitted by tc on Fri, 01/24/2014 - 18:16

In the FreeSWITCH project we include many libraries in our own tree. Keeping these up to date can be a challenge. Let's look at one way that git makes this easier.
We'll use speex as an example. The last time we updated speex from upstream was back in 2009 when Mike Jerris merged Speex v1.2rc1. Since then we've made a number of changes ourselves to speex, almost exclusively relating to build issues. If we're going to pull in a new version of speex from upstream we don't want to lose these changes.
This can make updating difficult because we can't just copy over a more recent version. One solution is git cherry-picking. This lets us pull in upstream changes one patch at a time.
But how can we use cherry-picking when freeswitch and speex are two separate git repositories with non-overlapping histories? This is where git's subtree merge support comes in.
Let's start with a clean FS clone:
$ git clone git://git.freeswitch.org/freeswitch.git && cd freeswitch
Now let's add the speex repository as an additional remote:
$ git remote add speex http://git.xiph.org/speex.git/ && git fetch speex
Now we'll look at what's changed in speex since we last updated:
$ git log --reverse --stat Speex-1.2rc1..speex/master
commit 785e61a593c61ebc0afee5d87eca9cc73e16d6a6
Author: Jean-Marc Valin <jeval@station513.(none)>
Date: Mon Aug 4 18:21:40 2008 -0400

Sorting out #include "" from #include <> and using relative paths for including
installed headers

configure.ac | 2 ++
include/speex/speex.h | 9 +++++++--
43 files changed, 107 insertions(+), 62 deletions(-)

commit 8d225323179a4642c58df0466beb960b0b367f29
Author: Jean-Marc Valin <jeval@station513.(none)>
Date: Tue Aug 5 12:00:05 2008 -0400

Narrowband state now contained in a single block

libspeex/modes.c | 14 +++++++-------
libspeex/nb_celp.c | 65 ++++++++++++-----------------------------------------------------
libspeex/nb_celp.h | 46 ++++++++++++++++++++++++++++------------------
3 files changed, 47 insertions(+), 78 deletions(-)

We'll skip the first commit for now because it conflicts with some build changes we've made. Let's pick the narrowband state change into our tree. Here's where the subtree merge comes in:
$ git cherry-pick --strategy=subtree -Xsubtree=libs/speex 8d225323179a4642c58df0466beb960b0b367f29

Auto-merging libs/speex/libspeex/nb_celp.h
Auto-merging libs/speex/libspeex/nb_celp.c
[master 2962cfb] Narrowband state now contained in a single block
Author: Jean-Marc Valin <jeval@station513.(none)>
3 files changed, 47 insertions(+), 78 deletions(-)
And that's it! That's all there is to it. We've now picked that commit into our tree, and it's ready to be pushed.
But instead, let's pull that commit out so we can try something else:
$ git reset --hard HEAD^
Let's say that we want to completely update speex and are willing to manually deal with any conflicts. We could run something like this:
$ cd libs/speex
$ git rev-list --reverse Speex-1.2rc1..speex/master | xargs git cherry-pick --strategy=subtree -Xsubtree=libs/speex

CONFLICT (modify/delete): libs/speex/libspeex/testresample.c deleted in 790c69cb48818e3f9d6feabed3a8840348d339b2 and modified in 785e61a593c61ebc0afee5d87eca9cc73e16d6a6. Version 785e61a593c61ebc0afee5d87eca9cc73e16d6a6 of libs/speex/libspeex/testresample.c left in tree.
Auto-merging libs/speex/libspeex/Makefile.am
CONFLICT (content): Merge conflict in libs/speex/libspeex/Makefile.am
Auto-merging libs/speex/configure.ac
CONFLICT (content): Merge conflict in libs/speex/configure.ac
error: could not apply 785e61a... Sorting out #include "" from #include <> and using relative paths for including
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
When we hit a conflict like this, we'll look at the output of git status and manually merge the conflicting files:
$ git status -s | grep 'UU\|DU'

UU configure.ac
UU libspeex/Makefile.am
DU libspeex/testresample.c
$ emacs configure.ac libspeex/Makefile.am
Once we're sure everything is OK, we'll tell git by running:
$ git add -A .
Then we can continue our cherry-picking operation:
$ git cherry-pick --continue
Each time we hit a conflict, we repeat this process. The nice thing here is that we get to deal with the conflicts one at a time; we get to merge while looking at the context and intention of each patch rather than just having a lump of conflicts as we would trying to merge a more recent tarball. This often makes the process simpler.
If you'd like to learn more, join us on our weekly conference call and ask your questions.
Travis Cross

Why FreeSWITCH bundles so many libraries -- the comprehensive answer

Submitted by tc on Fri, 01/24/2014 - 17:28

Many people have asked over the years why FreeSWITCH bundles so many libraries. The core developers are certainly aware of the downsides of this approach. We know it makes it difficult to stay on top of updates to these libraries. We know well that it complicates inclusion of FreeSWITCH in the major distributions. And we certainly know that it makes a clean build of FreeSWITCH take a very long time with all modules enabled.
But in every case where we've bundled a library with FreeSWITCH, there was a reason. Here are some of the major ones:
* We've become the upstream for Sofia-SIP. The original developer has moved on, and we've taken over maintenance and improvements to the library.
* The author of Spandsp, the inimitable Steve Underwood, now commits updates to his library directly into the FS source tree, so ours is always the most recent version.
* SQLite breaks in the sort of highly-multithreaded model that we use in FS, and we were never able to get our patches included in upstream, so we've essentially forked (which is encouraged by the SQLite project). While FS can build with more recent upstream versions of SQLite, it is very unstable.
* Many libraries we need, such as the most recent one, libv8, have (or at one time had) obsolete versions packaged in the major distros. Debian, for example carries 3.14 and we need 3.24 to make mod_v8 work at all.
* At one time, CentOS had patched libraries such as curl in ways that just completely broke them in our use case (e.g. they linked against libraries such as NSPR unnecessarily), so even if an apparently suitable system library was there, we couldn't use it.
* For many years, distros packaged major libraries built without thread safety.
* Many libraries which may now have acceptable versions in most major distributions did not at one time, and someone would have to go through each major distribution and verify that the library there is now actually acceptable, perhaps updating FS to use a newer API, and test the feature under load.
* When two distributions carry incompatible versions of the same library, it becomes very difficult to support both when building against system libraries. For Debian alone, we currently support sid, jessie, wheezy, and squeeze, and library versions and availability vary greatly between those releases.
* Though strictly distinct from the issue of bundling, we believe in the merits of static linking certain libraries. We sympathize with many statements Rob Pike has made about this issue, and with a piece by Roman Shaposhnik you can read here:
...and comments on that piece by Anthony here:
* Building on BSD, OS X, and Windows are project goals, and they do not provide these libraries.
We're happy to accept patches that would make FreeSWITCH build optionally against system libraries. No one has yet(!) stepped up to do this work. And while it would be a very valuable contribution, it's just not a priority for the core developers who focus on other important work.
If you're interested in helping out here, we're interested in helping you. Get in touch with us.
Travis Cross