asterisk-mod-res-feature.lua 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. -- Copyright 2008 Steven Barth <steven@midlink.org>
  2. -- Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
  3. -- Licensed to the public under the Apache License 2.0.
  4. cbimap = Map("asterisk", "asterisk", "")
  5. featuremap = cbimap:section(TypedSection, "featuremap", "Feature Key maps", "")
  6. featuremap.anonymous = true
  7. featuremap.addremove = true
  8. atxfer = featuremap:option(Value, "atxfer", "Attended transfer key", "")
  9. atxfer.rmempty = true
  10. blindxfer = featuremap:option(Value, "blindxfer", "Blind transfer key", "")
  11. blindxfer.rmempty = true
  12. disconnect = featuremap:option(Value, "disconnect", "Key to Disconnect call", "")
  13. disconnect.rmempty = true
  14. parkcall = featuremap:option(Value, "parkcall", "Key to Park call", "")
  15. parkcall.rmempty = true
  16. featurepark = cbimap:section(TypedSection, "featurepark", "Parking Feature", "")
  17. featurepark.anonymous = true
  18. parkenabled = featurepark:option(Flag, "parkenabled", "Enable Parking", "")
  19. adsipark = featurepark:option(Flag, "adsipark", "ADSI Park", "")
  20. adsipark.rmempty = true
  21. adsipark:depends({ parkenabled = "1" })
  22. atxfernoanswertimeout = featurepark:option(Value, "atxfernoanswertimeout", "Attended transfer timeout (sec)", "")
  23. atxfernoanswertimeout.rmempty = true
  24. atxfernoanswertimeout:depends({ parkenabled = "1" })
  25. automon = featurepark:option(Value, "automon", "One touch record key", "")
  26. automon.rmempty = true
  27. automon:depends({ parkenabled = "1" })
  28. context = featurepark:option(Value, "context", "Name of call context for parking", "")
  29. context.rmempty = true
  30. context:depends({ parkenabled = "1" })
  31. courtesytone = featurepark:option(Value, "courtesytone", "Sound file to play to parked caller", "")
  32. courtesytone.rmempty = true
  33. courtesytone:depends({ parkenabled = "1" })
  34. featuredigittimeout = featurepark:option(Value, "featuredigittimeout", "Max time (ms) between digits for feature activation", "")
  35. featuredigittimeout.rmempty = true
  36. featuredigittimeout:depends({ parkenabled = "1" })
  37. findslot = featurepark:option(ListValue, "findslot", "Method to Find Parking slot", "")
  38. findslot:value("first", "First available slot")
  39. findslot:value("next", "Next free parking space")
  40. findslot.rmempty = true
  41. findslot:depends({ parkenabled = "1" })
  42. parkedmusicclass = featurepark:option(ListValue, "parkedmusicclass", "Music on Hold class for the parked channel", "")
  43. parkedmusicclass.titleref = luci.dispatcher.build_url( "admin", "services", "asterisk" )
  44. parkedmusicclass:depends({ parkenabled = "1" })
  45. cbimap.uci:foreach( "asterisk", "moh", function(s) parkedmusicclass:value(s['.name']) end )
  46. parkedplay = featurepark:option(ListValue, "parkedplay", "Play courtesy tone to", "")
  47. parkedplay:value("caller", "Caller")
  48. parkedplay:value("parked", "Parked user")
  49. parkedplay:value("both", "Both")
  50. parkedplay.rmempty = true
  51. parkedplay:depends({ parkenabled = "1" })
  52. parkext = featurepark:option(Value, "parkext", "Extension to dial to park", "")
  53. parkext.rmempty = true
  54. parkext:depends({ parkenabled = "1" })
  55. parkingtime = featurepark:option(Value, "parkingtime", "Parking time (secs)", "")
  56. parkingtime.rmempty = true
  57. parkingtime:depends({ parkenabled = "1" })
  58. parkpos = featurepark:option(Value, "parkpos", "Range of extensions for call parking", "")
  59. parkpos.rmempty = true
  60. parkpos:depends({ parkenabled = "1" })
  61. pickupexten = featurepark:option(Value, "pickupexten", "Pickup extension", "")
  62. pickupexten.rmempty = true
  63. pickupexten:depends({ parkenabled = "1" })
  64. transferdigittimeout = featurepark:option(Value, "transferdigittimeout", "Seconds to wait between digits when transferring", "")
  65. transferdigittimeout.rmempty = true
  66. transferdigittimeout:depends({ parkenabled = "1" })
  67. xferfailsound = featurepark:option(Value, "xferfailsound", "sound when attended transfer is complete", "")
  68. xferfailsound.rmempty = true
  69. xferfailsound:depends({ parkenabled = "1" })
  70. xfersound = featurepark:option(Value, "xfersound", "Sound when attended transfer fails", "")
  71. xfersound.rmempty = true
  72. xfersound:depends({ parkenabled = "1" })
  73. return cbimap