Setting up a VOIP server, part 5 (Weather by Zip)

By jbayer - Last updated: Wednesday, March 23, 2011 - Save & Share - Leave a Comment

I wanted to have the feature available to get the weather by zip code, so I tried to install the Weather by zip code module.  There is a deplorable lack of documentation on the steps needed to install this.  As usual, this article documents my experiences with Elastix, but since Elastix uses FreePBX this should be applicable to most systems.

There are three main steps involved in getting this to work.  They are:

  1. Install Flite
  2. Install Asterisk-Flite
  3. Install Weather by ZIP

The following files are needed:

weatherzip-1.1.7.tar.gz
flite-1.4-release.tar.gz
Asterisk-Flite-1.6-0.1-beta2.tar.gz

Step 1:  Download, compile and install Flite.  Log on to the system, and issue the following commands (cut ‘n paste will probably work):

cd /usr/src
wget http://cmuflite.org/packed/flite-1.4/flite-1.4-release.tar.gz
tar xzf flite-1.4-release.tar.gz
cd flite-1.4-release
./configure --enable-shared
make
make install

If you are on a 64 bit system, then you may need to do the following step:

mv /usr/local/lib/flite* /usr/local/lib64

You now need to update the dynamic linker.  Depending on your system, you will need to do one of the following.  Replace the “lib64” with “lib” if you are on a 32 bit system:

Edit the file /etc/ld.so.conf, and add the following line:

/usr/local/lib64

or

Create a file /etc/ld.so.conf.d/local-lib.conf, and have the following line in it:

/usr/local/lib64

then issue the command:

ldconfig

Step 2:  Download, compile and install Asterisk-Flite

cd /usr/src
wget http://cloud.github.com/downloads/zaf/Asterisk-Flite/Asterisk-Flite-1.6-0.1-beta2.tar.gz
cd Asterisk-Flite
make
make install

if you are on a 64 bit system, then you may need to do the following step:

mv /usr/lib/asterisk/modules/app_flite.so /usr/lib64/asterisk/modules

Step 3:  Install the weatherzip module in FreePBX

Step 3.1: Download the module to your desktop From here..

Don’t decompress the archive!

Step 3.2: Use a web browser to access FreePBX on your PBX. Choose Tools, Module Admin, Upload Module.

Step 3.3: Now, browse to the weatherzip-1.1.7.tgz file on your Desktop and click the Upload button. Now click local module administration, scroll down and click on Sys Info and then the Install radio button. Now click Process, and complete the usual FreePBX install and reload process.

Step 3.4: I had one problem with the Weather by Zip module.  The PHP file references  a function xml2array, which isn’t present.  Since it is used only to display the module info, it is safe to comment it out.  Open up the file:

/var/www/html/admin/modules/weatherzip/page.weatherzip.php

and add to forward slashes to the beginning of line 23

Step 3.5: Finally, go into the FreePBX admin page for the Weather by Zip module, and make sure that the flite engine is selected.

Finally, restart Asterisk:

amportal restart

You should be able to test by dialing:  *947  from any phone and following the prompts.

References

Installing_Weather_by_ZIP_Code_Module_for_FreePBX

http://asterisk-flite.sourceforge.net/

http://projects.colsolgrp.net/attachments/download/342/weatherzip-1.1.7.tgz

Posted in Open Source, VOIP • Tags: Top Of Page
1,443 views

Write a comment

asd