summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-asterisk/luasrc/model/cbi/asterisk-iax-connections.lua
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2008-10-23 02:25:26 +0000
committerJo-Philipp Wich <jow@openwrt.org>2008-10-23 02:25:26 +0000
commit71724c76cbfe80724d408ed9f20e1fde34b68288 (patch)
tree28b230b419fbdc0dd8250fd9fb22a162a46e3b18 /applications/luci-asterisk/luasrc/model/cbi/asterisk-iax-connections.lua
parent1a830a559bfc7ef2e8f8156d505f85724d7ffcca (diff)
* luci/app/asterisk: add initial cbi definitions, needs cleanup
Diffstat (limited to 'applications/luci-asterisk/luasrc/model/cbi/asterisk-iax-connections.lua')
-rw-r--r--applications/luci-asterisk/luasrc/model/cbi/asterisk-iax-connections.lua58
1 files changed, 58 insertions, 0 deletions
diff --git a/applications/luci-asterisk/luasrc/model/cbi/asterisk-iax-connections.lua b/applications/luci-asterisk/luasrc/model/cbi/asterisk-iax-connections.lua
new file mode 100644
index 0000000000..a6b361e493
--- /dev/null
+++ b/applications/luci-asterisk/luasrc/model/cbi/asterisk-iax-connections.lua
@@ -0,0 +1,58 @@
+--[[
+LuCI - Lua Configuration Interface
+
+Copyright 2008 Steven Barth <steven@midlink.org>
+Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+$Id$
+]]--
+
+cbimap = Map("asterisk", "asterisk", "")
+
+iax = cbimap:section(TypedSection, "iax", "IAX Connection", "")
+iax.addremove = true
+
+alwaysinternational = iax:option(Flag, "alwaysinternational", "Always Dial International", "")
+alwaysinternational.optional = true
+
+context = iax:option(Value, "context", "", "")
+context.optional = true
+
+countrycode = iax:option(Value, "countrycode", "Country Code for connection", "")
+countrycode.optional = true
+
+extension = iax:option(Value, "extension", "Add as Extension", "")
+extension.optional = true
+
+host = iax:option(Value, "host", "Host name (or blank)", "")
+host.optional = true
+
+internationalprefix = iax:option(Value, "internationalprefix", "International Dial Prefix", "")
+internationalprefix.optional = true
+
+prefix = iax:option(Value, "prefix", "Dial Prefix (for external line)", "")
+prefix.optional = true
+
+secret = iax:option(Value, "secret", "Secret", "")
+secret.optional = true
+
+timeout = iax:option(Value, "timeout", "Dial Timeout (sec)", "")
+timeout.optional = true
+
+type = iax:option(ListValue, "type", "Option type", "")
+type:value("friend", "Friend (outbound/inbound)")
+type:value("user", "User (inbound - authenticate by \"from\")")
+type:value("peer", "Peer (outbound - match by host)")
+type.optional = true
+
+username = iax:option(Value, "username", "User name", "")
+username.optional = true
+
+
+return cbimap