[Asterisk-Users] Re: astmanproxy
Christian Lauinger
clauinger at conop-systems.de
Tue Jul 5 02:22:54 MST 2005
Christian Lauinger schrieb:
> Hello,
>
> I want to recieve the output from astmanproxy in a php script.
> Is that possible ?
>
> I made a simple php script:
>
> <PRE>
> <?php
> $socket = fsockopen("127.0.0.1","1234", $errno, $errstr, $timeout);
> fputs($socket, "Action: Login\r\n");
> fputs($socket, "UserName: xxx\r\n");
> fputs($socket, "Secret: xxx\r\n\r\n");
> fputs($socket, "Action: Command\r\n");
> fputs($socket, "Command: Show Channels\r\n\r\n");
> fputs($socket, "Action: Logoff\r\n\r\n");
> while (!feof($socket)) {
> $wrets[] = fread($socket, 8192);
> }
> fclose($socket);
> var_dump($wrets);
> ?>
> </pre>
>
> Output in debugmode at the console is correct, but I cannot read the
> output in php.
> If I use port 5038 I get the output, but I want to connect with multiple
> clients, so I should't use a direct connection to manager api, right ?
>
> Why can't I read the output from astmanproxy ?
Tried and tried to get the output but no success.
Does nobody use the astmanproxy ?
Greets
Christian
More information about the asterisk-users
mailing list