2 LuCI - Lua Configuration Interface
4 Copyright 2009 Jo-Philipp Wich <xm@subsignal.org>
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
10 http://www.apache.org/licenses/LICENSE-2.0
15 require "luci.sys.zoneinfo"
18 cbimap = Map("asterisk", "Voicemail - Common Settings")
20 voicegeneral = cbimap:section(TypedSection, "voicegeneral",
21 "General Voicemail Options", "Common settings for all mailboxes are " ..
22 "defined here. Most of them are optional. The storage format should " ..
23 "never be changed once set.")
25 voicegeneral.anonymous = true
26 voicegeneral.addremove = false
28 format = voicegeneral:option(MultiValue, "Used storage formats")
29 format.widget = "checkbox"
34 voicegeneral:option(Flag, "sendvoicemail", "Enable sending of emails")
35 voicegeneral:option(Flag, "attach", "Attach voice messages to emails")
36 voicegeneral:option(Value, "serveremail", "Used email sender address")
37 voicegeneral:option(Value, "emaildateformat", "Date format used in emails").optional = true
38 voicegeneral:option(Value, "maxlogins", "Max. failed login attempts").optional = true
39 voicegeneral:option(Value, "maxmsg", "Max. allowed messages per mailbox").optional = true
40 voicegeneral:option(Value, "minmessage", "Min. number of seconds for voicemail").optional = true
41 voicegeneral:option(Value, "maxmessage", "Max. number of seconds for voicemail").optional = true
42 voicegeneral:option(Value, "maxsilence", "Seconds of silence until stop recording").optional = true
43 voicegeneral:option(Value, "maxgreet", "Max. number of seconds for greetings").optional = true
44 voicegeneral:option(Value, "skipms", "Milliseconds to skip for rew./ff.").optional = true
45 voicegeneral:option(Value, "silencethreshold", "Threshold to detect silence").optional = true
48 voicezone = cbimap:section(TypedSection, "voicezone", "Time Zones",
49 "Time zones define how dates and times are expressen when used in " ..
50 "an voice mails. Refer to the asterisk manual for placeholder values.")
52 voicezone.addremove = true
53 voicezone.sectionhead = "Name"
54 voicezone.template = "cbi/tblsection"
56 tz = voicezone:option(ListValue, "zone", "Location")
57 for _, z in ipairs(luci.sys.zoneinfo.TZ) do tz:value(z[1]) end
59 voicezone:option(Value, "message", "Date Format")