Asterisk Manager account setup

You need an account to access the Asterisk Manager Interface. The accounts are stored in the Asterisk configuration file "manager.conf" or "manager_custom.conf".

Example of manager.conf:

;
; Asterisk Call Management support
;
[general]
enabled = yes
port = 5038
bindaddr = 0.0.0.0

[admin]
secret= amp111
deny=0.0.0.0/0.0.0.0
permit=127.0.0.1/255.255.255.0
read = system,call,log,verbose,command,agent,user
write = system,call,log,verbose,command,agent,user,originate

[AstTapi]
secret= AstTapi
deny=0.0.0.0/0.0.0.0
permit=192.168.0.0/255.255.255.0
read = system,call,log,verbose,command,agent,user
write = system,call,log,verbose,command,agent,user,originate

; Example: Account with minimal rights:

[AstTapiMinRights]
secret= AstTapi
deny=0.0.0.0/0.0.0.0
permit=192.168.0.0/255.255.255.0
read = call
write = call,command,originate


#include manager_custom.conf
 


Comments:  
[AstTapi] The section [AstTapi] was added to manager.conf.
"AstTapi" is the login name you can use later.
secret= AstTapi = Password
permit= 192.168.0.0/255.255.255.0 All computers with an IP address in range 192.168.0.xxx can use this account.
#include manager_custom.conf Alternatively you can add the account also to manager_custom.conf.Example
read= call Rights: Asterisk sends call information
write= call,command,originate Rights for actions
The right "command" is optionally used for: "show hints", "core show version", "sip show peers", "sip show users".

Hint: Please reload the Asterisk Manager to activate the new or modified account!


Test with telnet

Example: connection parameters Login-Action
  - Asterisk-IP: 192.168.0.20
- Asterisk-Port: 5038
Action: Login
ActionID: 1
UserName: AstTapi
Secret: AstTapi

  1. Run "telnet 192.168.0.20 5038" via command line.
    It may be necessary to install "telnet" first via [Start > Control Panel > Programs and Features > Activate Windows Features > Telnet-Client].
  2. The Asterisk Manager should answer with "Asterisk Call Manager/Version".
  3. Copy the four linesof your adapted login action into clipboard and then via context menu into telnet session.
  4. Press 2 x Enter button.
  5. The Asterisk Manger sould answer with "Response: Success, Message: Authentication accepted".

Example sequence:

telnet 192.168.0.20 5038
...
Asterisk Call Manager/1.0
Action: Login
ActionID: 1
UserName: AstTapi
Secret: AstTapi

Response: Success
Message: Authentication accepted