Put quotes for safety.

Move enable_Voicemail() here.
This commit is contained in:
Michael Geddes 2009-01-27 02:40:40 +00:00
parent 213d2a310e
commit dfa7dbbc45

View file

@ -46,13 +46,13 @@ valid_voicebox() {
} }
check_add_voicebox() { check_add_voicebox() {
if [ ! -z ${voicebox_number} ] ; then if [ ! -z "${voicebox_number}" ] ; then
[ -z "${voicebox_context}" ] && voicebox_context=default [ -z "${voicebox_context}" ] && voicebox_context=default
logdebug 1 "Adding Voicebox ${voicebox_number} in ${voicebox_context}" logdebug 1 "Adding Voicebox ${voicebox_number} in ${voicebox_context}"
# Construct the voicebox line # Construct the voicebox line
local line="$voicebox_number => " local line="$voicebox_number => "
[ -z ${voicebox_tz} ] && voicebox_tz=homeloc [ -z "${voicebox_tz}" ] && voicebox_tz=homeloc
[ -z ${voicebox_name} ] && voicebox_name=OpenWRT [ -z "${voicebox_name}" ] && voicebox_name=OpenWRT
logdebug 1 "Adding in order options" logdebug 1 "Adding in order options"
for i in password name email pager ; do for i in password name email pager ; do
@ -90,7 +90,7 @@ create_voicemailconf() {
get_checksum voicemail_conf $file get_checksum voicemail_conf $file
local isempty=1 local isempty=1
if [ -z ${voice_contextlist} ] ; then if [ -z "${voice_contextlist}" ] ; then
local isempty=2 local isempty=2
rm -f $file rm -f $file
else else
@ -188,8 +188,8 @@ handle_dialplanvoice() {
check_add_dialplanvoice() { check_add_dialplanvoice() {
if [ ! -z "${dial_voice_dialplan}" -a ! -z "${dial_voice_extension}" ] ; then if [ ! -z "${dial_voice_dialplan}" -a ! -z "${dial_voice_extension}" ] ; then
local ext="exten => ${dial_voice_extension}," local ext="exten => ${dial_voice_extension},"
[ -z ${dial_voice_voicebox} ] && dial_voice_voicebox=default [ -z "${dial_voice_voicebox}" ] && dial_voice_voicebox=default
if [ -z ${dial_voice_voicebox} ] ; then if [ -z "${dial_voice_voicebox}" ] ; then
logerror "Expecting voicebox for ${dial_voice_dialplan}/${dial_voice_extension}" logerror "Expecting voicebox for ${dial_voice_dialplan}/${dial_voice_extension}"
else else
check_add_context ${dial_voice_dialplan} check_add_context ${dial_voice_dialplan}
@ -203,6 +203,13 @@ check_add_dialplanvoice() {
done done
} }
enable_voicemail() {
enable_module res_adsi
enable_module app_voicemail
enable_format gsm
}
add_dialplan_voice() { add_dialplan_voice() {
local context=$1 local context=$1
logdebug 1 "Adding Dialplan voice $1 $2" logdebug 1 "Adding Dialplan voice $1 $2"