Added ADDMEMBER queue_log logging option to System Settings, and added CALLERONHOLD entries to queue_log when customer is on park.

Added admin no-cache and auto-refresh of modify screens to admin interface. These are configurable in the System Settings
Added option for cross-server phone dialplan extensions in System Settings.

git-svn-id: svn://192.168.202.10@1543 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2010-11-08 06:27:05 +00:00
parent 4011580e32
commit c3ac445a1f
14 changed files with 895 additions and 106 deletions
+8
View File
@@ -379,6 +379,14 @@ OTHER CHANGES:
84. Added customer park time counter to the agent screen when customer is on
park. Also, added logging of parked calls to park_log table
85. Added ADDMEMBER queue_log logging option to System Settings, and added
CALLERONHOLD entries to queue_log when customer is on park.
86. Added admin no-cache and auto-refresh of modify screens to admin interface.
These are configurable in the System Settings
87. Added option for cross-server phone dialplan extensions in System Settings.
+53 -2
View File
@@ -57,6 +57,7 @@
# 100812-0515 - Added --cu3way-delay= flag for setting delay in the leave3way cleaning script
# 100814-2206 - Added clearing and optimization for vicidial_xfer_stats table
# 101022-1655 - Added new variables to be cleared from vicidial_cacmpaign_stats table
# 101107-2257 - Added cross-server phone dialplan extensions
#
$DB=0; # Debug flag
@@ -851,7 +852,7 @@ if ($timeclock_end_of_day_NOW > 0)
################################################################################
##### Get the settings from system_settings #####
$stmtA = "SELECT sounds_central_control_active,active_voicemail_server,custom_dialplan_entry,default_codecs FROM system_settings;";
$stmtA = "SELECT sounds_central_control_active,active_voicemail_server,custom_dialplan_entry,default_codecs,generate_cross_server_exten FROM system_settings;";
# print "$stmtA\n";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
@@ -863,6 +864,7 @@ if ($sthArows > 0)
$active_voicemail_server = $aryA[1];
$SScustom_dialplan_entry = $aryA[2];
$SSdefault_codecs = $aryA[3];
$SSgenerate_cross_server_exten = $aryA[4];
}
$sthA->finish();
if ($DBXXX > 0) {print "SYSTEM SETTINGS: $sounds_central_control_active|$active_voicemail_server|$SScustom_dialplan_entry|$SSdefault_codecs\n";}
@@ -1098,6 +1100,8 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$active_server_ips='';
$active_dialplan_numbers='';
$i=0;
while ($sthArows > $i)
{
@@ -1105,6 +1109,9 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r
$server_ip[$i] = $aryA[0];
$server_id[$i] = $aryA[1];
$conf_secret[$i] = $aryA[2];
if ($i > 0)
{$active_server_ips .= ",";}
$active_server_ips .= "'$aryA[0]'";
if( $server_ip[$i] =~ m/(\S+)\.(\S+)\.(\S+)\.(\S+)/ )
{
@@ -1357,7 +1364,8 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r
$codecs_with_template[$i] = $aryA[16];
if ( (length($SSdefault_codecs) > 2) && (length($codecs_list[$i]) < 3) )
{$codecs_list[$i] = $SSdefault_codecs;}
$active_dialplan_numbers .= "'$aryA[1]',";
$i++;
}
$sthA->finish();
@@ -1475,6 +1483,7 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r
$codecs_with_template[$i] = $aryA[16];
if ( (length($SSdefault_codecs) > 2) && (length($codecs_list[$i]) < 3) )
{$codecs_list[$i] = $SSdefault_codecs;}
$active_dialplan_numbers .= "'$aryA[1]',";
$i++;
}
@@ -1562,6 +1571,48 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r
if ( ($SSgenerate_cross_server_exten > 0) and (length($active_server_ips) > 7) )
{
##### BEGIN Generate the CROSS SERVER IAX and SIP phone entries #####
$stmtA = "SELECT extension,dialplan_number,fullname,server_ip FROM phones where server_ip NOT IN('$server_ip') and server_ip IN($active_server_ips) and dialplan_number NOT IN($active_dialplan_numbers'') and protocol IN('SIP','IAX2') and active='Y' order by dialplan_number,server_ip;";
# print "$stmtA\n";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$i=0;
while ($sthArows > $i)
{
@aryA = $sthA->fetchrow_array;
$CXextension[$i] = $aryA[0];
$CXdialplan[$i] = $aryA[1];
$CXfullname[$i] = $aryA[2];
$CXserver_ip[$i] = $aryA[3];
$i++;
}
$sthA->finish();
$i=0;
while ($sthArows > $i)
{
$CXVARremDIALstr='';
if( $CXserver_ip[$i] =~ m/(\S+)\.(\S+)\.(\S+)\.(\S+)/ )
{
$a = leading_zero($1);
$b = leading_zero($2);
$c = leading_zero($3);
$d = leading_zero($4);
$CXVARremDIALstr = "$a$S$b$S$c$S$d$S";
}
$Pext .= "; Remote Phone Entry $i: $CXextension[$i] $CXserver_ip[$i] $CXfullname[$i]\n";
$Pext .= "exten => $CXdialplan[$i],1,Goto(default,$CXVARremDIALstr$CXdialplan[$i],1)\n";
$i++;
}
##### END Generate the CROSS SERVER IAX and SIP phone entries #####
}
##### BEGIN Generate the Call Menu entries #####
$stmtA = "SELECT menu_id,menu_name,menu_prompt,menu_timeout,menu_timeout_prompt,menu_invalid_prompt,menu_repeat,menu_time_check,call_time_id,track_in_vdac,custom_dialplan_entry,tracking_group FROM vicidial_call_menu order by menu_id;";
# print "$stmtA\n";
+35 -9
View File
@@ -245,21 +245,22 @@ $event_string='LOGGED INTO MYSQL SERVER ON 1 CONNECTION|';
#############################################
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmtA = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,outbound_autodial_active,queuemetrics_loginout FROM system_settings;";
$stmtA = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,outbound_autodial_active,queuemetrics_loginout,queuemetrics_addmember_enabled FROM system_settings;";
$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;
$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];
$outbound_autodial_active = $aryA[6];
$queuemetrics_loginout = $aryA[7];
$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];
$outbound_autodial_active = $aryA[6];
$queuemetrics_loginout = $aryA[7];
$queuemetrics_addmember_enabled = $aryA[8];
}
$sthA->finish();
##### END QUEUEMETRICS LOGGING LOOKUP #####
@@ -1941,6 +1942,7 @@ while($one_day_interval > 0)
{
@aryB = $sthB->fetchrow_array;
$time_logged_in = $aryB[0];
$RAWtime_logged_in = $aryB[0];
$phone_logged_in = $aryB[1];
}
$sthB->finish();
@@ -1952,6 +1954,30 @@ while($one_day_interval > 0)
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$LOGOFFtime',call_id='NONE',queue='NONE',agent='Agent/$VALOuser[$logrun]',verb='$QM_LOGOFF',serverid='$queuemetrics_log_id',data1='$phone_logged_in',data2='$time_logged_in';";
$Baffected_rows = $dbhB->do($stmtB);
if ($queuemetrics_addmember_enabled > 0)
{
$stmtB = "SELECT distinct queue FROM queue_log where time_id >= $RAWtime_logged_in and agent='Agent/$VALOuser[$logrun]' and verb IN('ADDMEMBER','ADDMEMBER2') order by time_id desc;";
$sthB = $dbhB->prepare($stmtB) or die "preparing: ",$dbhB->errstr;
$sthB->execute or die "executing: $stmtB ", $dbhB->errstr;
$sthBrows=$sthB->rows;
$rec_count=0;
while ($sthBrows > $rec_count)
{
@aryB = $sthB->fetchrow_array;
$AM_queue[$rec_count] = $aryB[0];
$rec_count++;
}
$sthB->finish();
$rec_count=0;
while ($sthBrows > $rec_count)
{
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$LOGOFFtime',call_id='NONE',queue='$AM_queue[$rec_count]',agent='Agent/$VALOuser[$logrun]',verb='REMOVEMEMBER',data1='$phone_logged_in',serverid='$queuemetrics_log_id';";
$Baffected_rows = $dbhB->do($stmtB);
$rec_count++;
}
}
$dbhB->disconnect();
}
+54 -8
View File
@@ -35,6 +35,7 @@
# 100318-2307 - Added ra_user field input to vla table
# 100524-1542 - Fixed live call detection bug on multi-server systems
# 100622-0917 - Added start_call_url function for remote agents, this launches a separate child script
# 101108-0032 - Added ADDMEMBER queue_log code
#
### begin parsing run-time options ###
@@ -207,20 +208,21 @@ while($one_day_interval > 0)
#############################################
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmtA = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,queuemetrics_loginout FROM system_settings;";
$stmtA = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,queuemetrics_loginout,queuemetrics_addmember_enabled FROM system_settings;";
$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;
$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];
$queuemetrics_loginout = $aryA[6];
$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];
$queuemetrics_loginout = $aryA[6];
$queuemetrics_addmember_enabled = $aryA[7];
}
$sthA->finish();
##### END QUEUEMETRICS LOGGING LOOKUP #####
@@ -633,6 +635,12 @@ while($one_day_interval > 0)
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$secX',call_id='NONE',queue='$DBremote_campaign[$h]',agent='Agent/$DBremote_user[$h]',verb='UNPAUSE',serverid='$queuemetrics_log_id';";
$Baffected_rows = $dbhB->do($stmtB);
if ($queuemetrics_addmember_enabled > 0)
{
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$secX',call_id='NONE',queue='$DBremote_campaign[$h]',agent='Agent/$DBremote_user[$h]',verb='ADDMEMBER2',data1='$DBremote_user[$h]$agents',serverid='$queuemetrics_log_id';";
$Baffected_rows = $dbhB->do($stmtB);
}
$dbhB->disconnect();
}
}
@@ -643,6 +651,11 @@ while($one_day_interval > 0)
$TEMPagentINGROUPS='';
if (length($DBremote_closer[$h]) > 1)
{
if ( ($enable_queuemetrics_logging > 0) && ($queuemetrics_addmember_enabled > 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;
}
$TEMPagentINGROUPS = $DBremote_closer[$h];
$TEMPagentINGROUPS =~ s/-$//gi;
@TEMPingroups = split(/ /,$TEMPagentINGROUPS);
@@ -684,10 +697,19 @@ while($one_day_interval > 0)
$stmtA = "INSERT IGNORE INTO vicidial_live_inbound_agents SET user='$DBremote_user[$h]', group_id='$TEMPingroups[$s]', group_weight='$TEMPagentWEIGHT', calls_today='$TEMPagentCALLS', last_call_time='$SQLdate', last_call_finish='$SQLdate' ON DUPLICATE KEY UPDATE group_weight='$TEMPagentWEIGHT';";
$affected_rows = $dbhA->do($stmtA);
if ( ($DBX) && ($affected_rows > 0) ) {print STDERR "$DBremote_user[$h] VLIA UPDATE: $affected_rows|$TEMPingroups[$s]|$TEMPagentWEIGHT\n";}
if ( ($enable_queuemetrics_logging > 0) && ($queuemetrics_addmember_enabled > 0) )
{
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$secX',call_id='NONE',queue='$TEMPingroups[$s]',agent='Agent/$DBremote_user[$h]',verb='ADDMEMBER2',data1='$DBremote_user[$h]$agents',serverid='$queuemetrics_log_id';";
$Baffected_rows = $dbhB->do($stmtB);
}
}
}
$s++;
}
if ( ($enable_queuemetrics_logging > 0) && ($queuemetrics_addmember_enabled > 0) )
{$dbhB->disconnect();}
}
}
$h++;
@@ -788,6 +810,30 @@ while($one_day_interval > 0)
$time_logged_in = ($secX - $logintime);
if ($time_logged_in > 1000000) {$time_logged_in=1;}
if ($queuemetrics_addmember_enabled > 0)
{
$stmtB = "SELECT distinct queue FROM queue_log where time_id >= $logintime and agent='Agent/$VD_user[$z]' and verb IN('ADDMEMBER','ADDMEMBER2') order by time_id desc;";
$sthB = $dbhB->prepare($stmtB) or die "preparing: ",$dbhB->errstr;
$sthB->execute or die "executing: $stmtB ", $dbhB->errstr;
$sthBrows=$sthB->rows;
$rec_count=0;
while ($sthBrows > $rec_count)
{
@aryB = $sthB->fetchrow_array;
$AM_queue[$rec_count] = $aryB[0];
$rec_count++;
}
$sthB->finish();
$rec_count=0;
while ($sthBrows > $rec_count)
{
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$secX',call_id='NONE',queue='$AM_queue[$rec_count]',agent='Agent/$VD_user[$z]',verb='REMOVEMEMBER',data1='$phone_logged_in',serverid='$queuemetrics_log_id';";
$Baffected_rows = $dbhB->do($stmtB);
$rec_count++;
}
}
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$secX',call_id='NONE',queue='$VD_campaign_id[$z]',agent='Agent/$VD_user[$z]',verb='$QM_LOGOFF',data1='$phone_logged_in',data2='$time_logged_in',serverid='$queuemetrics_log_id';";
$Baffected_rows = $dbhB->do($stmtB);
+12 -2
View File
@@ -195,6 +195,10 @@ agent actions - used by vicidial.php, vdc_db_query.php and AST_VDremote_agents.p
UNPAUSEALL
UNPAUSE
PAUSEREASON
ADDMEMBER2
REMOVEMEMBER
CALLERONHOLD
CALLEROFFHOLD
call actions before going to agent - used by agi-VDAD_ALL_inbound/outbound scripts
ENTERQUEUE(url|callerid)
@@ -221,9 +225,9 @@ not used in vicidial -
data1: call termination codes, DID, IVR context
data1: call termination codes, DID, IVR context, hold reason, on-hold length in seconds, addmember2 extension
data2: callerID or number called(sometimes prepended by DNIS) [3101-9015556189]
data2: callerID or number called(sometimes prepended by DNIS) [3101-9015556189], off-hold reason
NOTE: the queuemetrics_eq_prepend field allows you to specify what
vicidial_list field you would like to prefend to the phone number on
ENTERQUEUE/CALLOUTBOUND events
@@ -237,6 +241,12 @@ serverid: number of the server the call came from [for VICIDIAL use the database
### For documentation ONLY, these fields should already exist:
On the vicidial database side of things, we will add the following columns to the system_settings table:
enable_queuemetrics_logging ENUM('0','1') default '0',
@@ -1349,7 +1349,11 @@ first_login_trigger ENUM('Y','N') default 'N',
hosted_settings VARCHAR(100) default '',
default_phone_registration_password VARCHAR(20) default 'test',
default_phone_login_password VARCHAR(20) default 'test',
default_server_password VARCHAR(20) default 'test'
default_server_password VARCHAR(20) default 'test',
admin_modify_refresh SMALLINT(5) UNSIGNED default '0',
nocache_admin ENUM('0','1') default '1',
generate_cross_server_exten ENUM('0','1') default '0',
queuemetrics_addmember_enabled ENUM('0','1') default '0'
);
CREATE TABLE vicidial_campaigns_list_mix (
@@ -2386,7 +2390,7 @@ ALTER TABLE vicidial_agent_log_archive MODIFY agent_log_id INT(9) UNSIGNED NOT N
CREATE TABLE vicidial_carrier_log_archive LIKE vicidial_carrier_log;
UPDATE system_settings SET db_schema_version='1250',db_schema_update_date=NOW();
UPDATE system_settings SET db_schema_version='1251',db_schema_update_date=NOW();
GRANT RELOAD ON *.* TO cron@'%';
GRANT RELOAD ON *.* TO cron@localhost;
+7
View File
@@ -589,3 +589,10 @@ CREATE INDEX lead_id_park on park_log (lead_id);
CREATE INDEX uniqueid_park on park_log (uniqueid);
UPDATE system_settings SET db_schema_version='1250',db_schema_update_date=NOW();
ALTER TABLE system_settings ADD admin_modify_refresh SMALLINT(5) UNSIGNED default '0';
ALTER TABLE system_settings ADD nocache_admin ENUM('0','1') default '1';
ALTER TABLE system_settings ADD generate_cross_server_exten ENUM('0','1') default '0';
ALTER TABLE system_settings ADD queuemetrics_addmember_enabled ENUM('0','1') default '0';
UPDATE system_settings SET db_schema_version='1251',db_schema_update_date=NOW();
@@ -463,6 +463,15 @@ This field allows you to customize the name of the recording when Campaign recor
The default is FULLDATE_AGENT and would look like this 20051020-103108_6666. Another example is CAMPAIGN_TINYDATE_CUSTPHONE which would look like this||
Real-Time Agent Time Stats||
Setting this to anything but DISABLED will enable the gathering of agent time stats for today for this campaign, that are viewable through the Real-Time report. CALLS are the average calls handled per agent, WAIT is the average agent wait time, CUST is the average customer talk time, ACW is the average After Call Work time, PAUSE is the average pause time. Default is DISABLED||
Add A Dial Status to Call||
Admin Modify Auto-Refresh||
This is the refresh interval in seconds of the modify screens in this admin interface. Setting this to 0 will disable it, setting it below 5 will mostly make the modify screens unusable because they will refresh too quickly to change fields. This option is useful in situations where more than one manager is controlling settings on an active campaign or in-group so that the settings are refreshed frequently. Default is 0||
Admin No-Cache||
Setting this to 1 will set all admin pages to web browser no-cache, so every screen has to be reloaded every time it is viewed, even if clicking back on the browser. Default is 0 for disabled||
Generate Cross-Server Phone Extensions||
This option if set to 1 will generate dialplan entries for every phone on a multi-server system. Default is 0 for inactive||
QueueMetrics Addmember Enabled||
This option if set to 1 will generate ADDMEMBER2 and REMOVEMEMBER entries in queue_log. Default is 0 for disabled||
AST_LISTS_campaign_stats.php
+218 -9
View File
@@ -102,12 +102,13 @@
# 100813-0833 - Added preset_name variable and logging
# 101004-1345 - Added Ivr park functions
# 101024-1638 - Added park_log logging for parked calls
# 101107-2331 - Added CALLERONHOLD/CALLEROFFHOLD queue_log entries
#
$version = '2.4-52';
$build = '101024-1638';
$version = '2.4-53';
$build = '101107-2331';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=97;
$mysql_log_count=115;
$one_mysql_log=0;
require("dbconnect.php");
@@ -842,7 +843,60 @@ if ($ACTION=="RedirectToPark")
$stmt = "INSERT INTO park_log SET uniqueid='$uniqueid',status='PARKED',channel='$channel',channel_group='$campaign',server_ip='$server_ip',parked_time='$NOW_TIME',parked_sec=0,extension='$CalLCID',user='$user',lead_id='$lead_id';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02XXX',$user,$server_ip,$session_name,$one_mysql_log);}
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02098',$user,$server_ip,$session_name,$one_mysql_log);}
#############################################
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02099',$user,$server_ip,$session_name,$one_mysql_log);}
if ($format=='debug') {echo "\n<!-- $rowx[0]|$stmt -->";}
$qm_conf_ct = mysql_num_rows($rslt);
$i=0;
while ($i < $qm_conf_ct)
{
$row=mysql_fetch_row($rslt);
$enable_queuemetrics_logging = $row[0];
$queuemetrics_server_ip = $row[1];
$queuemetrics_dbname = $row[2];
$queuemetrics_login = $row[3];
$queuemetrics_pass = $row[4];
$queuemetrics_log_id = $row[5];
$i++;
}
##### END QUEUEMETRICS LOGGING LOOKUP #####
###########################################
if ($enable_queuemetrics_logging > 0)
{
$linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass");
mysql_select_db("$queuemetrics_dbname", $linkB);
$time_id=0;
$stmt="SELECT time_id,queue,agent from queue_log where call_id='$CalLCID' and verb='CONNECT' order by time_id desc limit 1;";
$rslt=mysql_query($stmt, $linkB);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$linkB,$mel,$stmt,'02100',$user,$server_ip,$session_name,$one_mysql_log);}
$VAC_eq_ct = mysql_num_rows($rslt);
if ($VAC_eq_ct > 0)
{
$row=mysql_fetch_row($rslt);
$time_id = $row[0];
$queue = $row[1];
$agent = $row[2];
}
$StarTtime = date("U");
if ($time_id > 100000)
{$secondS = ($StarTtime - $time_id);}
if ($VAC_eq_ct > 0)
{
$stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='$CalLCID',queue='$queue',agent='Agent/$user',verb='CALLERONHOLD',data1='PARK',serverid='$queuemetrics_log_id';";
$rslt=mysql_query($stmt, $linkB);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$linkB,$mel,$stmt,'02101',$user,$server_ip,$session_name,$one_mysql_log);}
$affected_rows = mysql_affected_rows($linkB);
if ($format=='debug') {echo "\n<!-- $affected_rows|$stmt -->";}
}
}
# $fp = fopen ("./vicidial_debug.txt", "a");
# fwrite ($fp, "$NOW_TIME|MS_LOG_0|$queryCID|$stmt|\n");
@@ -880,7 +934,7 @@ if ($ACTION=="RedirectFromPark")
$parked_sec=0;
$stmt = "SELECT UNIX_TIMESTAMP(parked_time) FROM park_log where uniqueid='$uniqueid' and server_ip='$server_ip' and extension='$CalLCID' and (parked_sec < 1 or grab_time is NULL) order by parked_time desc limit 1;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02XXX',$user,$server_ip,$session_name,$one_mysql_log);}
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02102',$user,$server_ip,$session_name,$one_mysql_log);}
$VAC_pl_ct = mysql_num_rows($rslt);
if ($VAC_pl_ct > 0)
{
@@ -890,7 +944,59 @@ if ($ACTION=="RedirectFromPark")
$stmt = "UPDATE park_log SET status='GRABBED',grab_time='$NOW_TIME',parked_sec='$parked_sec' where uniqueid='$uniqueid' and server_ip='$server_ip' and extension='$CalLCID' order by parked_time desc limit 1;";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02XXX',$user,$server_ip,$session_name,$one_mysql_log);}
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02103',$user,$server_ip,$session_name,$one_mysql_log);}
#############################################
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02104',$user,$server_ip,$session_name,$one_mysql_log);}
if ($format=='debug') {echo "\n<!-- $rowx[0]|$stmt -->";}
$qm_conf_ct = mysql_num_rows($rslt);
$i=0;
while ($i < $qm_conf_ct)
{
$row=mysql_fetch_row($rslt);
$enable_queuemetrics_logging = $row[0];
$queuemetrics_server_ip = $row[1];
$queuemetrics_dbname = $row[2];
$queuemetrics_login = $row[3];
$queuemetrics_pass = $row[4];
$queuemetrics_log_id = $row[5];
$i++;
}
##### END QUEUEMETRICS LOGGING LOOKUP #####
###########################################
if ($enable_queuemetrics_logging > 0)
{
$linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass");
mysql_select_db("$queuemetrics_dbname", $linkB);
$time_id=0;
$stmt="SELECT time_id,queue,agent from queue_log where call_id='$CalLCID' and verb='CONNECT' order by time_id desc limit 1;";
$rslt=mysql_query($stmt, $linkB);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$linkB,$mel,$stmt,'02105',$user,$server_ip,$session_name,$one_mysql_log);}
$VAC_eq_ct = mysql_num_rows($rslt);
if ($VAC_eq_ct > 0)
{
$row=mysql_fetch_row($rslt);
$time_id = $row[0];
$queue = $row[1];
$agent = $row[2];
}
$StarTtime = date("U");
if ($time_id > 100000)
{$secondS = ($StarTtime - $time_id);}
if ($VAC_eq_ct > 0)
{
$stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='$CalLCID',queue='$queue',agent='Agent/$user',verb='CALLEROFFHOLD',data1='$parked_sec',data2='PARK',serverid='$queuemetrics_log_id';";
$rslt=mysql_query($stmt, $linkB);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$linkB,$mel,$stmt,'02106',$user,$server_ip,$session_name,$one_mysql_log);}
$affected_rows = mysql_affected_rows($linkB);
if ($format=='debug') {echo "\n<!-- $affected_rows|$stmt -->";}
}
}
}
}
@@ -932,8 +1038,59 @@ if ($ACTION=="RedirectToParkIVR")
$stmt = "INSERT INTO park_log SET uniqueid='$uniqueid',status='IVRPARKED',channel='$channel',channel_group='$campaign',server_ip='$server_ip',parked_time='$NOW_TIME',parked_sec=0,extension='$CalLCID',user='$user',lead_id='$lead_id';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02XXX',$user,$server_ip,$session_name,$one_mysql_log);}
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02107',$user,$server_ip,$session_name,$one_mysql_log);}
#############################################
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02108',$user,$server_ip,$session_name,$one_mysql_log);}
if ($format=='debug') {echo "\n<!-- $rowx[0]|$stmt -->";}
$qm_conf_ct = mysql_num_rows($rslt);
$i=0;
while ($i < $qm_conf_ct)
{
$row=mysql_fetch_row($rslt);
$enable_queuemetrics_logging = $row[0];
$queuemetrics_server_ip = $row[1];
$queuemetrics_dbname = $row[2];
$queuemetrics_login = $row[3];
$queuemetrics_pass = $row[4];
$queuemetrics_log_id = $row[5];
$i++;
}
##### END QUEUEMETRICS LOGGING LOOKUP #####
###########################################
if ($enable_queuemetrics_logging > 0)
{
$linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass");
mysql_select_db("$queuemetrics_dbname", $linkB);
$time_id=0;
$stmt="SELECT time_id,queue,agent from queue_log where call_id='$CalLCID' and verb='CONNECT' order by time_id desc limit 1;";
$rslt=mysql_query($stmt, $linkB);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$linkB,$mel,$stmt,'02109',$user,$server_ip,$session_name,$one_mysql_log);}
$VAC_eq_ct = mysql_num_rows($rslt);
if ($VAC_eq_ct > 0)
{
$row=mysql_fetch_row($rslt);
$time_id = $row[0];
$queue = $row[1];
$agent = $row[2];
}
$StarTtime = date("U");
if ($time_id > 100000)
{$secondS = ($StarTtime - $time_id);}
if ($VAC_eq_ct > 0)
{
$stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='$CalLCID',queue='$queue',agent='Agent/$user',verb='CALLERONHOLD',data1='IVRPARK',serverid='$queuemetrics_log_id';";
$rslt=mysql_query($stmt, $linkB);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$linkB,$mel,$stmt,'02110',$user,$server_ip,$session_name,$one_mysql_log);}
$affected_rows = mysql_affected_rows($linkB);
if ($format=='debug') {echo "\n<!-- $affected_rows|$stmt -->";}
}
}
# $fp = fopen ("./vicidial_debug.txt", "a");
# fwrite ($fp, "$NOW_TIME|MS_LOG_0|$queryCID|$stmt|\n");
# fclose($fp);
@@ -975,7 +1132,7 @@ if ($ACTION=="RedirectFromParkIVR")
$parked_sec=0;
$stmt = "SELECT UNIX_TIMESTAMP(parked_time) FROM park_log where uniqueid='$uniqueid' and server_ip='$server_ip' and extension='$CalLCID' and (parked_sec < 1 or grab_time is NULL) order by parked_time desc limit 1;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02XXX',$user,$server_ip,$session_name,$one_mysql_log);}
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02111',$user,$server_ip,$session_name,$one_mysql_log);}
$VAC_pl_ct = mysql_num_rows($rslt);
if ($VAC_pl_ct > 0)
{
@@ -985,7 +1142,59 @@ if ($ACTION=="RedirectFromParkIVR")
$stmt = "UPDATE park_log SET status='GRABBEDIVR',grab_time='$NOW_TIME',parked_sec='$parked_sec' where uniqueid='$uniqueid' and server_ip='$server_ip' and extension='$CalLCID' order by parked_time desc limit 1;";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02XXX',$user,$server_ip,$session_name,$one_mysql_log);}
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02112',$user,$server_ip,$session_name,$one_mysql_log);}
#############################################
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02113',$user,$server_ip,$session_name,$one_mysql_log);}
if ($format=='debug') {echo "\n<!-- $rowx[0]|$stmt -->";}
$qm_conf_ct = mysql_num_rows($rslt);
$i=0;
while ($i < $qm_conf_ct)
{
$row=mysql_fetch_row($rslt);
$enable_queuemetrics_logging = $row[0];
$queuemetrics_server_ip = $row[1];
$queuemetrics_dbname = $row[2];
$queuemetrics_login = $row[3];
$queuemetrics_pass = $row[4];
$queuemetrics_log_id = $row[5];
$i++;
}
##### END QUEUEMETRICS LOGGING LOOKUP #####
###########################################
if ($enable_queuemetrics_logging > 0)
{
$linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass");
mysql_select_db("$queuemetrics_dbname", $linkB);
$time_id=0;
$stmt="SELECT time_id,queue,agent from queue_log where call_id='$CalLCID' and verb='CONNECT' order by time_id desc limit 1;";
$rslt=mysql_query($stmt, $linkB);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$linkB,$mel,$stmt,'02114',$user,$server_ip,$session_name,$one_mysql_log);}
$VAC_eq_ct = mysql_num_rows($rslt);
if ($VAC_eq_ct > 0)
{
$row=mysql_fetch_row($rslt);
$time_id = $row[0];
$queue = $row[1];
$agent = $row[2];
}
$StarTtime = date("U");
if ($time_id > 100000)
{$secondS = ($StarTtime - $time_id);}
if ($VAC_eq_ct > 0)
{
$stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='$CalLCID',queue='$queue',agent='Agent/$user',verb='CALLEROFFHOLD',data1='$parked_sec',data2='IVRPARK',serverid='$queuemetrics_log_id';";
$rslt=mysql_query($stmt, $linkB);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$linkB,$mel,$stmt,'02115',$user,$server_ip,$session_name,$one_mysql_log);}
$affected_rows = mysql_affected_rows($linkB);
if ($format=='debug') {echo "\n<!-- $affected_rows|$stmt -->";}
}
}
}
}
+83 -15
View File
@@ -260,12 +260,13 @@
# 100927-1618 - Added ability to use custom fields in web form and dispo_call_url
# 101001-1451 - Added full name display to Call Log functionality
# 101022-1243 - Fixed missing variables from start and dispo call urls
# 101108-0115 - Added ADDMEMBER option for queue_log
#
$version = '2.4-166';
$build = '101022-1243';
$version = '2.4-167';
$build = '101108-0115';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=345;
$mysql_log_count=352;
$one_mysql_log=0;
require("dbconnect.php");
@@ -449,6 +450,8 @@ if (isset($_GET["date"])) {$date=$_GET["date"];}
elseif (isset($_POST["date"])) {$date=$_POST["date"];}
if (isset($_GET["custom_field_names"])) {$FORMcustom_field_names=$_GET["custom_field_names"];}
elseif (isset($_POST["custom_field_names"])) {$FORMcustom_field_names=$_POST["custom_field_names"];}
if (isset($_GET["qm_phone"])) {$qm_phone=$_GET["qm_phone"];}
elseif (isset($_POST["qm_phone"])) {$qm_phone=$_POST["qm_phone"];}
header ("Content-type: text/html; charset=utf-8");
@@ -863,6 +866,34 @@ if ($ACTION == 'regCLOSER')
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00012',$user,$server_ip,$session_name,$one_mysql_log);}
#############################################
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,queuemetrics_addmember_enabled FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00349',$user,$server_ip,$session_name,$one_mysql_log);}
if ($format=='debug') {echo "\n<!-- $rowx[0]|$stmt -->";}
$qm_conf_ct = mysql_num_rows($rslt);
$i=0;
while ($i < $qm_conf_ct)
{
$row=mysql_fetch_row($rslt);
$enable_queuemetrics_logging = $row[0];
$queuemetrics_server_ip = $row[1];
$queuemetrics_dbname = $row[2];
$queuemetrics_login = $row[3];
$queuemetrics_pass = $row[4];
$queuemetrics_log_id = $row[5];
$queuemetrics_addmember_enabled = $row[6];
$i++;
}
##### END QUEUEMETRICS LOGGING LOOKUP #####
###########################################
if ( ($enable_queuemetrics_logging > 0) and ($queuemetrics_addmember_enabled > 0) )
{
$linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass");
mysql_select_db("$queuemetrics_dbname", $linkB);
}
$in_groups_pre = preg_replace('/-$/','',$closer_choice);
$in_groups = explode(" ",$in_groups_pre);
$in_groups_ct = count($in_groups);
@@ -891,6 +922,16 @@ if ($ACTION == 'regCLOSER')
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00014',$user,$server_ip,$session_name,$one_mysql_log);}
if ( ($enable_queuemetrics_logging > 0) and ($queuemetrics_addmember_enabled > 0) )
{
$stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='$in_groups[$k]',agent='Agent/$user',verb='ADDMEMBER2',data1='$qm_phone',serverid='$queuemetrics_log_id';";
$rslt=mysql_query($stmt, $linkB);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$linkB,$mel,$stmt,'0350',$user,$server_ip,$session_name,$one_mysql_log);}
$affected_rows = mysql_affected_rows($linkB);
if ($format=='debug') {echo "\n<!-- $affected_rows|$stmt -->";}
}
}
$k++;
}
@@ -5156,7 +5197,7 @@ if ($ACTION == 'userLOGout')
{
#############################################
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,allow_sipsak_messages,queuemetrics_loginout FROM system_settings;";
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,allow_sipsak_messages,queuemetrics_loginout,queuemetrics_addmember_enabled FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00138',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
@@ -5164,14 +5205,15 @@ if ($ACTION == 'userLOGout')
if ($qm_conf_ct > 0)
{
$row=mysql_fetch_row($rslt);
$enable_queuemetrics_logging = $row[0];
$queuemetrics_server_ip = $row[1];
$queuemetrics_dbname = $row[2];
$queuemetrics_login = $row[3];
$queuemetrics_pass = $row[4];
$queuemetrics_log_id = $row[5];
$allow_sipsak_messages = $row[6];
$queuemetrics_loginout = $row[7];
$enable_queuemetrics_logging = $row[0];
$queuemetrics_server_ip = $row[1];
$queuemetrics_dbname = $row[2];
$queuemetrics_login = $row[3];
$queuemetrics_pass = $row[4];
$queuemetrics_log_id = $row[5];
$allow_sipsak_messages = $row[6];
$queuemetrics_loginout = $row[7];
$queuemetrics_addmember_enabled = $row[8];
}
##### END QUEUEMETRICS LOGGING LOOKUP #####
###########################################
@@ -5220,6 +5262,32 @@ if ($ACTION == 'userLOGout')
if ($mel > 0) {mysql_error_logging($NOW_TIME,$linkB,$mel,$stmt,'00140',$user,$server_ip,$session_name,$one_mysql_log);}
$affected_rows = mysql_affected_rows($linkB);
if ($queuemetrics_addmember_enabled > 0)
{
$stmt = "SELECT distinct queue FROM queue_log where time_id >= $logintime and agent='Agent/$user' and verb IN('ADDMEMBER','ADDMEMBER2') order by time_id desc;";
$rslt=mysql_query($stmt, $linkB);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$linkB,$mel,$stmt,'00351',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
echo "$stmt\n";
$amq_conf_ct = mysql_num_rows($rslt);
$i=0;
while ($i < $amq_conf_ct)
{
$row=mysql_fetch_row($rslt);
$AMqueue[$i] = $row[0];
$i++;
}
$i=0;
while ($i < $amq_conf_ct)
{
$stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='$AMqueue[$i]',agent='Agent/$user',verb='REMOVEMEMBER',data1='$loginphone',serverid='$queuemetrics_log_id';";
$rslt=mysql_query($stmt, $linkB);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$linkB,$mel,$stmt,'00352',$user,$server_ip,$session_name,$one_mysql_log);}
$affected_rows = mysql_affected_rows($linkB);
$i++;
}
}
mysql_close($linkB);
}
}
@@ -6242,7 +6310,7 @@ if ($ACTION == 'updateDISPO')
$stmt = "SELECT did_id,extension from vicidial_did_log where uniqueid='$uniqueid' order by call_date desc limit 1;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00346',$user,$server_ip,$session_name,$one_mysql_log);}
$VDIDL_ct = mysql_num_rows($rslt);
if ($VDIDL_ct > 0)
{
@@ -6253,7 +6321,7 @@ if ($ACTION == 'updateDISPO')
$stmt = "SELECT did_pattern,did_description from vicidial_inbound_dids where did_id='$DID_id' limit 1;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00347',$user,$server_ip,$session_name,$one_mysql_log);}
$VDIDL_ct = mysql_num_rows($rslt);
if ($VDIDL_ct > 0)
{
@@ -6272,7 +6340,7 @@ if ($ACTION == 'updateDISPO')
$stmt = "SELECT campaign_id,closecallid,xfercallid from vicidial_closer_log where uniqueid='$uniqueid' and user='$user' order by call_date desc limit 1;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00348',$user,$server_ip,$session_name,$one_mysql_log);}
$VDCL_mvac_ct = mysql_num_rows($rslt);
if ($VDCL_mvac_ct > 0)
{
+27 -14
View File
@@ -320,12 +320,13 @@
# 101008-0356 - Added manual_preview_dial and two new variables for recording filenames
# 101012-1656 - Added scroll command at dispo submission to for scrolling to the top of the screen
# 101024-1639 - Added parked call counter
# 101108-0110 - Added ADDMEMBER option for queue_log
#
$version = '2.4-297';
$build = '101024-1639';
$version = '2.4-298';
$build = '101108-0110';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=68;
$mysql_log_count=69;
$one_mysql_log=0;
require("dbconnect.php");
@@ -2123,7 +2124,7 @@ else
#############################################
##### START SYSTEM_SETTINGS LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,vicidial_agent_disable,allow_sipsak_messages,queuemetrics_loginout FROM system_settings;";
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,vicidial_agent_disable,allow_sipsak_messages,queuemetrics_loginout,queuemetrics_addmember_enabled FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01040',$VD_login,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
@@ -2131,15 +2132,16 @@ else
if ($qm_conf_ct > 0)
{
$row=mysql_fetch_row($rslt);
$enable_queuemetrics_logging = $row[0];
$queuemetrics_server_ip = $row[1];
$queuemetrics_dbname = $row[2];
$queuemetrics_login = $row[3];
$queuemetrics_pass = $row[4];
$queuemetrics_log_id = $row[5];
$vicidial_agent_disable = $row[6];
$allow_sipsak_messages = $row[7];
$queuemetrics_loginout = $row[8];
$enable_queuemetrics_logging = $row[0];
$queuemetrics_server_ip = $row[1];
$queuemetrics_dbname = $row[2];
$queuemetrics_login = $row[3];
$queuemetrics_pass = $row[4];
$queuemetrics_log_id = $row[5];
$vicidial_agent_disable = $row[6];
$allow_sipsak_messages = $row[7];
$queuemetrics_loginout = $row[8];
$queuemetrics_addmember_enabled = $row[9];
}
##### END QUEUEMETRICS LOGGING LOOKUP #####
###########################################
@@ -2295,6 +2297,16 @@ else
$affected_rows = mysql_affected_rows($linkB);
echo "<!-- queue_log PAUSE entry added: $VD_login|$affected_rows -->\n";
if ($queuemetrics_addmember_enabled > 0)
{
$stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='$VD_campaign',agent='Agent/$VD_login',verb='ADDMEMBER2',data1='$QM_PHONE',serverid='$queuemetrics_log_id';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $linkB);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$linkB,$mel,$stmt,'01069',$VD_login,$server_ip,$session_name,$one_mysql_log);}
$affected_rows = mysql_affected_rows($linkB);
echo "<!-- queue_log ADDMEMBER2 entry added: $VD_login|$affected_rows -->\n";
}
mysql_close($linkB);
mysql_select_db("$VARDB_database", $link);
}
@@ -3121,6 +3133,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var customer_3way_hangup_counter_trigger=0;
var customer_3way_hangup_dispo_message='';
var ivr_park_call='<?php echo $ivr_park_call ?>';
var qm_phone='<?php echo $QM_PHONE ?>';
var DiaLControl_auto_HTML = "<IMG SRC=\"./images/vdc_LB_pause_OFF.gif\" border=0 alt=\" Pause \"><a href=\"#\" onclick=\"AutoDial_ReSume_PauSe('VDADready');\"><IMG SRC=\"./images/vdc_LB_resume.gif\" border=0 alt=\"Resume\"></a>";
var DiaLControl_auto_HTML_ready = "<a href=\"#\" onclick=\"AutoDial_ReSume_PauSe('VDADpause');\"><IMG SRC=\"./images/vdc_LB_pause.gif\" border=0 alt=\" Pause \"></a><IMG SRC=\"./images/vdc_LB_resume_OFF.gif\" border=0 alt=\"Resume\">";
var DiaLControl_auto_HTML_OFF = "<IMG SRC=\"./images/vdc_LB_pause_OFF.gif\" border=0 alt=\" Pause \"><IMG SRC=\"./images/vdc_LB_resume_OFF.gif\" border=0 alt=\"Resume\">";
@@ -8459,7 +8472,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
if (xmlhttp)
{
CSCupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=regCLOSER&format=text&user=" + user + "&pass=" + pass + "&comments=" + VU_agent_choose_ingroups_DV + "&closer_blended=" + VICIDiaL_closer_blended + "&campaign=" + campaign + "&dial_method" + dial_method + "&closer_choice=" + CloserSelectChoices + "-";
CSCupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=regCLOSER&format=text&user=" + user + "&pass=" + pass + "&comments=" + VU_agent_choose_ingroups_DV + "&closer_blended=" + VICIDiaL_closer_blended + "&campaign=" + campaign + "&qm_phone=" + qm_phone + "&dial_method" + dial_method + "&closer_choice=" + CloserSelectChoices + "-";
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(CSCupdate_query);
+311 -29
View File
@@ -93,6 +93,7 @@ $subcamp_color = '#C6C6C6';
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
$PHP_SELF=$_SERVER['PHP_SELF'];
$QUERY_STRING = getenv("QUERY_STRING");
$Vreports = 'NONE, Real-Time Main Report, Real-Time Campaign Summary , Inbound Report, Inbound Service Level Report, Inbound Summary Hourly Report, Inbound DID Report, Inbound IVR Report, Outbound Calling Report, Outbound Summary Interval Report, Fronter - Closer Report, Lists Campaign Statuses Report, Export Calls Report , Agent Time Detail, Agent Status Detail, Agent Performance Detail, Single Agent Daily , User Timeclock Report, User Group Timeclock Status Report, User Timeclock Detail Report , Server Performance Report, Administration Change Log, List Update Stats, User Stats, User Time Sheet, Download List';
@@ -1475,6 +1476,18 @@ if (isset($_GET["eht_minimum_prompt_seconds"])) {$eht_minimum_prompt_seconds=
elseif (isset($_POST["eht_minimum_prompt_seconds"])) {$eht_minimum_prompt_seconds=$_POST["eht_minimum_prompt_seconds"];}
if (isset($_GET["realtime_agent_time_stats"])) {$realtime_agent_time_stats=$_GET["realtime_agent_time_stats"];}
elseif (isset($_POST["realtime_agent_time_stats"])) {$realtime_agent_time_stats=$_POST["realtime_agent_time_stats"];}
if (isset($_GET["admin_modify_refresh"])) {$admin_modify_refresh=$_GET["admin_modify_refresh"];}
elseif (isset($_POST["admin_modify_refresh"])) {$admin_modify_refresh=$_POST["admin_modify_refresh"];}
if (isset($_GET["nocache_admin"])) {$nocache_admin=$_GET["nocache_admin"];}
elseif (isset($_POST["nocache_admin"])) {$nocache_admin=$_POST["nocache_admin"];}
if (isset($_GET["generate_cross_server_exten"])) {$generate_cross_server_exten=$_GET["generate_cross_server_exten"];}
elseif (isset($_POST["generate_cross_server_exten"])) {$generate_cross_server_exten=$_POST["generate_cross_server_exten"];}
if (isset($_GET["queuemetrics_addmember_enabled"])) {$queuemetrics_addmember_enabled=$_GET["queuemetrics_addmember_enabled"];}
elseif (isset($_POST["queuemetrics_addmember_enabled"])) {$queuemetrics_addmember_enabled=$_POST["queuemetrics_addmember_enabled"];}
if (isset($_GET["modify_page"])) {$modify_page=$_GET["modify_page"];}
elseif (isset($_POST["modify_page"])) {$modify_page=$_POST["modify_page"];}
if (isset($_GET["modify_url"])) {$modify_url=$_GET["modify_url"];}
elseif (isset($_POST["modify_url"])) {$modify_url=$_POST["modify_url"];}
if (isset($script_id)) {$script_id= strtoupper($script_id);}
@@ -1705,6 +1718,11 @@ if ($non_latin < 1)
$calculate_estimated_hold_seconds = ereg_replace("[^0-9]","",$calculate_estimated_hold_seconds);
$customer_3way_hangup_seconds = ereg_replace("[^0-9]","",$customer_3way_hangup_seconds);
$eht_minimum_prompt_seconds = ereg_replace("[^0-9]","",$eht_minimum_prompt_seconds);
$admin_modify_refresh = ereg_replace("[^0-9]","",$admin_modify_refresh);
$nocache_admin = ereg_replace("[^0-9]","",$nocache_admin);
$generate_cross_server_exten = ereg_replace("[^0-9]","",$generate_cross_server_exten);
$queuemetrics_addmember_enabled = ereg_replace("[^0-9]","",$queuemetrics_addmember_enabled);
$modify_page = ereg_replace("[^0-9]","",$modify_page);
$drop_call_seconds = ereg_replace("[^-0-9]","",$drop_call_seconds);
@@ -2246,7 +2264,10 @@ if ($non_latin < 1)
$blind_monitor_message = ereg_replace(";","",$blind_monitor_message);
$blind_monitor_message = ereg_replace("\r","",$blind_monitor_message);
$blind_monitor_message = ereg_replace("\"","",$blind_monitor_message);
$modify_url = ereg_replace("\\\\","",$modify_url);
$modify_url = ereg_replace(";","",$modify_url);
$modify_url = ereg_replace("\r","",$modify_url);
$modify_url = ereg_replace("\"","",$modify_url);
### VARIABLES TO BE mysql_real_escape_string ###
# $web_form_address
# $queuemetrics_url
@@ -2577,11 +2598,12 @@ else
# 100929-1203 - Added add_lead_url feature to In-Groups
# 101008-0349 - Added Estimated Hold Time Minimum options, Manual Dial Preview settings and two new variables for recording filenames
# 101022-1427 - Added ability to change user in-group prefs from in-group mod screen, added realtime_agent_time_stats campaign option
# 101106-1850 - Added admin refrech, no-cache, cross-server-exten, QM-addmember options
#
# make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time
$admin_version = '2.4-285';
$build = '101022-1427';
$admin_version = '2.4-286';
$build = '101106-1850';
$STARTtime = date("U");
$SQLdate = date("Y-m-d H:i:s");
@@ -2590,6 +2612,8 @@ $MT[0]='';
$US='_';
$active_lists=0;
$inactive_lists=0;
$modify_refresh_set=0;
$modify_footer_refresh=0;
$month_old = mktime(0, 0, 0, date("m")-1, date("d"), date("Y"));
$past_month_date = date("Y-m-d H:i:s",$month_old);
@@ -2629,7 +2653,7 @@ if ($force_logout)
#############################################
##### START SYSTEM_SETTINGS LOOKUP #####
$stmt = "SELECT use_non_latin,auto_dial_limit,user_territories_active,allow_custom_dialplan,callcard_enabled FROM system_settings;";
$stmt = "SELECT use_non_latin,auto_dial_limit,user_territories_active,allow_custom_dialplan,callcard_enabled,admin_modify_refresh,nocache_admin FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$qm_conf_ct = mysql_num_rows($rslt);
@@ -2641,6 +2665,8 @@ if ($qm_conf_ct > 0)
$SSuser_territories_active = $row[2];
$SSallow_custom_dialplan = $row[3];
$SScallcard_enabled = $row[4];
$SSadmin_modify_refresh = $row[5];
$SSnocache_admin = $row[6];
}
##### END SETTINGS LOOKUP #####
###########################################
@@ -2787,9 +2813,29 @@ else
header ("Content-type: text/html; charset=utf-8");
if ($SSnocache_admin=='1')
{
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header ("Pragma: no-cache"); // HTTP/1.0
}
echo "<html>\n";
echo "<head>\n";
echo "<!-- VERSION: $admin_version BUILD: $build ADD: $ADD PHP_SELF: $PHP_SELF-->\n";
echo "<META NAME=\"ROBOTS\" CONTENT=\"NONE\">\n";
echo "<META NAME=\"COPYRIGHT\" CONTENT=\"&copy; 2010 ViciDial Group\">\n";
echo "<META NAME=\"AUTHOR\" CONTENT=\"ViciDial Group\">\n";
if ($SSnocache_admin=='1')
{
echo "<META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\">\n";
echo "<META HTTP-EQUIV=\"Expires\" CONTENT=\"-1\">\n";
echo "<META HTTP-EQUIV=\"CACHE-CONTROL\" CONTENT=\"NO-CACHE\">\n";
}
if ( ($SSadmin_modify_refresh > 1) and (preg_match("/^3/",$ADD)) )
{
$modify_refresh_set=1;
if (preg_match("/^3/",$ADD)) {$modify_url = "$PHP_SELF?$QUERY_STRING";}
echo "<META HTTP-EQUIV=\"REFRESH\" CONTENT=\"$SSadmin_modify_refresh;URL=$modify_url\">\n";
}
echo "<title>ADMINISTRATION: ";
if (!isset($ADD)) {$ADD=0;}
@@ -6894,6 +6940,16 @@ if ($ADD==99999)
<BR>
<B>Admin Home URL -</B> This is the URL or web site address that you will go to if you click on the HOME link at the top of the admin.php page.
<BR>
<A NAME="settings-admin_modify_refresh">
<BR>
<B>Admin Modify Auto-Refresh -</B> This is the refresh interval in seconds of the modify screens in this admin interface. Setting this to 0 will disable it, setting it below 5 will mostly make the modify screens unusable because they will refresh too quickly to change fields. This option is useful in situations where more than one manager is controlling settings on an active campaign or in-group so that the settings are refreshed frequently. Default is 0.
<BR>
<A NAME="settings-nocache_admin">
<BR>
<B>Admin No-Cache -</B> Setting this to 1 will set all admin pages to web browser no-cache, so every screen has to be reloaded every time it is viewed, even if clicking back on the browser. Default is 0 for disabled.
<BR>
<A NAME="settings-enable_agc_xfer_log">
<BR>
@@ -7007,6 +7063,11 @@ if ($ADD==99999)
<BR>
<B>Allow Custom Dialplan Entries -</B> This option allows you to enter custom dialplan lines into Call Menus, Servers and System Settings. Default is 0 for inactive.
<BR>
<A NAME="settings-generate_cross_server_exten">
<BR>
<B>Generate Cross-Server Phone Extensions -</B> This option if set to 1 will generate dialplan entries for every phone on a multi-server system. Default is 0 for inactive.
<BR>
<A NAME="settings-user_territories_active">
<BR>
@@ -7152,6 +7213,11 @@ if ($ADD==99999)
<BR>
<B>QueueMetrics CallStatus -</B> This option if set to 0 will not put in the CALLSTATUS entry into queue_log when an agent dispositions a call. Default is 1 for enabled.
<BR>
<A NAME="settings-queuemetrics_addmember_enabled">
<BR>
<B>QueueMetrics Addmember Enabled -</B> This option if set to 1 will generate ADDMEMBER2 and REMOVEMEMBER entries in queue_log. Default is 0 for disabled.
<BR>
<A NAME="settings-enable_vtiger_integration">
<BR>
@@ -7557,8 +7623,10 @@ if ($ADD==7111111)
$ADMIN=$PHP_SELF;
require("admin_header.php");
if ( ($SSadmin_modify_refresh > 1) and (preg_match("/^3|^4/",$ADD)) )
{
echo "<span id=refresh_countdown></span><BR>";
}
######################################################################################################
@@ -15224,7 +15292,7 @@ if ($ADD==411111111111111)
}
$reports_use_slave_db = preg_replace("/,$/","",$new_field_value);
$stmt="UPDATE system_settings set use_non_latin='$use_non_latin',webroot_writable='$webroot_writable',enable_queuemetrics_logging='$enable_queuemetrics_logging',queuemetrics_server_ip='$queuemetrics_server_ip',queuemetrics_dbname='$queuemetrics_dbname',queuemetrics_login='$queuemetrics_login',queuemetrics_pass='$queuemetrics_pass',queuemetrics_url='$queuemetrics_url',queuemetrics_log_id='$queuemetrics_log_id',queuemetrics_eq_prepend='$queuemetrics_eq_prepend',vicidial_agent_disable='$vicidial_agent_disable',allow_sipsak_messages='$allow_sipsak_messages',admin_home_url='$admin_home_url',enable_agc_xfer_log='$enable_agc_xfer_log',timeclock_end_of_day='$timeclock_end_of_day',vdc_header_date_format='$vdc_header_date_format',vdc_customer_date_format='$vdc_customer_date_format',vdc_header_phone_format='$vdc_header_phone_format',vdc_agent_api_active='$vdc_agent_api_active',enable_vtiger_integration='$enable_vtiger_integration',vtiger_server_ip='$vtiger_server_ip',vtiger_dbname='$vtiger_dbname',vtiger_login='$vtiger_login',vtiger_pass='$vtiger_pass',vtiger_url='$vtiger_url',qc_features_active='$qc_features_active',outbound_autodial_active='$outbound_autodial_active',outbound_calls_per_second='$outbound_calls_per_second',enable_tts_integration='$enable_tts_integration',agentonly_callback_campaign_lock='$agentonly_callback_campaign_lock',sounds_central_control_active='$sounds_central_control_active',sounds_web_server='$sounds_web_server',sounds_web_directory='$sounds_web_directory',active_voicemail_server='$active_voicemail_server',auto_dial_limit='$auto_dial_limit',user_territories_active='$user_territories_active',allow_custom_dialplan='$allow_custom_dialplan',enable_second_webform='$enable_second_webform',default_webphone='$default_webphone',default_external_server_ip='$default_external_server_ip',webphone_url='" . mysql_real_escape_string($webphone_url) . "',enable_agc_dispo_log='$enable_agc_dispo_log',custom_dialplan_entry='$custom_dialplan_entry',queuemetrics_loginout='$queuemetrics_loginout',callcard_enabled='$callcard_enabled',queuemetrics_callstatus='$queuemetrics_callstatus',default_codecs='$default_codecs',admin_web_directory='$admin_web_directory',label_title='$label_title',label_first_name='$label_first_name',label_middle_initial='$label_middle_initial',label_last_name='$label_last_name',label_address1='$label_address1',label_address2='$label_address2',label_address3='$label_address3',label_city='$label_city',label_state='$label_state',label_province='$label_province',label_postal_code='$label_postal_code',label_vendor_lead_code='$label_vendor_lead_code',label_gender='$label_gender',label_phone_number='$label_phone_number',label_phone_code='$label_phone_code',label_alt_phone='$label_alt_phone',label_security_phrase='$label_security_phrase',label_email='$label_email',label_comments='$label_comments',custom_fields_enabled='$custom_fields_enabled',slave_db_server='$slave_db_server',reports_use_slave_db='$reports_use_slave_db',webphone_systemkey='$webphone_systemkey',first_login_trigger='$first_login_trigger',default_phone_registration_password='$default_phone_registration_password',default_phone_login_password='$default_phone_login_password',default_server_password='$default_server_password';";
$stmt="UPDATE system_settings set use_non_latin='$use_non_latin',webroot_writable='$webroot_writable',enable_queuemetrics_logging='$enable_queuemetrics_logging',queuemetrics_server_ip='$queuemetrics_server_ip',queuemetrics_dbname='$queuemetrics_dbname',queuemetrics_login='$queuemetrics_login',queuemetrics_pass='$queuemetrics_pass',queuemetrics_url='$queuemetrics_url',queuemetrics_log_id='$queuemetrics_log_id',queuemetrics_eq_prepend='$queuemetrics_eq_prepend',vicidial_agent_disable='$vicidial_agent_disable',allow_sipsak_messages='$allow_sipsak_messages',admin_home_url='$admin_home_url',enable_agc_xfer_log='$enable_agc_xfer_log',timeclock_end_of_day='$timeclock_end_of_day',vdc_header_date_format='$vdc_header_date_format',vdc_customer_date_format='$vdc_customer_date_format',vdc_header_phone_format='$vdc_header_phone_format',vdc_agent_api_active='$vdc_agent_api_active',enable_vtiger_integration='$enable_vtiger_integration',vtiger_server_ip='$vtiger_server_ip',vtiger_dbname='$vtiger_dbname',vtiger_login='$vtiger_login',vtiger_pass='$vtiger_pass',vtiger_url='$vtiger_url',qc_features_active='$qc_features_active',outbound_autodial_active='$outbound_autodial_active',outbound_calls_per_second='$outbound_calls_per_second',enable_tts_integration='$enable_tts_integration',agentonly_callback_campaign_lock='$agentonly_callback_campaign_lock',sounds_central_control_active='$sounds_central_control_active',sounds_web_server='$sounds_web_server',sounds_web_directory='$sounds_web_directory',active_voicemail_server='$active_voicemail_server',auto_dial_limit='$auto_dial_limit',user_territories_active='$user_territories_active',allow_custom_dialplan='$allow_custom_dialplan',enable_second_webform='$enable_second_webform',default_webphone='$default_webphone',default_external_server_ip='$default_external_server_ip',webphone_url='" . mysql_real_escape_string($webphone_url) . "',enable_agc_dispo_log='$enable_agc_dispo_log',custom_dialplan_entry='$custom_dialplan_entry',queuemetrics_loginout='$queuemetrics_loginout',callcard_enabled='$callcard_enabled',queuemetrics_callstatus='$queuemetrics_callstatus',default_codecs='$default_codecs',admin_web_directory='$admin_web_directory',label_title='$label_title',label_first_name='$label_first_name',label_middle_initial='$label_middle_initial',label_last_name='$label_last_name',label_address1='$label_address1',label_address2='$label_address2',label_address3='$label_address3',label_city='$label_city',label_state='$label_state',label_province='$label_province',label_postal_code='$label_postal_code',label_vendor_lead_code='$label_vendor_lead_code',label_gender='$label_gender',label_phone_number='$label_phone_number',label_phone_code='$label_phone_code',label_alt_phone='$label_alt_phone',label_security_phrase='$label_security_phrase',label_email='$label_email',label_comments='$label_comments',custom_fields_enabled='$custom_fields_enabled',slave_db_server='$slave_db_server',reports_use_slave_db='$reports_use_slave_db',webphone_systemkey='$webphone_systemkey',first_login_trigger='$first_login_trigger',default_phone_registration_password='$default_phone_registration_password',default_phone_login_password='$default_phone_login_password',default_server_password='$default_server_password',admin_modify_refresh='$admin_modify_refresh',nocache_admin='$nocache_admin',generate_cross_server_exten='$generate_cross_server_exten',queuemetrics_addmember_enabled='$queuemetrics_addmember_enabled';";
$rslt=mysql_query($stmt, $link);
### LOG INSERTION Admin Log Table ###
@@ -16347,20 +16415,21 @@ if ($ADD==62)
#############################################
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,queuemetrics_loginout FROM system_settings;";
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,queuemetrics_loginout,queuemetrics_addmember_enabled FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "<BR>$stmt\n";}
$qm_conf_ct = mysql_num_rows($rslt);
if ($qm_conf_ct > 0)
{
$row=mysql_fetch_row($rslt);
$enable_queuemetrics_logging = $row[0];
$queuemetrics_server_ip = $row[1];
$queuemetrics_dbname = $row[2];
$queuemetrics_login = $row[3];
$queuemetrics_pass = $row[4];
$queuemetrics_log_id = $row[5];
$queuemetrics_loginout = $row[6];
$enable_queuemetrics_logging = $row[0];
$queuemetrics_server_ip = $row[1];
$queuemetrics_dbname = $row[2];
$queuemetrics_login = $row[3];
$queuemetrics_pass = $row[4];
$queuemetrics_log_id = $row[5];
$queuemetrics_loginout = $row[6];
$queuemetrics_addmember_enabled = $row[7];
}
##### END QUEUEMETRICS LOGGING LOOKUP #####
###########################################
@@ -16375,7 +16444,7 @@ if ($ADD==62)
$agents='@agents';
$agent_logged_in='';
$time_logged_in='';
$time_logged_in='0';
$stmtB = "SELECT agent,time_id,data1 FROM queue_log where agent='Agent/$VLA_user[$k]' and verb IN('AGENTLOGIN','AGENTCALLBACKLOGIN') order by time_id desc limit 1;";
$rsltB=mysql_query($stmtB, $linkB);
@@ -16384,14 +16453,39 @@ if ($ADD==62)
if ($qml_ct > 0)
{
$row=mysql_fetch_row($rsltB);
$agent_logged_in = $row[0];
$time_logged_in = $row[1];
$phone_logged_in = $row[2];
$agent_logged_in = $row[0];
$time_logged_in = $row[1];
$RAWtime_logged_in = $row[1];
$phone_logged_in = $row[2];
}
$time_logged_in = ($now_date_epoch - $time_logged_in);
if ($time_logged_in > 1000000) {$time_logged_in=1;}
if ($queuemetrics_addmember_enabled > 0)
{
$stmt = "SELECT distinct queue FROM queue_log where time_id >= $RAWtime_logged_in and agent='$agent_logged_in' and verb IN('ADDMEMBER','ADDMEMBER2') order by time_id desc;";
$rslt=mysql_query($stmt, $linkB);
if ($DB) {echo "$stmt\n";}
$amq_conf_ct = mysql_num_rows($rslt);
$i=0;
while ($i < $amq_conf_ct)
{
$row=mysql_fetch_row($rslt);
$AMqueue[$i] = $row[0];
$i++;
}
$i=0;
while ($i < $amq_conf_ct)
{
$stmt = "INSERT INTO queue_log SET partition='P01',time_id='$now_date_epoch',call_id='NONE',queue='$AMqueue[$i]',agent='$agent_logged_in',verb='REMOVEMEMBER',data1='$phone_logged_in',serverid='$queuemetrics_log_id';";
$rslt=mysql_query($stmt, $linkB);
$affected_rows = mysql_affected_rows($linkB);
$i++;
}
}
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$now_date_epoch',call_id='NONE',queue='NONE',agent='$agent_logged_in',verb='$QM_LOGOFF',serverid='$queuemetrics_log_id',data1='$phone_logged_in',data2='$time_logged_in';";
if ($DB) {echo "<BR>$stmtB\n";}
$rsltB=mysql_query($stmtB, $linkB);
@@ -17647,6 +17741,12 @@ if ($ADD==3)
{
if ($LOGmodify_users==1)
{
if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) )
{
$modify_url = "$PHP_SELF?ADD=3&user=$user";
$modify_footer_refresh=1;
}
echo "<TABLE><TR><TD>\n";
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
@@ -17974,6 +18074,11 @@ if ($ADD==31)
{
if ($LOGmodify_campaigns==1)
{
if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) )
{
$modify_url = "$PHP_SELF?ADD=31&campaign_id=$campaign_id&SUB=$SUB";
$modify_footer_refresh=1;
}
if ($stage=='show_dialable')
{
$stmt="UPDATE vicidial_campaigns set display_dialable_count='Y' where campaign_id='$campaign_id';";
@@ -18426,7 +18531,7 @@ if ($ADD==31)
}
}
echo "<tr bgcolor=#8EBCFD><td align=right>Add A Dial Status: </td><td align=left><select size=1 name=dial_status $DEFlistDISABLE>\n";
echo "<tr bgcolor=#8EBCFD><td align=right>Add A Dial Status to Call: </td><td align=left><select size=1 name=dial_status $DEFlistDISABLE>\n";
echo "<option value=\"\"> - NONE - </option>\n";
echo "$dial_statuses_list";
@@ -19686,6 +19791,11 @@ if ($ADD==34)
{
if ($LOGmodify_campaigns==1)
{
if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) )
{
$modify_url = "$PHP_SELF?ADD=31&campaign_id=$campaign_id&SUB=$SUB";
$modify_footer_refresh=1;
}
if ($stage=='show_dialable')
{
$stmt="UPDATE vicidial_campaigns set display_dialable_count='Y' where campaign_id='$campaign_id';";
@@ -19875,7 +19985,7 @@ if ($ADD==34)
}
}
echo "<tr bgcolor=#8EBCFD><td align=right>Add A Dial Status: </td><td align=left><select size=1 name=dial_status $DEFlistDISABLE>\n";
echo "<tr bgcolor=#8EBCFD><td align=right>Add A Dial Status to Call: </td><td align=left><select size=1 name=dial_status $DEFlistDISABLE>\n";
echo "<option value=\"\"> - NONE - </option>\n";
echo "$dial_statuses_list";
@@ -20957,6 +21067,11 @@ if ($ADD==311)
{
if ($LOGmodify_lists==1)
{
if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) )
{
$modify_url = "$PHP_SELF?ADD=311&list_id=$list_id";
$modify_footer_refresh=1;
}
echo "<TABLE><TR><TD>\n";
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
@@ -21533,6 +21648,11 @@ if ($ADD==3111)
{
if ($LOGmodify_ingroups==1)
{
if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) )
{
$modify_url = "$PHP_SELF?ADD=3111&group_id=$group_id";
$modify_footer_refresh=1;
}
echo "<TABLE><TR><TD>\n";
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
@@ -22443,6 +22563,11 @@ if ($ADD==3311)
{
if ($LOGmodify_dids==1)
{
if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) )
{
$modify_url = "$PHP_SELF?ADD=3311&did_id=$did_id";
$modify_footer_refresh=1;
}
echo "<TABLE><TR><TD>\n";
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
@@ -22721,6 +22846,11 @@ if ($ADD==3511)
{
if ($LOGmodify_dids==1)
{
if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) )
{
$modify_url = "$PHP_SELF?ADD=3511&menu_id=$menu_id";
$modify_footer_refresh=1;
}
echo "<TABLE><TR><TD>\n";
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
@@ -23036,6 +23166,11 @@ if ($ADD==31111)
{
if ($LOGmodify_remoteagents==1)
{
if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) )
{
$modify_url = "$PHP_SELF?ADD=31111&remote_agent_id=$remote_agent_id";
$modify_footer_refresh=1;
}
echo "<TABLE><TR><TD>\n";
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
@@ -23118,6 +23253,11 @@ if ($ADD==3711)
{
if ($LOGmodify_dids==1)
{
if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) )
{
$modify_url = "$PHP_SELF?ADD=3711&filter_phone_group_id=$filter_phone_group_id";
$modify_footer_refresh=1;
}
echo "<TABLE><TR><TD>\n";
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
@@ -23170,6 +23310,11 @@ if ($ADD==32111)
{
if ($LOGmodify_remoteagents==1)
{
if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) )
{
$modify_url = "$PHP_SELF?ADD=32111&extension_id=$extension_id";
$modify_footer_refresh=1;
}
echo "<TABLE><TR><TD>\n";
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
@@ -23240,6 +23385,11 @@ if ($ADD==311111)
{
if ($LOGmodify_usergroups==1)
{
if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) )
{
$modify_url = "$PHP_SELF?ADD=311111&user_group=$user_group";
$modify_footer_refresh=1;
}
echo "<TABLE><TR><TD>\n";
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
@@ -23472,6 +23622,11 @@ if ($ADD==3111111)
{
if ($LOGmodify_scripts==1)
{
if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) )
{
$modify_url = "$PHP_SELF?ADD=3111111&script_id=$script_id";
$modify_footer_refresh=1;
}
echo "<TABLE><TR><TD>\n";
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
@@ -23488,6 +23643,7 @@ if ($ADD==3111111)
echo "<input type=hidden name=ADD value=4111111>\n";
echo "<input type=hidden name=DB value=\"$DB\">\n";
echo "<input type=hidden name=script_id value=\"$script_id\">\n";
echo "<center><TABLE width=$section_width cellspacing=3>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Script ID: </td><td align=left><B>$script_id</B>$NWB#vicidial_scripts-script_name$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Script Name: </td><td align=left><input type=text name=script_name size=40 maxlength=50 value=\"$script_name\"> (title of the script)$NWB#vicidial_scripts-script_name$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Script Comments: </td><td align=left><input type=text name=script_comments size=50 maxlength=255 value=\"$script_comments\"> $NWB#vicidial_scripts-script_comments$NWE</td></tr>\n";
@@ -23495,6 +23651,7 @@ if ($ADD==3111111)
echo "<tr bgcolor=#B6D3FC><td align=right>Script Text: <BR><BR><B><a href=\"javascript:openNewWindow('$PHP_SELF?ADD=7111111&script_id=$script_id')\">Preview Script</a></B> </td><td align=left>";
# BEGIN Insert Field
echo "<select id=\"selectedField\" name=\"selectedField\">";
echo "<option value=\"fullname\">Agent Name</option>";
echo "<option>vendor_lead_code</option>";
echo "<option>source_id</option>";
echo "<option>list_id</option>";
@@ -23617,9 +23774,6 @@ if ($ADD==3111111)
$o++;
}
echo "</TABLE>\n";
if ($LOGdelete_scripts > 0)
{
echo "<br><br><a href=\"$PHP_SELF?ADD=5111111&script_id=$script_id\">DELETE THIS SCRIPT</a>\n";
@@ -23628,6 +23782,7 @@ if ($ADD==3111111)
{
echo "<br><br><a href=\"$PHP_SELF?ADD=720000000000000&category=SCRIPTS&stage=$script_id\">Click here to see Admin chages to this script</FONT>\n";
}
}
else
{
@@ -23645,6 +23800,11 @@ if ($ADD==31111111)
{
if ($LOGmodify_filters==1)
{
if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) )
{
$modify_url = "$PHP_SELF?ADD=31111111&lead_filter_id=$lead_filter_id";
$modify_footer_refresh=1;
}
echo "<TABLE><TR><TD>\n";
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
@@ -23660,6 +23820,7 @@ if ($ADD==31111111)
echo "<input type=hidden name=ADD value=41111111>\n";
echo "<input type=hidden name=DB value=\"$DB\">\n";
echo "<input type=hidden name=lead_filter_id value=\"$lead_filter_id\">\n";
echo "<center><TABLE width=$section_width cellspacing=3>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Filter ID: </td><td align=left><B>$lead_filter_id</B>$NWB#vicidial_lead_filters-lead_filter_id$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Filter Name: </td><td align=left><input type=text name=lead_filter_name size=40 maxlength=50 value=\"$lead_filter_name\"> (short description of the filter)$NWB#vicidial_lead_filters-lead_filter_name$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Filter Comments: </td><td align=left><input type=text name=lead_filter_comments size=50 maxlength=255 value=\"$lead_filter_comments\"> $NWB#vicidial_lead_filters-lead_filter_comments$NWE</td></tr>\n";
@@ -23716,6 +23877,11 @@ if ($ADD==321111111)
{
if ($LOGmodify_call_times==1)
{
if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) )
{
$modify_url = "$PHP_SELF?ADD=311111111&call_time_id=$call_time_id";
$modify_footer_refresh=1;
}
if ( ($stage=="ADD") and (strlen($state_rule)>0) )
{
$stmt="SELECT ct_state_call_times from vicidial_call_times where call_time_id='$call_time_id';";
@@ -23761,6 +23927,11 @@ if ($ADD==311111111)
{
if ($LOGmodify_call_times==1)
{
if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) )
{
$modify_url = "$PHP_SELF?ADD=311111111&call_time_id=$call_time_id";
$modify_footer_refresh=1;
}
echo "<TABLE><TR><TD>\n";
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
@@ -23801,6 +23972,7 @@ if ($ADD==311111111)
echo "<input type=hidden name=ADD value=411111111>\n";
echo "<input type=hidden name=DB value=\"$DB\">\n";
echo "<input type=hidden name=call_time_id value=\"$call_time_id\">\n";
echo "<center><TABLE width=$section_width cellspacing=3>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Call Time ID: </td><td align=left colspan=3><B>$call_time_id</B>$NWB#vicidial_call_times-call_time_id$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Call Time Name: </td><td align=left colspan=3><input type=text name=call_time_name size=40 maxlength=50 value=\"$call_time_name\"> (short description of the call time)$NWB#vicidial_call_times-call_time_name$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Call Time Comments: </td><td align=left colspan=3><input type=text name=call_time_comments size=50 maxlength=255 value=\"$call_time_comments\"> $NWB#vicidial_call_times-call_time_comments$NWE</td></tr>\n";
@@ -23924,6 +24096,11 @@ if ($ADD==3111111111)
{
if ($LOGmodify_call_times==1)
{
if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) )
{
$modify_url = "$PHP_SELF?ADD=3111111111&call_time_id=$call_time_id";
$modify_footer_refresh=1;
}
echo "<TABLE><TR><TD>\n";
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
@@ -23956,6 +24133,7 @@ if ($ADD==3111111111)
echo "<input type=hidden name=ADD value=4111111111>\n";
echo "<input type=hidden name=DB value=\"$DB\">\n";
echo "<input type=hidden name=call_time_id value=\"$call_time_id\">\n";
echo "<center><TABLE width=$section_width cellspacing=3>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Call Time ID: </td><td align=left colspan=3><B>$call_time_id</B>$NWB#vicidial_call_times-call_time_id$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>State Call Time State: </td><td align=left colspan=3><input type=text name=state_call_time_state size=4 maxlength=2 value=\"$state_call_time_state\"> $NWB#vicidial_call_times-state_call_time_state$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>State Call Time Name: </td><td align=left colspan=3><input type=text name=call_time_name size=40 maxlength=50 value=\"$call_time_name\"> (short description of the call time)$NWB#vicidial_call_times-call_time_name$NWE</td></tr>\n";
@@ -24008,6 +24186,11 @@ if ($ADD==331111111)
{
if ($LOGmodify_call_times==1)
{
if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) )
{
$modify_url = "$PHP_SELF?ADD=331111111&shift_id=$shift_id";
$modify_footer_refresh=1;
}
echo "<TABLE><TR><TD>\n";
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
@@ -24120,6 +24303,11 @@ if ($ADD==31111111111)
{
if ($LOGast_admin_access==1)
{
if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) )
{
$modify_url = "$PHP_SELF?ADD=31111111111&extension=$extension&server_ip=$server_ip";
$modify_footer_refresh=1;
}
echo "<TABLE><TR><TD>\n";
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
@@ -24267,6 +24455,11 @@ if ($ADD==32111111111)
{
if ($LOGast_admin_access==1)
{
if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) )
{
$modify_url = "$PHP_SELF?ADD=32111111111&alias_id=$alias_id";
$modify_footer_refresh=1;
}
echo "<TABLE><TR><TD>\n";
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
@@ -24338,6 +24531,11 @@ if ($ADD==33111111111)
{
if ($LOGast_admin_access==1)
{
if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) )
{
$modify_url = "$PHP_SELF?ADD=33111111111&group_alias_id=$group_alias_id";
$modify_footer_refresh=1;
}
echo "<TABLE><TR><TD>\n";
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
@@ -24383,6 +24581,11 @@ if ($ADD==311111111111)
{
if ($LOGmodify_servers==1)
{
if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) )
{
$modify_url = "$PHP_SELF?ADD=311111111111&server_id=$server_id&server_ip=$server_ip";
$modify_footer_refresh=1;
}
echo "<TABLE><TR><TD>\n";
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
@@ -24698,6 +24901,11 @@ if ($ADD==331111111111)
{
if ($LOGast_admin_access==1)
{
if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) )
{
$modify_url = "$PHP_SELF?ADD=331111111111&template_id=$template_id";
$modify_footer_refresh=1;
}
echo "<TABLE><TR><TD>\n";
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
@@ -24810,6 +25018,11 @@ if ($ADD==341111111111)
{
if ($LOGast_admin_access==1)
{
if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) )
{
$modify_url = "$PHP_SELF?ADD=341111111111&carrier_id=$carrier_id";
$modify_footer_refresh=1;
}
echo "<TABLE><TR><TD>\n";
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
@@ -24894,6 +25107,11 @@ if ($ADD==351111111111)
{
if ($LOGast_admin_access==1)
{
if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) )
{
$modify_url = "$PHP_SELF?ADD=351111111111&tts_id=$tts_id";
$modify_footer_refresh=1;
}
echo "<TABLE><TR><TD>\n";
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
@@ -24947,6 +25165,11 @@ if ($ADD==361111111111)
{
if ($LOGast_admin_access==1)
{
if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) )
{
$modify_url = "$PHP_SELF?ADD=361111111111&moh_id=$moh_id";
$modify_footer_refresh=1;
}
echo "<TABLE><TR><TD>\n";
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
@@ -25025,6 +25248,11 @@ if ($ADD==371111111111)
{
if ($LOGast_admin_access==1)
{
if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) )
{
$modify_url = "$PHP_SELF?ADD=371111111111&voicemail_id=$voicemail_id";
$modify_footer_refresh=1;
}
echo "<TABLE><TR><TD>\n";
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
@@ -25083,6 +25311,11 @@ if ($ADD==3111111111111)
{
if ($LOGast_admin_access==1)
{
if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) )
{
$modify_url = "$PHP_SELF?ADD=3111111111111&conf_exten=$conf_exten&server_ip=$server_ip";
$modify_footer_refresh=1;
}
echo "<TABLE><TR><TD>\n";
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
@@ -25129,6 +25362,11 @@ if ($ADD==31111111111111)
{
if ($LOGast_admin_access==1)
{
if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) )
{
$modify_url = "$PHP_SELF?ADD=31111111111111&conf_exten=$conf_exten&server_ip=$server_ip";
$modify_footer_refresh=1;
}
echo "<TABLE><TR><TD>\n";
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
@@ -25176,10 +25414,15 @@ if ($ADD==311111111111111)
{
if ($LOGmodify_servers==1)
{
if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) )
{
$modify_url = "$PHP_SELF?ADD=311111111111111";
$modify_footer_refresh=1;
}
echo "<TABLE><TR><TD>\n";
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
$stmt="SELECT version,install_date,use_non_latin,webroot_writable,enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_url,queuemetrics_log_id,queuemetrics_eq_prepend,vicidial_agent_disable,allow_sipsak_messages,admin_home_url,enable_agc_xfer_log,db_schema_version,auto_user_add_value,timeclock_end_of_day,timeclock_last_reset_date,vdc_header_date_format,vdc_customer_date_format,vdc_header_phone_format,vdc_agent_api_active,qc_last_pull_time,enable_vtiger_integration,vtiger_server_ip,vtiger_dbname,vtiger_login,vtiger_pass,vtiger_url,qc_features_active,outbound_autodial_active,outbound_calls_per_second,enable_tts_integration,agentonly_callback_campaign_lock,sounds_central_control_active,sounds_web_server,sounds_web_directory,active_voicemail_server,auto_dial_limit,user_territories_active,allow_custom_dialplan,db_schema_update_date,enable_second_webform,default_webphone,default_external_server_ip,webphone_url,enable_agc_dispo_log,custom_dialplan_entry,queuemetrics_loginout,callcard_enabled,queuemetrics_callstatus,default_codecs,admin_web_directory,label_title,label_first_name,label_middle_initial,label_last_name,label_address1,label_address2,label_address3,label_city,label_state,label_province,label_postal_code,label_vendor_lead_code,label_gender,label_phone_number,label_phone_code,label_alt_phone,label_security_phrase,label_email,label_comments,custom_fields_enabled,slave_db_server,reports_use_slave_db,webphone_systemkey,first_login_trigger,default_phone_registration_password,default_phone_login_password,default_server_password from system_settings;";
$stmt="SELECT version,install_date,use_non_latin,webroot_writable,enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_url,queuemetrics_log_id,queuemetrics_eq_prepend,vicidial_agent_disable,allow_sipsak_messages,admin_home_url,enable_agc_xfer_log,db_schema_version,auto_user_add_value,timeclock_end_of_day,timeclock_last_reset_date,vdc_header_date_format,vdc_customer_date_format,vdc_header_phone_format,vdc_agent_api_active,qc_last_pull_time,enable_vtiger_integration,vtiger_server_ip,vtiger_dbname,vtiger_login,vtiger_pass,vtiger_url,qc_features_active,outbound_autodial_active,outbound_calls_per_second,enable_tts_integration,agentonly_callback_campaign_lock,sounds_central_control_active,sounds_web_server,sounds_web_directory,active_voicemail_server,auto_dial_limit,user_territories_active,allow_custom_dialplan,db_schema_update_date,enable_second_webform,default_webphone,default_external_server_ip,webphone_url,enable_agc_dispo_log,custom_dialplan_entry,queuemetrics_loginout,callcard_enabled,queuemetrics_callstatus,default_codecs,admin_web_directory,label_title,label_first_name,label_middle_initial,label_last_name,label_address1,label_address2,label_address3,label_city,label_state,label_province,label_postal_code,label_vendor_lead_code,label_gender,label_phone_number,label_phone_code,label_alt_phone,label_security_phrase,label_email,label_comments,custom_fields_enabled,slave_db_server,reports_use_slave_db,webphone_systemkey,first_login_trigger,default_phone_registration_password,default_phone_login_password,default_server_password,admin_modify_refresh,nocache_admin,generate_cross_server_exten,queuemetrics_addmember_enabled from system_settings;";
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$version = $row[0];
@@ -25264,7 +25507,10 @@ if ($ADD==311111111111111)
$default_phone_registration_password = $row[79];
$default_phone_login_password = $row[80];
$default_server_password = $row[81];
$admin_modify_refresh = $row[82];
$nocache_admin = $row[83];
$generate_cross_server_exten = $row[84];
$queuemetrics_addmember_enabled = $row[85];
echo "<br>MODIFY VICIDIAL SYSTEM SETTINGS<form action=$PHP_SELF method=POST>\n";
echo "<input type=hidden name=ADD value=411111111111111>\n";
@@ -25286,6 +25532,8 @@ if ($ADD==311111111111111)
echo "</select>$NWB#settings-vicidial_agent_disable$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Allow SIPSAK Messages: </td><td align=left><select size=1 name=allow_sipsak_messages><option>1</option><option>0</option><option selected>$allow_sipsak_messages</option></select>$NWB#settings-allow_sipsak_messages$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Admin Home URL: </td><td align=left><input type=text name=admin_home_url size=50 maxlength=255 value=\"$admin_home_url\">$NWB#settings-admin_home_url$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Admin Modify Auto-Refresh: </td><td align=left><input type=text name=admin_modify_refresh size=6 maxlength=5 value=\"$admin_modify_refresh\">$NWB#settings-admin_modify_refresh$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Admin No-Cache: </td><td align=left><select size=1 name=nocache_admin><option>1</option><option>0</option><option selected>$nocache_admin</option></select>$NWB#settings-nocache_admin$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Enable Agent Transfer Logfile: </td><td align=left><select size=1 name=enable_agc_xfer_log><option>1</option><option>0</option><option selected>$enable_agc_xfer_log</option></select>$NWB#settings-enable_agc_xfer_log$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Enable Agent Disposition Logfile: </td><td align=left><select size=1 name=enable_agc_dispo_log><option>1</option><option>0</option><option selected>$enable_agc_dispo_log</option></select>$NWB#settings-enable_agc_dispo_log$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Timeclock End Of Day: </td><td align=left><input type=text name=timeclock_end_of_day size=5 maxlength=4 value=\"$timeclock_end_of_day\">$NWB#settings-timeclock_end_of_day$NWE</td></tr>\n";
@@ -25393,6 +25641,8 @@ if ($ADD==311111111111111)
echo "<tr bgcolor=#B6D3FC><td align=right>Allow Custom Dialplan Entries: </td><td align=left><select size=1 name=allow_custom_dialplan><option>1</option><option>0</option><option selected>$allow_custom_dialplan</option></select>$NWB#settings-allow_custom_dialplan$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Generate Cross-Server Phone Extensions: </td><td align=left><select size=1 name=generate_cross_server_exten><option>1</option><option>0</option><option selected>$generate_cross_server_exten</option></select>$NWB#settings-generate_cross_server_exten$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>User Territories Active: </td><td align=left><select size=1 name=user_territories_active><option>1</option><option>0</option><option selected>$user_territories_active</option></select>$NWB#settings-user_territories_active$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Enable Second Webform: </td><td align=left><select size=1 name=enable_second_webform><option>1</option><option>0</option><option selected>$enable_second_webform</option></select>$NWB#settings-enable_second_webform$NWE</td></tr>\n";
@@ -25510,7 +25760,7 @@ if ($ADD==311111111111111)
echo "<option selected value=\"$queuemetrics_loginout\">$queuemetrics_loginout</option>\n";
echo "</select>$NWB#settings-queuemetrics_loginout$NWE</td></tr>\n";
echo "<tr bgcolor=#99FFCC><td align=right>QueueMetrics CallStatus: </td><td align=left><select size=1 name=queuemetrics_callstatus><option>1</option><option>0</option><option selected>$queuemetrics_callstatus</option></select>$NWB#settings-queuemetrics_callstatus$NWE</td></tr>\n";
echo "<tr bgcolor=#99FFCC><td align=right>QueueMetrics Addmember Enabled: </td><td align=left><select size=1 name=queuemetrics_addmember_enabled><option>1</option><option>0</option><option selected>$queuemetrics_addmember_enabled</option></select>$NWB#settings-queuemetrics_addmember_enabled$NWE</td></tr>\n";
echo "<tr bgcolor=#CCFFFF><td align=right>Enable Vtiger Integration: </td><td align=left><select size=1 name=enable_vtiger_integration><option>1</option><option>0</option><option selected>$enable_vtiger_integration</option></select>$NWB#settings-enable_vtiger_integration$NWE\n";
echo " &nbsp; <a href=\"./vtiger_user.php\" target=\"_blank\">Click here to Synchronize users with Vtiger</a>\n";
@@ -25550,6 +25800,11 @@ if ($ADD==321111111111111)
{
if ($LOGmodify_servers==1)
{
if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) )
{
$modify_url = "$PHP_SELF?ADD=321111111111111";
$modify_footer_refresh=1;
}
echo "<TABLE><TR><TD>\n";
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
@@ -25668,6 +25923,11 @@ if ($ADD==331111111111111)
{
if ($LOGmodify_servers==1)
{
if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) )
{
$modify_url = "$PHP_SELF?ADD=331111111111111";
$modify_footer_refresh=1;
}
echo "<TABLE><TR><TD>\n";
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
@@ -25774,6 +26034,11 @@ if ($ADD==341111111111111)
{
if ( ($LOGmodify_servers==1) and ($SSqc_features_active > 0) )
{
if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) )
{
$modify_url = "$PHP_SELF?ADD=341111111111111";
$modify_footer_refresh=1;
}
echo "<TABLE><TR><TD>\n";
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
@@ -28187,9 +28452,26 @@ echo "</font>\n";
</TD><TD BGCOLOR=#D9E6FE>
</TD></TR><TABLE>
</body>
</html>
<?php
if ( ($SSnocache_admin=='1') or ( ($SSadmin_modify_refresh > 1) and ($modify_footer_refresh > 0) and (strlen($modify_url)>10) ) )
{
echo "<head>\n";
if ($SSnocache_admin=='1')
{
echo "<META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\">\n";
echo "<META HTTP-EQUIV=\"Expires\" CONTENT=\"-1\">\n";
echo "<META HTTP-EQUIV=\"CACHE-CONTROL\" CONTENT=\"NO-CACHE\">\n";
}
if ( ($SSadmin_modify_refresh > 1) and ($modify_footer_refresh > 0) and (strlen($modify_url)>10) )
{
echo "<META HTTP-EQUIV=\"REFRESH\" CONTENT=\"$SSadmin_modify_refresh;URL=$modify_url\">\n";
}
echo "</head>\n";
}
echo "</html>\n";
exit;
+33 -4
View File
@@ -27,6 +27,7 @@
# 100831-2255 - Added password strength checking function
# 100914-1311 - Removed other links for reports-only users
# 101022-1323 - Added IGU_selectall function
# 101107-1133 - Added auto-refresh code
#
@@ -336,11 +337,11 @@ if ( ( ($ADD==34) or ($ADD==31) or ($ADD==49) ) and ($SUB==29) and ($LOGmodify_c
<?php
}
?>
var weak = Image();
var weak = new Image();
weak.src = "images/weak.png";
var medium = Image();
var medium = new Image();
medium.src = "images/medium.png";
var strong = Image();
var strong = new Image();
strong.src = "images/strong.png";
function pwdChanged(pwd_field_str, pwd_img_str)
@@ -405,10 +406,30 @@ if ( ( ($ADD==34) or ($ADD==31) or ($ADD==49) ) and ($SUB==29) and ($LOGmodify_c
<?php
#### Javascript for auto-generate of user ID Button
if ( ($SSadmin_modify_refresh > 1) and (preg_match("/^3|^4/",$ADD)) )
{
?>
var ar_seconds=<?php echo "$SSadmin_modify_refresh;"; ?>
function modify_refresh_display()
{
if (ar_seconds > 0)
{
ar_seconds = (ar_seconds - 1);
document.getElementById("refresh_countdown").innerHTML = "<font color=black> screen refresh in: " + ar_seconds + " seconds</font>";
setTimeout("modify_refresh_display()",1000);
}
}
<?php
}
#### Javascript for auto-generate of user ID Button
if ( ($ADD==1) or ($ADD=="1A") )
{
?>
function user_auto()
{
var user_toggle = document.getElementById("user_toggle");
@@ -991,7 +1012,15 @@ if ( ($ADD==3111) or ($ADD==2111) or ($ADD==2011) or ($ADD==4111) or ($ADD==5111
}
echo "</script>\n";
echo "</head>\n";
echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>\n";
if ( ($SSadmin_modify_refresh > 1) and (preg_match("/^3|^4/",$ADD)) )
{
echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0 onLoad=\"modify_refresh_display();\">\n";
}
else
{
echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>\n";
}
echo "<!-- INTERNATIONALIZATION-LINKS-PLACEHOLDER-VICIDIAL -->\n";
$stmt="SELECT admin_home_url,enable_tts_integration,callcard_enabled,custom_fields_enabled from system_settings;";
+39 -12
View File
@@ -15,6 +15,7 @@
# 91130-2039 - Added user closer log manager flag display
# 91212-0656 - Added more complete logging of Emergency Logout process
# 100309-0544 - Added queuemetrics_loginout option
# 101108-0032 - Added ADDMEMBER queue_log code
#
header ("Content-type: text/html; charset=utf-8");
@@ -339,20 +340,21 @@ if ($stage == "log_agent_out")
#############################################
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,queuemetrics_loginout FROM system_settings;";
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,queuemetrics_loginout,queuemetrics_addmember_enabled FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "<BR>$stmt\n";}
$qm_conf_ct = mysql_num_rows($rslt);
if ($qm_conf_ct > 0)
{
$row=mysql_fetch_row($rslt);
$enable_queuemetrics_logging = $row[0];
$queuemetrics_server_ip = $row[1];
$queuemetrics_dbname = $row[2];
$queuemetrics_login = $row[3];
$queuemetrics_pass = $row[4];
$queuemetrics_log_id = $row[5];
$queuemetrics_loginout = $row[6];
$enable_queuemetrics_logging = $row[0];
$queuemetrics_server_ip = $row[1];
$queuemetrics_dbname = $row[2];
$queuemetrics_login = $row[3];
$queuemetrics_pass = $row[4];
$queuemetrics_log_id = $row[5];
$queuemetrics_loginout = $row[6];
$queuemetrics_addmember_enabled = $row[7];
}
##### END QUEUEMETRICS LOGGING LOOKUP #####
###########################################
@@ -367,7 +369,7 @@ if ($stage == "log_agent_out")
$agents='@agents';
$agent_logged_in='';
$time_logged_in='';
$time_logged_in='0';
$stmtB = "SELECT agent,time_id,data1 FROM queue_log where agent='Agent/" . mysql_real_escape_string($user) . "' and verb IN('AGENTLOGIN','AGENTCALLBACKLOGIN') order by time_id desc limit 1;";
$rsltB=mysql_query($stmtB, $linkB);
@@ -376,14 +378,39 @@ if ($stage == "log_agent_out")
if ($qml_ct > 0)
{
$row=mysql_fetch_row($rsltB);
$agent_logged_in = $row[0];
$time_logged_in = $row[1];
$phone_logged_in = $row[2];
$agent_logged_in = $row[0];
$time_logged_in = $row[1];
$RAWtime_logged_in = $row[1];
$phone_logged_in = $row[2];
}
$time_logged_in = ($now_date_epoch - $time_logged_in);
if ($time_logged_in > 1000000) {$time_logged_in=1;}
if ($queuemetrics_addmember_enabled > 0)
{
$stmt = "SELECT distinct queue FROM queue_log where time_id >= $RAWtime_logged_in and agent='$agent_logged_in' and verb IN('ADDMEMBER','ADDMEMBER2') order by time_id desc;";
$rslt=mysql_query($stmt, $linkB);
if ($DB) {echo "$stmt\n";}
$amq_conf_ct = mysql_num_rows($rslt);
$i=0;
while ($i < $amq_conf_ct)
{
$row=mysql_fetch_row($rslt);
$AMqueue[$i] = $row[0];
$i++;
}
$i=0;
while ($i < $amq_conf_ct)
{
$stmt = "INSERT INTO queue_log SET partition='P01',time_id='$now_date_epoch',call_id='NONE',queue='$AMqueue[$i]',agent='$agent_logged_in',verb='REMOVEMEMBER',data1='$phone_logged_in',serverid='$queuemetrics_log_id';";
$rslt=mysql_query($stmt, $linkB);
$affected_rows = mysql_affected_rows($linkB);
$i++;
}
}
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$now_date_epoch',call_id='NONE',queue='NONE',agent='$agent_logged_in',verb='$QM_LOGOFF',serverid='$queuemetrics_log_id',data1='$phone_logged_in',data2='$time_logged_in';";
if ($DB) {echo "<BR>$stmtB\n";}
$rsltB=mysql_query($stmtB, $linkB);