[Asterisk-Dev] Asterisk Call Manger Won't Let Me In
Shannon Mitchell
shannonm at merlintechs.com
Fri May 21 07:16:25 MST 2004
I'm not sure about whats going on with your php script, but telnet looks
fine. When you log in it sends you the version, then its up to you to
send the login request. Just remember to hit enter a second time after
the last line of the request.
Action: Login[Enter]
Username: cron[Enter]
Secret: xxxxxx[Enter]
[Enter]
On Fri, 2004-05-21 at 08:28, Gary Ruddock wrote:
> 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
>
> _______________________________________________
> Asterisk-Dev mailing list
> Asterisk-Dev at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-dev
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-dev
>
--
Shannon Mitchell, SCSA, SCJP shannonm at kvinet.com
Kanawha Valley Internet www.kvinet.com
300 Technology Drive Suite 202 South Charleston, WV 25309
Voice: 304 720-1807 Fax: 304 720-1830
More information about the asterisk-dev
mailing list