diff options
author | Michael Geddes <openwrt@frog.wheelycreek.net> | 2009-03-30 05:07:10 +0000 |
---|---|---|
committer | Michael Geddes <openwrt@frog.wheelycreek.net> | 2009-03-30 05:07:10 +0000 |
commit | 333458f06c3de0b9cea9c3059133f6d6cc9485c2 (patch) | |
tree | ec47d939abb79955a5e82430dc1bd8049c96f804 /contrib/package/asterisk-xip/files | |
parent | 9bc7c1ddeda505741ac6053d803ac3c202355719 (diff) |
Support voicegeneral 'format' section as list
Diffstat (limited to 'contrib/package/asterisk-xip/files')
-rwxr-xr-x | contrib/package/asterisk-xip/files/uci/voicemailconf | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/contrib/package/asterisk-xip/files/uci/voicemailconf b/contrib/package/asterisk-xip/files/uci/voicemailconf index ea634ea7bf..f022e6fc09 100755 --- a/contrib/package/asterisk-xip/files/uci/voicemailconf +++ b/contrib/package/asterisk-xip/files/uci/voicemailconf @@ -12,7 +12,7 @@ init_voicemailconf() { ast_enable_type voicezone ast_enable_type dialplanvoice - voice_format="wav49|gsm|wav" + voice_format= voice_serveremail= voice_attach=no voice_skipms=3000 @@ -94,6 +94,8 @@ create_voicemailconf() { local isempty=2 rm -f $file else + + [ -z "${voice_format}" ] && voice_format="wav49|gsm|wav" echo "${asteriskuci_gen}[general]" > $file for i in ${voicegeneral_list} ; do eval value=\${voice_$i} @@ -117,11 +119,16 @@ create_voicemailconf() { handle_voicegeneral() { option_cb() { - if valid_voicemail $1 $2 ; then - eval voice_$1="$2" - else - logerror "Invalid general voice option: $1" - fi + case "$1" in + format|format_ITEM*) append voice_format "$2" "|" ;; + format_LENGTH) ;; + *) + if valid_voicemail $1 $2 ; then + eval voice_$1="$2" + else + logerror "Invalid general voice option: $1" + fi + esac } } |