The complete application is made up of various files:
welcome.lua
: This is the main scriptutils.lua
: This contains the utility functions provided to all other scriptsLuaRunWeb.lua
: This script is spawned by a function inwelcome.lua
for non-blocking web accessLuaRunMoh.lua
: This script is spawned bywelcome.lua
for non-blocking audio playback to the caller.welcome.xml
: This is the dialplan entry
Because we will often reference different parts of the scripts you really must download the code from www.packtpub.com.
Then, copy all LUA files into the script directory of FreeSWITCH (default: /usr/local/freeswitch/scripts/
), and put the XML file into the default
subdirectory of FreeSWITCH dialplan (/usr/local/freeswitch/conf/dialplan/default/
).
You will then load mod_flite
into FreeSWITCH, because this script needs
Text To Speech (TTS). If you have compiled from sources, go to /usr/src/freeswitch.git
and type (pay attention to dash-underscore differences):
makemod_flite-install
Then...