1
0

asterisk.lua 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  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. asterisk = cbimap:section(TypedSection, "asterisk", "Asterisk General Options", "")
  6. asterisk.anonymous = true
  7. agidir = asterisk:option(Value, "agidir", "AGI directory", "")
  8. agidir.rmempty = true
  9. cache_record_files = asterisk:option(Flag, "cache_record_files", "Cache recorded sound files during recording", "")
  10. cache_record_files.rmempty = true
  11. debug = asterisk:option(Value, "debug", "Debug Level", "")
  12. debug.rmempty = true
  13. dontwarn = asterisk:option(Flag, "dontwarn", "Disable some warnings", "")
  14. dontwarn.rmempty = true
  15. dumpcore = asterisk:option(Flag, "dumpcore", "Dump core on crash", "")
  16. dumpcore.rmempty = true
  17. highpriority = asterisk:option(Flag, "highpriority", "High Priority", "")
  18. highpriority.rmempty = true
  19. initcrypto = asterisk:option(Flag, "initcrypto", "Initialise Crypto", "")
  20. initcrypto.rmempty = true
  21. internal_timing = asterisk:option(Flag, "internal_timing", "Use Internal Timing", "")
  22. internal_timing.rmempty = true
  23. logdir = asterisk:option(Value, "logdir", "Log directory", "")
  24. logdir.rmempty = true
  25. maxcalls = asterisk:option(Value, "maxcalls", "Maximum number of calls allowed", "")
  26. maxcalls.rmempty = true
  27. maxload = asterisk:option(Value, "maxload", "Maximum load to stop accepting new calls", "")
  28. maxload.rmempty = true
  29. nocolor = asterisk:option(Flag, "nocolor", "Disable console colors", "")
  30. nocolor.rmempty = true
  31. record_cache_dir = asterisk:option(Value, "record_cache_dir", "Sound files Cache directory", "")
  32. record_cache_dir.rmempty = true
  33. record_cache_dir:depends({ ["cache_record_files"] = "true" })
  34. rungroup = asterisk:option(Flag, "rungroup", "The Group to run as", "")
  35. rungroup.rmempty = true
  36. runuser = asterisk:option(Flag, "runuser", "The User to run as", "")
  37. runuser.rmempty = true
  38. spooldir = asterisk:option(Value, "spooldir", "Voicemail Spool directory", "")
  39. spooldir.rmempty = true
  40. systemname = asterisk:option(Value, "systemname", "Prefix UniquID with system name", "")
  41. systemname.rmempty = true
  42. transcode_via_sln = asterisk:option(Flag, "transcode_via_sln", "Build transcode paths via SLINEAR, not directly", "")
  43. transcode_via_sln.rmempty = true
  44. transmit_silence_during_record = asterisk:option(Flag, "transmit_silence_during_record", "Transmit SLINEAR silence while recording a channel", "")
  45. transmit_silence_during_record.rmempty = true
  46. verbose = asterisk:option(Value, "verbose", "Verbose Level", "")
  47. verbose.rmempty = true
  48. zone = asterisk:option(Value, "zone", "Time Zone", "")
  49. zone.rmempty = true
  50. hardwarereboot = cbimap:section(TypedSection, "hardwarereboot", "Reload Hardware Config", "")
  51. method = hardwarereboot:option(ListValue, "method", "Reboot Method", "")
  52. method:value("web", "Web URL (wget)")
  53. method:value("system", "program to run")
  54. method.rmempty = true
  55. param = hardwarereboot:option(Value, "param", "Parameter", "")
  56. param.rmempty = true
  57. iaxgeneral = cbimap:section(TypedSection, "iaxgeneral", "IAX General Options", "")
  58. iaxgeneral.anonymous = true
  59. iaxgeneral.addremove = true
  60. allow = iaxgeneral:option(MultiValue, "allow", "Allow Codecs", "")
  61. allow:value("alaw", "alaw")
  62. allow:value("gsm", "gsm")
  63. allow:value("g726", "g726")
  64. allow.rmempty = true
  65. canreinvite = iaxgeneral:option(ListValue, "canreinvite", "Reinvite/redirect media connections", "")
  66. canreinvite:value("yes", "Yes")
  67. canreinvite:value("nonat", "Yes when not behind NAT")
  68. canreinvite:value("update", "Use UPDATE rather than INVITE for path redirection")
  69. canreinvite:value("no", "No")
  70. canreinvite.rmempty = true
  71. static = iaxgeneral:option(Flag, "static", "Static", "")
  72. static.rmempty = true
  73. writeprotect = iaxgeneral:option(Flag, "writeprotect", "Write Protect", "")
  74. writeprotect.rmempty = true
  75. sipgeneral = cbimap:section(TypedSection, "sipgeneral", "Section sipgeneral", "")
  76. sipgeneral.anonymous = true
  77. sipgeneral.addremove = true
  78. allow = sipgeneral:option(MultiValue, "allow", "Allow codecs", "")
  79. allow:value("ulaw", "ulaw")
  80. allow:value("alaw", "alaw")
  81. allow:value("gsm", "gsm")
  82. allow:value("g726", "g726")
  83. allow.rmempty = true
  84. port = sipgeneral:option(Value, "port", "SIP Port", "")
  85. port.rmempty = true
  86. realm = sipgeneral:option(Value, "realm", "SIP realm", "")
  87. realm.rmempty = true
  88. moh = cbimap:section(TypedSection, "moh", "Music On Hold", "")
  89. application = moh:option(Value, "application", "Application", "")
  90. application.rmempty = true
  91. application:depends({ ["asterisk.moh.mode"] = "custom" })
  92. directory = moh:option(Value, "directory", "Directory of Music", "")
  93. directory.rmempty = true
  94. mode = moh:option(ListValue, "mode", "Option mode", "")
  95. mode:value("system", "program to run")
  96. mode:value("files", "Read files from directory")
  97. mode:value("quietmp3", "Quite MP3")
  98. mode:value("mp3", "Loud MP3")
  99. mode:value("mp3nb", "unbuffered MP3")
  100. mode:value("quietmp3nb", "Quiet Unbuffered MP3")
  101. mode:value("custom", "Run a custom application")
  102. mode.rmempty = true
  103. random = moh:option(Flag, "random", "Random Play", "")
  104. random.rmempty = true
  105. return cbimap