<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'><div dir='ltr'>
hi:<br>please refer this:<br>http://www.voip-info.org/wiki/view/Asterisk+manager+Example:+PHP<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: www.voipviews.com <br><br><br><div><hr id="stopSpelling">From: gohar.ahmed@vopium.com<br>To: asterisk-users@lists.digium.com<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>
<meta http-equiv="Content-Type" content="text/html; charset=unicode">
<meta name="Generator" content="Microsoft SafeHTML"><style>
.ExternalClass p.ecxMsoNormal, .ExternalClass li.ecxMsoNormal, .ExternalClass div.ecxMsoNormal
{margin-bottom:.0001pt;font-size:12.0pt;font-family:'Times New Roman','serif';}
.ExternalClass a:link, .ExternalClass span.ecxMsoHyperlink
{color:blue;text-decoration:underline;}
.ExternalClass a:visited, .ExternalClass span.ecxMsoHyperlinkFollowed
{color:purple;text-decoration:underline;}
.ExternalClass span.ecxEmailStyle17
{font-family:'Calibri','sans-serif';color:#1F497D;}
.ExternalClass .ecxMsoChpDefault
{;}
@page WordSection1
{size:8.5in 11.0in;}
.ExternalClass div.ecxWordSection1
{page:WordSection1;}
</style><div class="ecxWordSection1"><p class="ecxMsoNormal"><span style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: rgb(31, 73, 125);">I¡¯m not a php expert, but seems your php script is incomplete/ you are sending to socket (fputs) but note receiving anything(fgets) :</span></p><p class="ecxMsoNormal"><span style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: rgb(31, 73, 125);">See <a href="http://www.voip-info.org/wiki/view/Asterisk+manager+Example:+PHP" target="_blank">this page</a> will help you.</span></p><p class="ecxMsoNormal"><span style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: rgb(31, 73, 125);"> </span></p><p class="ecxMsoNormal"><span style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: rgb(31, 73, 125);"> </span></p><div style="border-right: medium none; border-width: 1pt medium medium; border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; padding: 3pt 0in 0in;"><p class="ecxMsoNormal"><b><span style="font-size: 10pt; font-family: 'Tahoma','sans-serif';">From:</span></b><span style="font-size: 10pt; font-family: 'Tahoma','sans-serif';"> asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] <b>On Behalf Of </b>virendra bhati<br><b>Sent:</b> Wednesday, August 24, 2011 6:16 PM<br><b>To:</b> Asterisk Users Mailing List - Non-Commercial Discussion<br><b>Subject:</b> [asterisk-users] How to know how many user is connected</span></p></div><p class="ecxMsoNormal"> </p><div><p class="ecxMsoNormal">Hi List,<br clear="all"><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....</p><div><p class="ecxMsoNormal"><br>-----<br>Thanks and regards<br><br> Virendra Bhati<br>+91-9172341457<br>Software Engineer</p></div><p class="ecxMsoNormal"> </p></div></div><br>--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users</div>                                            </div></body>
</html>