Hi<br>You can use simple cli command<br>Manager show connected<br><br>On Thursday, August 25, 2011, James zhu <<a href="mailto:zhulizhong@live.com">zhulizhong@live.com</a>> wrote:<br>> hi:<br>> please refer this:<br>
> <a href="http://www.voip-info.org/wiki/view/Asterisk+manager+Example:+PHP">http://www.voip-info.org/wiki/view/Asterisk+manager+Example:+PHP</a><br>> and check the manager.conf, make sure the accounts in managers.conf matchs the managers displayed.<br>
><br>> Best regards,<br>> James.zhu<br>> Doing asterisk/PRI/ss7/dahdi, linux, asterisk cards, gateway(fxs/fxo/pri<->SIP).<br>> website: <a href="http://www.voipviews.com">www.voipviews.com</a><br>><br>
><br>> ________________________________<br>> From: <a href="mailto:gohar.ahmed@vopium.com">gohar.ahmed@vopium.com</a><br>> To: <a href="mailto:asterisk-users@lists.digium.com">asterisk-users@lists.digium.com</a><br>
> Date: Thu, 25 Aug 2011 11:26:53 +0500<br>> Subject: Re: [asterisk-users] How to know how many user is connected<br>><br>> I’m not a php expert, but seems your php script is incomplete/ you are sending to socket (fputs) but note receiving anything(fgets) :<br>
><br>> See this page <<a href="http://www.voip-info.org/wiki/view/Asterisk+manager+Example:+PHP">http://www.voip-info.org/wiki/view/Asterisk+manager+Example:+PHP</a>> will help you.<br>><br>> <br>><br>
> <br>><br>> From: <a href="mailto:asterisk-users-bounces@lists.digium.com">asterisk-users-bounces@lists.digium.com</a> [mailto:<a href="mailto:asterisk-users-bounces@lists.digium.com">asterisk-users-bounces@lists.digium.com</a>] On Behalf Of virendra bhati<br>
> Sent: Wednesday, August 24, 2011 6:16 PM<br>> To: Asterisk Users Mailing List - Non-Commercial Discussion<br>> Subject: [asterisk-users] How to know how many user is connected<br>><br>> <br>><br>> Hi List,<br>
><br>> I want to know how many manager is connected into asterisk server. I have made simple file but I don't have any idea how to get information back from Asterisk CLI<br>><br>> <?php<br>><br>> $socket = fsockopen("127.0.0.1","5038", $errno, $errstr, 30);<br>
> if (!$socket)<br>> {<br>> $done=0;<br>> } else {<br>> fputs($socket, "Action: Login\r\n");<br>> fputs($socket, "UserName: root\r\n");<br>> fputs($socket, "Secret: energy\r\n\r\n");<br>
> fputs($socket, "Action: Command\r\n");<br>> fputs($socket, "Command: manager show connected\r\n");<br>> $done=1;<br>> }<br>><br>> ?><br>><br>> Now how to get information into this PHP file....<br>
><br>> -----<br>> Thanks and regards<br>><br>> Virendra Bhati<br>> +91-9172341457<br>> Software Engineer<br>><br>> <br>><br>> -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com">http://www.api-digital.com</a> -- New to Asterisk? Join us for a live introductory webinar every Thurs: <a href="http://www.asterisk.org/hello">http://www.asterisk.org/hello</a> asterisk-users mailing list To UNSUBSCRIBE or update options visit: <a href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a>