| 
									
										
										
										
											2008-12-01 18:52:14 +00:00
										 |  |  | ; | 
					
						
							|  |  |  | ; CLI permissions configuration example for Asterisk | 
					
						
							|  |  |  | ; | 
					
						
							|  |  |  | ; All the users that you want to connect with asterisk using | 
					
						
							|  |  |  | ; rasterisk, should have write/read access to the | 
					
						
							|  |  |  | ; asterisk socket (asterisk.ctl). You could change the permissions | 
					
						
							|  |  |  | ; of this file in 'asterisk.conf' config parameter: 'astctlpermissions' (0666) | 
					
						
							|  |  |  | ; found on the [files] section. | 
					
						
							|  |  |  | ; | 
					
						
							|  |  |  | ; general options: | 
					
						
							|  |  |  | ; | 
					
						
							|  |  |  | ; default_perm = permit | deny | 
					
						
							|  |  |  | ;                This is the default permissions to apply for a user that | 
					
						
							| 
									
										
										
										
											2021-10-30 21:04:38 -04:00
										 |  |  | ;                does not has a permissions defined. | 
					
						
							| 
									
										
										
										
											2008-12-01 18:52:14 +00:00
										 |  |  | ; | 
					
						
							|  |  |  | ; user options: | 
					
						
							|  |  |  | ; permit = <command name> | all		; allow the user to run 'command' | | 
					
						
							|  |  |  | ;					; allow the user to run 'all' the commands | 
					
						
							|  |  |  | ; deny = <command name> | all		; disallow the user to run 'command' | | 
					
						
							|  |  |  | ;					; disallow the user to run 'all' commands. | 
					
						
							|  |  |  | ; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [general] | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | default_perm=permit	; To leave asterisk working as normal | 
					
						
							| 
									
										
										
										
											2009-05-28 14:39:21 +00:00
										 |  |  | 			; we should set this parameter to 'permit' | 
					
						
							| 
									
										
										
										
											2008-12-01 18:52:14 +00:00
										 |  |  | ; | 
					
						
							|  |  |  | ; Follows the per-users permissions configs. | 
					
						
							|  |  |  | ; | 
					
						
							|  |  |  | ; This list is read in the sequence that is being written, so | 
					
						
							|  |  |  | ; In this example the user 'eliel' is allow to run only the following | 
					
						
							|  |  |  | ; commands: | 
					
						
							| 
									
										
										
										
											2022-11-28 13:05:21 -07:00
										 |  |  | ;          pjsip show endpoints | 
					
						
							| 
									
										
										
										
											2008-12-01 18:52:14 +00:00
										 |  |  | ;          core set debug | 
					
						
							|  |  |  | ;          core set verbose | 
					
						
							|  |  |  | ; If the user is not specified, the default_perm option will be apply to | 
					
						
							|  |  |  | ; every command. | 
					
						
							|  |  |  | ; | 
					
						
							|  |  |  | ; Notice that you can also use regular expressions to allow or deny access to a | 
					
						
							|  |  |  | ; certain command like: 'core show application D*'. In this example the user will be | 
					
						
							|  |  |  | ; allowed to view the documentation for all the applications starting with 'D'. | 
					
						
							| 
									
										
										
										
											2022-11-28 13:05:21 -07:00
										 |  |  | ; Another regular expression could be: 'channel originate PJSIP/[0-9]* extension *' | 
					
						
							|  |  |  | ; allowing the user to use 'channel originate' on a pjsip channel and with the 'extension' | 
					
						
							| 
									
										
										
										
											2008-12-01 18:52:14 +00:00
										 |  |  | ; parameter and avoiding the use of the 'application' parameter. | 
					
						
							|  |  |  | ; | 
					
						
							|  |  |  | ; We can also use the templates syntax: | 
					
						
							|  |  |  | ; [supportTemplate](!) | 
					
						
							|  |  |  | ; deny=all | 
					
						
							| 
									
										
										
										
											2022-11-28 13:05:21 -07:00
										 |  |  | ; permit=pjsip show       ; all commands starting with 'pjsip show' will be allowed | 
					
						
							| 
									
										
										
										
											2008-12-01 18:52:14 +00:00
										 |  |  | ; permit=core show | 
					
						
							|  |  |  | ; | 
					
						
							|  |  |  | ; You can specify permissions for a local group instead of a user, | 
					
						
							|  |  |  | ; just put a '@' and we will know that is a group. | 
					
						
							|  |  |  | ; IMPORTANT NOTE: Users permissions overwrite group permissions. | 
					
						
							|  |  |  | ; | 
					
						
							|  |  |  | ;[@adm] | 
					
						
							|  |  |  | ;deny=all | 
					
						
							| 
									
										
										
										
											2022-11-28 13:05:21 -07:00
										 |  |  | ;permit=pjsip | 
					
						
							| 
									
										
										
										
											2008-12-01 18:52:14 +00:00
										 |  |  | ;permit=core | 
					
						
							|  |  |  | ; | 
					
						
							|  |  |  | ; | 
					
						
							|  |  |  | ;[eliel] | 
					
						
							|  |  |  | ;deny=all | 
					
						
							| 
									
										
										
										
											2022-11-28 13:05:21 -07:00
										 |  |  | ;permit=pjsip show endpoint | 
					
						
							|  |  |  | ;deny=pjsip show endpoints | 
					
						
							| 
									
										
										
										
											2008-12-01 18:52:14 +00:00
										 |  |  | ;permit=core set | 
					
						
							|  |  |  | ; | 
					
						
							|  |  |  | ; | 
					
						
							|  |  |  | ;User 'tommy' inherits from template 'supportTemplate': | 
					
						
							|  |  |  | ;	deny=all | 
					
						
							| 
									
										
										
										
											2022-11-28 13:05:21 -07:00
										 |  |  | ;	permit=pjsip show | 
					
						
							| 
									
										
										
										
											2008-12-01 18:52:14 +00:00
										 |  |  | ;	permit=core show | 
					
						
							|  |  |  | ;[tommy](supportTemplate) | 
					
						
							|  |  |  | ;permit=core set debug | 
					
						
							|  |  |  | ;permit=dialplan show | 
					
						
							|  |  |  | ; | 
					
						
							|  |  |  | ; | 
					
						
							|  |  |  | ;[mark] | 
					
						
							|  |  |  | ;deny=all | 
					
						
							|  |  |  | ;permit=all | 
					
						
							|  |  |  | ; | 
					
						
							|  |  |  | ; |