[Asterisk-Dev] Asterisk Call Manger Won't Let Me In

Gary Ruddock garyruddock at hotmail.com
Fri May 21 05:28:48 MST 2004


I edited manager.conf

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

[manager]
secret = xxxxxxxx
read = system,call,log,verbose,command,agent,user
write = system,call,log,verbose,command,agent,user

[cron]
secret = xxxxxxxxx
read = system,call,log,verbose,command,agent,user
write = system,call,log,verbose,command,agent,user


I tried to connect via telnet

telnet 10.0.0.4 5038

I got nothing till I set enabled = yes in manager.conf

now when I telnet I get a response from asterisk call manager but then hangs 
before asking me my username password

[cron at 10.0.0. root]$ telnet 10.0.0.4 5038
Trying 10.0.0.4...
Connected to 10.0.0.4 (10.0.0.4).
Escape character is '^]'.
Asterisk Call Manager/1.0


It then just hangs...
when I kill the telnet I get in the asterisk CLI

== Connect attempt from '10.0.0.3' unable to authenticate


I also tried to run a php script

        <?php

$socket = fsockopen("10.0.0.4","5038", $errno, $errstr, $timeout);
if (!$socket)
{
  echo 'Socket fail<br>';
  echo $errorno . '<br>';
  echo $errstr . '<br>';
  echo $timeout . '<br>';
}
else
{
fputs($socket, "Action: Login\r\n");
fputs($socket, "UserName: cron\r\n");
fputs($socket, "Secret: xxxxxx\r\n\r\n");
fputs($socket, "Action: Command\r\n");
fputs($socket, "Command: status\r\n\r\n");
$wrets=fgets($socket,128);
echo $wrets;
}
?>

and it displays back

"Socket fail

Connection timed out"

Any ideas? Is it a telnet thing?

_________________________________________________________________
Express yourself with cool new emoticons http://www.msn.co.uk/specials/myemo




More information about the asterisk-dev mailing list