diff --git a/UPGRADE b/UPGRADE
index 70463827..2a903899 100644
--- a/UPGRADE
+++ b/UPGRADE
@@ -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.
+
diff --git a/bin/ADMIN_keepalive_ALL.pl b/bin/ADMIN_keepalive_ALL.pl
index 4acbe20a..39ec42a1 100644
--- a/bin/ADMIN_keepalive_ALL.pl
+++ b/bin/ADMIN_keepalive_ALL.pl
@@ -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";
diff --git a/bin/AST_VDauto_dial.pl b/bin/AST_VDauto_dial.pl
index 95d6e2d4..785c0d03 100644
--- a/bin/AST_VDauto_dial.pl
+++ b/bin/AST_VDauto_dial.pl
@@ -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();
}
diff --git a/bin/AST_VDremote_agents.pl b/bin/AST_VDremote_agents.pl
index c6fe05bf..4c2283d6 100644
--- a/bin/AST_VDremote_agents.pl
+++ b/bin/AST_VDremote_agents.pl
@@ -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);
diff --git a/docs/QUEUEMETRICS.txt b/docs/QUEUEMETRICS.txt
index b96e2984..a3a70952 100644
--- a/docs/QUEUEMETRICS.txt
+++ b/docs/QUEUEMETRICS.txt
@@ -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',
diff --git a/extras/MySQL_AST_CREATE_tables.sql b/extras/MySQL_AST_CREATE_tables.sql
index 8b740d0e..28f9813c 100644
--- a/extras/MySQL_AST_CREATE_tables.sql
+++ b/extras/MySQL_AST_CREATE_tables.sql
@@ -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;
diff --git a/extras/upgrade_2.4.sql b/extras/upgrade_2.4.sql
index f85d8370..9c82f199 100644
--- a/extras/upgrade_2.4.sql
+++ b/extras/upgrade_2.4.sql
@@ -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();
diff --git a/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt b/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt
index e4f11e7e..b51ad804 100644
--- a/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt
+++ b/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt
@@ -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
diff --git a/www/agc/manager_send.php b/www/agc/manager_send.php
index f91091ed..edfdf76e 100644
--- a/www/agc/manager_send.php
+++ b/www/agc/manager_send.php
@@ -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";}
$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";}
+ $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";}
+ }
+ }
# $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";}
$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";}
+ $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";}
+ }
+ }
}
}
@@ -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";}
$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";}
+ $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";}
+ }
+ }
# $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";}
$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";}
+ $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";}
+ }
+ }
}
}
diff --git a/www/agc/vdc_db_query.php b/www/agc/vdc_db_query.php
index cf3c9037..f0133293 100644
--- a/www/agc/vdc_db_query.php
+++ b/www/agc/vdc_db_query.php
@@ -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";}
+ $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";}
$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";}
+ }
+
}
$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)
{
diff --git a/www/agc/vicidial.php b/www/agc/vicidial.php
index e78c9ca6..67568b1c 100644
--- a/www/agc/vicidial.php
+++ b/www/agc/vicidial.php
@@ -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 "\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 "\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='';
+ var qm_phone='';
var DiaLControl_auto_HTML = "
";
var DiaLControl_auto_HTML_ready = "
";
var DiaLControl_auto_HTML_OFF = "
";
@@ -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);
diff --git a/www/vicidial/admin.php b/www/vicidial/admin.php
index f701f227..60d53636 100644
--- a/www/vicidial/admin.php
+++ b/www/vicidial/admin.php
@@ -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 "\n";
echo "
\n";
echo "";
@@ -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 "| Add A Dial Status: | |