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 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.
The prerequisites must be satisfied before installing Voiceglue.
You must be installing on one of the following platforms:
Voiceglue has been tested and runs on both 32-bit and 64-bit versions of these OSes.
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:
Supported versions of Asterisk are:
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.
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.
Do not use the packaged asterisk, or the source for 1.6.2.(1-7) as these are all buggy.
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:
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.
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?
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/:
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.
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 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.
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.
The order in which the software components must be installed is:
Each perl library can be installed with the following sequence of actions:
perl Build.PL./Build installEach program can be installed with the following sequence of actions:
make -f Makefile installThe libvglue software is installed in two steps. The first step installs just the headers:
make install-headersWhen it's time to install libvglue binaries, do:
make installThis 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.soJSCFLAGS - The CFLAGS used for compiling against SpiderMonkeyJSLIBFLAGS - The library flags for linking against SpiderMonkeyJSUSESETOPERATIONCALLBACK - 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.
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:
/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.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.