diff --git a/bin/AST_VDremote_agents.pl b/bin/AST_VDremote_agents.pl index 730a5e4b..c437404d 100644 --- a/bin/AST_VDremote_agents.pl +++ b/bin/AST_VDremote_agents.pl @@ -212,7 +212,7 @@ while($one_day_interval > 0) &event_logger; - $stmtA = "UPDATE vicidial_live_agents set status='INCALL', last_call_time='$SQLdate' where server_ip='$server_ip' and status IN('QUEUE') and extension LIKE \"R/%\";"; + $stmtA = "UPDATE vicidial_live_agents set status='INCALL', last_call_time='$SQLdate',comments='REMOTE' where server_ip='$server_ip' and status IN('QUEUE') and extension LIKE \"R/%\";"; $affected_rows = $dbhA->do($stmtA); $event_string = "| QUEUEd call listing vla UPDATEd $affected_rows"; @@ -411,7 +411,7 @@ while($one_day_interval > 0) } $sthA->finish(); - $stmtA = "INSERT INTO vicidial_live_agents (user,server_ip,conf_exten,extension,status,campaign_id,random_id,last_call_time,last_update_time,last_call_finish,closer_campaigns,channel,uniqueid,callerid,user_level) values('$DBremote_user[$h]','$server_ip','$DBremote_conf_exten[$h]','R/$DBremote_user[$h]','READY','$DBremote_campaign[$h]','$DBremote_random[$h]','$SQLdate','$tsSQLdate','$SQLdate','$DBremote_closer[$h]','','','','$DBuser_level[$h]');"; + $stmtA = "INSERT INTO vicidial_live_agents (user,server_ip,conf_exten,extension,status,campaign_id,random_id,last_call_time,last_update_time,last_call_finish,closer_campaigns,channel,uniqueid,callerid,user_level,comments) values('$DBremote_user[$h]','$server_ip','$DBremote_conf_exten[$h]','R/$DBremote_user[$h]','READY','$DBremote_campaign[$h]','$DBremote_random[$h]','$SQLdate','$tsSQLdate','$SQLdate','$DBremote_closer[$h]','','','','$DBuser_level[$h]','REMOTE');"; $affected_rows = $dbhA->do($stmtA); if ($DBX) {print STDERR "$DBremote_user[$h] NEW INSERT\n";} if ($TESTrun > 0) diff --git a/docs/BASE_INSTALL.txt b/docs/BASE_INSTALL.txt index 36ae864a..f5b085dd 100644 --- a/docs/BASE_INSTALL.txt +++ b/docs/BASE_INSTALL.txt @@ -21,7 +21,7 @@ REQUIREMENTS: - asterisk-perl 0.08, do NOT use the 0.09 version, it does not work with VICIDIAL - MySQL server or mysqlclientlibs, must be version 4.0.X or higher - If you will be installing Asterisk 1.4 releases you need Gnu Make 3.81 -- Apache/PHP server with php.ini memory_limit set to 12M minimum +- Apache/PHP server with php.ini memory_limit set to 24M diff --git a/docs/REQUIREMENTS.txt b/docs/REQUIREMENTS.txt index 630590d4..ca0a0e19 100644 --- a/docs/REQUIREMENTS.txt +++ b/docs/REQUIREMENTS.txt @@ -20,7 +20,7 @@ Requirements for installing astGUIclient/VICIDIAL on an Asterisk server: - Perl5 with several CPAN modules(Time::HiRes, DBD::mysql, Net::Telnet, etc) - asterisk-per-0.08 perl module required (0.09 version does NOT work) - Access to MySQL server and mysqlclientlibs, must be version 4.0.X or higher -- Access to Apache/PHP webserver, php.ini memory_limit set to 12M minimum +- Access to Apache/PHP webserver, php.ini memory_limit set to 24M - Several entries in the crontab for interval-running scripts and keepalives Requirements for using the astGUIclient/VICIDIAL web-client versions diff --git a/docs/SCRATCH_INSTALL.txt b/docs/SCRATCH_INSTALL.txt index ee2ef68e..e759b4c2 100644 --- a/docs/SCRATCH_INSTALL.txt +++ b/docs/SCRATCH_INSTALL.txt @@ -692,7 +692,7 @@ installation on another machine) - cp php.ini-dist /usr/local/lib/php.ini NOTE: you will want to make sure notice logging is turned off: error_reporting = E_ALL & ~E_NOTICE ; (this is default) - !!! REQUIRED !!! raise the memory limit for scripts in php.ini: +!!! REQUIRED !!! raise the memory limit for scripts in php.ini: memory_limit = 24M - vi /usr/local/apache2/conf/httpd.conf add the following lines: diff --git a/extras/MySQL_AST_CREATE_tables.sql b/extras/MySQL_AST_CREATE_tables.sql index cc68fd1a..7e1cc72a 100644 --- a/extras/MySQL_AST_CREATE_tables.sql +++ b/extras/MySQL_AST_CREATE_tables.sql @@ -308,6 +308,7 @@ last_call_finish DATETIME, closer_campaigns TEXT, call_server_ip VARCHAR(15), user_level INT(2) default '0', +comments VARCHAR(20), index (random_id), index (last_call_time), index (last_update_time), @@ -512,7 +513,8 @@ adaptive_intensity VARCHAR(6) default '0', adaptive_dl_diff_target SMALLINT(3) default '0', concurrent_transfers ENUM('AUTO','1','2','3','4','5','6','7','8','9','10') default 'AUTO', auto_alt_dial ENUM('NONE','ALT_ONLY','ADDR3_ONLY','ALT_AND_ADDR3') default 'NONE', -auto_alt_dial_statuses VARCHAR(255) default ' B N NA DC -' +auto_alt_dial_statuses VARCHAR(255) default ' B N NA DC -', +agent_pause_codes_active ENUM('Y','N') default 'N' ); CREATE TABLE vicidial_lists ( @@ -658,7 +660,7 @@ user VARCHAR(20), server_ip VARCHAR(15) NOT NULL, event_time DATETIME, lead_id INT(9) UNSIGNED, -campaign_id VARCHAR(8), +campaign_id VARCHAR(8), pause_epoch INT(10) UNSIGNED, pause_sec SMALLINT(5) UNSIGNED default '0', wait_epoch INT(10) UNSIGNED, @@ -668,7 +670,9 @@ talk_sec SMALLINT(5) UNSIGNED default '0', dispo_epoch INT(10) UNSIGNED, dispo_sec SMALLINT(5) UNSIGNED default '0', status VARCHAR(6), -user_group VARCHAR(20) +user_group VARCHAR(20), +comments VARCHAR(20), +sub_status VARCHAR(6) ); CREATE TABLE vicidial_scripts ( @@ -842,6 +846,14 @@ country CHAR(3), country_code SMALLINT(5) UNSIGNED ); + CREATE TABLE vicidial_pause_codes ( +pause_code VARCHAR(6) NOT NULL, +pause_code_name VARCHAR(30), +billable ENUM('NO','YES','HALF') default 'NO', +campaign_id VARCHAR(8), +index (campaign_id) +); + INSERT INTO vicidial_user_groups SET user_group='ADMIN',group_name='VICIDIAL ADMINISTRATORS',allowed_campaigns=' -ALL-CAMPAIGNS- - -'; diff --git a/extras/upgrade_2.0.3.sql b/extras/upgrade_2.0.3.sql index 47c2c048..71112315 100644 --- a/extras/upgrade_2.0.3.sql +++ b/extras/upgrade_2.0.3.sql @@ -36,3 +36,17 @@ UPDATE vicidial_users SET modify_remoteagents='1' where delete_remote_agents='1' UPDATE vicidial_users SET modify_servers='1' where ast_admin_access='1'; ALTER TABLE inbound_numbers ADD department VARCHAR(30); + +ALTER TABLE vicidial_agent_log ADD comments VARCHAR(20); +ALTER TABLE vicidial_agent_log ADD sub_status VARCHAR(6); +ALTER TABLE vicidial_live_agents ADD comments VARCHAR(20); + +ALTER TABLE vicidial_campaigns ADD agent_pause_codes_active ENUM('Y','N') default 'N'; + + CREATE TABLE vicidial_pause_codes ( +pause_code VARCHAR(6) NOT NULL, +pause_code_name VARCHAR(30), +billable ENUM('NO','YES','HALF') default 'NO', +campaign_id VARCHAR(8), +index (campaign_id) +); diff --git a/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.3.txt b/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.3.txt index c1a61e71..f9d4064e 100644 --- a/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.3.txt +++ b/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.3.txt @@ -84,6 +84,24 @@ View Reports: || You do not have permission to view this page|| Lead Time Zone Lookup: || Lead Duplicate Check: || +Agent Pause Codes Active -<\/B> Allows agents to select a pause code when they click on the PAUSE button in vicidial.php. Pause codes are definable per campaign at the bottom of the campaign view detail screen and they are stored in the vicidial_agent_log table. Default is N|| +AGENT PAUSE CODES|| +If the Agent Pause Codes Active field is set to active then the agents will be able to select from these pause codes when they click on the PAUSE button on their screens. This data is then stored in the vicidial agent log. The Pause code must contain only letters and numbers and be less than 7 characters long. The pause code name can be no longer than 30 characters.|| +AGENT PAUSE CODES FOR THIS CAMPAIGN|| +PAUSE CODES|| +BILLABLE|| +ADD NEW AGENT PAUSE CODE|| +Pause Code: || +Pause Code Name: || +Billable: || +New Agent Pause Code|| +Modify Agent Pause Code|| +Delete Agent Pause Code|| +AGENT PAUSE CODE NOT ADDED|| +there is already an entry for this campaign with this pause code|| +AGENT PAUSE CODE ADDED|| +AGENT PAUSE CODE NOT MODIFIED|| +CAMPAIGN PAUSE CODE NOT DELETED|| ############################################################ CLIENT diff --git a/www/agc/vdc_db_query.php b/www/agc/vdc_db_query.php index 5d6945ac..1fa78544 100644 --- a/www/agc/vdc_db_query.php +++ b/www/agc/vdc_db_query.php @@ -539,7 +539,7 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); } - $stmt="UPDATE vicidial_agent_log set lead_id='$lead_id' where agent_log_id='$agent_log_id';"; + $stmt="UPDATE vicidial_agent_log set lead_id='$lead_id',comments='MANUAL' where agent_log_id='$agent_log_id';"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); @@ -583,7 +583,7 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); ### update the agent status to INCALL in vicidial_live_agents - $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',callerid='$MqueryCID',lead_id='$lead_id' where user='$user' and server_ip='$server_ip';"; + $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',callerid='$MqueryCID',lead_id='$lead_id',comments='MANUAL' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); } @@ -720,7 +720,7 @@ if ($ACTION == 'manDiaLonly') $rslt=mysql_query($stmt, $link); ### update the agent status to INCALL in vicidial_live_agents - $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',callerid='$MqueryCID',lead_id='$lead_id' where user='$user' and server_ip='$server_ip';"; + $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',callerid='$MqueryCID',lead_id='$lead_id',comments='MANUAL' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); @@ -970,7 +970,7 @@ if ($stage == "end") if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); - $stmt = "UPDATE vicidial_live_agents set status='PAUSED',lead_id='',uniqueid=0,callerid='',channel='',call_server_ip='',last_call_finish='$NOW_TIME' where user='$user' and server_ip='$server_ip';"; + $stmt = "UPDATE vicidial_live_agents set status='PAUSED',lead_id='',uniqueid=0,callerid='',channel='',call_server_ip='',last_call_finish='$NOW_TIME',comments='' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); } @@ -980,7 +980,7 @@ if ($stage == "end") if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); - $stmt = "UPDATE vicidial_live_agents set status='PAUSED',lead_id='',uniqueid=0,callerid='',channel='',call_server_ip='',last_call_finish='$NOW_TIME' where user='$user' and server_ip='$server_ip';"; + $stmt = "UPDATE vicidial_live_agents set status='PAUSED',lead_id='',uniqueid=0,callerid='',channel='',call_server_ip='',last_call_finish='$NOW_TIME',comments='' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); } @@ -1182,7 +1182,7 @@ if ($ACTION == 'VDADcheckINCOMING') echo "1\n" . $lead_id . '|' . $uniqueid . '|' . $callerid . '|' . $channel . '|' . $call_server_ip . "|\n"; ### update the agent status to INCALL in vicidial_live_agents - $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME' where user='$user' and server_ip='$server_ip';"; + $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',comments='AUTO' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); @@ -1666,7 +1666,7 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) else { $random = (rand(1000000, 9999999) + 10000000); - $stmt="UPDATE vicidial_live_agents set status='$stage',lead_id='',uniqueid=0,callerid='',channel='', random_id='$random' where user='$user' and server_ip='$server_ip';"; + $stmt="UPDATE vicidial_live_agents set status='$stage',lead_id='',uniqueid=0,callerid='',channel='', random_id='$random',comments='' where user='$user' and server_ip='$server_ip';"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); diff --git a/www/agc/vicidial.php b/www/agc/vicidial.php index 872f84b3..b42554b7 100644 --- a/www/agc/vicidial.php +++ b/www/agc/vicidial.php @@ -1061,7 +1061,7 @@ else $StarTtimE = date("U"); $NOW_TIME = date("Y-m-d H:i:s"); ##### Agent is going to log in so insert the vicidial_agent_log entry now - $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch,user_group) values('$VD_login','$server_ip','$NOW_TIME','$VD_campaign','$StarTtimE','0','$StarTtimE','$VU_user_group');"; + $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch,user_group,sub_status) values('$VD_login','$server_ip','$NOW_TIME','$VD_campaign','$StarTtimE','0','$StarTtimE','$VU_user_group','LOGIN');"; if ($DB) {echo "$stmt\n";} if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); diff --git a/www/vicidial/admin.php b/www/vicidial/admin.php index 0931d61b..21fef6a5 100644 --- a/www/vicidial/admin.php +++ b/www/vicidial/admin.php @@ -529,6 +529,14 @@ if (isset($_GET["modify_servers"])) {$modify_servers=$_GET["modify_servers"]; elseif (isset($_POST["modify_servers"])) {$modify_servers=$_POST["modify_servers"];} if (isset($_GET["view_reports"])) {$view_reports=$_GET["view_reports"];} elseif (isset($_POST["view_reports"])) {$view_reports=$_POST["view_reports"];} +if (isset($_GET["agent_pause_codes_active"])) {$agent_pause_codes_active=$_GET["agent_pause_codes_active"];} + elseif (isset($_POST["agent_pause_codes_active"])) {$agent_pause_codes_active=$_POST["agent_pause_codes_active"];} +if (isset($_GET["pause_code"])) {$pause_code=$_GET["pause_code"];} + elseif (isset($_POST["pause_code"])) {$pause_code=$_POST["pause_code"];} +if (isset($_GET["pause_code_name"])) {$pause_code_name=$_GET["pause_code_name"];} + elseif (isset($_POST["pause_code_name"])) {$pause_code_name=$_POST["pause_code_name"];} +if (isset($_GET["billable"])) {$billable=$_GET["billable"];} + elseif (isset($_POST["billable"])) {$billable=$_POST["billable"];} if (isset($script_id)) {$script_id= strtoupper($script_id);} @@ -666,6 +674,7 @@ $available_only_ratio_tally = ereg_replace("[^NY]","",$available_only_ratio_tall $sys_perf_log = ereg_replace("[^NY]","",$sys_perf_log); $vicidial_balance_active = ereg_replace("[^NY]","",$vicidial_balance_active); $vd_server_logs = ereg_replace("[^NY]","",$vd_server_logs); +$agent_pause_codes_active = ereg_replace("[^NY]","",$agent_pause_codes_active); ### ALPHA-NUMERIC ONLY ### $PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); @@ -894,12 +903,13 @@ $lead_filter_sql = ereg_replace(";","",$lead_filter_sql); # 70118-1706 - Added new user group displays and links # 70123-1519 - Added user permission settings for all sections # 70124-1346 - Fixed spelling errors and formatting consistency +# 70202-1120 - Added agent_pause_codes section to campaigns # # 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 -$version = '2.0.82'; -$build = '70124-1346'; +$version = '2.0.83'; +$build = '70202-1120'; $STARTtime = date("U"); @@ -1023,6 +1033,7 @@ if ($ADD==22) {$hh='campaigns'; echo "New Campaign Status Addition";} if ($ADD==23) {$hh='campaigns'; echo "New Campaign HotKey Addition";} if ($ADD==25) {$hh='campaigns'; echo "New Campaign Lead Recycle Addition";} if ($ADD==26) {$hh='campaigns'; echo "New Auto Alt Dial Status";} +if ($ADD==27) {$hh='campaigns'; echo "New Agent Pause Code";} if ($ADD==211) {$hh='lists'; echo "New List Addition";} if ($ADD==2111) {$hh='ingroups'; echo "New In-Group Addition";} if ($ADD==21111) {$hh='remoteagent'; echo "New Remote Agents Addition";} @@ -1061,6 +1072,7 @@ if ($ADD==42) {$hh='campaigns'; echo "Modify Campaign Status";} if ($ADD==43) {$hh='campaigns'; echo "Modify Campaign HotKey";} if ($ADD==44) {$hh='campaigns'; echo "Modify Campaign - Basic View";} if ($ADD==45) {$hh='campaigns'; echo "Modify Campaign Lead Recycle";} +if ($ADD==47) {$hh='campaigns'; echo "Modify Agent Pause Code";} if ($ADD==411) {$hh='lists'; echo "Modify List";} if ($ADD==4111) {$hh='ingroups'; echo "Modify In-Group";} if ($ADD==41111) {$hh='remoteagent'; echo "Modify Remote Agents";} @@ -1096,6 +1108,7 @@ if ($ADD==62) {$hh='campaigns'; echo "Logout Agents";} if ($ADD==63) {$hh='campaigns'; echo "Emergency VDAC Jam Clear";} if ($ADD==65) {$hh='campaigns'; echo "Delete Lead Recycle";} if ($ADD==66) {$hh='campaigns'; echo "Delete Auto Alt Dial Status";} +if ($ADD==67) {$hh='campaigns'; echo "Delete Agent Pause Code";} if ($ADD==611) {$hh='lists'; echo "Delete List";} if ($ADD==6111) {$hh='ingroups'; echo "Delete In-Group";} if ($ADD==61111) {$hh='remoteagent'; echo "Delete Remote Agents";} @@ -1804,6 +1817,11 @@ echo "