Friday, July 3, 2009

Remind me again... 1.6

So, like I was saying, we installed this reminder module:
http://bestof.nerdvittles.com/applications/reminders4/

It started working with pieces of tutorials everywhere. I had it working easily on Asterisk 1.4, but I was not satisfied with 1.4 and went to 1.6, which made things a bit more difficult.

1. The reminder.pbx script worked on Trixbox. ie

wget http://bestof.nerdvittles.com/applications/reminders4/reminders.pbx
chmod +x reminders.pbx
./reminders.pbx


Then you can go into the FreePBX web gui and enable the module in the Module Admin section. Ok, we're half done... NOT!

2. Reminders work, but they won't do anything without a text-to-voice protocol (Flite or Cepstral). I tried to install Flite and failed, so I went to Cepstral, which worked after multiple failures. (It was important to install asterisk-devel)

[EDIT] Apparently Flite doesn't work in Trixbox. I forgot the sauce but that pretty much explains why it didn't install AND life in general.

Cepstral install worked based on this:
http://www.trixbox.org/forums/trixbox-forums/open-discussion/mini-howto-install-cepstral-asterisk-weather-station-zip-nerdv

Log into your trixbox system via ssh as root and enter the following commands:

cd /root
wget http://downloads.cepstral.com/cepstral/i386-linux/Cepstral_Allison-8kHz_i386-linux_5.1.0.tar.gz
tar -zxvf Cepstral*
cd Cepstral_Allison-8kHz_i386-linux_4.2.1
./install.sh

After you've read the license, type yes to install the voice on your system, not -yes- as the instructions imply. Don't ask how I know. Accept the default locations for the installation. When the installation completes, issue the following command:

echo /opt/swift/lib > /etc/ld.so.conf.d/cepstral.conf
ldconfig

This places the Cepstral_Allison voice in /opt/swift/voices/
You can download other voices from Cepstral at http://www.cepstral.com/cgi-bin/downloads?type=1143746987

After installing multiple voices, retrieve a list of installed voices with:

ls /opt/swift/voices


The "Allison" package will have be updated by then so wget it here:
http://cepstral.com/cgi-bin/downloads?type=1143746987

4. So, for Asterisk 1.6, we have a special case for App_Swift:
http://nerdvittles.com/index.php?p=202

Asterisk 1.6 Install. If you're using the newer versions of PBX in a Flash with Asterisk 1.6, you will need Darren Session's 1.6-compatible version of app-swift:

cd /usr/src
wget http://pbxinaflash.net/source/app_swift/app_swift-1.6.2.tar.gz (see below)
tar -zxvf app_swift-1.6*
rm *.gz
cd app_swift-1.6.2
make
make install
cp swift.conf.sample /etc/asterisk/swift.conf
chown asterisk:asterisk /etc/asterisk/swift.conf

Finally, you need to add a link in your search path for Cepstral and modify /etc/asterisk/swift.conf to tell it which voice you want to use with Asterisk and then restart Asterisk. Assuming you installed Allison-8kHz, here are the commands.

ln -s /opt/swift/bin/swift /usr/bin/swift
sed -i 's|David-8kHz|Allison-8kHz|' /etc/asterisk/swift.conf
amportal restart


This is all good except that we are using Trixbox and for some reason the App_swift package in the instructions didn't work (maybe made for PBX in a Flash).
This 1.6.2 package did work:

http://www.darrensessions.com/downloads/

To be sure that everything is installed and working with Asterisk, issue this command:

asterisk -rx "core show application swift"


You should receive the following response:

-= Info about application 'Swift' =-

[Synopsis]
Speak text through Swift text-to-speech engine.

[Description]
Swift(text) Speaks the given text through the Swift TTS engine.
Returns -1 on hangup or 0 otherwise. User can exit by pressing any key.

If you don't see that, then something is wrong.

5. FOP Problem. I was getting strange errors right in the terminal when scheduling reminders. Apparently, Asterisk 1.6 does not work well with Fop. Period. LIES.

It works with op_panel 0.3 http://www.asternic.org/

Stop your asterisk/op_server.pl:
amportal stop

Get the package:
wget http://www.asternic.org/files/op_panel-0.30.tar.gz

Unpack the package:
tar -zxvf op_panel*.gz

Delete the Package:
rm op_panel*.gz

Go to the package contents:
cd op_panel*

Update current FOB with package contents:
cp op_server.pl /var/www/html/panel/

Go to the flash directory in the unpacked package:
cd flash
cp operator_panel.swf /var/www/html/panel/

Restart your asterisk dood:
amportal restart

Now we can schedule reminders via the web gui: "Tools"--> "Reminders"

I'm still working on getting the phone reminders to work.

To be continued...

DJ@Limbo

No comments:

Post a Comment