Asterisk Manager API SIPPeers - Permission Denied

Posted by Matt H on Stack Overflow See other posts from Stack Overflow or by Matt H
Published on 2010-06-10T00:01:18Z Indexed on 2010/06/10 0:12 UTC
Read the original article Hit count: 565

Filed under:

I'm wanting to use the asterisk manager api to show the status of all my SIP lines in a PHP web interface.

I thought I'd start simple and use telnet to see it working.

So I created a user in /etc/asterisk/manager.conf

[portal] secret = password read = all,system,call,log,verbose,command,agent,user

Then telnet to localhost on port 5038

This is what I get.

asterisk ~ # telnet localhost 5038
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Asterisk Call Manager/1.0
Action: login
Username: portal
Secret: 8u9sdgk
Events: off

Response: Success
Message: Authentication accepted

Action: SIPPeers

Response: Error
Message: Permission denied

Why am I getting permission denied? I thought the user has basically full access? Do I need to restart asterisk to make this work? I didn't restart it. On the other hand, I was able to log in which makes me think that the manager.conf has been reloaded as the portal user didn't exist before.

Any ideas?

© Stack Overflow or respective owner

Related posts about asterisk