applications/luci-asterisk: fix link to voicemail boxes, remove dialplanvoice and dialplanmeetme too when removing dialplan sections
This commit is contained in:
parent
36b1bbd9ff
commit
5f72f9d547
2 changed files with 5 additions and 9 deletions
|
@ -81,8 +81,6 @@ function handle_dialplan()
|
||||||
if #newinc > 0 then
|
if #newinc > 0 then
|
||||||
uci:set("asterisk", plan.name, "include", newinc)
|
uci:set("asterisk", plan.name, "include", newinc)
|
||||||
end
|
end
|
||||||
|
|
||||||
uci:save("asterisk")
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -101,8 +99,6 @@ function handle_dialplan()
|
||||||
if #newinc > 0 then
|
if #newinc > 0 then
|
||||||
uci:set("asterisk", plan.name, "include", newinc)
|
uci:set("asterisk", plan.name, "include", newinc)
|
||||||
end
|
end
|
||||||
|
|
||||||
uci:save("asterisk")
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -111,7 +107,6 @@ function handle_dialplan()
|
||||||
if #v > 0 and plan then
|
if #v > 0 and plan then
|
||||||
uci:delete_all("asterisk", "dialplanvoice",
|
uci:delete_all("asterisk", "dialplanvoice",
|
||||||
{ extension=v, dialplan=plan.name })
|
{ extension=v, dialplan=plan.name })
|
||||||
uci:save("asterisk")
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -127,7 +122,6 @@ function handle_dialplan()
|
||||||
voicebox = vbox.number,
|
voicebox = vbox.number,
|
||||||
voicecontext = vbox.context
|
voicecontext = vbox.context
|
||||||
})
|
})
|
||||||
uci:save("asterisk")
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -135,7 +129,6 @@ function handle_dialplan()
|
||||||
if aname and #aname > 0 then
|
if aname and #aname > 0 then
|
||||||
if aname:match("^[a-zA-Z0-9_]+$") then
|
if aname:match("^[a-zA-Z0-9_]+$") then
|
||||||
uci:section("asterisk", "dialplan", aname, { })
|
uci:section("asterisk", "dialplan", aname, { })
|
||||||
uci:save("asterisk")
|
|
||||||
else
|
else
|
||||||
err = true
|
err = true
|
||||||
end
|
end
|
||||||
|
@ -145,11 +138,14 @@ function handle_dialplan()
|
||||||
if dname and #dname > 0 then
|
if dname and #dname > 0 then
|
||||||
if uci:get("asterisk", dname) == "dialplan" then
|
if uci:get("asterisk", dname) == "dialplan" then
|
||||||
uci:delete("asterisk", dname)
|
uci:delete("asterisk", dname)
|
||||||
uci:save("asterisk")
|
uci:delete_all("asterisk", "dialplanvoice", { dialplan=dname })
|
||||||
|
uci:delete_all("asterisk", "dialplanmeetme", { dialplan=dname })
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
uci:save("asterisk")
|
||||||
ast.uci_resync()
|
ast.uci_resync()
|
||||||
|
|
||||||
luci.template.render("asterisk/dialplans", { create_error = err })
|
luci.template.render("asterisk/dialplans", { create_error = err })
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -78,7 +78,7 @@ $Id$
|
||||||
Here you can manage your dial plans which are used to route outgoing calls from your local extensions.<br /><br />
|
Here you can manage your dial plans which are used to route outgoing calls from your local extensions.<br /><br />
|
||||||
Related tasks:<br />
|
Related tasks:<br />
|
||||||
<a href="<%=luci.dispatcher.build_url('admin/asterisk/dialplans/zones')%>" class="cbi-title-ref">Manage dialzones</a> |
|
<a href="<%=luci.dispatcher.build_url('admin/asterisk/dialplans/zones')%>" class="cbi-title-ref">Manage dialzones</a> |
|
||||||
<a href="<%=luci.dispatcher.build_url('admin/asterisk/dialplans/zones')%>" class="cbi-title-ref">Manage voicemailboxes</a>
|
<a href="<%=luci.dispatcher.build_url('admin/asterisk/voicemail/mailboxes')%>" class="cbi-title-ref">Manage voicemail boxes</a>
|
||||||
</div>
|
</div>
|
||||||
<!-- tblsection -->
|
<!-- tblsection -->
|
||||||
<fieldset class="cbi-section" id="cbi-asterisk-sip">
|
<fieldset class="cbi-section" id="cbi-asterisk-sip">
|
||||||
|
|
Loading…
Reference in a new issue