FusionPBX for ex-Trixbox users

This blog is intended to be read in sequential order as it is a series of steps that I followed to build a fully functioning fusionpbx phone system. However you might just need to find out how to do a particular thing so you might want to use the search box below to find that specific step. Please give feedback - if you know a better way to do something share it!

Thursday, August 5

Anyone hungry? How about Pizza?

When you load up FusionPBX you will notice that the dial plan contains an entry called pizza_demo.  If you dial this using 74992 (ie. PIZZA) you will find that nothing happens!  So what is it?

FreeSwitch includes a speech recognition demonstration called Gino's Pizza or "pizza demo".  This is a great thing to have working on your system if you want to explore speech recognition technology (and for Trixbox users this is a big leap forward in capabilities).  My initial thoughts after trying it is that you really need more confirmations along the way in your scripting because it is very easy to select a pizza topping you didn't actually want and then all you can do is go back to the beginning again if you get it wrong - but that is just scripting.  The other thought I had was that there is a lot of silence after you say something, it would be good if the system acknowledged your response while it was working out what you said rather than just going away and thinking about it - it doesn't feel fluent yet.  But that said, it is a great advance beyond DTMF IVRs.

So how do you get it running?  Well actually, all that has been included in the ISO is the dialplan entry, everything else needed for it is missing due to space limitations in the ISO.  So to get started we need to log in to the console.  If you use putty you can cut and paste these steps.


cd /usr/local/freeswitch/scripts
wget http://svn.freeswitch.org/svn/freeswitch/trunk/scripts/javascript/ps_pizza.js
nano ps_pizza.js
edit the line in section Set audio params to say asr.setAudioBase("pizza/");
save the changes
mkdir js_modules
cd js_modules
wget http://svn.freeswitch.org/svn/freeswitch/trunk/scripts/javascript/js_modules/SpeechTools.jm
cd ..
chown apache -R *
chgrp apache -R *
cd ..
cd sounds/en/us/callie
wget http://www.freeswitch.org/eg/pizza_sounds.tar.gz
gzip -d *.gz
tar -xf *.tar
rm *.tar
chgrp freeswitch -R pizza
chown freeswitch -R pizza
cd /usr/local/freeswitch/grammar
wget http://www.bkw.org/pizza_gram.tar.gz
tar xvzf pizza_gram.tar.gz


watch for console messages when you call extension 74992 (pizza) to test it!  To show the console run the following command.
/usr/local/freeswitch/bin/fs_cli
To exit the console type ... (yes, three fullstops or if you are American, three periods) and then press Enter.

Enjoy your pizza!  (oh, just remember, if you want to order real pizza you should call your local pizza shop - FusionPBX is good but it isn't actually going to cook and deliver your pizza for you)

No comments:

Post a Comment