summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-asterisk/luasrc/model/cbi
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2009-01-11 04:01:32 +0000
committerJo-Philipp Wich <jow@openwrt.org>2009-01-11 04:01:32 +0000
commit00636ae577d3d7e6a8c7b216ae46df499291eeb7 (patch)
treee455b6d552fc1bb56986e383a29663b9fec811b8 /applications/luci-asterisk/luasrc/model/cbi
parentfb7aea55e89c4484aa14460bb788285c36d15d3c (diff)
applications/luci-asterisk: add some options to sip trunk configuration
Diffstat (limited to 'applications/luci-asterisk/luasrc/model/cbi')
-rw-r--r--applications/luci-asterisk/luasrc/model/cbi/asterisk/trunk_sip.lua28
1 files changed, 24 insertions, 4 deletions
diff --git a/applications/luci-asterisk/luasrc/model/cbi/asterisk/trunk_sip.lua b/applications/luci-asterisk/luasrc/model/cbi/asterisk/trunk_sip.lua
index 3d7e6dc0f0..ca29471384 100644
--- a/applications/luci-asterisk/luasrc/model/cbi/asterisk/trunk_sip.lua
+++ b/applications/luci-asterisk/luasrc/model/cbi/asterisk/trunk_sip.lua
@@ -21,12 +21,32 @@ local ast = require("luci.asterisk")
if arg[1] then
cbimap = Map("asterisk", "Edit SIP Trunk")
- peer = cbimap:section(NamedSection, arg[1], "Foo")
+ peer = cbimap:section(NamedSection, arg[1])
+ peer.hidden = {
+ type = "peer"
+ }
- name = peer:option(DummyValue, "username")
+ back = peer:option(DummyValue, "_overview", "Back to trunk overview")
+ back.value = ""
+ back.titleref = luci.dispatcher.build_url("admin", "asterisk", "trunks", "sip")
- outproxy = peer:option(Value, "outboundproxy")
-
+ sipdomain = peer:option(Value, "host", "SIP Domain")
+ sipport = peer:option(Value, "port", "SIP Port")
+ sipport.default = 5060
+
+ username = peer:option(Value, "username", "Authorization ID")
+ password = peer:option(Value, "secret", "Authorization Password")
+ password.password = true
+
+ register = peer:option(ListValue, "register", "Register with peer")
+ register:value("yes", "on")
+ register:value("no", "off")
+
+ regext = peer:option(Value, "registerextension", "Extension to register (optional)")
+ regext:depends({register="yes"})
+
+ didval = peer:option(ListValue, "_did", "Number of assigned DID numbers")
+ for i=1,24 do didval:value(i) end
return cbimap