| 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 defined. |
| 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 |
; NOTE: This file can't be used to restict the use of the '!' prefix |
| 23 |
; for running shell commands from the CLI. You can however disable the |
| 24 |
; use of the shell commands in remote consoles altogether by setting |
| 25 |
; the 'disable_remote_console_shell' parameter in asterisk.conf to 'yes'. |
| 26 |
; |
| 27 |
|
| 28 |
[general] |
| 29 |
|
| 30 |
default_perm=permit ; To leave asterisk working as normal |
| 31 |
; we should set this parameter to 'permit' |
| 32 |
; |
| 33 |
; Follows the per-users permissions configs. |
| 34 |
; |
| 35 |
; This list is read in the sequence that is being written, so |
| 36 |
; In this example the user 'eliel' is allow to run only the following |
| 37 |
; commands: |
| 38 |
; pjsip show endpoints |
| 39 |
; core set debug |
| 40 |
; core set verbose |
| 41 |
; If the user is not specified, the default_perm option will be apply to |
| 42 |
; every command. |
| 43 |
; |
| 44 |
; Notice that you can also use regular expressions to allow or deny access to a |
| 45 |
; certain command like: 'core show application D*'. In this example the user will be |
| 46 |
; allowed to view the documentation for all the applications starting with 'D'. |
| 47 |
; Another regular expression could be: 'channel originate PJSIP/[0-9]* extension *' |
| 48 |
; allowing the user to use 'channel originate' on a pjsip channel and with the 'extension' |
| 49 |
; parameter and avoiding the use of the 'application' parameter. |
| 50 |
; |
| 51 |
; We can also use the templates syntax: |
| 52 |
; [supportTemplate](!) |
| 53 |
; deny=all |
| 54 |
; permit=pjsip show ; all commands starting with 'pjsip show' will be allowed |
| 55 |
; permit=core show |
| 56 |
; |
| 57 |
; You can specify permissions for a local group instead of a user, |
| 58 |
; just put a '@' and we will know that is a group. |
| 59 |
; IMPORTANT NOTE: Users permissions overwrite group permissions. |
| 60 |
; |
| 61 |
;[@adm] |
| 62 |
;deny=all |
| 63 |
;permit=pjsip |
| 64 |
;permit=core |
| 65 |
; |
| 66 |
; |
| 67 |
;[eliel] |
| 68 |
;deny=all |
| 69 |
;permit=pjsip show endpoint |
| 70 |
;deny=pjsip show endpoints |
| 71 |
;permit=core set |
| 72 |
; |
| 73 |
; |
| 74 |
;User 'tommy' inherits from template 'supportTemplate': |
| 75 |
; deny=all |
| 76 |
; permit=pjsip show |
| 77 |
; permit=core show |
| 78 |
;[tommy](supportTemplate) |
| 79 |
;permit=core set debug |
| 80 |
;permit=dialplan show |
| 81 |
; |
| 82 |
; |
| 83 |
;[mark] |
| 84 |
;deny=all |
| 85 |
;permit=all |
| 86 |
; |
| 87 |
; |