summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-asterisk/luasrc/controller
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2009-03-30 19:29:37 +0000
committerJo-Philipp Wich <jow@openwrt.org>2009-03-30 19:29:37 +0000
commitd0c6e88b95782d8c50cd8c6caec1302bb9ab1a9d (patch)
tree64d160f4a8f64fc9467c58e3605aaba37b3e1c30 /applications/luci-asterisk/luasrc/controller
parent7385d0b070e2aa4a367b8864fcaad00e65fabb18 (diff)
applications/luci-asterisk: add meetme support, data integrity improvements
Diffstat (limited to 'applications/luci-asterisk/luasrc/controller')
-rw-r--r--applications/luci-asterisk/luasrc/controller/asterisk.lua28
1 files changed, 27 insertions, 1 deletions
diff --git a/applications/luci-asterisk/luasrc/controller/asterisk.lua b/applications/luci-asterisk/luasrc/controller/asterisk.lua
index c258f2db3..ab053397d 100644
--- a/applications/luci-asterisk/luasrc/controller/asterisk.lua
+++ b/applications/luci-asterisk/luasrc/controller/asterisk.lua
@@ -53,7 +53,11 @@ function index()
entry({"admin", "asterisk", "voicemail", "mailboxes"}, cbi("asterisk/voicemail"), "Mailboxes", 1)
entry({"admin", "asterisk", "voicemail", "settings"}, cbi("asterisk/voicemail_settings"), "Settings", 2)
- entry({"admin", "asterisk", "dialplans"}, call("handle_dialplan"), "Call Routing", 4)
+ entry({"admin", "asterisk", "meetme"}, cbi("asterisk/meetme"), "MeetMe", 4)
+ entry({"admin", "asterisk", "meetme", "rooms"}, cbi("asterisk/meetme"), "Rooms", 1)
+ entry({"admin", "asterisk", "meetme", "settings"}, cbi("asterisk/meetme_settings"), "Settings", 2)
+
+ entry({"admin", "asterisk", "dialplans"}, call("handle_dialplan"), "Call Routing", 5)
entry({"admin", "asterisk", "dialplans", "out"}, cbi("asterisk/dialplan_out"), nil, 1).leaf = true
entry({"admin", "asterisk", "dialplans", "zones"}, call("handle_dialzones"), "Dial Zones", 2).leaf = true
@@ -125,6 +129,28 @@ function handle_dialplan()
end
end
+ for k, v in pairs(luci.http.formvaluetable("delmeetme")) do
+ local plan = ast.dialplan.plan(k)
+ if #v > 0 and plan then
+ uci:delete_all("asterisk", "dialplanmeetme",
+ { extension=v, dialplan=plan.name })
+ end
+ end
+
+ for k, v in pairs(luci.http.formvaluetable("addmeetme")) do
+ local plan = ast.dialplan.plan(k)
+ local meetme = ast.meetme.room(v)
+ if plan and meetme then
+ local mext = luci.http.formvalue("addmeetmeext.%s" % plan.name)
+ mext = ( mext and #mext > 0 ) and mext or meetme.room
+ uci:section("asterisk", "dialplanmeetme", nil, {
+ dialplan = plan.name,
+ extension = mext,
+ room = meetme.room
+ })
+ end
+ end
+
local aname = luci.http.formvalue("addplan")
if aname and #aname > 0 then
if aname:match("^[a-zA-Z0-9_]+$") then