Hi guys,
I’ve been spending all the day trying to connect to the Asterisk Manger but I still get this message :
ASTERISK MANAGER OUTPUT:
Asterisk Call Manager/1.1
Response: Error
Message: Authentication failed
I’m getting crazy… so here is my config :
manager.conf
[general]
enabled = yes
port = 5038
bindaddr = 127.0.0.1
[test]
secret = test
read = system,call,log,verbose,command,agent,user
write = system,call,log,verbose,command,agent,user
deny=0.0.0.0/0.0.0.0
permit=127.0.0.1/255.255.255.255
http.conf
[general]
enabled=yes
enablestatic=yes
bindaddr=0.0.0.0
What I’m doing :
$errno = “”;
$errstr = “”;
$timeout = “30”;
$socket = fsockopen(“127.0.0.1”,“5038”, $errno, $errstr, $timeout);
fputs($socket, “Action: Login\r\n”);
fputs($socket, “UserName: test\r\n”);
fputs($socket, “Secret: test\r\n\r\n”);
fputs($socket, “\r\n”);
fputs($socket, “\r\n\r\n”);
fputs($socket, “Action: ListCommands\r\n\r\n”);
fputs($socket, “Action: Logoff\r\n\r\n”);
while (!feof($socket)) {
$wrets .= fread($socket, 4096);
}
fclose($socket);
echo “ASTERISK MANAGER OUTPUT:$wrets”;
My server is located on a public adress : 91.121.72.X
It’s very important, Could you please help me ?
Thank you 1000 times !
Vincent.