[Asterisk-Users] About the using of astmanproxy

Gary Li firebug0314 at yahoo.com.cn
Sat Jul 9 00:48:57 MST 2005


Hi,I met the same problem as this mail,

http://www.mail-archive.com/asterisk-users@lists.digium.com/msg101451.html

*******************************************************

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

*******************************************************
I searched the archive, and didn't find the answer. 
Anyone knows how to solve it ?
and Christian, may you not mind me borrowing ur mail content.  
 
BTW: Do u get the answer? 
 
Thanks a lot!
 
 
 
 


Best Regards,
Gary Li


__________________________________________________
赶快注册雅虎超大容量免费邮箱?
http://cn.mail.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20050709/d240e316/attachment.htm


More information about the asterisk-users mailing list