Open lgaetz opened 9 years ago
I updated the license to include GNU GPL2+
On Fri, Mar 6, 2015 at 3:16 PM, Lorne Gaetz notifications@github.com wrote:
I have rewritten index.php to remove to use the FreePBX bootstrap and remove reliance on the old phpagi library. Project now works with just the single index.php file placed in the webroot of the pbx. Since you didn't include any license info, I won't proceed any further. If you own the code, suggest you license it at GNU GPL2+ so anyone can fork and use it.
";?>Advanced Recovery Systems Queue Monitor connect()) { $queue_show = $astman->Command("queue show"); $pattern = "~(._?) has \d_? calls~"; //regex tested and working with Asterisk 11 preg_match_all($pattern, $queue_show['data'], $lines); // 2D array of queues in $lines[1]}echo "";echo "
";if($astman->connect()) { $result = $astman->Command("queue show $queue"); // ECHO THE QUEUE STATUS FIRST if(!strpos($result['data'], ':')) { echo $peer['data']; } else { $data = array(); echo ""; echo "
"; } // Create two columns echo ""; foreach(explode("\n", $result['data']) as $line) { if (preg_match("/talktime/i", $line)) { echo " Queue Number Calls in queue Answered calls Abandoned calls Average hold time Average talk time "; $pieces = explode(" ", $line); echo " "; } } echo "$pieces[0] "; echo "$pieces[2] "; echo "".trim($pieces[14], "C:,")." "; echo "".trim($pieces[15], "A:,")." "; echo "".trim($pieces[9], "(s")." s "; echo "".trim($pieces[11], "s")." s "; echo ""; echo "
"; // Create two columns echo " "; echo "
"; $asm->disconnect();}?>"; // ECHO AGENTS AVAILABLE echo " Agents logged in
"; if(!strpos($result['data'], ':')) { echo $peer['data']; } else { $data = array(); echo ""; echo "
"; }echo ""; foreach(explode("\n", $result['data']) as $line) { if (preg_match("/ .*has taken \d{0,2} calls|has taken no calls yet/i", $line)) { $pieces2 = preg_split('/)\s(|\s(|)\s/i', trim(substr($line, 0, -1))); echo " Agent ID Status Last call taken (seconds ago) Calls today "; echo ' "; } } echo "' . $pieces2[0] . ' '; echo '' . $pieces2[4] . ' '; echo '' . preg_replace("/[^0-9]/","", $pieces2[6]) .' '; echo '' . preg_replace("/[^0-9]/","", $pieces2[5]) .' '; echo "";echo " ![]()
— Reply to this email directly or view it on GitHub https://github.com/Riick370/QueueStats/issues/1.
I have rewritten
index.php
to use the FreePBX bootstrap and remove reliance on the old phpagi library. Also queue list no longer parses the hard coded file name. Project now works with just the single index.php file. Since you didn't include any license info, I won't proceed any further without clarification. If you own the code, suggest you license it at GNU GPL2+ so anyone can fork and use it.