diff --git a/UPGRADE b/UPGRADE index 54cc09ba..599f2ea0 100644 --- a/UPGRADE +++ b/UPGRADE @@ -133,7 +133,7 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom 29. Added manual dial and inbound queue_log logging capability for better QueueMetrics compatibility - +30. Added some basic agent interface API functions and an agc/api.php script diff --git a/docs/AGENT_API.txt b/docs/AGENT_API.txt new file mode 100644 index 00000000..f5863d99 --- /dev/null +++ b/docs/AGENT_API.txt @@ -0,0 +1,38 @@ +AGENT API DOCUMENT 2008-07-03 + +This document describes the functions of an API(Application Programming Interface) +for the VICIDIAL Agent screen. This functionality will be rather limited at first +and will be built upon as critical functions are identified and programmed into it. + + + +API functions: +external_hangup - sends command to hangup the current phone call for one specific agent(Hangup Customer) +external_status - sends command to set the disposition for one specific agent and move on to next call + + + +New scripts: +/agc/api.php - the script that is accessed to execute commands + + + +Example URL strings for API calls: +http://server/agc/api.php?user=6666&pass=1234&agent_user=1000&function=external_hangup&value=1 +http://server/agc/api.php?user=6666&pass=1234&agent_user=1000&function=external_status&value=A + + + +Example MySQL queries for executing API functions: +update vicidial_live_agents set external_hangup=1 where user='1000'; +update vicidial_live_agents set external_status='A' where user='1000'; +update vicidial_live_agents set status='PAUSED' where user='1000'; + + +Database changes: +ALTER TABLE vicidial_live_agents ADD external_hangup VARCHAR(1) default ''; +ALTER TABLE vicidial_live_agents ADD external_status VARCHAR(6) default ''; + +ALTER TABLE vicidial_users ADD vdc_agent_api_access ENUM('0','1') default '0'; + +ALTER TABLE system_settings ADD vdc_agent_api_active ENUM('0','1') default '0'; diff --git a/extras/MySQL_AST_CREATE_tables.sql b/extras/MySQL_AST_CREATE_tables.sql index bd2a2e00..a775b21f 100644 --- a/extras/MySQL_AST_CREATE_tables.sql +++ b/extras/MySQL_AST_CREATE_tables.sql @@ -575,7 +575,8 @@ survey_ni_status VARCHAR(6) default 'NI', survey_response_digit_map VARCHAR(255) default '1-DEMOCRAT|2-REPUBLICAN|3-INDEPENDANT|8-OPTOUT|X-NO RESPONSE|', survey_xfer_exten VARCHAR(20) default '8300', survey_camp_record_dir VARCHAR(255) default '/home/survey', -disable_alter_custphone ENUM('Y','N') default 'Y' +disable_alter_custphone ENUM('Y','N') default 'Y', +display_queue_count ENUM('Y','N') default 'Y' ); CREATE TABLE vicidial_lists ( @@ -1218,5 +1219,5 @@ INSERT INTO vicidial_state_call_times SET state_call_time_id='utah',state_call_t INSERT INTO vicidial_state_call_times SET state_call_time_id='washington',state_call_time_state='WA',state_call_time_name='Washington 8am',sct_default_start='800',sct_default_stop='2100'; INSERT INTO vicidial_state_call_times SET state_call_time_id='wyoming',state_call_time_state='WY',state_call_time_name='Wyoming 8am-8pm',sct_default_start='800',sct_default_stop='2000'; -UPDATE system_settings SET db_schema_version='1096'; +UPDATE system_settings SET db_schema_version='1097'; diff --git a/extras/upgrade_2.0.5.sql b/extras/upgrade_2.0.5.sql index aa8140e5..129f80dc 100644 --- a/extras/upgrade_2.0.5.sql +++ b/extras/upgrade_2.0.5.sql @@ -289,3 +289,7 @@ ALTER TABLE vicidial_users ADD vdc_agent_api_access ENUM('0','1') default '0'; ALTER TABLE system_settings ADD vdc_agent_api_active ENUM('0','1') default '0'; UPDATE system_settings SET db_schema_version='1096'; + +ALTER TABLE vicidial_campaigns ADD display_queue_count ENUM('Y','N') default 'Y'; + +UPDATE system_settings SET db_schema_version='1097'; diff --git a/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.5.txt b/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.5.txt index 97be27d1..996f6b0f 100644 --- a/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.5.txt +++ b/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.5.txt @@ -225,6 +225,8 @@ Agent Alter Customer Phone Override: || Agent API Access: || Disable Alter Customer Phone: || Agent API Active: || +Agent Display Queue Count -<\/B> If set to Y, when a customer is waiting for an agent, the Queue Calls display at the top of the agent screen will turn red and show the number of waiting calls. Default is Y|| +Agent Display Queue Count: || ############################################################ CLIENT diff --git a/www/agc/api.php b/www/agc/api.php new file mode 100644 index 00000000..92f1ee48 --- /dev/null +++ b/www/agc/api.php @@ -0,0 +1,207 @@ + LICENSE: AGPLv2 +# +# This script is designed as an API(Application Programming Interface) to allow +# other programs to interact with the VICIDIAL Agent screen +# +# required variables: +# - $user +# - $pass +# - $agent_user +# - $function - ('external_hangup','external_status') +# - $value +# - $extra_value +# - $format - ('text','debug') + +# CHANGELOG: +# 80703-2225 - First build of script +# + +$version = '2.0.5-1'; +$build = '80703-2225'; + +require("dbconnect.php"); + +### If you have globals turned off uncomment these lines +if (isset($_GET["user"])) {$user=$_GET["user"];} + elseif (isset($_POST["user"])) {$user=$_POST["user"];} +if (isset($_GET["pass"])) {$pass=$_GET["pass"];} + elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} +if (isset($_GET["agent_user"])) {$agent_user=$_GET["agent_user"];} + elseif (isset($_POST["agent_user"])) {$agent_user=$_POST["agent_user"];} +if (isset($_GET["function"])) {$function=$_GET["function"];} + elseif (isset($_POST["function"])) {$function=$_POST["function"];} +if (isset($_GET["value"])) {$value=$_GET["value"];} + elseif (isset($_POST["value"])) {$value=$_POST["value"];} +if (isset($_GET["extra_value"])) {$extra_value=$_GET["extra_value"];} + elseif (isset($_POST["extra_value"])) {$extra_value=$_POST["extra_value"];} +if (isset($_GET["format"])) {$format=$_GET["format"];} + elseif (isset($_POST["format"])) {$format=$_POST["format"];} + + +header ("Content-type: text/html; charset=utf-8"); +header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 +header ("Pragma: no-cache"); // HTTP/1.0 + +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ +$user=ereg_replace("[^0-9a-zA-Z]","",$user); +$pass=ereg_replace("[^0-9a-zA-Z]","",$pass); +$agent_user=ereg_replace("[^0-9a-zA-Z]","",$agent_user); +} + +$StarTtime = date("U"); +$NOW_DATE = date("Y-m-d"); +$NOW_TIME = date("Y-m-d H:i:s"); +$CIDdate = date("mdHis"); +$ENTRYdate = date("YmdHis"); +$MT[0]=''; + +if ($ACTION == 'LogiNCamPaigns') + { + $skip_user_validation=1; + } +else + { + $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and vdc_agent_api_access = '1';"; + if ($DB) {echo "|$stmt|\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $auth=$row[0]; + + if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) + { + echo "ERROR: Invalid Username/Password: |$user|$pass|$auth|\n"; + exit; + } + else + { + $stmt="SELECT count(*) from system_settings where vdc_agent_api_active='1';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $SNauth=$row[0]; + if($SNauth==0) + { + echo "ERROR: System API NOT ACTIVE\n"; + exit; + } + else + { + # do nothing for now + } + } + } + +if ($format=='debug') +{ +echo "\n"; +echo "\n"; +echo "";} + $rslt=mysql_query($stmt, $link); + echo "SUCCESS: external_hangup function set - $agent_user|$value\n"; + } + else + { + echo "ERROR: agent_user is not logged in - $agent_user\n"; + } + } +} + + + + + +################################################################################ +### external_status - set the dispo code or status for a call and move on +################################################################################ +if ($function == 'external_status') +{ + if ( (strlen($value)<1) || (strlen($agent_user)<1) ) + { + echo "ERROR: external_status not valid - $value|$agent_user\n"; + exit; + } + else + { + $stmt = "select count(*) from vicidial_live_agents where user='$agent_user';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + { + $stmt="UPDATE vicidial_live_agents set external_status='$value' where user='$agent_user';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + echo "SUCCESS: external_status function set - $agent_user|$value\n"; + } + else + { + echo "ERROR: agent_user is not logged in - $agent_user\n"; + } + } +} + + + + + +if ($format=='debug') +{ +$ENDtime = date("U"); +$RUNtime = ($ENDtime - $StarTtime); +echo "\n"; +echo "\n\n\n"; +} + +exit; + +?> diff --git a/www/agc/conf_exten_check.php b/www/agc/conf_exten_check.php index dafecba8..e79a2824 100644 --- a/www/agc/conf_exten_check.php +++ b/www/agc/conf_exten_check.php @@ -37,6 +37,7 @@ # 71122-0205 - Added vicidial_live_agent status output # 80424-0442 - Added non_latin lookup from system_settings # 80519-1425 - Added calls-in-queue tally +# 80703-1106 - Added API functionality for Hangup and Dispo # require("dbconnect.php"); @@ -259,10 +260,19 @@ echo " } + ### grab the API hangup and API dispo fields in vicidial_live_agents + $stmt="SELECT external_hangup,external_status from vicidial_live_agents where user='$user' and server_ip='$server_ip';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $external_hangup = $row[0]; + $external_status = $row[1]; + if (strlen($external_status)<1) {$external_status = '::::::::::';} + if ($Acount < 1) {$Alogin='DEAD_VLA';} if ($AexternalDEAD > 0) {$Alogin='DEAD_EXTERNAL';} - echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Logged-in: ' . $Alogin . '|CampCalls: ' . $RingCalls . '|Status: ' . $Astatus . '|DiaLCalls: ' . $DiaLCalls . "|\n"; + echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Logged-in: ' . $Alogin . '|CampCalls: ' . $RingCalls . '|Status: ' . $Astatus . '|DiaLCalls: ' . $DiaLCalls . '|APIHanguP: ' . $external_hangup . '|APIStatuS: ' . $external_status . "|\n"; } $total_conf=0; diff --git a/www/agc/manager_send.php b/www/agc/manager_send.php index 507519ba..8a87f10f 100644 --- a/www/agc/manager_send.php +++ b/www/agc/manager_send.php @@ -400,6 +400,10 @@ if ($ACTION=="HangupConfDial") ###################### if ($ACTION=="Hangup") { +$stmt="UPDATE vicidial_live_agents SET external_hangup='0' where user='$user';"; + if ($format=='debug') {echo "\n";} +$rslt=mysql_query($stmt, $link); + $row=''; $rowx=''; $channel_live=1; if ( (strlen($channel)<3) or (strlen($queryCID)<15) ) diff --git a/www/agc/vdc_db_query.php b/www/agc/vdc_db_query.php index 58033f1b..b65788a0 100644 --- a/www/agc/vdc_db_query.php +++ b/www/agc/vdc_db_query.php @@ -797,7 +797,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',comments='MANUAL',calls_today='$calls_today' 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',calls_today='$calls_today',external_hangup=0,external_status='' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); @@ -1003,7 +1003,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',comments='MANUAL',calls_today='$calls_today' 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',calls_today='$calls_today',external_hangup=0,external_status='' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); @@ -1758,7 +1758,7 @@ if ($ACTION == 'VDADcheckINCOMING') $calls_today++; ### update the agent status to INCALL in vicidial_live_agents - $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',comments='AUTO',calls_today='$calls_today' where user='$user' and server_ip='$server_ip';"; + $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',comments='AUTO',calls_today='$calls_today',external_hangup=0,external_status='' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); @@ -2261,7 +2261,7 @@ if ($ACTION == 'updateDISPO') else { ### update the comments in vicidial_live_agents record - $stmt = "UPDATE vicidial_live_agents set lead_id='' where user='$user' and server_ip='$server_ip';"; + $stmt = "UPDATE vicidial_live_agents set lead_id='',external_hangup=0,external_status='' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); diff --git a/www/agc/vicidial.php b/www/agc/vicidial.php index 9060e4c5..f40754c8 100644 --- a/www/agc/vicidial.php +++ b/www/agc/vicidial.php @@ -181,10 +181,11 @@ # 80625-0047 - Added U option for gender, added date/phone display options # 80630-2210 - Added queue_log entries for Manual Dial # 80703-0139 - Added alter customer phone permissions -# +# 80703-1106 - Added API functionality for Hangup and Dispo, added Agent Display Queue Count +# -$version = '2.0.5-159'; -$build = '80703-0139'; +$version = '2.0.5-160'; +$build = '80703-1106'; require("dbconnect.php"); @@ -320,6 +321,7 @@ $MNwidth = ($MASTERwidth + 330); # 760 - main frame $XFwidth = ($MASTERwidth + 320); # 750 - transfer/conference $HCwidth = ($MASTERwidth + 310); # 740 - hotkeys and callbacks $AMwidth = ($MASTERwidth + 270); # 700 - agent mute and preset-dial links +$SCwidth = ($MASTERwidth + 230); # 670 - live call seconds counter $SSwidth = ($MASTERwidth + 176); # 606 - scroll script $SDwidth = ($MASTERwidth + 170); # 600 - scroll script, customer data and calls-in-session $HKwidth = ($MASTERwidth + 70); # 500 - Hotkeys button @@ -778,7 +780,7 @@ $VDloginDISPLAY=0; $HKstatusnames = substr("$HKstatusnames", 0, -1); ##### grab the campaign settings - $stmt="SELECT park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,agent_pause_codes_active,no_hopper_leads_logins,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,disable_alter_custphone FROM vicidial_campaigns where campaign_id = '$VD_campaign';"; + $stmt="SELECT park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,agent_pause_codes_active,no_hopper_leads_logins,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,disable_alter_custphone,display_queue_count FROM vicidial_campaigns where campaign_id = '$VD_campaign';"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); @@ -816,6 +818,7 @@ $VDloginDISPLAY=0; $default_xfer_group = $row[31]; $xfer_groups = $row[32]; $disable_alter_custphone = $row[33]; + $display_queue_count = $row[34]; if ( (!ereg('DISABLED',$VU_vicidial_recording_override)) and ($VU_vicidial_recording > 0) ) { @@ -832,6 +835,9 @@ $VDloginDISPLAY=0; {$alt_phone_dialing='1';} else {$alt_phone_dialing='0';} + if ($display_queue_count=='N') + {$callholdstatus='0';} + $closer_campaigns = preg_replace("/^ | -$/","",$closer_campaigns); $closer_campaigns = preg_replace("/ /","','",$closer_campaigns); $closer_campaigns = "'$closer_campaigns'"; @@ -2459,6 +2465,24 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } else {PausENotifYCounTer=0;} + var APIHanguP_array = check_time_array[6].split("APIHanguP: "); + var APIHanguP = APIHanguP_array[1]; + var APIStatuS_array = check_time_array[7].split("APIStatuS: "); + var APIStatuS = APIStatuS_array[1]; + if ( (APIHanguP==1) && (VD_live_customer_call==1) ) + { + hideDiv('CustomerGoneBox'); + WaitingForNextStep=0; + custchannellive=0; + + dialedcall_send_hangup(); + } + if ( (APIStatuS.length < 10) && (APIStatuS.length > 0) && (AgentDispoing > 0) ) + { + document.vicidial_form.DispoSelection.value = APIStatuS; + DispoSelect_submit(); + } + var check_conf_array=check_ALL_array[1].split("|"); var live_conf_calls = check_conf_array[0]; var conf_chan_array = check_conf_array[1].split(" ~"); @@ -3417,6 +3441,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} lastcustchannel = MDlookResponse_array[1]; if( document.images ) { document.images['livecall'].src = image_livecall_ON.src;} document.vicidial_form.SecondS.value = 0; + document.getElementById("SecondSDISP").innerHTML = '0'; VD_live_customer_call = 1; VD_live_call_secondS = 0; @@ -4159,6 +4184,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} lastcustserverip = VDIC_data_VDAC[4]; if( document.images ) { document.images['livecall'].src = image_livecall_ON.src;} document.vicidial_form.SecondS.value = 0; + document.getElementById("SecondSDISP").innerHTML = '0'; VD_live_customer_call = 1; VD_live_call_secondS = 0; @@ -6267,6 +6293,7 @@ else { VD_live_call_secondS++; document.vicidial_form.SecondS.value = VD_live_call_secondS; + document.getElementById("SecondSDISP").innerHTML = VD_live_call_secondS; } if (XD_live_customer_call==1) { @@ -6792,7 +6819,7 @@ echo "\n"; MARGINWIDTH=0 MARGINHEIGHT=0 LEFTMARGIN=0 TOPMARGIN=0 VALIGN=TOP ALIGN=LEFT>
- + 0) {echo "GROUPS     \n";} ?> @@ -6828,6 +6855,10 @@ echo "\n";
+ seconds: +     + +
+
- - + + diff --git a/www/vicidial/admin.php b/www/vicidial/admin.php index 9a1213dc..dd867284 100644 --- a/www/vicidial/admin.php +++ b/www/vicidial/admin.php @@ -773,6 +773,8 @@ if (isset($_GET["vdc_agent_api_access"])) {$vdc_agent_api_access=$_GET["vdc_a elseif (isset($_POST["vdc_agent_api_access"])) {$vdc_agent_api_access=$_POST["vdc_agent_api_access"];} if (isset($_GET["vdc_agent_api_active"])) {$vdc_agent_api_active=$_GET["vdc_agent_api_active"];} elseif (isset($_POST["vdc_agent_api_active"])) {$vdc_agent_api_active=$_POST["vdc_agent_api_active"];} +if (isset($_GET["display_queue_count"])) {$display_queue_count=$_GET["display_queue_count"];} + elseif (isset($_POST["display_queue_count"])) {$display_queue_count=$_POST["display_queue_count"];} if (isset($script_id)) {$script_id= strtoupper($script_id);} if (isset($lead_filter_id)) {$lead_filter_id = strtoupper($lead_filter_id);} @@ -977,6 +979,7 @@ $human_answered = ereg_replace("[^NY]","",$human_answered); $tovdad_display = ereg_replace("[^NY]","",$tovdad_display); $campaign_allow_inbound = ereg_replace("[^NY]","",$campaign_allow_inbound); $disable_alter_custphone = ereg_replace("[^NY]","",$disable_alter_custphone); +$display_queue_count = ereg_replace("[^NY]","",$display_queue_count); $qc_enabled = ereg_replace("[^0-9NY]","",$qc_enabled); @@ -2746,6 +2749,11 @@ echo "
seconds:   Channel:   Cust Time:   Cust Time:   Channel:
Customer Information:
\n"; + echo "\n"; + echo "\n"; if ($campaign_allow_inbound == 'Y')
Allow No-Hopper-Leads Logins - If set to Y, allows agents to login to the campaign even if there are no leads loaded into the hopper for that campaign. This function is not needed in CLOSER-type campaigns. Default is N. +
+ +
+Agent Display Queue Count - If set to Y, when a customer is waiting for an agent, the Queue Calls display at the top of the agent screen will turn red and show the number of waiting calls. Default is Y. +

@@ -5785,7 +5793,7 @@ if ($ADD==20) { echo "
CAMPAIGN COPIED: $campaign_id copied from $source_campaign_id\n"; - $stmt="INSERT INTO vicidial_campaigns (campaign_name,campaign_id,active,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,list_order_mix,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,campaign_shift_start_time,campaign_shift_length,campaign_day_start_time,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone) SELECT \"$campaign_name\",\"$campaign_id\",\"N\",dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,\"DISABLED\",campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,campaign_shift_start_time,campaign_shift_length,campaign_day_start_time,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone from vicidial_campaigns where campaign_id='$source_campaign_id';"; + $stmt="INSERT INTO vicidial_campaigns (campaign_name,campaign_id,active,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,list_order_mix,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,campaign_shift_start_time,campaign_shift_length,campaign_day_start_time,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count) SELECT \"$campaign_name\",\"$campaign_id\",\"N\",dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,\"DISABLED\",campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,campaign_shift_start_time,campaign_shift_length,campaign_day_start_time,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count from vicidial_campaigns where campaign_id='$source_campaign_id';"; $rslt=mysql_query($stmt, $link); $stmtA="INSERT INTO vicidial_campaign_stats (campaign_id) values('$campaign_id');"; @@ -7075,7 +7083,7 @@ if ($ADD==41) if ( (!ereg("DISABLED",$list_order_mix)) and ($hopper_level < 100) ) {$hopper_level='100';} - $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',drop_action='$drop_action',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',campaign_description='$campaign_description',campaign_changedate='$SQLdate',campaign_stats_refresh='$campaign_stats_refresh',disable_alter_custdata='$disable_alter_custdata',no_hopper_leads_logins='$no_hopper_leads_logins',list_order_mix='$list_order_mix',campaign_allow_inbound='$campaign_allow_inbound',manual_dial_list_id='$manual_dial_list_id',default_xfer_group='$default_xfer_group',xfer_groups='$XFERgroups_value',queue_priority='$queue_priority',drop_inbound_group='$drop_inbound_group',disable_alter_custphone='$disable_alter_custphone' 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',drop_action='$drop_action',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',campaign_description='$campaign_description',campaign_changedate='$SQLdate',campaign_stats_refresh='$campaign_stats_refresh',disable_alter_custdata='$disable_alter_custdata',no_hopper_leads_logins='$no_hopper_leads_logins',list_order_mix='$list_order_mix',campaign_allow_inbound='$campaign_allow_inbound',manual_dial_list_id='$manual_dial_list_id',default_xfer_group='$default_xfer_group',xfer_groups='$XFERgroups_value',queue_priority='$queue_priority',drop_inbound_group='$drop_inbound_group',disable_alter_custphone='$disable_alter_custphone',display_queue_count='$display_queue_count' where campaign_id='$campaign_id';"; $rslt=mysql_query($stmtA, $link); if ($reset_hopper == 'Y') @@ -10366,6 +10374,7 @@ if ($ADD==31) $survey_xfer_exten = $row[88]; $survey_camp_record_dir = $row[89]; $disable_alter_custphone = $row[90]; + $display_queue_count = $row[91]; if (ereg("DISABLED",$list_order_mix)) {$DEFlistDISABLE = ''; $DEFstatusDISABLED=0;} @@ -10783,6 +10792,8 @@ if ($ADD==31) echo "
Allow No-Hopper-Leads Logins: $NWB#vicidial_campaigns-no_hopper_leads_logins$NWE
Agent Display Queue Count: $NWB#vicidial_campaigns-display_queue_count$NWE
Manual Dial List ID: $NWB#vicidial_campaigns-manual_dial_list_id$NWE