Monitoring Agent Screens
Posted: Tue May 04, 2010 11:13 am
For the latest version of vicidial 2.2.0-53. We needed the ability to monitor agent screens . All our phones are SIP and we have vnc servers (UltraVNC) installed on all stations. We have them set to watch only with minimal disruption to agents. We have the web interfaces for these stations setup listening on port 5800. When you connect to that port a java applet is launched and the agent's screen in displayed.
We modified ASTtimeon_VDADall.php to include this ability alongside listen/barge.
We had to give the user "wwwrun" access to /var/run/asterisk.ctl with chmod a+rw /var/run/asterisk.ctl
In the script on the current line for the main table, we strip the channel info from the extension. Query asterisk for the IP of that phone registration and pass the IP to be used in a link to port 5800 on the IP.
It would be great to include some functionality like this in the default installation along with the existing LISTEN/BARGE abilities.
We modified ASTtimeon_VDADall.php to include this ability alongside listen/barge.
We had to give the user "wwwrun" access to /var/run/asterisk.ctl with chmod a+rw /var/run/asterisk.ctl
In the script on the current line for the main table, we strip the channel info from the extension. Query asterisk for the IP of that phone registration and pass the IP to be used in a link to port 5800 on the IP.
- Code: Select all
if ($non_latin < 1)
{
$extension = eregi_replace('Local/',"",$Aextension[$i]);
$extension = sprintf("%-14s", $extension);
while(strlen($extension)>14) {$extension = substr("$extension", 0, -1);}
}
else
{
$extension = eregi_replace('Local/',"",$Aextension[$i]);
$extension = sprintf("%-48s", $extension);
while(mb_strlen($extension, 'utf-8')>14) {$extension = mb_substr("$extension", 0, -1,'utf8');}
}
//screen monitoring patch for sip extensions {
$exten=preg_replace("/[^0-9]/","",$extension);
$ip=shell_exec("asterisk -rx 'sip show peer $exten' | grep 'Addr->IP' | awk '{print $3}'");
$extension="<a target='_blank' href='http://$ip:5800'>$extension</a>";
//}
$phone = sprintf("%-12s", $phone_split[0]);
$custphone = sprintf("%-11s", $custphone);
It would be great to include some functionality like this in the default installation along with the existing LISTEN/BARGE abilities.