* luci/app/asterisk: add initial cbi definitions, needs cleanup
[project/luci.git] / applications / luci-asterisk / luasrc / model / cbi / asterisk-dialplans.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 dialplan = cbimap:section(TypedSection, "dialplan", "Section dialplan", "")
19 dialplan.addremove = true
20 dialplan.dynamic = true
21
22 include = dialplan:option(Value, "include", "", "")
23 include.rmempty = true
24
25
26 dialplanexten = cbimap:section(TypedSection, "dialplanexten", "Dialplan Extension", "")
27 dialplanexten.anonymous = true
28 dialplanexten.addremove = true
29 dialplanexten.dynamic = true
30
31
32 dialplangeneral = cbimap:section(TypedSection, "dialplangeneral", "Dialplan General Options", "")
33 dialplangeneral.anonymous = true
34 dialplangeneral.addremove = true
35
36 allowtransfer = dialplangeneral:option(Flag, "allowtransfer", "Allow transfer", "")
37 allowtransfer.rmempty = true
38
39 canreinvite = dialplangeneral:option(ListValue, "canreinvite", "Reinvite/redirect media connections", "")
40 canreinvite:value("yes", "Yes")
41 canreinvite:value("nonat", "Yes when not behind NAT")
42 canreinvite:value("update", "Use UPDATE rather than INVITE for path redirection")
43 canreinvite:value("no", "No")
44 canreinvite.rmempty = true
45
46 clearglobalvars = dialplangeneral:option(Flag, "clearglobalvars", "Clear global vars", "")
47 clearglobalvars.rmempty = true
48
49
50 dialplangoto = cbimap:section(TypedSection, "dialplangoto", "Dialplan Goto", "")
51 dialplangoto.anonymous = true
52 dialplangoto.addremove = true
53 dialplangoto.dynamic = true
54
55
56 dialplanmeetme = cbimap:section(TypedSection, "dialplanmeetme", "Dialplan Conference", "")
57 dialplanmeetme.anonymous = true
58 dialplanmeetme.addremove = true
59 dialplanmeetme.dynamic = true
60
61
62 dialplansaytime = cbimap:section(TypedSection, "dialplansaytime", "Dialplan Time", "")
63 dialplansaytime.anonymous = true
64 dialplansaytime.addremove = true
65 dialplansaytime.dynamic = true
66
67
68 dialplanvoice = cbimap:section(TypedSection, "dialplanvoice", "Dialplan Voicemail", "")
69 dialplanvoice.anonymous = true
70 dialplanvoice.addremove = true
71 dialplanvoice.dynamic = true
72
73
74 dialzone = cbimap:section(TypedSection, "dialzone", "Dial Zones for Dialplan", "")
75 dialzone.addremove = true
76
77 addprefix = dialzone:option(Value, "addprefix", "Prefix to add matching dialplans", "")
78 addprefix.rmempty = true
79
80 international = dialzone:option(DynamicList, "international", "Match International prefix", "")
81 international.rmempty = true
82
83 localprefix = dialzone:option(Value, "localprefix", "Prefix (0) to add/remove to/from international numbers", "")
84 localprefix.rmempty = true
85
86 localzone = dialzone:option(Value, "localzone", "", "")
87 localzone.rmempty = true
88
89 match = dialzone:option(Value, "match", "Match plan", "")
90 match.rmempty = true
91
92 uses = dialzone:option(Value, "uses", "Connection to use", "")
93 uses.rmempty = true
94
95
96 return cbimap