Asterisk - Voicemail with Speech Recognition using Google API

Asterisk

In a previous article I published a solution to convert Asterisk voicemail attachments from WAV to MP3 on the fly. This is done by catching the mails sent by Asterisk just before they are passed to sendmail.

I recently got the idea from Daniel Dainty to add Voice Recognition feature at the same time as mp3 encoding.

After testing different voice recognition engines, I realized that the Google Speech Recognition API is by far superior to any other solution available under Linux (Sphinx, ...).

This article will explain an approach to add voice recognition to Asterisk voicemail using the services of Google Speech Recognition API.

The principle is very simple. After doing the voicemail mp3 conversion, the script :

  1. does some pre-processing clean-up on the file,
  2. converts it to an acceptable format (flac),
  3. sends it to Google speech recognition engine,
  4. gets back the text version
  5. adds it at the end of the mail body.

This procedure has been done on a Debian Squeeze server. It should be fully compatible with an Ubuntu server. You will then just need to add sudo to the commands needing root privilege.

Read more: Asterisk - Voicemail with Speech Recognition using Google API

Asterisk - Setup voicemail to send email with mp3 attachment

Asterisk

This guide will explain how to configure Asterisk PBX to send voicemail as email with messages as mp3 attachement.

If, like me, you are using an Asterisk server, you may be using the voicemail by email functionnality. It allows your Asterisk PABX to send your by email all the messages received in your voicemail.

Just imagine :

  • someone is calling you on your landline
  • he is leaving a message on your answering machine
  • after few seconds, you are receiving a mail on your android or i-phone with the message as an attachment

You can call back immediatly or even forward the email for someone else to deal with that call !

One of the main drawback of that functionnality is that Asterisk can generate attachments using only the standard telephony codecs (wav49, gsm, wav). The wav format is widely recognised, but it is quite uncompressed. The wav49 or gsm formats are better in terms of compression, but sadly they are not recognised by all the devices able to deal with your emails.

So why not to use mp3 format for the voicemail attachments ?

This is what this guide is all about. It will explain how to catch the emails sent by Asterisk and convert the audio attachment from a wav file to a mp3 file.

Read more: Asterisk - Setup voicemail to send email with mp3 attachment

Ubuntu - Generate PDF file from any set of documents

dropcap pdf

Nowadays, PDF has become the de facto exchange file format for most documents. Whenever you need to send a document to someone using a smartphone, a Linux PC, a Windows PC or a Mac, by sending a PDF file, you'll be confident that your recipient will be able to open and read it.

Till date, under Linux, I haven't found a simple tool able to generate a PDF file in one click from a selection of miscellaneous documents like :

  • a serie of scanned pages
  • some office documents (doc, docx, odf, xls, …)
  • some text files
  • some photos (.jpg, .png, ...)

ubuntu pdf generate

This article explains how to setup a desktop environment under Linux which will allow you to convert any set of documents to a single multi-pages PDF document. All documents will be merged in alphabetical order according to their filename. Conversion will be accessible straight from the comfort of your Linux file manager (Nautilus, …).

Read more: Ubuntu - Generate PDF file from any set of documents

Ubuntu - Transcode your video to MKV / AAC the simple way

dropcap-ubuntu-stabilize

If you sometimes end up grabbing some video files from internet, you may have encountered some playback troubles :

  • Video container may not be playable on some devices (AVI, MOV, ...)
  • Some copyrighted audio codecs like DTS, AC3, E-AC3, ... may give play back problem on some of your devices
  • On multi-channels audio tracks, general audio level may vary widely between talks and action scenes (you end up changing volume level at every scene change)

So, to be able to play your video on any type of device and in any type of environment, an elegant option is to :

  • use MKV container as it is open source and recognized by almost all modern players
  • convert all audio tracks to AAC as it is playable on almost any modern devices
  • add some midnight mode audio channels side to the multi-tracks channels to allow smooth listening even without a home cinema system

This article explains how to setup a post-processing environment for your Linux desktop to be able to :

  • generate MKV video file from any video file
  • convert all audio tracks to AAC format (stereo and multi-channels)
  • add some associated Midnight Mode audio tracks (if selected)
  • add an embedded video cover (if present)

It also explains how to use this tool straight from your desktop menu and from Nautilus file manager. A simple right click on a video file will show a menu to post-process it.

It has been designed and tested on an Ubuntu 14.04 LTS workstation, but it should be applicable to any Linux distribution, as long as the needed tools are available.

Read more: Ubuntu - Transcode your video to MKV / AAC the simple way

Ubuntu - Setup a BTSync Client running per User Session

dropcap-ubuntu-btsync

BitTorrent Sync is a new p2p tool which opens some fantastic possibilities. It may revolutionize the way you'll handle your private file sharing as it allows you to share & synchronize your files across multiple devices (PC, tablet, smartphone, ...) on the net in almost real time.

Some examples of the possibilities opened by BTSync are described in the article BTSync - How peer-to-peer may Simplify your Life.

As BTSync is a young project, you can get latest binary from the project site but you still don't get proper Ubuntu installation package handling BTSync daemon launched per user session. With this type of configuration, BTSync will be launched at login time with the current user's credentials.

This article explains how to install a BTSync daemon on a Ubuntu workstation with BTSync daemon being launched at session login using the user's credentials. It will allow your currently logged-in user to share files with a BTSync daemon running using current account. You'll get a synchronisation daemon equivalent to Dropbox.

It has been tested under Ubuntu 12.04 LTS 7 Amd64 but it should be applicable to any debian based distribution with little adaptation.

Read more: Ubuntu - Setup a BTSync Client running per User Session

Debian - Automate Monthly Connexion for Dyndns Free Accounts

dropcap-debian-dyndns

For so many years, http://www.dyndns.org/ has been providing free dynamic DNS accounts. For me, they have been the 'de facto' dynamic DNS provider. The proof : so many home routers, NAS, ... manufacturers are providing update clients for their DNS service.

But this wonderful time has come to an end. Dyn has simply removed any free offer from their catalog and thanks to their latest SLA, you are now supposed to connect to their web server at least once a month to keep your existing free dyndns account active. Even with an update client, your free account may be terminated if you do not connect periodically to their web site. This new policy is a deliberate free account killer.

If, like me, you've been relying for ages on their service for your personal web site, this new policy is a real pain in the neck. Who will think to connect once a month to a site to do ... nothing ? Hopefully (as usual in the computing world) there is a solution : instead of you in person, a small shell script can peridically to do the connection job for you. It will automatically connect to Dyn web site using your account.

So, this article explains how to create and setup a periodic script that will connect to Dyn login page. This connexion will be considered by Dyn as a user connexion. As a result, you'll be able to keep your free dyndns account active even without doing yourself the newly needed monthly connexion. This periodic script should allow you to save your free account from a killing SLA.

Read more: Debian - Automate Monthly Connexion for Dyndns Free Accounts

Debian - Setup your Server as a Permanent BTSync Peer

dropcap-debian-btsync

BitTorrent Sync is a new p2p tool which opens some fantastic possibilities. It may revolutionize the way you'll handle your private file sharing as it allows you to share & synchronize your files across multiple devices (PC, tablet, smartphone, ...) on the net in almost real time.

Some examples of the possibilities opened by BTSync are described in the article BTSync - How peer-to-peer may Simplify your Life .

Like with any p2p network, BTSync needs to get some accessible peers to start synchronisation.

So, to allow synchronisation to be done at any time, you can setup a permanent peer on a Debian server by installing BTSync on it. As your server is always connected, it will handle all your devices connexions whenever they need it.

This article explains how to install a BTSync client on a Debian server to make it a permanent BTSync network peer. Any device (PC, smartphone, tablet, ...) will then be able to synchronize any time. You've then created your self hosted Dropbox or Google Drive replacement.

It has been tested on a Debian 7 Amd64 server.

Read more: Debian - Setup your Server as a Permanent BTSync Peer

Debian 7 - ZFS pools lost after ZFSonLinux update

dropcap-debian-zfsonlinux

In a previous article, I explained how to Setup ZFS with RAIDZ pool on your Linux Server .

Even if I'm doing regular updates to my Debian Wheezy server, I hardly reboot it, once every blue moon.

With these regular updates, my ZFSonLinux packages have been updated from version 0.6.2 to 0.6.3, from 0.6.3 to 0.6.4, from 0.6.4 to 0.6.4.1 , ... but without a reboot after every update.

To my surprise, after next reboot following a ZFSonLinux update, both my ZFS pools had disappeared. All my important server data where lost !

While searching the web for an explanation, I read lots of articles giving some tips and tricks, but nothing was really convincing. And more than that, lots of stuff was looking quite dangerous, with a high risk of definitely breaking the ZFS pools. After lots of searches, I finally found the real explanation to this huge problem on zfsforlinux discussion group.

Even if the solution is very simple, it is to my point of view worth writing this article. In fact, I hope it will help you to go straight to the solution. This should avoid you lots of frightening time ...

Please note that this solution is valid for servers where the / partition is not a ZFS one. Your ZFS pools should not host the root filesystem. They should be mounted during the boot process.

Read more: Debian 7 - ZFS pools lost after ZFSonLinux update

Debian 7 - Setup ZFS with RAIDZ pool on your Linux Server

dropcap-debian-zfsonlinux

Few days after the release of Debian Wheezy, I decided to install a brand new HP N54L micro server to use it as a small company NAS cum Server and to use ZFS filesystem for the data storage. As I wanted to fully manage my system, I decided not to go for a NAS distribution, but to use a plain Debian install and to setup a ZFS filesystem.

ZFS is a filesystem originally developed by Sun for Solaris OS. It has been ported to Linux by the zfs on linux project.

Its most interesting functionnalities are :

  • convergence of filesystem and volume manager
  • software raidz (software raid5 equivalent)
  • online data compression
  • snapshots

This filesystem is so simple, efficient and advanced, that I'm sure it will become a Linux standard very, very soon. Other FS may become part of the past sooner than expected ...

This guide explains how to install and configure a ZFS RAIDZ pool, how to setup snapshots and how to handle its day to day maintenance. A pre-requisite is to run Debian Wheezy server with a separate system disk (ZFS won't be on the boot device).

It doesn't explain in detail all ZFS options and possibilities, but it explains all the steps to get a fully running zfs raidz pool that will give you the flexibility of a professional grade NAS at the cost of a geek tool box :-)

Read more: Debian 7 - Setup ZFS with RAIDZ pool on your Linux Server

Debian 7 - Install Android Tools (ADB, Fastboot, ... & QtADB)

dropcap-debian-android

If you own an Android Smartphone and you want to manage it from your computer, you will need sooner or later to use some specific Android tools like adb or fastboot.

Under Debian, two options are available :

  • Install the whole Android SDK which bring these tools among many other things
  • Install some specific android-tools packages that bring only these tools

For some basic needs, to install the whole Android SDK is not needed, the android-tools packages are more than enough.

But these packages are only available for sid, they are not in the wheezy repository. So we'll need to backport them.

This article explains the simple steps needed to install the main Android tools (ADB, Fastboot, ... & QtADB) on a Debian 7 Wheezy workstation.

For example, after these steps, you should be able to Root a Google Nexus S or to Root a Google Nexus 7.

Read more: Debian 7 - Install Android Tools (ADB, Fastboot,... & QtADB)

Ubuntu - Take Screen capture of your Android device even from Recovery

dropcap ubuntu android

With ADB, a lot of possibilities are open to administrate and tweak your Android device. A tool like QtADB is a good example of what can be done.

Some time back, I discovered that you can take some screenshots of your Android device thru ADB with a inbuilt utility called screencap. But it only works when you are running a normal android session, not when you are in recovery mode.

After some searches, I found that many devices, depending on their hardware, can provide some screen capture thru a frame buffer.

Both these approaches open some nice possibilities to take screenshot of your device while running any type of application (tutorials, games, …) or even running a recent version of recovery like TWRP where ADB is activated by default.

This article explains how to take a screenshot of an android device in ADB mode thru some simple console commands by using both screencap or frame buffer methods.

It also provides a GUI tool to take sreenshot of your android device with a single click from the comfort of your linux desktop.

It has been written and tested on Ubuntu 14.04 LTS, but it should be applicable to any modern Linux flavor. Frame buffer capture under TWRP recovery has been tested on Nexus S, Nexus 7 2012 and Nexus 5.

Read more: Ubuntu - Take Screen capture of your Android device even from Recovery

Ubuntu - Graphviz Previewer & Thumbnailer for Nautilus

dropcap-ubuntu-graphviz

Graphviz (Graph Visualization Software) is a package of open-source tools initiated by AT&T Labs Research for drawing graphs specified in DOT language scripts.

DOT files are text files with .dot extension. They use a graph description language named DOT language. These files can be processed by some tools like dot  to generate a graphical view.

Under Ubuntu and Debian, you get a set of command line tools but no GUI (Graphical User Interface) for Gnome Shell.

If you want to have a complete desktop integration for your graphviz DOT files, you need to add a proper thumbnailer and a previewer.

This article explains how to setup a complete desktop integration for Graphviz .dot files with Gnome Shell. You'll then be able to :

  • see your graphviz .dot files thumbnails inside Nautilus
  • see your graphviz .dot file preview straight from Eye of Gnome

This has been tested on Ubuntu Gnome 14.04 LTS Amd64 and LUbuntu 14.04 LTS. It should work on many Linux distribution with little adjustment.

Read more: Ubuntu - Graphviz Previewer & Thumbnailer for Nautilus

Ubuntu - How to browse your Windows Mobile phone

Ubuntu

Smartphone and Pocket PC under Windows Mobile are becoming more and more popular. Since WM5, these phone are using a new RDNIS protocol to synchronise with computers. This is good news for Linux users, as this protocol is much more simple and robust than the previous one. As a result, the synchronisation between a Linux PC and one of these phones is more simple to setup.

This article will explain how to install and configure SynCE to setup a synchronisation between a WM Phone and a Ubuntu workstation to be able to browse the mobile phone filesystem. You will then be able to get some infos about your phone and, more interesting, to browse your phone filesystem thru Nautilus

It won't explain how to synchronise your contacts or calendar with Evolution or Thunderbird. This can be acheived with some additionnal steps, but as I'm not needing it, I haven't tried.

This setup has been done on a Ubuntu Jaunty 9.04 workstation, but it should work on any later version.

Read more: Ubuntu - How to browse your Windows Mobile phone

Ubuntu - Install HP Laserjet Multifunction (Print and Scan)

Ubuntu

hp-cm1312-mfpHP provides a very good driver support on the Linux platform for its multifunction Laser printers.

But for the network scanner capabilities, you need to install some HP extension plugin, downloaded during the driver installation process ... and for me the plugin download failed most of the time.

This article explains the different steps needed to install a HP Multi function printer & scanner under Ubuntu, including scanner capabilities, even when you encounter a download error for the plugin extension.

Even if this procedure has been tested on Laserjet CM1312nfi, it should be operationnal for most of the HP multifunction printers.

It has been tested on Ubuntu Precise 12.04 LTS &  Trusty 14.04 LTS and Debian Jessie & Stretch .

Read more: Ubuntu - Install HP Laserjet Multifunction (Print and Scan)

Gnome Shell - Customise your SSH terminal per Host basis

dropcap-gnomeshell-ssh

If you are a sysadmin, your desktop must be filled with SSH consoles, allowing you to supervise and administrate a lot of different servers. And there is nothing more similar to a console than another console.

As all these console are the same, there is a real risk of error, typing some commands on the wrong server ...

Nowadays, the standard Gnome Shell terminal is providing a begining of solutions with the support of profiles. So, with the help of these profiles, you can easily change the title bar, background color, background image or text color of your consoles. Your consoles can be customised for every host, but you have to select the profile once the console is opened.

Why not to automatised the process ?

This article explains a solution to select automatically a profile according to the SSH host. The main principle of the proposed solution is to :

  • create one SSH configuration for each host
  • create one Gnome Terminal profile per host
  • use a helper script to detect the host and to launch the terminal with the right profile

To make it simple, when you will type custom-ssh -e "ssh server1"  you will launch gnome-terminal SSH console to server1 host using server1 profile.

The strengh of this solution is that it will be integrated with SSH Search Shell Extension, which is a fantastic productivity tool available under Gnome Shell. It allows you to launch your SSH console by just typing the first letters of the host to administrate.

It has been tested under Ubuntu Precise 12.04, but it should work with any Linux distribution using Gnome Shell 3.x.

Read more: Gnome Shell - Customise your SSH terminal per Host basis

Ubuntu 12.04 - Graphviz Viewer & Thumbnailer for Nautilus

dropcap-ubuntu-graphviz

This article is outdated.
Please follow Ubuntu - Graphviz Previewer & Thumbnailer for Nautilus instead.

Graphviz (Graph Visualization Software) is a package of open-source tools initiated by AT&T Labs Research for drawing graphs specified in DOT language scripts. It consists of a graph description language named the DOT language and a set of tools that can generate and/or process DOT files.

Under Ubuntu and Debian, you get a set of command line tools but no GUI (Graphical User Interface) for Gnome Shell.

Hopefully, a graph visualizer implemented in Java is available with ZGRViewer project. It is based upon the Zoomable Visual Transformation Machine. It is specifically aimed at displaying graphs expressed using the DOT language by using GraphViz binaries.

ZGRViewer is designed to handle large graphs, and offers a Zoomable User Interface, which enables smooth zooming and easy navigation in the visualized structure.

This article explains how to install Graphwiz & ZGRViewer and to declare interaction with Gnome Shell. You'll then be able to :

  • launch ZGRViewer from the Graphics menu
  • double-click on a DOT file to launch ZGRViewer
  • see your graphviz DOT files thumbnails inside Nautilus

This has been tested on Ubuntu Precise 12.04 LTS Amd64 and Gnome Shell 3.4. It should work on any distribution running Gnome Shell.

Read more: Ubuntu 12.04 - Graphviz Viewer & Thumbnailer for Nautilus

Ubuntu 14.04 - Fix Intel Centrino 6235 freeze & dramatically slow speed

dropcap-ubuntu-wifi

I've been using a combo Wifi/Bluetooth Intel Centrino 6235 mini-pci wireless adapter on my laptop with Ubuntu 12.04 for many months without problem.

But since I've upgraded to Ubuntu Trusty 14.04 LTS and I've started to use Bluetooth audio, my wifi speed has dramatically dropped.

Wireless performances have become so bad that system seems to freeze for few seconds, web surfing is sluggish and file transfer can go down to 20 kB/s !

This problem seems to come from some kernel evolutions where default parameters for iwlwifi module have changed and are not suiting Intel Centrino 6235 wireless adapters.

This article explains how to get back normal performance on a Intel Centrino 6235 mini-pci wireless adapter under Ubuntu 14.04 LTS.

It has been tested on a Ubuntu Gnome 14.04 LTS Amb64 installation but should be applicable to any other 14.04 flavor.

Read more: Ubuntu 14.04 - Fix Intel Centrino 6235 freeze & dramatically slow speed

LUbuntu 14.04 LTS - Add right click menu to Empty Trash

dropcap-lubuntu

As a regular Lubuntu user, I really miss one simple thing that Gnome desktop provides out-of-the-box : a right menu on the desktop Trash to allow to directly empty it. Instead, you need to go to PcManFm and then you get a proper menu to empty the Trash !

Hopefully, thanks to latest version of PcManFm, it is now possible to customize some context-menu with your own actions. This means that we are now entitled to create a custom menu specific to the Trash object. This menu will do a simple thing : empty your trash with a dialog confirmation.

This article explains how to add this Empty trash menu to your desktop Trash icon under Lubuntu 14.04 LTS.

Read more: LUbuntu 14.04 LTS - Add right click menu to Empty Trash

Ubuntu - Activate your brand new iPAD without iTunes

Ubuntu

This article will explain how to activate a brand new iPad without the help of iTunes.

First question : why do you want to do such weird thing ?

Just because nowadays some places do not get any proprietary operating system anymore ... neither Windows, nor OSX. So no iTunes.

And, when you get an iPad in hand, you can not get anything out of it before it has been activated. This process is supposed to be done thru iTunes.

So here is the process to be able to use your iPad with the help of a Ubuntu workstation and of fantastic pieces of software called libimobiledevice & ideviceactivate.

Following this procedure, you will get a working iPad, not even knowing what iTunes means  :-)

As iDevices protocols are changing fast with hardware and iOS version, this guide will compile all the iDevice specific tools from git repositories.
This will maximimize the chances for this procedure to work with your brand new device.

This activation process has been tested on an iPad 1 under iOS 3.2.1 and iOS 4.3.1. I've been told that this activation procedure has been followed with sucess on an iPad 2. Even if I've not tested it, it should also work on an iPhone ...

Read more: Ubuntu - Activate your brand new iPAD without iTunes

Ubuntu - Paint Tool Sai Integration including Wacom Tablet Pen Pressure

dropcap-ubuntu-sai

Paint Tool SAI has been running for a long time under linux with the help of Wine. But till date, Wacom tablet pressure is not handled properly. This problem is referenced as bug11846, opened in 2008 in WineHQ Bugzilla and still open.

Hopefully, the PlayOnLinux team has issued a patch for Wine version 1.5.5 that allows Paint Tool SAI to handle tablet pen pressure. But this patch doesn't seem to work with latest Wine versions.

So, this specific wine version has been added into PlayOnLinux database under 1.5.5-SAI name.

This guide explains all the steps to :

  • check if your Wacom tablet is recognised on your system
  • install PlayOnLinux and the patched Wine 1.5.5-SAI
  • install Paint Tool SAI
  • declare SAI files interaction for Gnome desktop

It has been tested with a Bamboo Fun CTH-661 tablet under Ubuntu Precise 12.04 Amd64 (Gnome 3.4) and Ubuntu Gnome 13.10 Amd64 (Gnome 3.8).

It should be applicable to many other Wacom tablet models and other Linux flavours.

Read more: Ubuntu - Paint Tool Sai Integration including Wacom Tablet Pen Pressure

Ubuntu - Resume your computer from any USB device (keyboard, mouse, remote, ...)

Ubuntu

With the arrival of Gnome Shell, one major step has been taken : by default you can't switch-off your computer !

In fact, the only menu available is Suspend. You have to press ALT at the same time to see the Switch-off menu. You will find lots of topics about this strange evolution on the net, with lots of furious people who still want to keep the power of switching off their computer.

But, if you think twice about it, suspend / resume is one of the revolution of modern appliances : who is still switching-off a TV set, a video player or an ADSL box ?
Almost nobody ! Now, you suspend it from your remote. So why not to handle your favorite computer the same way ?

usb-symbol Even if it is consuming a little bit of power, suspend state is having a very strong advantage : it takes almost no time to resume to working condition.

Who is ready to wait for 1 minute or more to check his mails, when 5 seconds are enough to resume a computer with thunderbird already open ?

Under Ubuntu, the only trouble is that your USB input devices (keyboard, mouse, MCE remote, …) are not fully configured by default to be used to resume from a suspend mode.

This guide will explain how to configure your USB input devices to be able to wake-up your suspended computer. As a result, you will be able to wake-up your Ubuntu computer with :

  • a simple key press on your keyboard
  • a click on your mouse center button
  • the power button of your MCE remote

It has been written on a Ubuntu Precise 12.04, but should be applicable with any Linux flavor using a kernel version prior to 3.10.
As USB power management has changed drastically in kernel 3.10 +, this article is not applicable for kernel 3.10+.

Read more: Ubuntu - Resume your computer from any USB device (keyboard, mouse, remote,...)

Gnome Shell - Tips to help migration from Gnome 3.4 to Gnome 3.8+

dropcap-gnome-shell

For the last two years, I've become a big fan of Gnome Shell. This desktop environment is becoming really robust and very well polished. Its simplicity is its strength.

But when upgrading from Gnome Shell 3.4 to 3.8+, you'll notice few differences in term of interface and behaviour. As a normal or power user you may be a little bit lost because of some evolutions. Some of the most noticeable differences are :

  • placement of Nautilus main menu
  • location of Nautilus scripts
  • location of Bookmarks file
  • behaviour of right menu to create new documents

This article focuses on some of these differences between Gnome Shell 3.4 and Gnome SHell 3.8 / 3.10. It gives some tips and clues to simplify your migration from version 3.4 to 3.8+.

It has been tested on a migration from Ubuntu 12.04 LTS to Ubuntu Gnome 13.10 & Ubuntu Gnome 14.04 LTS. But it should be applicable to any Linux distribution based on Gnome shell.

Read more: Gnome Shell - Tips to help migration from Gnome 3.4 to Gnome 3.8+

Page 2 of 5