Merge pull request #278 from nmav/ocserv
[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
38 parkenabled = featurepark:option(Flag, "parkenabled", "Enable Parking", "")
39
40 adsipark = featurepark:option(Flag, "adsipark", "ADSI Park", "")
41 adsipark.rmempty = true
42 adsipark:depends({ parkenabled = "1" })
43
44 atxfernoanswertimeout = featurepark:option(Value, "atxfernoanswertimeout", "Attended transfer timeout (sec)", "")
45 atxfernoanswertimeout.rmempty = true
46 atxfernoanswertimeout:depends({ parkenabled = "1" })
47
48 automon = featurepark:option(Value, "automon", "One touch record key", "")
49 automon.rmempty = true
50 automon:depends({ parkenabled = "1" })
51
52 context = featurepark:option(Value, "context", "Name of call context for parking", "")
53 context.rmempty = true
54 context:depends({ parkenabled = "1" })
55
56 courtesytone = featurepark:option(Value, "courtesytone", "Sound file to play to parked caller", "")
57 courtesytone.rmempty = true
58 courtesytone:depends({ parkenabled = "1" })
59
60 featuredigittimeout = featurepark:option(Value, "featuredigittimeout", "Max time (ms) between digits for feature activation", "")
61 featuredigittimeout.rmempty = true
62 featuredigittimeout:depends({ parkenabled = "1" })
63
64 findslot = featurepark:option(ListValue, "findslot", "Method to Find Parking slot", "")
65 findslot:value("first", "First available slot")
66 findslot:value("next", "Next free parking space")
67 findslot.rmempty = true
68 findslot:depends({ parkenabled = "1" })
69
70 parkedmusicclass = featurepark:option(ListValue, "parkedmusicclass", "Music on Hold class for the parked channel", "")
71 parkedmusicclass.titleref = luci.dispatcher.build_url( "admin", "services", "asterisk" )
72 parkedmusicclass:depends({ parkenabled = "1" })
73 cbimap.uci:foreach( "asterisk", "moh", function(s) parkedmusicclass:value(s['.name']) end )
74
75 parkedplay = featurepark:option(ListValue, "parkedplay", "Play courtesy tone to", "")
76 parkedplay:value("caller", "Caller")
77 parkedplay:value("parked", "Parked user")
78 parkedplay:value("both", "Both")
79 parkedplay.rmempty = true
80 parkedplay:depends({ parkenabled = "1" })
81
82 parkext = featurepark:option(Value, "parkext", "Extension to dial to park", "")
83 parkext.rmempty = true
84 parkext:depends({ parkenabled = "1" })
85
86 parkingtime = featurepark:option(Value, "parkingtime", "Parking time (secs)", "")
87 parkingtime.rmempty = true
88 parkingtime:depends({ parkenabled = "1" })
89
90 parkpos = featurepark:option(Value, "parkpos", "Range of extensions for call parking", "")
91 parkpos.rmempty = true
92 parkpos:depends({ parkenabled = "1" })
93
94 pickupexten = featurepark:option(Value, "pickupexten", "Pickup extension", "")
95 pickupexten.rmempty = true
96 pickupexten:depends({ parkenabled = "1" })
97
98 transferdigittimeout = featurepark:option(Value, "transferdigittimeout", "Seconds to wait bewteen digits when transferring", "")
99 transferdigittimeout.rmempty = true
100 transferdigittimeout:depends({ parkenabled = "1" })
101
102 xferfailsound = featurepark:option(Value, "xferfailsound", "sound when attended transfer is complete", "")
103 xferfailsound.rmempty = true
104 xferfailsound:depends({ parkenabled = "1" })
105
106 xfersound = featurepark:option(Value, "xfersound", "Sound when attended transfer fails", "")
107 xfersound.rmempty = true
108 xfersound:depends({ parkenabled = "1" })
109
110
111 return cbimap