* luci/app/asterisk: add initial cbi definitions, needs cleanup
[project/luci.git] / applications / luci-asterisk / luasrc / model / cbi / asterisk-mod-res-feature.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 featuremap = cbimap:section(TypedSection, "featuremap", "Feature Key maps", "")
19 featuremap.anonymous = true
20 featuremap.addremove = true
21
22 atxfer = featuremap:option(Value, "atxfer", "Attended transfer key", "")
23 atxfer.rmempty = true
24
25 blindxfer = featuremap:option(Value, "blindxfer", "Blind transfer key", "")
26 blindxfer.rmempty = true
27
28 disconnect = featuremap:option(Value, "disconnect", "Key to Disconnect call", "")
29 disconnect.rmempty = true
30
31 parkcall = featuremap:option(Value, "parkcall", "Key to Park call", "")
32 parkcall.rmempty = true
33
34
35 featurepark = cbimap:section(TypedSection, "featurepark", "Parking Feature", "")
36 featurepark.anonymous = true
37 featurepark.addremove = true
38
39 adsipark = featurepark:option(Flag, "adsipark", "ADSI Park", "")
40 adsipark.rmempty = true
41 adsipark:depends({ ["asterisk.featurepark.parkenabled"] = "true" })
42
43 atxfernoanswertimeout = featurepark:option(Value, "atxfernoanswertimeout", "Attended transfer timeout (sec)", "")
44 atxfernoanswertimeout.rmempty = true
45 atxfernoanswertimeout:depends({ ["asterisk.featurepark.parkenabled"] = "true" })
46
47 automon = featurepark:option(Value, "automon", "One touch record key", "")
48 automon.rmempty = true
49 automon:depends({ ["asterisk.featurepark.parkenabled"] = "true" })
50
51 context = featurepark:option(Value, "context", "Name of call context for parking", "")
52 context.rmempty = true
53 context:depends({ ["asterisk.featurepark.parkenabled"] = "true" })
54
55 courtesytone = featurepark:option(Value, "courtesytone", "Sound file to play to parked caller", "")
56 courtesytone.rmempty = true
57 courtesytone:depends({ ["asterisk.featurepark.parkenabled"] = "true" })
58
59 featuredigittimeout = featurepark:option(Value, "featuredigittimeout", "Max time (ms) between digits for feature activation", "")
60 featuredigittimeout.rmempty = true
61 featuredigittimeout:depends({ ["asterisk.featurepark.parkenabled"] = "true" })
62
63 findslot = featurepark:option(ListValue, "findslot", "Method to Find Parking slot", "")
64 findslot:value("first", "First available slot")
65 findslot:value("next", "Next free parking space")
66 findslot.rmempty = true
67 findslot:depends({ ["asterisk.featurepark.parkenabled"] = "true" })
68
69 parkedmusicclass = featurepark:option(Value, "parkedmusicclass", "", "")
70 parkedmusicclass.rmempty = true
71
72 parkedplay = featurepark:option(ListValue, "parkedplay", "Play courtesy tone to", "")
73 parkedplay:value("caller", "Caller")
74 parkedplay:value("parked", "Parked user")
75 parkedplay:value("both", "Both")
76 parkedplay.rmempty = true
77 parkedplay:depends({ ["asterisk.featurepark.parkenabled"] = "true" })
78
79 parkenabled = featurepark:option(Flag, "parkenabled", "Enable Parking", "")
80 parkenabled.rmempty = true
81
82 parkext = featurepark:option(Value, "parkext", "Extension to dial to park", "")
83 parkext.rmempty = true
84 parkext:depends({ ["asterisk.featurepark.parkenabled"] = "true" })
85
86 parkingtime = featurepark:option(Value, "parkingtime", "Parking time (secs)", "")
87 parkingtime.rmempty = true
88 parkingtime:depends({ ["asterisk.featurepark.parkenabled"] = "true" })
89
90 parkpos = featurepark:option(Value, "parkpos", "Range of extensions for call parking", "")
91 parkpos.rmempty = true
92 parkpos:depends({ ["asterisk.featurepark.parkenabled"] = "true" })
93
94 pickupexten = featurepark:option(Value, "pickupexten", "Pickup extension", "")
95 pickupexten.rmempty = true
96 pickupexten:depends({ ["asterisk.featurepark.parkenabled"] = "true" })
97
98 transferdigittimeout = featurepark:option(Value, "transferdigittimeout", "Seconds to wait bewteen digits when transferring", "")
99 transferdigittimeout.rmempty = true
100 transferdigittimeout:depends({ ["asterisk.featurepark.parkenabled"] = "true" })
101
102 xferfailsound = featurepark:option(Value, "xferfailsound", "sound when attended transfer is complete", "")
103 xferfailsound.rmempty = true
104 xferfailsound:depends({ ["asterisk.featurepark.parkenabled"] = "true" })
105
106 xfersound = featurepark:option(Value, "xfersound", "Sound when attended transfer fails", "")
107 xfersound.rmempty = true
108 xfersound:depends({ ["asterisk.featurepark.parkenabled"] = "true" })
109
110
111 return cbimap