* luci/app/asterisk: more work on cbi models
[project/luci.git] / applications / luci-asterisk / luasrc / model / cbi / asterisk-voice.lua
1 --[[
2 LuCI - Lua Configuration Interface
3
4 Copyright 2008 Steven Barth <steven@midlink.org>
5 Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
6
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
10
11         http://www.apache.org/licenses/LICENSE-2.0
12
13 $Id$
14 ]]--
15
16 cbimap = Map("asterisk", "asterisk", "")
17
18 voicegeneral = cbimap:section(TypedSection, "voicegeneral", "Voicemail general options", "")
19
20 serveremail = voicegeneral:option(Value, "serveremail", "From Email address of server", "")
21
22
23 voicemail = cbimap:section(TypedSection, "voicemail", "Voice Mail boxes", "")
24 voicemail.addremove = true
25
26 attach = voicemail:option(Flag, "attach", "Email contains attachment", "")
27 attach.rmempty = true
28
29 email = voicemail:option(Value, "email", "Email", "")
30 email.rmempty = true
31
32 name = voicemail:option(Value, "name", "Display Name", "")
33 name.rmempty = true
34
35 password = voicemail:option(Value, "password", "Password", "")
36 password.rmempty = true
37
38 zone = voicemail:option(ListValue, "zone", "Voice Zone", "")
39 cbimap.uci:foreach( "asterisk", "voicezone", function(s) zone:value(s['.name']) end )
40
41
42 voicezone = cbimap:section(TypedSection, "voicezone", "Voice Zone settings", "")
43 voicezone.addremove = true
44
45 message = voicezone:option(Value, "message", "Message Format", "")
46 message.rmempty = true
47
48 zone = voicezone:option(Value, "zone", "Time Zone", "")
49 zone.rmempty = true
50
51
52 return cbimap