Configuring safe_asterisk

NOTE: The following instructions are no longer necessary as of version 8.5 of the LumenVox software. They are only provided as a reference for users of previous versions.

If you start Asterisk using safe_asterisk (a script that will restart Asterisk if it stops), you need to export the LumenVox environment variables in the script. To do this, make this edit to the script.

Note that these same principles apply if you use any script to start Asterisk.

The variables the Engine looks for are:

LVROOT (needs to point to the Engine installation directory.)
LVBIN=$LVROOT/bin
LVINCLUDE=$LVROOT/include
LVLANG=$LVROOT/Lang
LVRESPONSE=$LVLANG LVLIB=$LVROOT/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$LVLIB

So if you are using LumenVox Speech Engine version 7.5 installed to /opt/lumenvox/engine_7.5/ your LVROOT would be set to that directory.

Edit safe_asterisk and change:

run_asterisk()
{
while :; do
if [ "$TTY" != "" ]; then
cd /tmp
stty sane < /dev/${TTY}
${ASTSBINDIR}/asterisk ${CLIARGS} ${ASTARGS} >& /dev/${TTY} < /dev/${TTY}
else
cd /tmp
${ASTSBINDIR}/asterisk ${CLIARGS} ${ASTARGS}
fi

To

run_asterisk()
{
while :; do
if [ "$TTY" != "" ]; then
cd /tmp
stty sane < /dev/${TTY}
export LV_LICENSE="/opt/lumenvox/licenseserver/bin"
export LVBIN=/opt/lumenvox/engine/bin
export LVLIB=/opt/lumenvox/engine/lib
export LVINCLUDE=/opt/lumenvox/engine/include
export LVLANG=/opt/lumenvox/engine/Lang
export LVRESPONSE=/opt/lumenvox/engine/Lang
export LD_LIBRARY_PATH=$LVLIB:$LD_LIBRARY_PATH
export LD_RUN_PATH=$LVLIB:$LD_RUN_PATH
${ASTSBINDIR}/asterisk ${CLIARGS} ${ASTARGS} >& /dev/${TTY} < /dev/${TTY}
else
cd /tmp
export LV_LICENSE="/opt/lumenvox/licenseserver/bin"
export LVBIN=/opt/lumenvox/engine/bin
export LVLIB=/opt/lumenvox/engine/lib
export LVINCLUDE=/opt/lumenvox/engine/include
export LVLANG=/opt/lumenvox/engine/Lang
export LVRESPONSE=/opt/lumenvox/engine/Lang
export LD_LIBRARY_PATH=$LVLIB:$LD_LIBRARY_PATH
export LD_RUN_PATH=$LVLIB:$LD_RUN_PATH
${ASTSBINDIR}/asterisk ${CLIARGS} ${ASTARGS}
fi
© 2012 LumenVox LLC. All rights reserved.