* luci/app/asterisk: add initial cbi definitions, needs cleanup
[project/luci.git] / applications / luci-asterisk / luasrc / model / cbi / asterisk-iax-connections.lua
1 --[[
2 LuCI - Lua Configuration Interface
3
4 Copyright 2008 Steven Barth <steven@midlink.org>
5 Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
6
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
10
11         http://www.apache.org/licenses/LICENSE-2.0
12
13 $Id$
14 ]]--
15
16 cbimap = Map("asterisk", "asterisk", "")
17
18 iax = cbimap:section(TypedSection, "iax", "IAX Connection", "")
19 iax.addremove = true
20
21 alwaysinternational = iax:option(Flag, "alwaysinternational", "Always Dial International", "")
22 alwaysinternational.optional = true
23
24 context = iax:option(Value, "context", "", "")
25 context.optional = true
26
27 countrycode = iax:option(Value, "countrycode", "Country Code for connection", "")
28 countrycode.optional = true
29
30 extension = iax:option(Value, "extension", "Add as Extension", "")
31 extension.optional = true
32
33 host = iax:option(Value, "host", "Host name (or blank)", "")
34 host.optional = true
35
36 internationalprefix = iax:option(Value, "internationalprefix", "International Dial Prefix", "")
37 internationalprefix.optional = true
38
39 prefix = iax:option(Value, "prefix", "Dial Prefix (for external line)", "")
40 prefix.optional = true
41
42 secret = iax:option(Value, "secret", "Secret", "")
43 secret.optional = true
44
45 timeout = iax:option(Value, "timeout", "Dial Timeout (sec)", "")
46 timeout.optional = true
47
48 type = iax:option(ListValue, "type", "Option type", "")
49 type:value("friend", "Friend (outbound/inbound)")
50 type:value("user", "User (inbound - authenticate by \"from\")")
51 type:value("peer", "Peer (outbound - match by host)")
52 type.optional = true
53
54 username = iax:option(Value, "username", "User name", "")
55 username.optional = true
56
57
58 return cbimap