diff --git a/agc_2-X/trunk/bin/AST_VDremote_agents.pl b/agc_2-X/trunk/bin/AST_VDremote_agents.pl index 730a5e4b..c437404d 100644 --- a/agc_2-X/trunk/bin/AST_VDremote_agents.pl +++ b/agc_2-X/trunk/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/agc_2-X/trunk/docs/BASE_INSTALL.txt b/agc_2-X/trunk/docs/BASE_INSTALL.txt index 36ae864a..f5b085dd 100644 --- a/agc_2-X/trunk/docs/BASE_INSTALL.txt +++ b/agc_2-X/trunk/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/agc_2-X/trunk/docs/REQUIREMENTS.txt b/agc_2-X/trunk/docs/REQUIREMENTS.txt index 630590d4..ca0a0e19 100644 --- a/agc_2-X/trunk/docs/REQUIREMENTS.txt +++ b/agc_2-X/trunk/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/agc_2-X/trunk/docs/SCRATCH_INSTALL.txt b/agc_2-X/trunk/docs/SCRATCH_INSTALL.txt index ee2ef68e..e759b4c2 100644 --- a/agc_2-X/trunk/docs/SCRATCH_INSTALL.txt +++ b/agc_2-X/trunk/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/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql b/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql index cc68fd1a..7e1cc72a 100644 --- a/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql +++ b/agc_2-X/trunk/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/agc_2-X/trunk/extras/upgrade_2.0.3.sql b/agc_2-X/trunk/extras/upgrade_2.0.3.sql index 47c2c048..71112315 100644 --- a/agc_2-X/trunk/extras/upgrade_2.0.3.sql +++ b/agc_2-X/trunk/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/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.3.txt b/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.3.txt index c1a61e71..f9d4064e 100644 --- a/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.3.txt +++ b/agc_2-X/trunk/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/agc_2-X/trunk/www/agc/vdc_db_query.php b/agc_2-X/trunk/www/agc/vdc_db_query.php index 5d6945ac..1fa78544 100644 --- a/agc_2-X/trunk/www/agc/vdc_db_query.php +++ b/agc_2-X/trunk/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/agc_2-X/trunk/www/agc/vicidial.php b/agc_2-X/trunk/www/agc/vicidial.php index 872f84b3..b42554b7 100644 --- a/agc_2-X/trunk/www/agc/vicidial.php +++ b/agc_2-X/trunk/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/agc_2-X/trunk/www/vicidial/admin.php b/agc_2-X/trunk/www/vicidial/admin.php index 0931d61b..21fef6a5 100644 --- a/agc_2-X/trunk/www/vicidial/admin.php +++ b/agc_2-X/trunk/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 "
Allowed Inbound Groups - For CLOSER campaigns only. Here is where you select the inbound groups you want agents in this CLOSER campaign to be able to take calls from. It is important for BLENDED inbound-outbound campaigns only to select the inbound groups that are used for agents in this campaign. The calls coming into the inbound groups selected here will be counted as active calls for a blended campaign even if all agents in the campaign are not logged in to receive calls from all of those selected inbound groups. +
+ +
+Agent Pause Codes Active - 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. +



@@ -2006,6 +2024,17 @@ echo "\n"; + echo "\n"; + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)", $campaign_id)) { @@ -7086,8 +7237,8 @@ if ($ADD==31) echo "\n"; echo "\n"; echo "\n"; - echo "\n"; - echo "\n"; + echo "\n"; + echo "\n"; echo "\n"; echo "\n"; echo "\n"; @@ -7102,8 +7253,8 @@ if ($ADD==31) echo "Status:   \n"; - echo "Attempt Delay: \n"; - echo "Attempt Maximum: \n"; + echo "Attempt Delay: \n"; + echo "Attempt Maximum: \n"; echo "
\n"; echo "
\n"; @@ -7141,11 +7292,54 @@ if ($ADD==31) echo "   \n"; echo "
\n"; + echo "
\n"; + + + + echo "

AGENT PAUSE CODES FOR THIS CAMPAIGN:   $NWB#vicidial_pause_codes$NWE
\n"; + echo "



+ +VICIDIAL 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. + + + + +



VICIDIAL_USER_GROUPS TABLE

@@ -3848,6 +3877,46 @@ $ADD=31; } +###################### +# ADD=27 adds the new campaign agent pause code entry to the system +###################### + +if ($ADD==27) +{ + echo ""; + $stmt="SELECT count(*) from vicidial_pause_codes where campaign_id='$campaign_id' and pause_code='$pause_code';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + {echo "
AGENT PAUSE CODE NOT ADDED - there is already an entry for this campaign with this pause code\n";} + else + { + if ( (strlen($campaign_id) < 2) or (strlen($pause_code) < 1) or (strlen($pause_code) > 6) or (strlen($pause_code_name) < 2) ) + { + echo "
AGENT PAUSE CODE NOT ADDED - Please go back and look at the data you entered\n"; + echo "
pause code must be between 1 and 6 characters in length\n"; + echo "
pause code name must be between 2 and 30 characters in length\n"; + } + else + { + echo "
AGENT PAUSE CODE ADDED: $campaign_id - $pause_code - $pause_code_name\n"; + + $stmt="INSERT INTO vicidial_pause_codes(campaign_id,pause_code,pause_code_name,billable) values('$campaign_id','$pause_code','$pause_code_name','$billable');"; + $rslt=mysql_query($stmt, $link); + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|ADD A NEW AGENT PAUSE CODE|$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } +$ADD=31; +} + + ###################### # ADD=211 adds the new list to the system ###################### @@ -4517,7 +4586,7 @@ if ($ADD==41) } } } - $stmtA="UPDATE vicidial_campaigns set campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',allow_closers='$allow_closers',hopper_level='$hopper_level', $adlSQL next_agent_call='$next_agent_call', local_call_time='$local_call_time', voicemail_ext='$voicemail_ext', dial_timeout='$dial_timeout', dial_prefix='$dial_prefix', campaign_cid='$campaign_cid', campaign_vdad_exten='$campaign_vdad_exten', web_form_address='" . mysql_real_escape_string($web_form_address) . "', park_ext='$park_ext', park_file_name='$park_file_name', campaign_rec_exten='$campaign_rec_exten', campaign_recording='$campaign_recording', campaign_rec_filename='$campaign_rec_filename', campaign_script='$script_id', get_call_launch='$get_call_launch', am_message_exten='$am_message_exten', amd_send_to_vmx='$amd_send_to_vmx', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number', xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',lead_filter_id='$lead_filter_id',alt_number_dialing='$alt_number_dialing',scheduled_callbacks='$scheduled_callbacks',safe_harbor_message='$safe_harbor_message',drop_call_seconds='$drop_call_seconds',safe_harbor_exten='$safe_harbor_exten',wrapup_seconds='$wrapup_seconds',wrapup_message='$wrapup_message',closer_campaigns='$groups_value',use_internal_dnc='$use_internal_dnc',allcalls_delay='$allcalls_delay',omit_phone_code='$omit_phone_code',dial_method='$dial_method',available_only_ratio_tally='$available_only_ratio_tally',adaptive_dropped_percentage='$adaptive_dropped_percentage',adaptive_maximum_level='$adaptive_maximum_level',adaptive_latest_server_time='$adaptive_latest_server_time',adaptive_intensity='$adaptive_intensity',adaptive_dl_diff_target='$adaptive_dl_diff_target',concurrent_transfers='$concurrent_transfers',auto_alt_dial='$auto_alt_dial' where campaign_id='$campaign_id';"; + $stmtA="UPDATE vicidial_campaigns set campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',allow_closers='$allow_closers',hopper_level='$hopper_level', $adlSQL next_agent_call='$next_agent_call', local_call_time='$local_call_time', voicemail_ext='$voicemail_ext', dial_timeout='$dial_timeout', dial_prefix='$dial_prefix', campaign_cid='$campaign_cid', campaign_vdad_exten='$campaign_vdad_exten', web_form_address='" . mysql_real_escape_string($web_form_address) . "', park_ext='$park_ext', park_file_name='$park_file_name', campaign_rec_exten='$campaign_rec_exten', campaign_recording='$campaign_recording', campaign_rec_filename='$campaign_rec_filename', campaign_script='$script_id', get_call_launch='$get_call_launch', am_message_exten='$am_message_exten', amd_send_to_vmx='$amd_send_to_vmx', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number', xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',lead_filter_id='$lead_filter_id',alt_number_dialing='$alt_number_dialing',scheduled_callbacks='$scheduled_callbacks',safe_harbor_message='$safe_harbor_message',drop_call_seconds='$drop_call_seconds',safe_harbor_exten='$safe_harbor_exten',wrapup_seconds='$wrapup_seconds',wrapup_message='$wrapup_message',closer_campaigns='$groups_value',use_internal_dnc='$use_internal_dnc',allcalls_delay='$allcalls_delay',omit_phone_code='$omit_phone_code',dial_method='$dial_method',available_only_ratio_tally='$available_only_ratio_tally',adaptive_dropped_percentage='$adaptive_dropped_percentage',adaptive_maximum_level='$adaptive_maximum_level',adaptive_latest_server_time='$adaptive_latest_server_time',adaptive_intensity='$adaptive_intensity',adaptive_dl_diff_target='$adaptive_dl_diff_target',concurrent_transfers='$concurrent_transfers',auto_alt_dial='$auto_alt_dial',agent_pause_codes_active='$agent_pause_codes_active' where campaign_id='$campaign_id';"; $rslt=mysql_query($stmtA, $link); if ($reset_hopper == 'Y') @@ -4752,6 +4821,46 @@ if ($ADD==45) $ADD=31; # go to campaign modification form below } +###################### +# ADD=47 modify agent pause code in the system +###################### + +if ($ADD==47) +{ + if ($LOGmodify_campaigns==1) + { + echo ""; + + if ( (strlen($campaign_id) < 2) or (strlen($pause_code) < 1) or (strlen($pause_code) > 6) or (strlen($pause_code_name) < 2) ) + { + echo "
AGENT PAUSE CODE NOT MODIFIED - Please go back and look at the data you entered\n"; + echo "
pause_code must be between 1 and 6 characters in length\n"; + echo "
pause_code name must be between 2 and 30 characters in length\n"; + } + else + { + echo "
AGENT PAUSE CODE MODIFIED: $campaign_id - $pause_code - $pause_code_name\n"; + + $stmt="UPDATE vicidial_pause_codes SET pause_code_name='$pause_code_name',billable='$billable' where campaign_id='$campaign_id' and pause_code='$pause_code';"; + $rslt=mysql_query($stmt, $link); + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|MODIFY AGENT PAUSECODE|$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=31; # go to campaign modification form below +} + ###################### # ADD=411 submit list modifications to the system ###################### @@ -5967,6 +6076,45 @@ if ($ADD==66) $ADD=31; # go to campaign modification form below } +###################### +# ADD=67 delete agent pause code in the system +###################### + +if ($ADD==67) +{ + if ($LOGmodify_campaigns==1) + { + echo ""; + + if ( (strlen($campaign_id) < 2) or (strlen($pause_code) < 1) ) + { + echo "
CAMPAIGN PAUSE CODE NOT DELETED - Please go back and look at the data you entered\n"; + echo "
pause code must be between 1 and 6 characters in length\n"; + } + else + { + echo "
CAMPAIGN PAUSE CODE DELETED: $campaign_id - $pause_code\n"; + + $stmt="DELETE FROM vicidial_pause_codes where campaign_id='$campaign_id' and pause_code='$pause_code';"; + $rslt=mysql_query($stmt, $link); + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|DELETE AGENT PAUSECODE|$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=31; # go to campaign modification form below +} + ###################### # ADD=611 delete list record and all leads within it @@ -6692,6 +6840,7 @@ if ($ADD==31) $concurrent_transfers = $row[53]; $auto_alt_dial = $row[54]; $auto_alt_dial_statuses = $row[55]; + $agent_pause_codes_active = $row[56]; echo "
MODIFY A CAMPAIGNS RECORD: $row[0] -
Basic View"; echo " | Detail View | "; @@ -6895,6 +7044,8 @@ if ($ADD==31) echo "
Use Internal DNC List: $NWB#vicidial_campaigns-use_internal_dnc$NWE
Agent Pause Codes Active: $NWB#vicidial_campaigns-agent_pause_codes_active$NWE
DELETE
\n"; + echo "\n"; + + $stmt="SELECT * from vicidial_pause_codes where campaign_id='$campaign_id' order by pause_code"; + $rslt=mysql_query($stmt, $link); + $pause_codes_to_print = mysql_num_rows($rslt); + $o=0; + while ($pause_codes_to_print > $o) { + $rowx=mysql_fetch_row($rslt); + $o++; + + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + } + + echo "
PAUSE CODESBILLABLEMODIFYDELETE
$rowx[0]\n"; + echo "\n"; + echo "\n"; + echo "  \n"; + echo "
DELETE
\n"; + + echo "
ADD NEW AGENT PAUSE CODE
\n"; + echo "\n"; + echo "\n"; + echo "Pause Code: \n"; + echo "Pause Code Name: \n"; + echo "   Billable: \n"; + echo "
\n"; + echo "

\n"; + + echo "

\n"; echo "
LOG ALL AGENTS OUT OF THIS CAMPAIGN

\n"; echo "EMERGENCY VDAC CLEAR FOR THIS CAMPAIGN

\n";