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 local ast = require "luci.asterisk"
17 cbimap = Map("asterisk", "MeetMe - Rooms")
19 meetme = cbimap:section(TypedSection, "meetme", "MeetMe Rooms")
20 meetme.addremove = true
21 meetme.anonymous = true
22 meetme.template = "cbi/tblsection"
23 meetme:option(Value, "_description", "Description", "Short room description")
25 room = meetme:option(Value, "room", "Room Number", "Unique room identifier")
27 function room.write(self, s, val)
28 if val and #val > 0 then
29 local old = self:cfgvalue(s)
30 self.map.uci:foreach("asterisk", "dialplanmeetme",
33 self.map:set(v['.name'], "room", val)
36 Value.write(self, s, val)
41 meetme:option(Value, "pin", "PIN", "PIN required to access")
42 meetme:option(Value, "adminpin", "Admin PIN", "PIN required for administration")
44 function meetme.remove(self, s)
45 return ast.meetme.remove(self.map:get(s, "room"), self.map.uci)