applications/luci-asterisk: fix voicemail storage option, don't load tzdata in mailbo...
[project/luci.git] / applications / luci-asterisk / luasrc / model / cbi / asterisk / voicemail_settings.lua
1 --[[
2 LuCI - Lua Configuration Interface
3
4 Copyright 2009 Jo-Philipp Wich <xm@subsignal.org>
5
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
9
10 http://www.apache.org/licenses/LICENSE-2.0
11
12 $Id$
13 ]]--
14
15 require "luci.sys.zoneinfo"
16
17
18 cbimap = Map("asterisk", "Voicemail - Common Settings")
19
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.")
24
25 voicegeneral.anonymous = true
26 voicegeneral.addremove = false
27
28 format = voicegeneral:option(MultiValue, "Used storage formats")
29 format.widget = "checkbox"
30 format:value("wav49")
31 format:value("gsm")
32 format:value("wav")
33
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
46
47
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.")
51
52 voicezone.addremove = true
53 voicezone.sectionhead = "Name"
54 voicezone.template = "cbi/tblsection"
55
56 tz = voicezone:option(ListValue, "zone", "Location")
57 for _, z in ipairs(luci.sys.zoneinfo.TZ) do tz:value(z[1]) end
58
59 voicezone:option(Value, "message", "Date Format")
60
61
62 return cbimap