Installing Voiceglue: Two Ways

There are two ways to install Voiceglue. The easy way, and the hard way. The easy was has the advantage of being, well, easy, but has the disadvantage of supporting only a small number of configurations and a small number of platforms. The hard way is, well, harder, but has the advantage of potentially being able to support any unix-y system in arbitrary configurations.

If you're fine with running Voiceglue on the same box as Asterisk and are going to run it on Ubuntu 9.10 or 10.4 or Fedora 12, or CentOS 5.4, then by all means try the easy method.

The Easy Way

The easy way is mostly automatic. Voiceglue provides a script that should get everything installed and running in one shot. Before the script can run, however, you have to do some preparation work.

Prerequisites

The prerequisites must be satisfied before installing Voiceglue.

Supported Platforms

You must be installing on one of the following platforms:

  • Ubuntu 10.04 (Lucid Lynx)
  • Ubuntu 9.10 (Karmic)
  • Fedora 12
  • CentOS 5.4

Voiceglue has been tested and runs on both 32-bit and 64-bit versions of these OSes.

Asterisk

Asterisk must be installed before voiceglue can be installed. Our testing has shown that the asterisk packages available for the supported platforms are often buggy. Additionally, the most recent source versions of asterisk are often buggy (as of this writing, May 2010). Therefore, the safest bet is probably to install an older stable source build of asterisk.

Here is one set of notes to accomplish this:

  • Download, unpack, and cd to the top-level directory of the asterisk distribution
  • Run: ./configure
  • Run: make install
  • Run: make samples
  • Run: make config

Supported versions of Asterisk are:

  • Asterisk 1.4
  • Asterisk 1.6

The "asterisk" user

The “asterisk” user must be present. This user is what the voiceglue process runs as because it needs to share audio files with Asterisk. It is legal, even with the easy way, to have Asterisk installed on a separate machine from Voiceglue, but the “asterisk” user must be present on the voiceglue host, and should match the uid/gid of the “asterisk” user on the Asterisk host.

Required Packages

There are several software packages that Voiceglue requires. The installer looks for them as packages in the system (debs for Ubuntu, rpms for Fedora) so they must be installed that way. For Ubuntu you use apt/synaptic, for Fedora you use yum/yumex. Here's the list of what's required on each of the supported platforms:

Package Ubuntu 9.10 - 10.4 Fedora 12, CentOS 5.4
gcc/g++ gcc g++ gcc-c++
libc++ libstdc++-devel
xerces-c libxerces-c2-dev xerces-c-devel
SpiderMonkey 9.10: libmozjs-dev 10.4: xulrunner-dev xulrunner-devel
flite flite flite
sox sox sox
libsox-fmt libsox-fmt-base libsox-fmt-all
curl curl curl
openssl libssl-dev openssl-devel
XML::LibXML libxml-libxml-perl perl-XML-LibXML
BSD::Resource libbsd-resource-perl perl-BSD-Resource
Module::Build libmodule-build-perl perl-Module-Build
URI::Escape liburi-perl CentOS: perl-URI perl-URI-Escape-XS
Test::More perl-Test-Base
pkg-config pkg-config pkgconfig

If an entry is blank, it means I didn't have to install that package from a base system because it was already present, so you probably won't have to either.

Notes on Specific OS's

Ubuntu 10.4 (Lucid)

Do not use the packaged asterisk, or the source for 1.6.2.(1-7) as these are all buggy.

Ubuntu 9.10 (Karmic)

The desktop version of Ubuntu 9.10 has a messed up dependency for libmozjs-dev. If you try to install libmozjs-dev, it will say it has to uninstall the entire desktop set of software. For this reason, the libmozjs-dev dependency is not checked in the voiceglue install script, but it must be installed. To achieve this:

  • install package libmozjs0d
  • change to a scratch directory
  • Run: aptitude download libmozjs-dev
  • Run: mkdir tmpdir
  • Run: dpkg-deb -x libmozjs-dev_1.8.1.16+nobinonly-0ubuntu1_all.deb tmpdir
  • Run: cp -r tmpdir/usr/include/mozjs /usr/include
  • Run: cp -r tmpdir/usr/lib/pkgconfig/xulrunner-js.pc /usr/lib/pkgconfig
  • Run: ln -s libmozjs.so.0d /usr/lib/libmozjs.so

Fedora12

Turn off the firewall, disable selinux, and edit the mime types file to remove the entry for “gsm” so as not to conflict with audio gsm files.

Download and Unpack Voiceglue

After prerequisites are installed, download and unpack the voiceglue distribution. It can always be found at http://voiceglue.org by clicking on the “Download” tab at the top.

I'm assuming that downloading and unpacking a tar file is not hard for a voiceglue user. After all, you installed Asterisk, didn't you? :-)

Running the install script

From within the top-level voiceglue directory (the one containing doc), run the following command as root:

doc/install-voiceglue

It first checks the prerequisites listed above, then if those are satisfied, builds and installs all of the software required for Voiceglue. Check the output for errors.

After the script runs to completion,. you should have the following services ready to run with their init scripts in /etc/init.d/:

  • dynlog
  • phoneglue
  • voiceglue

These scripts can be called manually (but don't until you read the user guide), however it's more common to let them run automatically on system boot. On Fedora/CentOS systems, you may need to run chkconfig to activate them on at boot-time.

These services must be brought up in the order shown above, and brought down in the reverse order. Their install scripts will do this automatically on system startup and shutdown.

Uninstalling voiceglue

If you want to get rid of everything that voiceglue installed (which can be useful for re-installs too in case you're using something like checkinstall to create packages and you want all files re-installed even if they didn't change) you can run the supplied uninstall script.

From within the top-level voiceglue directory (the one containing doc), run the following command as root:

doc/uninstall-voiceglue

The Hard Way

Prerequisites

The prerequisites are the same as for the easy way, except that you are not necessarily restricted to the platforms listed there, and the software packages don't necessarily need to be installed as the package format of choice for the distribution.

Voiceglue Contents

The Voiceglue distribution contains the following top-level directories:

Directory Contents
Cam-Scom perl library for IPC
doc documentation and install script
dynlog perl programs providing unified log collection
libvglue voiceglue C/C++ libraries
openvxi-3.4+vglue voiceglue-modified openvxi 3.4 C/C++ library
phoneglue perl program providing high-level Asterisk interface
Satc perl library for phoneglue communication
SRGSDTMF perl library for processing SRGS DTMF grammars
voiceglue perl program providing voiceglue interface
Voiceglue-Conf perl library for voiceglue configuration
Vxglue perl library for interfacing to openvxi

Each of these items (except doc) must be installed.

Installing Voiceglue

The order in which the software components must be installed is:

  1. Cam-Scom
  2. dynlog
  3. Satc
  4. Voiceglue-Conf
  5. phoneglue
  6. SRGSDTMF
  7. libvglue-headers
  8. openvxi-3.4+vglue
  9. libvglue
  10. Vxglue
  11. voiceglue

Installing Perl Libraries

Each perl library can be installed with the following sequence of actions:

  1. Change to that directory
  2. Run: perl Build.PL
  3. Run: ./Build install

Installing Programs

Each program can be installed with the following sequence of actions:

  1. Change to that directory
  2. Determine which Makefile is appropriate for your situation
  3. Run: make -f Makefile install

Installing libvglue-headers

The libvglue software is installed in two steps. The first step installs just the headers:

  1. Change to that directory
  2. Run: make install-headers

Installing libvglue

When it's time to install libvglue binaries, do:

  1. Change to that directory
  2. Run: make install

Installing openvxi-3.4+vglue

This is the most challenging install step, as it consists of a large number of C/C++ modules that have dependencies on several system libraries.

The build_openvxi file at the top level is a script to build OpenVXI. Before running it, however, the following environment variables must be set:

  • JSLIB - The name of the SpiderMonkey library, e.g. js for libjs.so
  • JSCFLAGS - The CFLAGS used for compiling against SpiderMonkey
  • JSLIBFLAGS - The library flags for linking against SpiderMonkey
  • JSUSESETOPERATIONCALLBACK - Which version to call, either “2” for the 2-argument version or “3” for the 3-argument version

Finally, the install_openvxi script in the same top-level directory installs the compiled OpenVXI library files and runtime support files to their system destinations.

Installation on Dedicated Hardware

Voiceglue (and supporting components) can be installed on hardware separate to the Asterisk host. Doing this is actually easy.

Before you install Voiceglue itself you need to do the following:

  • Ensure you have your Asterisk host already installed.
  • Configure the Asterisk manager ready for Phoneglue to connect as detailed in the user guide. Ensure you bind to an IP that Voiceglue can talk to and remember to allow such traffic through any firewalls on your Asterisk host.
  • Now you need to share the Asterisk sounds directory somehow, usually /var/lib/asterisk/sounds. NFS, CIFS, SSHFS - the choice of how is implementation-specific and beyond the scope of this installation guide. Please remember that stability and performance are of extremely high priority.
  • Mount your shared Asterisk sounds directory on the Voiceglue host in the same position as it would be found on the Asterisk host (to keep things simple).
  • You may need an asterisk user/group that matches the user/group ids on the Asterisk host. Otherwise, when Voiceglue creates it's voice prompts within the /var/lib/asterisk/sounds/voiceglue/tts/ folder the ownership may mean Asterisk cannot read the files back.

OK, now you can install Voiceglue. You can use the easy or the hard way, it should not matter. You'll need the dependencies too such as perl and Spidermonkey.

Once installed you should be able to fire up dynlog, phoneglue and voiceglue. To make Asterisk talk to the remote Voiceglue host just alter your AGI calls accordingly. Example:

  • exten ⇒ s,n,AGI(agi://localhost/url=http%3A%2F%2Fvoice.server%2Fsomething)

becomes

  • exten ⇒ s,n,AGI(agi://10.0.0.31/url=http%3A%2F%2Fvoice.server%2Fsomething)

Where 10.0.0.31 is your Voiceglue host.

 
voiceglue_0.12_installation_instructions.txt · Last modified: 2010/05/19 09:57 by jgreen
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Debian Driven by DokuWiki