[Asterisk-Users] astmanproxy

Christian Lauinger clauinger at conop-systems.de
Fri Jul 1 03:41:07 MST 2005


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 ?
-- 

Regards


Christian Lauinger
ConOp Systems GbR
http://www.conop-systems.de
mailto:clauinger at conop-systems.de
Gesellschafter: Madou Kono, Christian Lauinger, Andreas Roth




More information about the asterisk-users mailing list