Hi List,

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

<?php

  $socket = fsockopen("127.0.0.1","5038", $errno, $errstr, 30);
  if (!$socket)
  {
     $done=0;
  } else {
  fputs($socket, "Action: Login\r\n");
  fputs($socket, "UserName: root\r\n");
  fputs($socket, "Secret: energy\r\n\r\n");
  fputs($socket, "Action: Command\r\n");
  fputs($socket, "Command: manager show connected\r\n");
  $done=1;
  }

?>

Now how to get information into this PHP file....

-----
Thanks and regards

 Virendra Bhati
+91-9172341457
Software Engineer
--
_____________________________________________________________________
-- 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

Reply via email to