Git Codebase - Sn0wlink IT
Firebrick 2900 Call Monitor
Code:
Download ZIP
LICENCE.md
README.md
index.php
phone.png
screenshot.png
index.php
<html> <head> <title>Calls In Progress</title> <link rel="icon" type="image/x-icon" href="phone.png"> </head> <?php /* Firebrick 2900 Connector Using Telnet */ // Config $Server_IP = '192.168.0.250'; $Port_Number = '23'; echo '<h1>Firebrick Connect</h1>'; echo 'Calls in Progress: <br />'; $Connection = fsockopen($Server_IP, $Port_Number, $errno, $errstr, 3000); fwrite($Connection, "status\n"); fwrite($Connection, "status\n"); fwrite($Connection, "show voip registrations\n"); sleep(1); $Output = fread($Connection, 300000); fclose($Connection); // $Output = file_get_contents('sample-data.txt'); $Lines = explode(PHP_EOL, $Output); foreach ($Lines as $Line) { if (strpos($Line, 'Phone') !== FALSE) { $Line = str_replace('Phone<', '', $Line); $Line = str_replace('Phone>', '', $Line); $Line = explode(" ", $Line); $Name_List .= $Line[0] . '<br />'; } } echo '<p style="color: red;"><b>'; echo $Name_List; echo '</b></p>'; header('Refresh: 3'); // EOF