diff --git a/agc_2-X/trunk/docs/AGENT_API.txt b/agc_2-X/trunk/docs/AGENT_API.txt index 1ef98777..78e4e42c 100644 --- a/agc_2-X/trunk/docs/AGENT_API.txt +++ b/agc_2-X/trunk/docs/AGENT_API.txt @@ -1,4 +1,4 @@ -AGENT API DOCUMENT Started: 2008-07-03 Updated: 2020-11-12 +AGENT API DOCUMENT Started: 2008-07-03 Updated: 2021-02-22 This document describes the functions of an API(Application Programming Interface) for the VICIDIAL Agent screen. This functionality will be rather limited at first @@ -553,7 +553,7 @@ SUCCESS: st_get_agent_active_lead lead found - 6666|7275551212|123456|9987-12347 ra_call_control - DESCRIPTION: -Allows for remote agent call control: hangup/transfer calls being handled by remote agents, also options for recording a disposition and call length +Allows for remote agent call control: hangup/transfer calls being handled by remote agents, also options for logging a disposition and call length VALUES: value - @@ -571,6 +571,7 @@ status - EXAMPLE URLS: http://server/agc/api.php?source=test&user=6666&pass=1234&agent_user=1028&function=ra_call_control&stage=INGROUPTRANSFER&ingroup_choices=DEFAULTINGROUP&value=Y0316001655000402028 +http://server/agc/api.php?source=test&user=6666&pass=1234&agent_user=9877&function=ra_call_control&stage=HANGUP&status=TEST88&value=V2221052110000798236 RESPONSES: ERROR: ra_call_control not valid - Y0315201639000402027|6666|INGROUPTRANSFER diff --git a/agc_2-X/trunk/www/agc/api.php b/agc_2-X/trunk/www/agc/api.php index e75cdf7c..db4faa20 100644 --- a/agc_2-X/trunk/www/agc/api.php +++ b/agc_2-X/trunk/www/agc/api.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2021 Matt Florell LICENSE: AGPLv2 # # This script is designed as an API(Application Programming Interface) to allow # other programs to interact with the VICIDIAL Agent screen @@ -102,10 +102,11 @@ # 200403-1510 - Added outbound_cid option to external_dial function # 201112-2053 - Added vm_message function # 210116-1138 - Addressed session ID issue in ticket #1251 +# 210222-1058 - Added call length logging to ra_call_control function # -$version = '2.14-67'; -$build = '201112-2053'; +$version = '2.14-68'; +$build = '210222-1058'; $startMS = microtime(); @@ -3258,11 +3259,11 @@ if ($function == 'ra_call_control') {$status='RAXFER';} if ($call_type=='IN') { - $stmt = "UPDATE vicidial_closer_log SET status='$status' where uniqueid='$uniqueid' and lead_id='$lead_id' and campaign_id='$campaign_id' order by closecallid desc limit 1;"; + $stmt = "UPDATE vicidial_closer_log SET status='$status',length_in_sec=(UNIX_TIMESTAMP(NOW()) - start_epoch),end_epoch=UNIX_TIMESTAMP(NOW()) where uniqueid='$uniqueid' and lead_id='$lead_id' and campaign_id='$campaign_id' order by closecallid desc limit 1;"; } else { - $stmt = "UPDATE vicidial_log SET status='$status',user='$agent_user' where uniqueid='$uniqueid' and lead_id='$lead_id' order by call_date desc limit 1;"; + $stmt = "UPDATE vicidial_log SET status='$status',user='$agent_user',length_in_sec=(UNIX_TIMESTAMP(NOW()) - start_epoch),end_epoch=UNIX_TIMESTAMP(NOW()) where uniqueid='$uniqueid' and lead_id='$lead_id' order by call_date desc limit 1;"; } if ($format=='debug') {echo "\n";} $rslt=mysql_to_mysqli($stmt, $link); diff --git a/agc_2-X/trunk/www/agc/vicidial.php b/agc_2-X/trunk/www/agc/vicidial.php index 5366ee06..ce343ffb 100644 --- a/agc_2-X/trunk/www/agc/vicidial.php +++ b/agc_2-X/trunk/www/agc/vicidial.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2021 Matt Florell LICENSE: AGPLv2 # # Other scripts that this application depends on: # - vdc_db_query.php: Updates information in the database @@ -653,10 +653,11 @@ # 201117-0818 - Changes for better compatibility with non-latin data input # 201123-1436 - Added Daily call count limit features # 201201-2015 - Added transfer_button_launch feature +# 210222-0819 - Fixes for manual dial agent-state issues and a translation issue # -$version = '2.14-621c'; -$build = '201201-2015'; +$version = '2.14-622c'; +$build = '210222-0819'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=92; $one_mysql_log=0; @@ -4800,6 +4801,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var lastxferchannel=''; var custchannellive=0; var xferchannellive=0; + var manual_call_live=0; var nochannelinsession=0; var agc_dial_prefix = '91'; var dtmf_silent_prefix = ''; @@ -8348,7 +8350,15 @@ function set_length(SLnumber,SLlength_goal,SLdirection) if (MEdial=='YES') {manual_entry_dial=1;} var move_on=1; - if ( (starting_dial_level != 0) && (dial_next_failed < 1) && ( (AutoDialWaiting == 1) || (VD_live_customer_call==1) || (alt_dial_active==1) || (MD_channel_look==1) || (in_lead_preview_state==1) ) ) + // JCJ + // alert("Both move_ons must be true plus at least one of the last 5 variables must be '1' to check. Then all 7 non-move_on must be true to manual dial.:\nmove_on - starting_dial_level != 0 ("+starting_dial_level+")\nmove_on - dial_next_failed < 1 ("+dial_next_failed+")\n(N/A)dial_method = "+dial_method+"\n(N/A)custchanellive = "+custchannellive+"\nauto_pause_precall == 'Y' ("+auto_pause_precall+")\nagent_pause_codes_active=='Y' OR 'FORCE' ("+agent_pause_codes_active+")\nAutoDialWaiting == 1 ("+AutoDialWaiting+")\nVD_live_customer_call != 1 ("+VD_live_customer_call+")\nalt_dial_active != 1 ("+alt_dial_active+")\nMD_channel_look != 1 ("+MD_channel_look+")\nin_lead_preview_state != 1 ("+in_lead_preview_state+")"); + // JCJ Check if in live call in MANUAL dial method so person can't place manual calls + if (dial_method == 'MANUAL' && (lastcustchannel.length > 0 || manual_call_live > 0)) + { + move_on=0; + alert_box(""); + } + else if ( (starting_dial_level != 0) && (dial_next_failed < 1) && ( (AutoDialWaiting == 1) || (VD_live_customer_call==1) || (alt_dial_active==1) || (MD_channel_look==1) || (in_lead_preview_state==1) ) ) { if ((auto_pause_precall == 'Y') && ( (agent_pause_codes_active=='Y') || (agent_pause_codes_active=='FORCE') ) && (AutoDialWaiting == 1) && (VD_live_customer_call!=1) && (alt_dial_active!=1) && (MD_channel_look!=1) && (in_lead_preview_state!=1) ) { @@ -10099,7 +10109,11 @@ function set_length(SLnumber,SLlength_goal,SLdirection) InternalChatsCheck(); if (MDnextCID.match(regMNCvar)) - {alert_box("\n" + campaign); alert_displayed=1;} + { + alert_box("\n" + campaign); + alert_displayed=1; + in_lead_preview_state=0; // JCJ - This needs to be reset here otherwise the variable stays at 1 and thus manual dials can't be made even if the agent is paused. + } if (MDnextCID.match(regMDFvarDNC)) {alert_box("\n" + mdnPhonENumbeR); alert_displayed=1;} if (MDnextCID.match(regMDFvarDCCL)) @@ -10142,6 +10156,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection) else { fronter = user; + manual_call_live=1; LasTCID = MDnextResponse_array[0]; document.vicidial_form.lead_id.value = MDnextResponse_array[1]; LeaDPreVDispO = MDnextResponse_array[2]; @@ -10817,6 +10832,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection) prefix_choice=''; agent_dialed_number=''; agent_dialed_type=''; + manual_call_live=0; // CalL_ScripT_id=''; // CalL_ScripT_color=''; dial_next_failed=0; @@ -11040,6 +11056,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection) LasTCID = MDOnextResponse_array[0]; MD_channel_look=1; custchannellive=1; + manual_call_live=1; var dispnum = manDiaLonly_num; var status_display_number = phone_number_format(dispnum); @@ -11209,6 +11226,10 @@ function set_length(SLnumber,SLlength_goal,SLdirection) if (dial_method == "INBOUND_MAN") { auto_dial_level=starting_dial_level; + // JCJ - reset dial_next_failed to zero here. Currently if hopper is empty, agent is auto paused and dial_next_failed=1 + // However it remains 1 if you click to be active which causes the move_on check to be skipped allowing active + // agents to manual dial. + dial_next_failed=0; document.getElementById("DiaLControl").innerHTML = "\" border=\"0\" alt=\"You are active\" />
\" border=\"0\" alt=\"Dial Next Number\" />"; } @@ -13718,6 +13739,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection) lastcustchannel=''; lastcustserverip=''; MDchannel=''; + manual_call_live=0; if (post_phone_time_diff_alert_message.length > 10) { document.getElementById("post_phone_time_diff_span_contents").innerHTML = ""; @@ -17828,7 +17850,7 @@ function phone_number_format(formatphone) { { var temp_response = xmlhttp.responseText; // alert(xmlhttp.responseText); - var regCDS = new RegExp("ERROR: no","ig"); + var regCDS = new RegExp("ERROR","ig"); if (temp_response.match(regCDS)) { // alert_box(temp_response); @@ -19268,7 +19290,7 @@ function phone_number_format(formatphone) { if (logout_stop_timeouts==1) {WaitingForNextStep=1;} if ( (custchannellive < customer_gone_seconds) && (lastcustchannel.length > 3) && (no_empty_session_warnings < 1) && (document.vicidial_form.lead_id.value != '') && (currently_in_email_or_chat==0) ) {CustomerChanneLGone();} - // document.getElementById("debugbottomspan").innerHTML = "custchannellive: " + custchannellive + " lastcustchannel.length: " + lastcustchannel.length + " no_empty_session_warnings: " + no_empty_session_warnings + " lead_id: |" + document.vicidial_form.lead_id.value + "|"; + // document.getElementById("debugbottomspan").innerHTML = "custchannellive: " + custchannellive + " customer_gone_seconds: " + customer_gone_seconds + ", lastcustchannel.length: " + lastcustchannel.length + " no_empty_session_warnings: " + no_empty_session_warnings + " lead_id: |" + document.vicidial_form.lead_id.value + "|" + " currently_in_email_or_chat: " + currently_in_email_or_chat; //JCJ if ( (custchannellive < -10) && (lastcustchannel.length > 3) ) {ReChecKCustoMerChaN();} if ( (nochannelinsession > 16) && (check_n > 15) && (no_empty_session_warnings < 1) ) {NoneInSession();} if (external_transferconf_count > 0) {external_transferconf_count = (external_transferconf_count - 1);} diff --git a/agc_2-X/trunk/www/vicidial/admin.php b/agc_2-X/trunk/www/vicidial/admin.php index 300d8464..97911d3a 100644 --- a/agc_2-X/trunk/www/vicidial/admin.php +++ b/agc_2-X/trunk/www/vicidial/admin.php @@ -5959,7 +5959,7 @@ echo "\n"; echo "\n"; echo "\n"; echo "\n"; -echo "\n"; +echo "\n"; echo "\n"; echo "\n"; echo "\n"; @@ -44888,7 +44888,7 @@ if ($ADD==999995) echo "
"._QXZ("Welcome to ViciDial: copyright, trademark and license page")."

\n"; echo "
\n"; - echo "\n"; + echo "\n"; echo "\n"; @@ -44909,7 +44909,7 @@ if ($ADD==999995) echo "
"._QXZ("Copyright").":   "._QXZ("The ViciDial Contact Center Suite is maintained by the")." ViciDial Group, © 2020
"._QXZ("Copyright").":   "._QXZ("The ViciDial Contact Center Suite is maintained by the")." ViciDial Group, © 2021
"._QXZ("Trademark").":   \"VICIDIAL\" "._QXZ("is a registered trademark of the")." ViciDial Group. Here is our "._QXZ("trademark use policy")."
\n"; echo ""; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo ""; @@ -45831,7 +45831,7 @@ echo "

"; echo _QXZ("BUILD").": $build\n"; if (!preg_match("/_BUILD_/",$SShosted_settings)) - {echo "
© 2020 ViciDial Group
";} + {echo "
© 2021 ViciDial Group
";} echo "
\n"; ?>
"._QXZ("Matex").": "._QXZ("Copyright").":   "._QXZ("Matex PHP Mathematical expression parser and evaluator library was written by Dorin Marcoci").", © 2021
"._QXZ("License").":   "._QXZ("Chart.js is licensed under the")." MIT "._QXZ("open source license")."
"._QXZ("License").":   "._QXZ("Matex is licensed under the")." MIT "._QXZ("open source license")."
"._QXZ("Source Code").":   "._QXZ("Matex original source code is available at")." "._QXZ("this link").".