cli_permissions.conf 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. ;
  2. ; CLI permissions configuration example for Asterisk
  3. ;
  4. ; All the users that you want to connect with asterisk using
  5. ; rasterisk, should have write/read access to the
  6. ; asterisk socket (asterisk.ctl). You could change the permissions
  7. ; of this file in 'asterisk.conf' config parameter: 'astctlpermissions' (0666)
  8. ; found on the [files] section.
  9. ;
  10. ; general options:
  11. ;
  12. ; default_perm = permit | deny
  13. ; This is the default permissions to apply for a user that
  14. ; does not has a permissions definided.
  15. ;
  16. ; user options:
  17. ; permit = <command name> | all ; allow the user to run 'command' |
  18. ; ; allow the user to run 'all' the commands
  19. ; deny = <command name> | all ; disallow the user to run 'command' |
  20. ; ; disallow the user to run 'all' commands.
  21. ;
  22. [general]
  23. default_perm=permit ; To leave asterisk working as normal
  24. ; we should set this parameter to 'permit'
  25. ;
  26. ; Follows the per-users permissions configs.
  27. ;
  28. ; This list is read in the sequence that is being written, so
  29. ; In this example the user 'eliel' is allow to run only the following
  30. ; commands:
  31. ; sip show peer
  32. ; core set debug
  33. ; core set verbose
  34. ; If the user is not specified, the default_perm option will be apply to
  35. ; every command.
  36. ;
  37. ; Notice that you can also use regular expressions to allow or deny access to a
  38. ; certain command like: 'core show application D*'. In this example the user will be
  39. ; allowed to view the documentation for all the applications starting with 'D'.
  40. ; Another regular expression could be: 'channel originate SIP/[0-9]* extension *'
  41. ; allowing the user to use 'channel originate' on a sip channel and with the 'extension'
  42. ; parameter and avoiding the use of the 'application' parameter.
  43. ;
  44. ; We can also use the templates syntax:
  45. ; [supportTemplate](!)
  46. ; deny=all
  47. ; permit=sip show ; all commands starting with 'sip show' will be allowed
  48. ; permit=core show
  49. ;
  50. ; You can specify permissions for a local group instead of a user,
  51. ; just put a '@' and we will know that is a group.
  52. ; IMPORTANT NOTE: Users permissions overwrite group permissions.
  53. ;
  54. ;[@adm]
  55. ;deny=all
  56. ;permit=sip
  57. ;permit=core
  58. ;
  59. ;
  60. ;[eliel]
  61. ;deny=all
  62. ;permit=sip show peer
  63. ;deny=sip show peers
  64. ;permit=core set
  65. ;
  66. ;
  67. ;User 'tommy' inherits from template 'supportTemplate':
  68. ; deny=all
  69. ; permit=sip show
  70. ; permit=core show
  71. ;[tommy](supportTemplate)
  72. ;permit=core set debug
  73. ;permit=dialplan show
  74. ;
  75. ;
  76. ;[mark]
  77. ;deny=all
  78. ;permit=all
  79. ;
  80. ;