added auto-pause notification to vicidial.php
git-svn-id: svn://192.168.202.10@728 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -249,7 +249,7 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
|
||||
}
|
||||
|
||||
|
||||
$stmtA = "UPDATE vicidial_campaign_stats SET dialable_leads='0', calls_today='0', answers_today='0', drops_today='0', drops_today_pct='0', drops_answers_today_pct='0', calls_hour='0', answers_hour='0', drops_hour='0', drops_hour_pct='0', calls_halfhour='0', answers_halfhour='0', drops_halfhour='0', drops_halfhour_pct='0', calls_fivemin='0', answers_fivemin='0', drops_fivemin='0', drops_fivemin_pct='0', calls_onemin='0', answers_onemin='0', drops_onemin='0', drops_onemin_pct='0', differential_onemin='0', agents_average_onemin='0', balance_trunk_fill='0', status_category_count_1='0', status_category_count_2='0', status_category_count_3='0', status_category_count_4='0', ;";
|
||||
$stmtA = "UPDATE vicidial_campaign_stats SET dialable_leads='0', calls_today='0', answers_today='0', drops_today='0', drops_today_pct='0', drops_answers_today_pct='0', calls_hour='0', answers_hour='0', drops_hour='0', drops_hour_pct='0', calls_halfhour='0', answers_halfhour='0', drops_halfhour='0', drops_halfhour_pct='0', calls_fivemin='0', answers_fivemin='0', drops_fivemin='0', drops_fivemin_pct='0', calls_onemin='0', answers_onemin='0', drops_onemin='0', drops_onemin_pct='0', differential_onemin='0', agents_average_onemin='0', balance_trunk_fill='0', status_category_count_1='0', status_category_count_2='0', status_category_count_3='0', status_category_count_4='0';";
|
||||
if($DB){print STDERR "\n|$stmtA|\n";}
|
||||
if (!$T) {
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?
|
||||
# conf_exten_check.php
|
||||
#
|
||||
# Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
|
||||
# Copyright (C) 2007 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
|
||||
#
|
||||
# This script is designed purely to send whether the meetme conference has live channels connected and which they are
|
||||
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
|
||||
@@ -34,6 +34,7 @@
|
||||
# 60619-1201 - Added variable filters to close security holes for login form
|
||||
# 61128-2255 - Added update for manual dial vicidial_live_agents
|
||||
# 70319-1542 - Added agent disabled display function
|
||||
# 71122-0205 - Added vicidial_live_agent status output
|
||||
#
|
||||
|
||||
require("dbconnect.php");
|
||||
@@ -70,8 +71,8 @@ if (!isset($format)) {$format="text";}
|
||||
if (!isset($ACTION)) {$ACTION="refresh";}
|
||||
if (!isset($client)) {$client="agc";}
|
||||
|
||||
$version = '0.0.11';
|
||||
$build = '70319-1542';
|
||||
$version = '2.0.4-12';
|
||||
$build = '71122-0205';
|
||||
$StarTtime = date("U");
|
||||
$NOW_DATE = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
@@ -155,6 +156,14 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$Acount=$row[0];
|
||||
|
||||
if ($Acount > 0)
|
||||
{
|
||||
$stmt="SELECT status from vicidial_live_agents where user='$user' and server_ip='$server_ip';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$Astatus=$row[0];
|
||||
}
|
||||
# ### find out if external table shows agent should be disabled
|
||||
# $stmt="SELECT count(*) from another_table where user='$user' and status='DEAD';";
|
||||
# if ($DB) {echo "|$stmt|\n";}
|
||||
@@ -176,7 +185,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$Astatus=$row[0];
|
||||
$Alogin=$row[0];
|
||||
$Acampaign=$row[1];
|
||||
|
||||
### grab the number of calls being placed from this server and campaign
|
||||
@@ -188,13 +197,13 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
}
|
||||
else
|
||||
{
|
||||
$Astatus='N';
|
||||
$Alogin='N';
|
||||
$RingCalls='N';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$Astatus='N';
|
||||
$Alogin='N';
|
||||
$RingCalls='N';
|
||||
|
||||
### update the vicidial_live_agents every second with a new random number so it is shown to be alive
|
||||
@@ -204,10 +213,10 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
|
||||
}
|
||||
|
||||
if ($Acount < 1) {$Astatus='DEAD_VLA';}
|
||||
if ($AexternalDEAD > 0) {$Astatus='DEAD_EXTERNAL';}
|
||||
if ($Acount < 1) {$Alogin='DEAD_VLA';}
|
||||
if ($AexternalDEAD > 0) {$Alogin='DEAD_EXTERNAL';}
|
||||
|
||||
echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Status: ' . $Astatus . '|CampCalls: ' . $RingCalls . "|\n";
|
||||
echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Logged-in: ' . $Alogin . '|CampCalls: ' . $RingCalls . '|Status: ' . $Astatus . "|\n";
|
||||
|
||||
}
|
||||
$total_conf=0;
|
||||
|
||||
+24
-8
@@ -167,10 +167,11 @@
|
||||
# 71101-1204 - Fixed bug in callback calendar with DST
|
||||
# 71116-0957 - Added campaign_weight and calls_today to the vla table insertion
|
||||
# 71120-1719 - Added XMLHTPRequest lookup of allowable campaigns for agents during login
|
||||
# 71122-0256 - Added auto-pause notification
|
||||
#
|
||||
|
||||
$version = '2.0.4-138';
|
||||
$build = '71120-1719';
|
||||
$version = '2.0.4-139';
|
||||
$build = '71122-0256';
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
@@ -1749,6 +1750,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
var DispO3wayCalLserverip = '';
|
||||
var DispO3wayCalLxfernumber = '';
|
||||
var DispO3wayCalLcamptail = '';
|
||||
var PausENotifYCounTer = 0;
|
||||
var phone_ip = '<? echo $phone_ip ?>';
|
||||
var enable_sipsak_messages = '<? echo $enable_sipsak_messages ?>';
|
||||
var allow_sipsak_messages = '<? echo $allow_sipsak_messages ?>';
|
||||
@@ -2207,27 +2209,41 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
t.setTime(UnixTimeMS);
|
||||
if ( (agentcallsstatus == '1') || (vicidial_agent_disable != 'NOT_ACTIVE') )
|
||||
{
|
||||
var Astatus_array = check_time_array[2].split("Status: ");
|
||||
var AGStatuS = Astatus_array[1];
|
||||
var Alogin_array = check_time_array[2].split("Logged-in: ");
|
||||
var AGLogiN = Alogin_array[1];
|
||||
var CamPCalLs_array = check_time_array[3].split("CampCalls: ");
|
||||
var CamPCalLs = CamPCalLs_array[1];
|
||||
if (AGStatuS != 'N')
|
||||
if (AGLogiN != 'N')
|
||||
{
|
||||
document.getElementById("AgentStatusStatus").innerHTML = AGStatuS;
|
||||
document.getElementById("AgentStatusStatus").innerHTML = AGLogiN;
|
||||
}
|
||||
if (CamPCalLs != 'N')
|
||||
{
|
||||
document.getElementById("AgentStatusCalls").innerHTML = CamPCalLs;
|
||||
}
|
||||
if ( (AGStatuS == 'DEAD_VLA') && ( (vicidial_agent_disable == 'LIVE_AGENT') || (vicidial_agent_disable == 'ALL') ) )
|
||||
if ( (AGLogiN == 'DEAD_VLA') && ( (vicidial_agent_disable == 'LIVE_AGENT') || (vicidial_agent_disable == 'ALL') ) )
|
||||
{
|
||||
showDiv('AgenTDisablEBoX');
|
||||
}
|
||||
if ( (AGStatuS == 'DEAD_EXTERNAL') && ( (vicidial_agent_disable == 'EXTERNAL') || (vicidial_agent_disable == 'ALL') ) )
|
||||
if ( (AGLogiN == 'DEAD_EXTERNAL') && ( (vicidial_agent_disable == 'EXTERNAL') || (vicidial_agent_disable == 'ALL') ) )
|
||||
{
|
||||
showDiv('AgenTDisablEBoX');
|
||||
}
|
||||
}
|
||||
var VLAStatuS_array = check_time_array[4].split("Status: ");
|
||||
var VLAStatuS = VLAStatuS_array[1];
|
||||
if ( (VLAStatuS == 'PAUSED') && (AutoDialWaiting == 1) )
|
||||
{
|
||||
if (PausENotifYCounTer > 10)
|
||||
{
|
||||
alert('Your session has been paused');
|
||||
AutoDial_ReSume_PauSe('VDADpause');
|
||||
PausENotifYCounTer=0;
|
||||
}
|
||||
else {PausENotifYCounTer++;}
|
||||
}
|
||||
else {PausENotifYCounTer=0;}
|
||||
|
||||
var check_conf_array=check_ALL_array[1].split("|");
|
||||
var live_conf_calls = check_conf_array[0];
|
||||
var conf_chan_array = check_conf_array[1].split(" ~");
|
||||
|
||||
Reference in New Issue
Block a user