efd6a29167b655f24b217a6ca9270eab3df65c77
[project/luci.git] / applications / luci-asterisk / luasrc / model / cbi / asterisk / voicemail.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 - Mailboxes")
19
20 voicemail = cbimap:section(TypedSection, "voicemail", "Voicemail Boxes")
21 voicemail.addremove = true
22 voicemail.anonymous = true
23 voicemail.template = "cbi/tblsection"
24
25 context = voicemail:option(ListValue, "context", "Context")
26 context:value("default")
27
28 voicemail:option(Value, "number", "Mailbox Number", "Unique mailbox identifier")
29 voicemail:option(Value, "name", "Ownername", "Human readable display name")
30 voicemail:option(Value, "password", "Password", "Access protection")
31 voicemail:option(Value, "email", "eMail", "Where to send voice messages")
32 voicemail:option(Value, "page", "Pager", "Pager number")
33
34 zone = voicemail:option(ListValue, "zone", "Timezone", "Used time format")
35 zone.titleref = luci.dispatcher.build_url("admin/asterisk/voicemail/settings")
36 cbimap.uci:foreach("asterisk", "voicezone",
37 function(s) zone:value(s['.name']) end)
38
39
40 return cbimap