From 2c7a76105403ede3bf4a9803a47ca62d86e8cd72 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sun, 29 Mar 2009 19:11:57 +0000 Subject: applications/luci-asterisk: initial dialplan voicemail box support --- .../luasrc/view/asterisk/dialplans.htm | 67 ++++++++++++++++++---- 1 file changed, 57 insertions(+), 10 deletions(-) (limited to 'applications/luci-asterisk/luasrc/view/asterisk') diff --git a/applications/luci-asterisk/luasrc/view/asterisk/dialplans.htm b/applications/luci-asterisk/luasrc/view/asterisk/dialplans.htm index 75c98184fb..3ffe6c5eec 100644 --- a/applications/luci-asterisk/luasrc/view/asterisk/dialplans.htm +++ b/applications/luci-asterisk/luasrc/view/asterisk/dialplans.htm @@ -33,6 +33,10 @@ $Id$ function format_matches(z) local html = { } + if type(z) ~= "table" then + z = { matches = { z } } + end + if z.localprefix then for _, m in ipairs(z.matches) do html[#html+1] = @@ -41,7 +45,7 @@ $Id$ end end - if #z.intlmatches > 0 then + if z.intlmatches and #z.intlmatches > 0 then for _, i in ipairs(z.intlmatches) do for _, m in ipairs(z.matches) do html[#html+1] = "%s %s" %{ @@ -71,7 +75,10 @@ $Id$

Outgoing Call Routing

- Here you can manage your dial plans which are used to route outgoing calls from your local extensions. + Here you can manage your dial plans which are used to route outgoing calls from your local extensions.

+ Related tasks:
+ Manage dialzones | + Manage voicemailboxes
@@ -93,9 +100,9 @@ $Id$ - <% local zones_used = { } %> + <% local zones_used = { }; local row = 0 %> <% for i, zone in ipairs(plan.zones) do zones_used[zone.name] = true %> - + └ Dialzone <%=zone.name%> (<%=zone.description%>)

@@ -118,25 +125,65 @@ $Id$ - <% end %> + <% row = row + 1; end %> + + + + <% local boxes_used = { } %> + <% for ext, box in luci.util.kspairs(plan.voicemailboxes) do boxes_used[box.id] = true %> + + + └ Voicemailbox <%=box.id%> (<%=box.name%>) +

+ Owner: <%=box.name%> | + eMail: <%=#box.email > 0 and box.email or 'n/a'%> | + Pager: <%=#box.page > 0 and box.page or 'n/a'%>
+ Matches: <%=format_matches(ext)%> +

+ + + + Edit dialzone + + + Remove from this dialplan + + + + <% row = row + 1; end %> +
+ + Add Dialzone:
- -     - Manage dialzones +

+ + Add Voicemailbox:
+ + as extension + +

+ + - -- cgit v1.2.3