FreeSWITCH bootstrap libtool not found – missing libtool-bin

Was rebuilding FreeSWITCH source and had upgraded my test machine Ubuntu from 14.10 to version 15.04 so I did a make uninstall on FreeSWITCH and reran the but it came up with the error of libtool not found.

Libtool (2.4.2) was installed but what I found is that I had to add libtool-bin with,

sudo apt-get install libtool-bin

Then worked fine.

Typical DDI trunking connection problems

Once you have your FreeSWITCH setup then adding new trunks should work fine but you can get some first-day-of-use problems that slow you down.As I find them I will update this post.

Calling PSTN number of DDI trunk, rings then silence.
This is probably due to the trunk on FreeSWITCH not having the  “Register” checkbox set (true). If using bluebox then in the Connectivity->Trunk Manager for the trunk check the Register checkbox. In XML this is in the conf/sip_profiles/ in your .XML file for the profile of the interface you need to verify that register is true,

       <gateway name="trunk_x">
        <param name="realm" value=""/>
        <param name="username" value="xxxxxxxx"/>
        <param name="password" value="xxxxxxx"/>
        <param name="register" value="true"/>
        <param name="extension" value="auto_to_user"/>
        <param name="auto_to_user" value="true"/>

Calling PSTN number of DDI trunk, rings then very quickly goes to disconnect.
This is due to the inbound ACL not being set to “Trunks (Auto)” on the Sip interface (NAT).


FreeSWITCH dialplan system and null strings

In a FreeSWITCH dialplan the application action system is used to execute system e.g. shell commands. You can also use the returned result from a system command to set a dialplan variable e.g.,

<action application="set" data="result=${system"/>

The problem is that if the system directive does not return a null terminated string then extra garbage can end up in the data variable in the dialplan.

So your shell script must explicitly terminate any strings in its output. Normally this won’t be a problem but if you are using piped results and awk then you can end up with no null.

In your awk print you must use printf as follows,

awk '{ printf "%s%c", $1, 0 }'

That will print your string (e.g. $1 field) and then print the number 0 as a character. This in effect fakes what is returned as a string that is null terminated.

Here is the FreeSWITCH wiki on the dialplan use,

Here are some of my examples as used in custom feature codes,


FreeSWITCH show command syntax help missing show registrations

I was converting my Asterisk commands to the closest equivalent FreeSWITCH command so I could display the data in the FMS Pandora Console. Nothing fancy here – just totals of registrations and current call counts (and channels – a subtle difference as a channel is one leg of a call). I was after numbers of registrations but the FreeSWITCH command line interface (fs_cli) didn’t list this as an option when you did a help on the show command.

But it really does have a show registrations with a switch for the totals i.e. show registrations count only the module source code didn’t have this in its help text. I’ll log it as a trivial bug.

Here is my Pandora FMS pandora_agent.conf snippet,

module_name FSRegnsCount
module_type generic_data
module_exec  /usr/local/freeswitch/bin/fs_cli -x "show registrations count" | awk '{if (match($0,"total")) { printf("%d",$1);}}'
module_description FreeSWITCH registrations

I will be adding more of thee snippets of Pandora agent configs to a special page on our web site here –

The “show” command help syntax is just a #define in  /usr/local/src/freeswitch/src/mod/applications/mod_commands/mod_commands.c so easy to fix.

Ring then disconnect on registered VOIP SIP trunks

The setup is a (VOIP) SIP trunk provider in the UK connecting via the internet to a FreeSWITCH PBX with the web interface that is attached to the Internet via a NAT routed ADSL last mile. The local IP telephones connect to the FreeSWITCH PBX and the different trunks from the UK (using 3 trunks for 3 different projects) should appear on one of three of the 5 extension lines on a Cisco SPA 525G.

The trunk to the UK was registered correctly as far as FreeSWITCH/ was concerned but when you called the UK phone number from the PSTN then it rang but then went to disconnect tone. What was expected was that the call would use the SIP trunk to connect via the FreeSWITCH to the IP phone on the client site and light up the correct extension.

The problem is that in I had configured the trunk Bind to the Authenticated SIP interface and not the Authenticated SIP NAT interface. Changed it to the Authenticated SIP NAT interface and that worked. The Authenticated SIP NAT port has port 5070, auto-detect IP address via UPnP whereas the Authenticate SIP port I have is on the fixed local LAN private IP address used for local IP phones to proxy register against. These SIP interfaces are defined in under Connectivity -> SIP Interface and the trunk is defined under Connectivity -> Trunk manager.

You will see the FreeSWITCH console log has,

2011-12-25 12:29:06.274781 [WARNING] sofia_reg.c:1445
SIP auth challenge (INVITE) on sofia profile 'sipinterface_4'
for [] from ip X.Y.Z.A

for each inbound call attempt. Bit of a first day of setup gotcha.


No text-to-speech with Flite on Freeswitch/ IVR

If you have configured a feature code that uses text-to-speech e.g. a talking clock or if you are setting up an auto attendant (IVR) on a new system and you have selected the flite voice but when you connect to the auto attendant Assigned Number you get no message audio even though you have selected the Flite voice then you can test this problem very quickly.

Look at the freeswitch console log and you should see a error message,

2012-12-26 09:57:14.381330 [ERR] switch_core_speech.c:61 Invalid speech module [flite]!
2012-12-26 09:57:14.381330 [ERR] switch_ivr_play_say.c:2439 Invalid TTS module!

If you are not at the console and if you are testing an IVR then connect to the IVR from a phone and  hit one of the key mapping option numbers that you have configured for it to action and if this works (which they probably will) then your problem is that you have not enabled the mod_flite in Freeswitch source modules.conf or the module is not automatically loading.

This is easy to fix. Edit the /usr/local/src/freeswitch/modules.conf  and uncomment the line,


(also make sure that you have mod_cepstral commented out as you can’t use flite and cepstral at the same time. Cepstral is licensed, albeit not very expensive – about 30 dollars per voice – and you can test with their TTS voices though the TTS engine will periodically insert nag messages.)

Now do a make on Freeswitch. This will see that you have enabled the mod_flite and it will download the flite package from  (about 14 Megabytes).

Note that if you break the download then you must cd to /usr/local/src/freeswitch/libs and sudo rm -R flite-1.5.1-current*  or similar to clean up the broken download and then run make again.

After the make then do a make install.

Once that has done (or perhaps you had already had that uncommented) then you must make sure that the module is autoloaded. To check this go to the runtime program path which is usually /usr/local/freeswitch) e.g.

cd /usr/local/freeswitch/conf/autoload_configs

and edit the  modules.conf.xml and again uncomment the mod_flite line so it is  the only one uncommented,

  <!-- ASR /TTS -->
    <load module="mod_flite"/> <!-- -->
    <!-- <load module="mod_pocketsphinx"/> -->
    <!-- <load module="mod_cepstral"/> -->
    <!-- <load module="mod_tts_commandline"/> -->
    <!-- <load module="mod_rss"/> -->

now restart freeswitch. Your feature code text to speech will now work.

Truthfully though the Flite TTS is synthetic (e.g. the rms voice) and will never be as good as a human spoken voice but it does allow you to quickly setup what option codes to use and test your options before you get a human speaker to say a script.

If you are getting someone to say the script (or yourself !) in-house and want a low-cost recording solution without a professional sound recording setup then I use Audacity with an ordinary microphone (VOIP headset) and a sheet of copy paper as a de-popper. See my post here for details.