voicemail_settings.lua 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. -- Copyright 2009 Jo-Philipp Wich <jow@openwrt.org>
  2. -- Licensed to the public under the Apache License 2.0.
  3. require "luci.sys.zoneinfo"
  4. cbimap = Map("asterisk", "Voicemail - Common Settings")
  5. voicegeneral = cbimap:section(TypedSection, "voicegeneral",
  6. "General Voicemail Options", "Common settings for all mailboxes are " ..
  7. "defined here. Most of them are optional. The storage format should " ..
  8. "never be changed once set.")
  9. voicegeneral.anonymous = true
  10. voicegeneral.addremove = false
  11. format = voicegeneral:option(MultiValue, "Used storage formats")
  12. format.widget = "checkbox"
  13. format:value("wav49")
  14. format:value("gsm")
  15. format:value("wav")
  16. voicegeneral:option(Flag, "sendvoicemail", "Enable sending of emails")
  17. voicegeneral:option(Flag, "attach", "Attach voice messages to emails")
  18. voicegeneral:option(Value, "serveremail", "Used email sender address")
  19. voicegeneral:option(Value, "emaildateformat", "Date format used in emails").optional = true
  20. voicegeneral:option(Value, "maxlogins", "Max. failed login attempts").optional = true
  21. voicegeneral:option(Value, "maxmsg", "Max. allowed messages per mailbox").optional = true
  22. voicegeneral:option(Value, "minmessage", "Min. number of seconds for voicemail").optional = true
  23. voicegeneral:option(Value, "maxmessage", "Max. number of seconds for voicemail").optional = true
  24. voicegeneral:option(Value, "maxsilence", "Seconds of silence until stop recording").optional = true
  25. voicegeneral:option(Value, "maxgreet", "Max. number of seconds for greetings").optional = true
  26. voicegeneral:option(Value, "skipms", "Milliseconds to skip for rew./ff.").optional = true
  27. voicegeneral:option(Value, "silencethreshold", "Threshold to detect silence").optional = true
  28. voicezone = cbimap:section(TypedSection, "voicezone", "Time Zones",
  29. "Time zones define how dates and times are expressen when used in " ..
  30. "an voice mails. Refer to the asterisk manual for placeholder values.")
  31. voicezone.addremove = true
  32. voicezone.sectionhead = "Name"
  33. voicezone.template = "cbi/tblsection"
  34. tz = voicezone:option(ListValue, "zone", "Location")
  35. for _, z in ipairs(luci.sys.zoneinfo.TZ) do tz:value(z[1]) end
  36. voicezone:option(Value, "message", "Date Format")
  37. return cbimap