some changes to queue_log logging
added inbound call stats option to Realtime timeonVDAD screen git-svn-id: svn://192.168.202.10@984 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -85,6 +85,7 @@
|
||||
# 81002-1120 - Added processing for DID forwarded calls
|
||||
# 81011-1019 - Added option for press 1 to leave voicemail if wait time > hold-time-option-seconds
|
||||
# 81020-0237 - Added term_reason logging for all possible exits of the script
|
||||
# 81021-2315 - Changed and add queue_log logging
|
||||
#
|
||||
|
||||
$script = 'agi-VDAD_ALL_inbound.agi';
|
||||
@@ -1559,7 +1560,15 @@ if ($hold_recall_xfer_group !~ /NONE/)
|
||||
|
||||
if ($DBX) {print "CONNECTED TO DATABASE: $queuemetrics_server_ip|$queuemetrics_dbname\n";}
|
||||
|
||||
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$now_date_epoch',call_id='$YqueryCID',queue='$channel_group',agent='NONE',verb='TRANSFER',data1='$DROPexten',data2='$ext_context',data3='1',data4='1',serverid='$queuemetrics_log_id';";
|
||||
$place=0;
|
||||
if ($rec_countWAIT > 0) {$place = $rec_countWAIT;}
|
||||
if ($rec_countWAITrem > 0) {$place = $rec_countWAITrem;}
|
||||
$place++;
|
||||
|
||||
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$now_date_epoch',call_id='$YqueryCID',queue='$channel_group',agent='NONE',verb='EXITWITHKEY',data1='3',data2='$place',serverid='$queuemetrics_log_id';";
|
||||
$Baffected_rows = $dbhB->do($stmtB);
|
||||
|
||||
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$now_date_epoch',call_id='$YqueryCID',queue='$channel_group',agent='NONE',verb='CALLSTATUS',data1='HXFER',serverid='$queuemetrics_log_id';";
|
||||
$Baffected_rows = $dbhB->do($stmtB);
|
||||
|
||||
$dbhB->disconnect();
|
||||
@@ -1843,6 +1852,9 @@ if ($hold_time_option =~ /PRESS_VMAIL/)
|
||||
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$now_date_epoch',call_id='$YqueryCID',queue='$channel_group',agent='NONE',verb='EXITWITHKEY',data1='1',data2='$place',serverid='$queuemetrics_log_id';";
|
||||
$Baffected_rows = $dbhB->do($stmtB);
|
||||
|
||||
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$now_date_epoch',call_id='$YqueryCID',queue='$channel_group',agent='NONE',verb='CALLSTATUS',data1='QVMAIL',serverid='$queuemetrics_log_id';";
|
||||
$Baffected_rows = $dbhB->do($stmtB);
|
||||
|
||||
$exitwithkey++;
|
||||
|
||||
$dbhB->disconnect();
|
||||
@@ -1940,9 +1952,18 @@ if ($wait_in_queue < 1)
|
||||
|
||||
if ($DBX) {print "CONNECTED TO DATABASE: $queuemetrics_server_ip|$queuemetrics_dbname\n";}
|
||||
|
||||
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$now_date_epoch',call_id='$YqueryCID',queue='$channel_group',agent='NONE',verb='TRANSFER',data1='$DROPexten',data2='$ext_context',data3='$drop_seconds',data4='$drop_seconds',serverid='$queuemetrics_log_id';";
|
||||
$place=0;
|
||||
if ($rec_countWAIT > 0) {$place = $rec_countWAIT;}
|
||||
if ($rec_countWAITrem > 0) {$place = $rec_countWAITrem;}
|
||||
$place++;
|
||||
|
||||
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$now_date_epoch',call_id='$YqueryCID',queue='$channel_group',agent='NONE',verb='EXITWITHKEY',data1='2',data2='$place',serverid='$queuemetrics_log_id';";
|
||||
$Baffected_rows = $dbhB->do($stmtB);
|
||||
|
||||
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$now_date_epoch',call_id='$YqueryCID',queue='$channel_group',agent='NONE',verb='CALLSTATUS',data1='HOLDTO',serverid='$queuemetrics_log_id';";
|
||||
$Baffected_rows = $dbhB->do($stmtB);
|
||||
|
||||
|
||||
$dbhB->disconnect();
|
||||
}
|
||||
|
||||
@@ -2042,6 +2063,9 @@ if ($enable_queuemetrics_logging > 0)
|
||||
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$now_date_epoch',call_id='$YqueryCID',queue='$channel_group',agent='NONE',verb='EXITWITHTIMEOUT',data1='$place',serverid='$queuemetrics_log_id';";
|
||||
$Baffected_rows = $dbhB->do($stmtB);
|
||||
|
||||
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$now_date_epoch',call_id='$YqueryCID',queue='$channel_group',agent='NONE',verb='CALLSTATUS',data1='DROP',serverid='$queuemetrics_log_id';";
|
||||
$Baffected_rows = $dbhB->do($stmtB);
|
||||
|
||||
$dbhB->disconnect();
|
||||
}
|
||||
|
||||
|
||||
@@ -1229,6 +1229,9 @@ if ($enable_queuemetrics_logging > 0)
|
||||
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$now_date_epoch',call_id='$callerid',queue='$VDADcampaign',agent='NONE',verb='EXITWITHTIMEOUT',data1='1',serverid='$queuemetrics_log_id';";
|
||||
$Baffected_rows = $dbhB->do($stmtB);
|
||||
|
||||
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$now_date_epoch',call_id='$callerid',queue='$VDADcampaign',agent='NONE',verb='CALLSTATUS',data1='DROP',serverid='$queuemetrics_log_id';";
|
||||
$Baffected_rows = $dbhB->do($stmtB);
|
||||
|
||||
$dbhB->disconnect();
|
||||
}
|
||||
|
||||
|
||||
+280
-30
@@ -24,14 +24,20 @@
|
||||
# 70521-1038 - Fixed bug when no live campaigns are running, define $vicidial_log
|
||||
# 70619-1339 - Added Status Category tally calculations
|
||||
# 71029-1906 - Changed CLOSER-type campaign_id restriction
|
||||
# 81021-2201 - Deactivated queue_log QUEUESTART event
|
||||
# 81022-0713 - Added gathering of vicidial_inbound_groups stats(day only)
|
||||
#
|
||||
|
||||
# constants
|
||||
$DB=0; # Debug flag, set to 0 for no debug messages, On an active system this will generate lots of lines of output per minute
|
||||
$US='__';
|
||||
$MT[0]='';
|
||||
|
||||
##### table definitions:
|
||||
$vicidial_log = 'vicidial_log FORCE INDEX (call_date) ';
|
||||
# $vicidial_log = 'vicidial_log';
|
||||
$vicidial_closer_log = 'vicidial_closer_log FORCE INDEX (call_date) ';
|
||||
# $vicidial_closer_log = 'vicidial_closer_log';
|
||||
|
||||
|
||||
$i=0;
|
||||
@@ -244,36 +250,37 @@ if ($DBX) {print "CONNECTED TO DATABASE: $VARDB_server|$VARDB_database\n";}
|
||||
|
||||
#############################################
|
||||
##### START QUEUEMETRICS LOGGING LOOKUP #####
|
||||
$stmtA = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
$rec_count=0;
|
||||
while ($sthArows > $rec_count)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$enable_queuemetrics_logging = "$aryA[0]";
|
||||
$queuemetrics_server_ip = "$aryA[1]";
|
||||
$queuemetrics_dbname = "$aryA[2]";
|
||||
$queuemetrics_login = "$aryA[3]";
|
||||
$queuemetrics_pass = "$aryA[4]";
|
||||
$queuemetrics_log_id = "$aryA[5]";
|
||||
$rec_count++;
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
if ($enable_queuemetrics_logging > 0)
|
||||
{
|
||||
$dbhB = DBI->connect("DBI:mysql:$queuemetrics_dbname:$queuemetrics_server_ip:3306", "$queuemetrics_login", "$queuemetrics_pass")
|
||||
or die "Couldn't connect to database: " . DBI->errstr;
|
||||
|
||||
if ($DBX) {print "CONNECTED TO DATABASE: $queuemetrics_server_ip|$queuemetrics_dbname\n";}
|
||||
|
||||
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$secT',call_id='NONE',queue='NONE',agent='NONE',verb='QUEUESTART',serverid='$queuemetrics_log_id';";
|
||||
$Baffected_rows = $dbhB->do($stmtB);
|
||||
|
||||
$dbhB->disconnect();
|
||||
}
|
||||
# Disabled per Lorenzo at QueueMetrics because this event is apparently useless
|
||||
#$stmtA = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;";
|
||||
#$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
#$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
#$sthArows=$sthA->rows;
|
||||
#$rec_count=0;
|
||||
#while ($sthArows > $rec_count)
|
||||
# {
|
||||
# @aryA = $sthA->fetchrow_array;
|
||||
# $enable_queuemetrics_logging = "$aryA[0]";
|
||||
# $queuemetrics_server_ip = "$aryA[1]";
|
||||
# $queuemetrics_dbname = "$aryA[2]";
|
||||
# $queuemetrics_login = "$aryA[3]";
|
||||
# $queuemetrics_pass = "$aryA[4]";
|
||||
# $queuemetrics_log_id = "$aryA[5]";
|
||||
# $rec_count++;
|
||||
# }
|
||||
#$sthA->finish();
|
||||
#
|
||||
#if ($enable_queuemetrics_logging > 0)
|
||||
# {
|
||||
# $dbhB = DBI->connect("DBI:mysql:$queuemetrics_dbname:$queuemetrics_server_ip:3306", "$queuemetrics_login", "$queuemetrics_pass")
|
||||
# or die "Couldn't connect to database: " . DBI->errstr;
|
||||
#
|
||||
# if ($DBX) {print "CONNECTED TO DATABASE: $queuemetrics_server_ip|$queuemetrics_dbname\n";}
|
||||
#
|
||||
# $stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$secT',call_id='NONE',queue='NONE',agent='NONE',verb='QUEUESTART',serverid='$queuemetrics_log_id';";
|
||||
# $Baffected_rows = $dbhB->do($stmtB);
|
||||
#
|
||||
# $dbhB->disconnect();
|
||||
# }
|
||||
##### END QUEUEMETRICS LOGGING LOOKUP #####
|
||||
###########################################
|
||||
|
||||
@@ -508,6 +515,52 @@ if ($RESETdrop_count_updater>0) {$RESETdrop_count_updater=0; $drop_count_updat
|
||||
$diff_ratio_updater = ($diff_ratio_updater + $CLIdelay);
|
||||
$drop_count_updater = ($drop_count_updater + $CLIdelay);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
################################################################################
|
||||
#### BEGIN gather stats for inbound groups for the real-time display
|
||||
################################################################################
|
||||
$stmtA = "SELECT group_id from vicidial_inbound_groups where active='Y';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
$ibg_count=0;
|
||||
while ($sthArows > $ibg_count)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$group_id[$ibg_count] = $aryA[0];
|
||||
$ibg_count++;
|
||||
}
|
||||
$sthA->finish();
|
||||
if ($DB) {print "$now_date INBOUND GROUPS TO GET STATS FOR: $ibg_count|$#group_id IT: $master_loop\n";}
|
||||
|
||||
|
||||
##### LOOP THROUGH EACH INBOUND GROUP AND GATHER STATS #####
|
||||
$p=0;
|
||||
foreach(@group_id)
|
||||
{
|
||||
&calculate_drops_inbound;
|
||||
|
||||
$p++;
|
||||
}
|
||||
|
||||
################################################################################
|
||||
#### END gather stats for inbound groups for the real-time display
|
||||
################################################################################
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sleep($CLIdelay);
|
||||
|
||||
$stat_count++;
|
||||
@@ -1092,6 +1145,203 @@ if ($DBX) {print "$campaign_id[$i]|$stmtA|\n";}
|
||||
|
||||
|
||||
|
||||
sub calculate_drops_inbound
|
||||
{
|
||||
$camp_ANS_STAT_SQL='';
|
||||
# GET LIST OF HUMAN-ANSWERED STATUSES
|
||||
$stmtA = "SELECT status from vicidial_statuses where human_answered='Y';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
$rec_count=0;
|
||||
while ($sthArows > $rec_count)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$camp_ANS_STAT_SQL .= "'$aryA[0]',";
|
||||
$rec_count++;
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
$stmtA = "SELECT distinct(status) from vicidial_campaign_statuses where human_answered='Y';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
$rec_count=0;
|
||||
while ($sthArows > $rec_count)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$camp_ANS_STAT_SQL .= "'$aryA[0]',";
|
||||
$rec_count++;
|
||||
}
|
||||
$sthA->finish();
|
||||
chop($camp_ANS_STAT_SQL);
|
||||
|
||||
if ($DBX) {print " ANSWERED STATUSES: $group_id[$p]|$camp_ANS_STAT_SQL|\n";}
|
||||
|
||||
#$RESETdrop_count_updater++;
|
||||
$VCScalls_today[$p]=0;
|
||||
$VCSanswers_today[$p]=0;
|
||||
$VCSdrops_today[$p]=0;
|
||||
$VCSdrops_today_pct[$p]=0;
|
||||
$VCSdrops_answers_today_pct[$p]=0;
|
||||
|
||||
|
||||
# TODAY CALL AND DROP STATS
|
||||
$stmtA = "SELECT count(*) from $vicidial_closer_log where campaign_id='$group_id[$p]' and call_date > '$VDL_date';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
$rec_count=0;
|
||||
while ($sthArows > $rec_count)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$VCScalls_today[$p] = "$aryA[0]";
|
||||
$rec_count++;
|
||||
}
|
||||
$sthA->finish();
|
||||
if ($VCScalls_today[$p] > 0)
|
||||
{
|
||||
# TODAY ANSWERS
|
||||
$stmtA = "SELECT count(*) from $vicidial_closer_log where campaign_id='$group_id[$p]' and call_date > '$VDL_date' and status IN($camp_ANS_STAT_SQL);";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
$rec_count=0;
|
||||
while ($sthArows > $rec_count)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$VCSanswers_today[$p] = "$aryA[0]";
|
||||
$rec_count++;
|
||||
}
|
||||
$sthA->finish();
|
||||
# TODAY DROPS
|
||||
$stmtA = "SELECT count(*) from $vicidial_closer_log where campaign_id='$group_id[$p]' and call_date > '$VDL_date' and status IN('DROP','XDROP');";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
$rec_count=0;
|
||||
while ($sthArows > $rec_count)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$VCSdrops_today[$p] = "$aryA[0]";
|
||||
if ($VCSdrops_today[$p] > 0)
|
||||
{
|
||||
$VCSdrops_today_pct[$p] = ( ($VCSdrops_today[$p] / $VCScalls_today[$p]) * 100 );
|
||||
$VCSdrops_today_pct[$p] = sprintf("%.2f", $VCSdrops_today_pct[$p]);
|
||||
if ($VCSanswers_today[$p] < 1) {$VCSanswers_today[$p] = 1;}
|
||||
$VCSdrops_answers_today_pct[$p] = ( ($VCSdrops_today[$p] / $VCSanswers_today[$p]) * 100 );
|
||||
$VCSdrops_answers_today_pct[$p] = sprintf("%.2f", $VCSdrops_answers_today_pct[$p]);
|
||||
}
|
||||
$rec_count++;
|
||||
}
|
||||
$sthA->finish();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
# DETERMINE WHETHER TO GATHER STATUS CATEGORY STATISTICS
|
||||
$VSC_categories=0;
|
||||
$VSCupdateSQL='';
|
||||
$stmtA = "SELECT vsc_id from vicidial_status_categories where tovdad_display='Y' limit 4;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
$rec_count=0;
|
||||
while ($sthArows > $rec_count)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$VSC_categories[$rec_count] = "$aryA[0]";
|
||||
$rec_count++;
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
$g=0;
|
||||
foreach (@VSC_categories)
|
||||
{
|
||||
$VSCcategory=$VSC_categories[$g];
|
||||
$VSCtally='';
|
||||
$CATstatusesSQL='';
|
||||
# FIND STATUSES IN STATUS CATEGORY
|
||||
$stmtA = "SELECT status from vicidial_statuses where category='$VSCcategory';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
$rec_count=0;
|
||||
while ($sthArows > $rec_count)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$CATstatusesSQL .= "'$aryA[0]',";
|
||||
$rec_count++;
|
||||
}
|
||||
# FIND CAMPAIGN_STATUSES IN STATUS CATEGORY
|
||||
$stmtA = "SELECT status from vicidial_campaign_statuses where category='$VSCcategory';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
$rec_count=0;
|
||||
while ($sthArows > $rec_count)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$CATstatusesSQL .= "'$aryA[0]',";
|
||||
$rec_count++;
|
||||
}
|
||||
chop($CATstatusesSQL);
|
||||
if (length($CATstatusesSQL)>2)
|
||||
{
|
||||
# FIND STATUSES IN STATUS CATEGORY
|
||||
$stmtA = "SELECT count(*) from $vicidial_closer_log where campaign_id='$group_id[$p]' and call_date > '$VDL_date' and status IN($CATstatusesSQL);";
|
||||
# if ($DBX) {print "|$stmtA|\n";}
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
$rec_count=0;
|
||||
while ($sthArows > $rec_count)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$VSCtally = "$aryA[0]";
|
||||
$rec_count++;
|
||||
}
|
||||
}
|
||||
$g++;
|
||||
if ($DBX) {print " $group_id[$p]|$VSCcategory|$VSCtally|$CATstatusesSQL|\n";}
|
||||
$VSCupdateSQL .= "status_category_$g='$VSCcategory',status_category_count_$g='$VSCtally',";
|
||||
}
|
||||
while ($g < 4)
|
||||
{
|
||||
$g++;
|
||||
$VSCupdateSQL .= "status_category_$g='',status_category_count_$g='0',";
|
||||
}
|
||||
chop($VSCupdateSQL);
|
||||
|
||||
$vcs_exists=1;
|
||||
$stmtA = "SELECT count(*) from vicidial_campaign_stats where campaign_id='$group_id[$p]';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
if ($sthArows > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$vcs_exists = "$aryA[0]";
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
if ($vcs_exists < 1)
|
||||
{
|
||||
$stmtA = "INSERT INTO vicidial_campaign_stats (campaign_id) values('$group_id[$p]');";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
if ($DBX) {print "$group_id[$p]|$stmtA|\n";}
|
||||
}
|
||||
|
||||
$stmtA = "UPDATE vicidial_campaign_stats SET calls_today='$VCScalls_today[$p]',answers_today='$VCSanswers_today[$p]',drops_today='$VCSdrops_today[$p]',drops_today_pct='$VCSdrops_today_pct[$p]',drops_answers_today_pct='$VCSdrops_answers_today_pct[$p]',$VSCupdateSQL where campaign_id='$group_id[$p]';";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
if ($DBX) {print "$group_id[$p]|$stmtA|\n";}
|
||||
}
|
||||
##### END calculate_drops_inbound
|
||||
|
||||
|
||||
|
||||
|
||||
sub calculate_dial_level
|
||||
{
|
||||
$RESETdiff_ratio_updater++;
|
||||
|
||||
@@ -2621,7 +2621,7 @@ else
|
||||
$time_logged_in = ($StarTtime - $logintime);
|
||||
if ($time_logged_in > 1000000) {$time_logged_in=1;}
|
||||
|
||||
$stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='$campaign',agent='Agent/$user',verb='AGENTLOGOFF',data1='$user$agents',data2='$time_logged_in',serverid='$queuemetrics_log_id';";
|
||||
$stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='NONE',agent='Agent/$user',verb='AGENTLOGOFF',data1='$user$agents',data2='$time_logged_in',serverid='$queuemetrics_log_id';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $linkB);
|
||||
$affected_rows = mysql_affected_rows($linkB);
|
||||
|
||||
@@ -1449,7 +1449,7 @@ else
|
||||
$linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass");
|
||||
mysql_select_db("$queuemetrics_dbname", $linkB);
|
||||
|
||||
$stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='$VD_campaign',agent='Agent/$VD_login',verb='AGENTLOGIN',data1='$VD_login@agents',serverid='$queuemetrics_log_id';";
|
||||
$stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='NONE',agent='Agent/$VD_login',verb='AGENTLOGIN',data1='$VD_login@agents',serverid='$queuemetrics_log_id';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $linkB);
|
||||
$affected_rows = mysql_affected_rows($linkB);
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
# 80704-0543 - Added DEAD status for agents INCALL with no live call
|
||||
# 80822-1222 - Added option for display of customer phone number
|
||||
# 81011-0335 - Fixed remote agent display bug
|
||||
# 81022-1500 - Added inbound call stats display option
|
||||
#
|
||||
|
||||
header ("Content-type: text/html; charset=utf-8");
|
||||
@@ -83,6 +84,8 @@ if (isset($_GET["PHONEdisplay"])) {$PHONEdisplay=$_GET["PHONEdisplay"];}
|
||||
elseif (isset($_POST["PHONEdisplay"])) {$PHONEdisplay=$_POST["PHONEdisplay"];}
|
||||
if (isset($_GET["CUSTPHONEdisplay"])) {$CUSTPHONEdisplay=$_GET["CUSTPHONEdisplay"];}
|
||||
elseif (isset($_POST["CUSTPHONEdisplay"])) {$CUSTPHONEdisplay=$_POST["CUSTPHONEdisplay"];}
|
||||
if (isset($_GET["with_inbound"])) {$with_inbound=$_GET["with_inbound"];}
|
||||
elseif (isset($_POST["with_inbound"])) {$with_inbound=$_POST["with_inbound"];}
|
||||
|
||||
#############################################
|
||||
##### START SYSTEM_SETTINGS LOOKUP #####
|
||||
@@ -110,6 +113,7 @@ if (!isset($SERVdisplay)) {$SERVdisplay=1;} # 0=no, 1=yes
|
||||
if (!isset($CALLSdisplay)) {$CALLSdisplay=1;} # 0=no, 1=yes
|
||||
if (!isset($PHONEdisplay)) {$PHONEdisplay=0;} # 0=no, 1=yes
|
||||
if (!isset($CUSTPHONEdisplay)) {$CUSTPHONEdisplay=0;} # 0=no, 1=yes
|
||||
if (!isset($with_inbound)) {$with_inbound='N';} # 0=no, 1=yes
|
||||
|
||||
function get_server_load($windows = false) {
|
||||
$os = strtolower(PHP_OS);
|
||||
@@ -257,13 +261,13 @@ $F=''; $FG=''; $B=''; $BG='';
|
||||
echo "\n-->\n
|
||||
</STYLE>\n";
|
||||
|
||||
$stmt = "select count(*) from vicidial_campaigns where campaign_id='$group' and campaign_allow_inbound='Y';";
|
||||
$stmt = "select count(*) from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "' and campaign_allow_inbound='Y';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$campaign_allow_inbound = $row[0];
|
||||
|
||||
echo "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
|
||||
echo"<META HTTP-EQUIV=Refresh CONTENT=\"$RR; URL=$PHP_SELF?RR=$RR&DB=$DB&group=$group&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay\">\n";
|
||||
echo"<META HTTP-EQUIV=Refresh CONTENT=\"$RR; URL=$PHP_SELF?RR=$RR&DB=$DB&group=$group&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&with_inbound=$with_inbound\">\n";
|
||||
echo "<TITLE>VICIDIAL: Time On VDAD Campaign: $group</TITLE></HEAD><BODY BGCOLOR=WHITE>\n";
|
||||
echo "<FORM ACTION=\"$PHP_SELF\" METHOD=GET>\n";
|
||||
echo "VICIDIAL Campaign: \n";
|
||||
@@ -303,10 +307,17 @@ if ($UGdisplay > 0)
|
||||
}
|
||||
echo "</SELECT>\n";
|
||||
}
|
||||
if (!eregi('XXXX-ALL-ACTIVE-XXXX', $group))
|
||||
{
|
||||
echo " Inbound: <SELECT SIZE=1 NAME=with_inbound>\n";
|
||||
echo "<option value=\"N\">No</option>\n";
|
||||
echo "<option value=\"Y\">Yes</option>\n";
|
||||
echo "<option selected>$with_inbound</option>\n";
|
||||
}
|
||||
echo "<INPUT type=submit NAME=SUBMIT VALUE=SUBMIT><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2> \n";
|
||||
echo "<a href=\"$PHP_SELF?group=$group&RR=4000&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay\">STOP</a> | ";
|
||||
echo "<a href=\"$PHP_SELF?group=$group&RR=40&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay\">SLOW</a> | ";
|
||||
echo "<a href=\"$PHP_SELF?group=$group&RR=4&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay\">GO</a>";
|
||||
echo "<a href=\"$PHP_SELF?group=$group&RR=4000&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&with_inbound=$with_inbound\">STOP</a> | ";
|
||||
echo "<a href=\"$PHP_SELF?group=$group&RR=40&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&with_inbound=$with_inbound\">SLOW</a> | ";
|
||||
echo "<a href=\"$PHP_SELF?group=$group&RR=4&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&with_inbound=$with_inbound\">GO</a>";
|
||||
if ($group == 'XXXX-ALL-ACTIVE-XXXX')
|
||||
{
|
||||
echo " <a href=\"./admin.php?ADD=10\">MODIFY</a> | \n";
|
||||
@@ -323,11 +334,40 @@ echo "\n\n";
|
||||
if (!$group) {echo "<BR><BR>please select a campaign from the pulldown above</FORM>\n"; exit;}
|
||||
else
|
||||
{
|
||||
$stmt="select auto_dial_level,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,lead_filter_id,hopper_level,dial_method,adaptive_maximum_level,adaptive_dropped_percentage,adaptive_dl_diff_target,adaptive_intensity,available_only_ratio_tally,adaptive_latest_server_time,local_call_time,dial_timeout,dial_statuses from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';";
|
||||
if ($group=='XXXX-ALL-ACTIVE-XXXX')
|
||||
{
|
||||
$stmt="select avg(auto_dial_level),min(dial_status_a),min(dial_status_b),min(dial_status_c),min(dial_status_d),min(dial_status_e),min(lead_order),min(lead_filter_id),sum(hopper_level),min(dial_method),avg(adaptive_maximum_level),avg(adaptive_dropped_percentage),avg(adaptive_dl_diff_target),avg(adaptive_intensity),min(available_only_ratio_tally),min(adaptive_latest_server_time),min(local_call_time),avg(dial_timeout),min(dial_statuses) from vicidial_campaigns;";
|
||||
|
||||
$stmtB="select sum(dialable_leads),sum(calls_today),sum(drops_today),avg(drops_answers_today_pct),avg(differential_onemin),avg(agents_average_onemin),sum(balance_trunk_fill),sum(answers_today),min(status_category_1),sum(status_category_count_1),min(status_category_2),sum(status_category_count_2),min(status_category_3),sum(status_category_count_3),min(status_category_4),sum(status_category_count_4) from vicidial_campaign_stats;";
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($DB > 0) {echo "\n|$with_inbound|$campaign_allow_inbound|\n";}
|
||||
|
||||
if ( (ereg('Y',$with_inbound)) and ($campaign_allow_inbound > 0) )
|
||||
{
|
||||
$stmt = "select closer_campaigns from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$closer_campaigns = $row[0];
|
||||
$closer_campaigns = preg_replace("/^ | -$/","",$closer_campaigns);
|
||||
$closer_campaigns = preg_replace("/ /","','",$closer_campaigns);
|
||||
$closer_campaignsSQL = "'$closer_campaigns'";
|
||||
if ($DB > 0) {echo "\n|$closer_campaigns|$closer_campaignsSQL|$stmt|\n";}
|
||||
|
||||
$stmt="select auto_dial_level,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,lead_filter_id,hopper_level,dial_method,adaptive_maximum_level,adaptive_dropped_percentage,adaptive_dl_diff_target,adaptive_intensity,available_only_ratio_tally,adaptive_latest_server_time,local_call_time,dial_timeout,dial_statuses from vicidial_campaigns where campaign_id IN ('" . mysql_real_escape_string($group) . "',$closer_campaignsSQL);";
|
||||
|
||||
$stmtB="select dialable_leads,calls_today,drops_today,drops_answers_today_pct,differential_onemin,agents_average_onemin,balance_trunk_fill,answers_today,status_category_1,status_category_count_1,status_category_2,status_category_count_2,status_category_3,status_category_count_3,status_category_4,status_category_count_4 from vicidial_campaign_stats where campaign_id IN ('" . mysql_real_escape_string($group) . "',$closer_campaignsSQL);";
|
||||
}
|
||||
else
|
||||
{
|
||||
$stmt="select auto_dial_level,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,lead_filter_id,hopper_level,dial_method,adaptive_maximum_level,adaptive_dropped_percentage,adaptive_dl_diff_target,adaptive_intensity,available_only_ratio_tally,adaptive_latest_server_time,local_call_time,dial_timeout,dial_statuses from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';";
|
||||
|
||||
$stmtB="select dialable_leads,calls_today,drops_today,drops_answers_today_pct,differential_onemin,agents_average_onemin,balance_trunk_fill,answers_today,status_category_1,status_category_count_1,status_category_2,status_category_count_2,status_category_3,status_category_count_3,status_category_4,status_category_count_4 from vicidial_campaign_stats where campaign_id='" . mysql_real_escape_string($group) . "';";
|
||||
}
|
||||
}
|
||||
if ($DB > 0) {echo "\n|$stmt|$stmtB|\n";}
|
||||
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$DIALlev = $row[0];
|
||||
@@ -361,12 +401,7 @@ $rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$VDhop = $row[0];
|
||||
|
||||
$stmt="select dialable_leads,calls_today,drops_today,drops_answers_today_pct,differential_onemin,agents_average_onemin,balance_trunk_fill,answers_today,status_category_1,status_category_count_1,status_category_2,status_category_count_2,status_category_3,status_category_count_3,status_category_4,status_category_count_4 from vicidial_campaign_stats where campaign_id='" . mysql_real_escape_string($group) . "';";
|
||||
if ($group=='XXXX-ALL-ACTIVE-XXXX')
|
||||
{
|
||||
$stmt="select sum(dialable_leads),sum(calls_today),sum(drops_today),avg(drops_answers_today_pct),avg(differential_onemin),avg(agents_average_onemin),sum(balance_trunk_fill),sum(answers_today),min(status_category_1),sum(status_category_count_1),min(status_category_2),sum(status_category_count_2),min(status_category_3),sum(status_category_count_3),min(status_category_4),sum(status_category_count_4) from vicidial_campaign_stats;";
|
||||
}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$rslt=mysql_query($stmtB, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$DAleads = $row[0];
|
||||
$callsTODAY = $row[1];
|
||||
@@ -472,55 +507,55 @@ echo "<TD ALIGN=LEFT COLSPAN=8>";
|
||||
|
||||
if ($adastats<2)
|
||||
{
|
||||
echo "<a href=\"$PHP_SELF?group=$group&RR=$RR&DB=$DB&adastats=2&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay\"><font size=1>+ VIEW MORE SETTINGS</font></a>";
|
||||
echo "<a href=\"$PHP_SELF?group=$group&RR=$RR&DB=$DB&adastats=2&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&with_inbound=$with_inbound\"><font size=1>+ VIEW MORE SETTINGS</font></a>";
|
||||
}
|
||||
if ($UGdisplay>0)
|
||||
{
|
||||
echo " <a href=\"$PHP_SELF?group=$group&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=0&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay\"><font size=1>HIDE USER GROUP</font></a>";
|
||||
echo " <a href=\"$PHP_SELF?group=$group&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=0&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&with_inbound=$with_inbound\"><font size=1>HIDE USER GROUP</font></a>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo " <a href=\"$PHP_SELF?group=$group&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=1&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay\"><font size=1>VIEW USER GROUP</font></a>";
|
||||
echo " <a href=\"$PHP_SELF?group=$group&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=1&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&with_inbound=$with_inbound\"><font size=1>VIEW USER GROUP</font></a>";
|
||||
}
|
||||
if ($UidORname>0)
|
||||
{
|
||||
echo " <a href=\"$PHP_SELF?group=$group&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=0&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay\"><font size=1>SHOW AGENT ID</font></a>";
|
||||
echo " <a href=\"$PHP_SELF?group=$group&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=0&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&with_inbound=$with_inbound\"><font size=1>SHOW AGENT ID</font></a>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo " <a href=\"$PHP_SELF?group=$group&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=1&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay\"><font size=1>SHOW AGENT NAME</font></a>";
|
||||
echo " <a href=\"$PHP_SELF?group=$group&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=1&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&with_inbound=$with_inbound\"><font size=1>SHOW AGENT NAME</font></a>";
|
||||
}
|
||||
if ($SERVdisplay>0)
|
||||
{
|
||||
echo " <a href=\"$PHP_SELF?group=$group&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=0&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay\"><font size=1>HIDE SERVER INFO</font></a>";
|
||||
echo " <a href=\"$PHP_SELF?group=$group&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=0&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&with_inbound=$with_inbound\"><font size=1>HIDE SERVER INFO</font></a>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo " <a href=\"$PHP_SELF?group=$group&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=1&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay\"><font size=1>SHOW SERVER INFO</font></a>";
|
||||
echo " <a href=\"$PHP_SELF?group=$group&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=1&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&with_inbound=$with_inbound\"><font size=1>SHOW SERVER INFO</font></a>";
|
||||
}
|
||||
if ($CALLSdisplay>0)
|
||||
{
|
||||
echo " <a href=\"$PHP_SELF?group=$group&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=0&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay\"><font size=1>HIDE WAITING CALLS</font></a>";
|
||||
echo " <a href=\"$PHP_SELF?group=$group&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=0&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&with_inbound=$with_inbound\"><font size=1>HIDE WAITING CALLS</font></a>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo " <a href=\"$PHP_SELF?group=$group&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=1&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay\"><font size=1>SHOW WAITING CALLS</font></a>";
|
||||
echo " <a href=\"$PHP_SELF?group=$group&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=1&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&with_inbound=$with_inbound\"><font size=1>SHOW WAITING CALLS</font></a>";
|
||||
}
|
||||
if ($PHONEdisplay>0)
|
||||
{
|
||||
echo " <a href=\"$PHP_SELF?group=$group&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=0&PHONEdisplay=0&CUSTPHONEdisplay=$CUSTPHONEdisplay\"><font size=1>HIDE PHONES</font></a>";
|
||||
echo " <a href=\"$PHP_SELF?group=$group&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=0&PHONEdisplay=0&CUSTPHONEdisplay=$CUSTPHONEdisplay&with_inbound=$with_inbound\"><font size=1>HIDE PHONES</font></a>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo " <a href=\"$PHP_SELF?group=$group&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=1&PHONEdisplay=1&CUSTPHONEdisplay=$CUSTPHONEdisplay\"><font size=1>SHOW PHONES</font></a>";
|
||||
echo " <a href=\"$PHP_SELF?group=$group&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=1&PHONEdisplay=1&CUSTPHONEdisplay=$CUSTPHONEdisplay&with_inbound=$with_inbound\"><font size=1>SHOW PHONES</font></a>";
|
||||
}
|
||||
if ($CUSTPHONEdisplay>0)
|
||||
{
|
||||
echo " <a href=\"$PHP_SELF?group=$group&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=0&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=0\"><font size=1>HIDE CUSTPHONES</font></a>";
|
||||
echo " <a href=\"$PHP_SELF?group=$group&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=0&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=0&with_inbound=$with_inbound\"><font size=1>HIDE CUSTPHONES</font></a>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo " <a href=\"$PHP_SELF?group=$group&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=1&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=1\"><font size=1>SHOW CUSTPHONES</font></a>";
|
||||
echo " <a href=\"$PHP_SELF?group=$group&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=1&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=1&with_inbound=$with_inbound\"><font size=1>SHOW CUSTPHONES</font></a>";
|
||||
}
|
||||
echo "</TD>";
|
||||
echo "</TR>";
|
||||
@@ -721,11 +756,11 @@ $HTbegin = "|";
|
||||
$HDstation = "------------+";
|
||||
$HTstation = " STATION |";
|
||||
$HDphone = "------------+";
|
||||
$HTphone = " <a href=\"$PHP_SELF?group=$group&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$phoneord&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay\">PHONE</a> |";
|
||||
$HTphone = " <a href=\"$PHP_SELF?group=$group&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$phoneord&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&with_inbound=$with_inbound\">PHONE</a> |";
|
||||
$HDuser = "--------------------+";
|
||||
$HTuser = " <a href=\"$PHP_SELF?group=$group&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$userord&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay\">USER</a> |";
|
||||
$HTuser = " <a href=\"$PHP_SELF?group=$group&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$userord&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&with_inbound=$with_inbound\">USER</a> |";
|
||||
$HDusergroup = "--------------+";
|
||||
$HTusergroup = " <a href=\"$PHP_SELF?group=$group&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$groupord&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay\">USER GROUP</a> |";
|
||||
$HTusergroup = " <a href=\"$PHP_SELF?group=$group&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$groupord&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&with_inbound=$with_inbound\">USER GROUP</a> |";
|
||||
$HDsessionid = "------------------+";
|
||||
$HTsessionid = " SESSIONID |";
|
||||
$HDbarge = "-------+";
|
||||
@@ -739,9 +774,9 @@ $HTserver_ip = " SERVER IP |";
|
||||
$HDcall_server_ip = "-----------------+";
|
||||
$HTcall_server_ip = " CALL SERVER IP |";
|
||||
$HDtime = "---------+";
|
||||
$HTtime = " <a href=\"$PHP_SELF?group=$group&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$timeord&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay\">MM:SS</a> |";
|
||||
$HTtime = " <a href=\"$PHP_SELF?group=$group&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$timeord&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&with_inbound=$with_inbound\">MM:SS</a> |";
|
||||
$HDcampaign = "------------+";
|
||||
$HTcampaign = " <a href=\"$PHP_SELF?group=$group&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$campaignord&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay\">CAMPAIGN</a> |";
|
||||
$HTcampaign = " <a href=\"$PHP_SELF?group=$group&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$campaignord&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&with_inbound=$with_inbound\">CAMPAIGN</a> |";
|
||||
$HDcalls = "-------+";
|
||||
$HTcalls = " CALLS |";
|
||||
|
||||
|
||||
@@ -6631,6 +6631,9 @@ if ($ADD==2111)
|
||||
$stmt="INSERT INTO vicidial_inbound_groups (group_id,group_name,group_color,active,web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch) values('$group_id','$group_name','$group_color','$active','" . mysql_real_escape_string($web_form_address) . "','$voicemail_ext','$next_agent_call','$fronter_display','$script_id','$get_call_launch');";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
|
||||
$stmt="INSERT INTO vicidial_campaign_stats (campaign_id) values('$group_id');";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
|
||||
echo "<br><B>GROUP ADDED: $group_id</B>\n";
|
||||
|
||||
### LOG CHANGES TO LOG FILE ###
|
||||
@@ -10200,6 +10203,9 @@ if ($ADD==6111)
|
||||
$stmt="DELETE from vicidial_live_inbound_agents where group_id='$group_id';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
|
||||
$stmt="DELETE from vicidial_campaign_stats where campaign_id='$group_id';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
|
||||
### LOG CHANGES TO LOG FILE ###
|
||||
if ($WeBRooTWritablE > 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user