2 LuCI - Lua Configuration Interface
4 Copyright 2008 Steven Barth <steven@midlink.org>
5 Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
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
11 http://www.apache.org/licenses/LICENSE-2.0
16 cbimap = Map("asterisk", "asterisk", "")
18 iax = cbimap:section(TypedSection, "iax", "IAX Connection", "")
21 alwaysinternational = iax:option(Flag, "alwaysinternational", "Always Dial International", "")
22 alwaysinternational.optional = true
24 context = iax:option(ListValue, "context", "Context to use", "")
25 context.titleref = luci.dispatcher.build_url( "admin", "services", "asterisk", "dialplans" )
26 cbimap.uci:foreach( "asterisk", "dialplan", function(s) context:value(s['.name']) end )
27 cbimap.uci:foreach( "asterisk", "dialzone", function(s) context:value(s['.name']) end )
29 countrycode = iax:option(Value, "countrycode", "Country Code for connection", "")
30 countrycode.optional = true
32 extension = iax:option(Value, "extension", "Add as Extension", "")
33 extension.optional = true
35 host = iax:option(Value, "host", "Host name (or blank)", "")
38 internationalprefix = iax:option(Value, "internationalprefix", "International Dial Prefix", "")
39 internationalprefix.optional = true
41 prefix = iax:option(Value, "prefix", "Dial Prefix (for external line)", "")
42 prefix.optional = true
44 secret = iax:option(Value, "secret", "Secret", "")
45 secret.optional = true
47 timeout = iax:option(Value, "timeout", "Dial Timeout (sec)", "")
48 timeout.optional = true
50 type = iax:option(ListValue, "type", "Option type", "")
51 type:value("friend", "Friend (outbound/inbound)")
52 type:value("user", "User (inbound - authenticate by \"from\")")
53 type:value("peer", "Peer (outbound - match by host)")
56 username = iax:option(Value, "username", "User name", "")
57 username.optional = true