My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
VoiceGlue  
What is VoiceGlue and how to configure it
asterisk, vxml
Updated Feb 4, 2010 by len...@gmail.com

Introduction

For real information see http://www.voiceglue.org. After that, look at the following info on how to build it and for example configuration files.

Installing packages

SuSE

See the comment at the bottom of the page. The author of the comment says he built a package of VoiceGlue for SuSE and provided the link http://download.opensuse.org/repositories/home:/archie172/openSUSE_10.3/src/voiceglue-0.6-14.2.src.rpm. As always, make sure you trust the provider of a binary package before installing it (personally, I just install stuff without thinking, but I don't own any production machines).

Debian-based (tested on Ubuntu 8.04)

Install the packages:

sudo apt-get install libmozjs-dev spidermonkey-bin libxerces28-dev flite libssl-dev openssl libxml-perl libbsd-resource-perl libmodule-build-perl asterisk libxml-libxml-perl

There are a number of things that have to be changed in the VoiceGlue source code to allow installation on Ubuntu (and probably other Debians). This includes the /etc/init.d files (for dynlog, voiceglue and phoneglue). I hope to post the patches here soon.

Red-hat based (tested on CentOS 5.2)

First, make sure you have the regular repositories (Centos "os", or if you own a RedHat registration, Red Hat Network).

Next, do the following as root (I couldn't figure how to use sudo on CentOS). Add RpmForge repository to yum:

rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm

(for more info and other versions, see here on how to do it: http://dag.wieers.com/rpm/FAQ.php#B1)

Add ATrpms to the repositories of yum. First, add the atrpms gpg key:

rpm --import http://ATrpms.net/RPM-GPG-KEY.atrpms

Next, add this to a new file /etc/yum.repos.d/atrpms.repo:

[atrpms]
name=ATrpms
baseurl=http://dl.atrpms.net/el5-i386/atrpms/stable
gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms
gpgcheck=1

Next, run:

yum update

Now, you can install the dependencies for VoiceGlue:

yum install -y xerces-c-devel openssl-devel perl-XML-LibXML perl-BSD-Resource js-devel perl-Module-Build perl-ExtUtils-CBuilder

Download flite: (as far as I know, it's not available on any of those repositories). I got an rpm for Fedora Core 9 and installed it on my Centos 5.2 from here ftp://rpmfind.net/linux/fedora/releases/9/Everything/x86_64/os/Packages/flite-1.3-9.fc9.i386.rpm after searching the net for it.

wget ftp://rpmfind.net/linux/fedora/releases/9/Everything/x86_64/os/Packages/flite-1.3-9.fc9.i386.rpm
rpm -i flite-1.3-9.fc9.i386.rpm

Now, install asterisk if you don't have it yet. It is available at the atrpms repo we configured before:

yum install asterisk

Building VoiceGlue

After getting the required packages, you should be able to build VoiceGlue like this:

# running as root, enter the voiceglue source dir:
cd voiceglue_0.6
doc/install_voiceglue

Make sure that this completes without any errors.

Example configuration

/etc/asterisk/manager.conf:

;
; Asterisk Call Management support
;

; By default asterisk will listen on localhost only. 
[general]
enabled = yes
port = 5038
bindaddr = 127.0.0.1

; No access is allowed by default.
; To set a password, create a file in /etc/asterisk/manager.d
; use creative permission games to allow other serivces to create their own
; files
#include "manager.d/*.conf" 

/etc/asterisk/extensions.conf:

[globals]

[general]
autofallthrough=yes

[default]
exten => s,1,Verbose(1|Unrouted call handler)
exten => s,n,Answer()
exten => s,n,Wait(1)
exten => s,n,Playback(tt-weasels)
exten => s,n,Hangup()

[phoneglue]
exten => 1,1,Agi(agi://localhost)
exten => 1,2,Hangup()

[incoming_calls]

[internal]
exten => 500,1,Verbose(1|Echo test application)
exten => 500,n,Echo()
exten => 500,n,Hangup()
exten => 1000,1,Verbose(1|Extension 1000)
exten => 1000,n,Dial(SIP/1000,30)
exten => 1000,n,Hangup()
exten => 1001,1,Verbose(1|Extension 1001)
exten => 1001,n,Answer()
exten => 1001,n,Goto(phoneglue,1,1)
exten => 1001,n,Hangup()
exten => 1002,1,Answer()
exten => 1002,n,Background('/var/lib/asterisk/sounds/hello-world')
exten => 1002,n,Hangup()

[phones]
include => internal

/etc/asterisk/sip.conf:

[general]

[1000]
type=friend
context=phones
host=dynamic

[1001]
type=friend
context=phones
host=dynamic

/etc/voiceglue.conf:

* http://127.0.0.1/vxml/menu-input.vxml

You can put the vxml files anywhere you want, as long as they are accessible via HTTP (any web server will do). Here I used a local web server.

/etc/asterisk/manager.d/phoneglue.conf:

[phoneglue]
secret=phoneglue
read = system,call,log,verbose,command,agent,user
write = system,call,log,verbose,command,agent,user

Running the services

Start asterisk:

/etc/init.d/asterisk start

Start dynlog - this usually starts without errors:

/etc/init.d/dynlog start

Start phoneglue - this is the problematic one (if there are configuration problems, it may "start" but die immediately, that's why I say run status after a few seconds):

/etc/init.d/phoneglue start
# Wait a few seconds...
# And then make sure phoneglue is really running:
/etc/init.d/phoneglue status

It should say something like "phoneglue is running"

Start voiceglue:

/etc/init.d/voiceglue start
# Wait a few seconds...
# And then make sure about voiceglue:
/etc/init.d/voiceglue status

Testing

You will need a softphone or a physical SIP phone connected to your asterisk machine's network. Once you have access, dial 1001 - you should hear a menu prompting you to press 1, 2 or 3 (or something like that). If you do - it works.

X-Lite

I tested my setup using a softphone - X-Lite. Using the asterisk documentation (the great book) I configued X-Lite and made a call from 1000 to 1001.

You will have to install libstdc++.5.so for X-Lite to work. On RedHat based machines, install:

yum install compat-libstdc++-33

Debugging

If you encounter problems, the first things you should do are:

  1. Make sure the services are all up and running (using the status commands on the /etc/init.d scripts)
  2. Turn on more logging by running dynlog_level 7
  3. Run /usr/sbin/asterisk -rvvvvv and try making a call, see if there are any errors printed.
  4. Take a look at files at /var/log under: dynlog
Other than that, use the VoiceGlue mailing list...

Good Luck!

Comment by archie.c...@gmail.com, Jul 6, 2008
Comment by archie.c...@gmail.com, Aug 5, 2008

Update to previous comment. The normal voiceglue build is now part of the network:telephony OBS project. So the RPM now lives here:

http://download.opensuse.org/repositories/network:/telephony/

Because I needed a SLES-9 build, I also created a personal sub-project:

http://download.opensuse.org/repositories/home:/archie172:/voiceglue/

This project also contains a "minimal" build of Asterisk that only does SIP, for use as a SIP-Voiceglue gateway.


Sign in to add a comment
Powered by Google Project Hosting