Merge pull request #1102 from badcrc/master

New key types for Aastra devices and Logged in agents in fifo queues
This commit is contained in:
FusionPBX
2015-08-17 09:17:30 -06:00
3 changed files with 80 additions and 1 deletions

View File

@@ -1689,6 +1689,32 @@ $text['label-blf']['de-at'] = "BLF";
$text['label-blf']['ar-eg'] = "";
$text['label-blf']['he'] = "";
$text['label-callers']['en-us'] = "Callers";
$text['label-callers']['es-cl'] = "Llaamadas";
$text['label-callers']['pt-pt'] = "";
$text['label-callers']['fr-fr'] = "";
$text['label-callers']['pt-br'] = "";
$text['label-callers']['pl'] = "";
$text['label-callers']['uk'] = "";
$text['label-callers']['sv-se'] = "";
$text['label-callers']['ro'] = "";
$text['label-callers']['de-at'] = "";
$text['label-callers']['ar-eg'] = "";
$text['label-callers']['he'] = "";
$text['label-xfer']['en-us'] = "Xfer";
$text['label-xfer']['es-cl'] = "Xfer";
$text['label-xfer']['pt-pt'] = "";
$text['label-xfer']['fr-fr'] = "";
$text['label-xfer']['pt-br'] = "";
$text['label-xfer']['pl'] = "Xfer ";
$text['label-xfer']['uk'] = "";
$text['label-xfer']['sv-se'] = "";
$text['label-xfer']['ro'] = "";
$text['label-xfer']['de-at'] = "";
$text['label-xfer']['ar-eg'] = "";
$text['label-xfer']['he'] = "";
$text['label-automata']['en-us'] = "automata";
$text['label-automata']['es-cl'] = "automata";
$text['label-automata']['pt-pt'] = "automata";

View File

@@ -880,16 +880,21 @@ require_once "resources/require.php";
if (strtolower($device_vendor) == "aastra" || strlen($device_vendor) == 0 || strlen($device_username) > 0) {
echo "<optgroup label='Aastra'>";
?>
<option value='blf' <?php if ($row['device_key_type'] == "blf") { echo $selected;$found=true; } ?>><?php echo $text['label-blf'] ?></option>
<option value='blf' <?php if ($row['device_key_type'] == "blf") { echo $selected;$found=true; } ?>><?php echo $text['label-blf'] ?></option>
<option value='blfxfer' <?php if ($row['device_key_type'] == "blfxfer") { echo $selected;$found=true; } ?>><?php echo $text['label-blf_xfer'] ?></option>
<option value='callers' <?php if ($row['device_key_type'] == "callers") { echo $selected;$found=true; } ?>><?php echo $text['label-callers'] ?></option>
<option value='dnd' <?php if ($row['device_key_type'] == "dnd") { echo $selected;$found=true; } ?>><?php echo $text['label-dnd'] ?></option>
<option value='speeddial' <?php if ($row['device_key_type'] == "speeddial") { echo $selected;$found=true; } ?>><?php echo $text['label-speed_dial'] ?></option>
<option value='xfer' <?php if ($row['device_key_type'] == "xfer") { echo $selected;$found=true; } ?>><?php echo $text['label-xfer'] ?></option>
<?php
if (strlen($device_vendor) == 0) { echo "</optgroup>"; }
}
if (strtolower($device_vendor) == "cisco" || strlen($device_vendor) == 0 || strlen($device_username) > 0) {
echo "<optgroup label='Cisco'>";
?>
<option value='blf' <?php if ($row['device_key_type'] == "blf") { echo $selected;$found=true; } ?>><?php echo $text['label-blf'] ?></option>
<option value='line' <?php if ($row['device_key_type'] == "line") { echo $selected;$found=true; } ?>><?php echo $text['label-line'] ?></option>
<option value='disabled' <?php if ($row['device_key_type'] == "disabled") { echo $selected;$found=true; } ?>><?php echo $text['label-disabled'] ?></option>
<?php

View File

@@ -188,5 +188,53 @@ else {
if ($c==0) { $c=1; } else { $c=0; }
}
echo "</table>\n";
//Current logged members
//set the alternating row styles
$c = 0;
$row_style["0"] = "row_style0";
$row_style["1"] = "row_style1";
//response div tag
echo "<div id='cmd_reponse'>\n";
echo "</div>\n";
echo "<br><br>Logged in agents<br><br>\n";
//show the content
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n";
echo "<th>".$text['label-username']."</th>\n";
echo "<th>Total inbound calls</th>\n";
echo "<th>Logged on since</th>\n";
echo "</tr>\n";
//print_r($xml->fifo->outbound->member[0]);
//print_r($xml->fifo->outbound->member[1]);
foreach ($xml->fifo->outbound->member as $row) {
$username=explode("@",$row);
$username=explode("/",$username[0]);
$username=$username[1];
$fifo_duration_formatted=$row["logged-on-since"];
$fifo_total_inbound_calls=$row["outbound-call-total-count"];
echo "<tr>\n";
echo "<td valign='top' class='".$row_style[$c]."'>$username &nbsp;</td>\n";
echo "<td valign='top' class='".$row_style[$c]."'>$fifo_total_inbound_calls &nbsp;</td>\n";
echo "<td valign='top' class='".$row_style[$c]."'>$fifo_duration_formatted &nbsp;</td>\n";
echo "</tr>\n";
if ($c==0) { $c=1; } else { $c=0; }
}
echo "</table>\n";
}
?>