diff --git a/agc_2-X/branches/agc_2.0.5/www/agc/conf_exten_check.php b/agc_2-X/branches/agc_2.0.5/www/agc/conf_exten_check.php index dd338763..748a99e9 100644 --- a/agc_2-X/branches/agc_2.0.5/www/agc/conf_exten_check.php +++ b/agc_2-X/branches/agc_2.0.5/www/agc/conf_exten_check.php @@ -43,10 +43,11 @@ # 90102-1402 - Added check for system and database time synchronization # 90120-1720 - Added compatibility for API pause/resume and dial a number # 90307-1855 - Added shift enforcement to send logout flag if outside of shift hours +# 90711-0934 - Fixed AGENTDIRECT calls in queue display count # -$version = '2.0.5-18'; -$build = '90307-1855'; +$version = '2.0.5-19'; +$build = '90711-0934'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=17; $one_mysql_log=0; @@ -236,6 +237,7 @@ echo " if ($campagentstdisp == 'YES') { + $ADsql=''; ### grab the status of this agent to display $stmt="SELECT status,campaign_id,closer_campaigns from vicidial_live_agents where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "|$stmt|\n";} @@ -247,9 +249,14 @@ echo " $AccampSQL=$row[2]; $AccampSQL = ereg_replace(' -','', $AccampSQL); $AccampSQL = ereg_replace(' ',"','", $AccampSQL); + if (eregi('AGENTDIRECT', $AccampSQL)) + { + $AccampSQL = ereg_replace('AGENTDIRECT','', $AccampSQL); + $ADsql = "or ( (campaign_id LIKE \"%AGENTDIRECT%\") and (agent_only='$user') )"; + } ### grab the number of calls being placed from this server and campaign - $stmt="SELECT count(*) from vicidial_auto_calls where status IN('LIVE') and ( (campaign_id='$Acampaign') or (campaign_id IN('$AccampSQL')) );"; + $stmt="SELECT count(*) from vicidial_auto_calls where status IN('LIVE') and ( (campaign_id='$Acampaign') or (campaign_id IN('$AccampSQL')) $ADsql);"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03007',$user,$server_ip,$session_name,$one_mysql_log);} diff --git a/agc_2-X/branches/agc_2.0.5/www/agc/vdc_db_query.php b/agc_2-X/branches/agc_2.0.5/www/agc/vdc_db_query.php index 3409970b..6df53fbe 100644 --- a/agc_2-X/branches/agc_2.0.5/www/agc/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.0.5/www/agc/vdc_db_query.php @@ -193,10 +193,11 @@ # 90307-1735 - Added Shift enforcement and manager override features # 90320-0306 - Fixed agent log bug when using wrapup time # 90519-0634 - Fixed manual dial status and logging bug +# 90711-0931 - Backported some minor fixes from trunk # -$version = '2.0.5-105'; -$build = '90519-0634'; +$version = '2.0.5-106'; +$build = '90711-0931'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=194; $one_mysql_log=0; @@ -754,7 +755,7 @@ if ($ACTION == 'regCLOSER') ################################################################################ -### manDiaLnextCALL - for manual VICIDiaL dialing this will grab the next lead +### manDiaLnextCaLL - for manual VICIDiaL dialing this will grab the next lead ### in the campaign, reserve it, send data back to client and ### place the call by inserting into vicidial_manager ################################################################################ @@ -1148,8 +1149,7 @@ if ($ACTION == 'manDiaLnextCaLL') if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00037',$user,$server_ip,$session_name,$one_mysql_log);} if ($DB) {echo "$stmt\n";} $qm_conf_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $qm_conf_ct) + if ($qm_conf_ct > 0) { $row=mysql_fetch_row($rslt); $enable_queuemetrics_logging = $row[0]; @@ -1158,7 +1158,6 @@ if ($ACTION == 'manDiaLnextCaLL') $queuemetrics_login = $row[3]; $queuemetrics_pass = $row[4]; $queuemetrics_log_id = $row[5]; - $i++; } ##### END QUEUEMETRICS LOGGING LOOKUP ##### ########################################### @@ -3346,7 +3345,7 @@ if ($ACTION == 'updateDISPO') { $four_hours_ago = date("Y-m-d H:i:s", mktime(date("H")-4,date("i"),date("s"),date("m"),date("d"),date("Y"))); - if ($auto_dial_level < 1) + if ( ($auto_dial_level < 1) or (preg_match('/^M/',$MDnextCID)) ) { $stmt = "SELECT count(*) from vicidial_log where lead_id='$lead_id' and user='$user' and call_date > \"$four_hours_ago\";"; if ($format=='debug') {echo "\n";} diff --git a/agc_2-X/branches/agc_2.0.5/www/agc/vicidial.php b/agc_2-X/branches/agc_2.0.5/www/agc/vicidial.php index 1cb31294..e33faec3 100644 --- a/agc_2-X/branches/agc_2.0.5/www/agc/vicidial.php +++ b/agc_2-X/branches/agc_2.0.5/www/agc/vicidial.php @@ -227,10 +227,11 @@ # 90511-1018 - Added restriction not allowing dialing into agent sessions from manual dial # 90519-0636 - Fixed manual dial status and logging bug # 90525-1014 - Fixed transfer issue of auto-received call after manual dial call +# 90711-0923 - Backport of several small bug fixes from trunk # -$version = '2.0.5-206'; -$build = '90525-1014'; +$version = '2.0.5-207'; +$build = '90711-0923'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=60; $one_mysql_log=0; @@ -278,9 +279,9 @@ if (isset($_GET["MGR_override"])) {$MGR_override=$_GET["MGR_override"];} $DB=ereg_replace("[^0-9a-z]","",$DB); $phone_login=ereg_replace("[^\,0-9a-zA-Z]","",$phone_login); $phone_pass=ereg_replace("[^0-9a-zA-Z]","",$phone_pass); - $VD_login=ereg_replace("[^0-9a-zA-Z]","",$VD_login); - $VD_pass=ereg_replace("[^0-9a-zA-Z]","",$VD_pass); - $VD_campaign = ereg_replace("[^-\_0-9a-zA-Z]","",$VD_campaign); + $VD_login=ereg_replace("[^-_0-9a-zA-Z]","",$VD_login); + $VD_pass=ereg_replace("[^-_0-9a-zA-Z]","",$VD_pass); + $VD_campaign = ereg_replace("[^-_0-9a-zA-Z]","",$VD_campaign); $forever_stop=0; @@ -1170,7 +1171,7 @@ $VDloginDISPLAY=0; ##### grab the inbound groups to choose from if campaign contains CLOSER $VARingroups="''"; - if ($campaign_allow_inbound == 'Y') + if ( ($campaign_allow_inbound == 'Y') and ($dial_method != 'MANUAL') ) { $VARingroups=''; $stmt="select group_id from vicidial_inbound_groups where active = 'Y' and group_id IN($closer_campaigns) order by group_id limit 60;"; @@ -1188,6 +1189,8 @@ $VDloginDISPLAY=0; } $VARingroups = substr("$VARingroups", 0, -1); } + else + {$closer_campaigns = "''";} ##### grab the allowable inbound groups to choose from for transfer options $xfer_groups = preg_replace("/^ | -$/","",$xfer_groups); @@ -1611,7 +1614,7 @@ else $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01030',$VD_login,$server_ip,$session_name,$one_mysql_log);} - if ( ($campaign_allow_inbound == 'Y') || ($campaign_leads_to_call > 0) || (ereg('Y',$no_hopper_leads_logins)) ) + if ( ( ($campaign_allow_inbound == 'Y') and ($dial_method != 'MANUAL') ) || ($campaign_leads_to_call > 0) || (ereg('Y',$no_hopper_leads_logins)) ) { ### insert an entry into the user log for the login event $stmt = "INSERT INTO vicidial_user_log (user,event,campaign_id,event_date,event_epoch,user_group) values('$VD_login','LOGIN','$VD_campaign','$NOW_TIME','$StarTtimE','$VU_user_group')"; @@ -1792,7 +1795,7 @@ else } - if ($campaign_allow_inbound == 'Y') + if ( ($campaign_allow_inbound == 'Y') and ($dial_method != 'MANUAL') ) { print "\n"; } @@ -2715,7 +2718,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (Ctasknum.length < 2) {Ctasknum = '990009';} var XfeRSelecT = document.getElementById("XfeRGrouP"); - tasknum = Ctasknum + "*" + XfeRSelecT.value + '*CXFER*' + document.vicidial_form.lead_id.value + '**' + document.vicidial_form.phone_number.value + '*' + user + '*'; + tasknum = Ctasknum + "*" + XfeRSelecT.value + '*CXFER*' + document.vicidial_form.lead_id.value + '**' + dialed_number + '*' + user + '*'; CustomerData_update(); @@ -3455,7 +3458,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var XfeRSelecT = document.getElementById("XfeRGrouP"); var queryCID = "XLvdcW" + epoch_sec + user_abb; // "90009*$group**$lead_id**$phone_number*$user*$agent_only*"; - var redirectdestination = closerxferinternal + '90009*' + XfeRSelecT.value + '**' + document.vicidial_form.lead_id.value + '**' + document.vicidial_form.phone_number.value + '*' + user + '*' + document.vicidial_form.xfernumber.value + '*'; + var redirectdestination = closerxferinternal + '90009*' + XfeRSelecT.value + '**' + document.vicidial_form.lead_id.value + '**' + dialed_number + '*' + user + '*' + document.vicidial_form.xfernumber.value + '*'; xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS + "&session_id=" + session_id; } @@ -4366,6 +4369,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var genderIndex = document.getElementById("gender_list").selectedIndex; var genderValue = document.getElementById('gender_list').options[genderIndex].value; document.vicidial_form.gender.value = genderValue; + LeaDDispO=''; var regWFAcustom = new RegExp("^VAR","ig"); if (VDIC_web_form_address.match(regWFAcustom)) @@ -5265,7 +5269,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var genderIndex = document.getElementById("gender_list").selectedIndex; var genderValue = document.getElementById('gender_list').options[genderIndex].value; document.vicidial_form.gender.value = genderValue; - + LeaDDispO=''; var regWFAcustom = new RegExp("^VAR","ig"); if (VDIC_web_form_address.match(regWFAcustom)) @@ -5744,6 +5748,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { if (hotkeysused == 'YES') { + manual_auto_hotkey = 1; + alt_dial_active=0; + document.getElementById("MainStatuSSpan").style.background = panel_bgcolor; document.getElementById("MainStatuSSpan").innerHTML = ''; if (dial_method == "INBOUND_MAN") @@ -6701,7 +6708,7 @@ if ($useIE > 0) function hotkeypress(evt) { enter_disable(); - if ( (hot_keys_active==1) && (VD_live_customer_call==1) ) + if ( (hot_keys_active==1) && ( (VD_live_customer_call==1) || (MD_ring_secondS > 4) ) ) { var e = evt? evt : window.event; if(!e) return; @@ -6748,7 +6755,7 @@ else function hotkeypress(evt) { enter_disable(); - if ( (hot_keys_active==1) && (VD_live_customer_call==1) ) + if ( (hot_keys_active==1) && ( (VD_live_customer_call==1) || (MD_ring_secondS > 4) ) ) { var e = evt? evt : window.event; if(!e) return; diff --git a/agc_2-X/branches/agc_2.0.5/www/vicidial/AST_CLOSERstats.php b/agc_2-X/branches/agc_2.0.5/www/vicidial/AST_CLOSERstats.php index 4801c4ed..605139c9 100644 --- a/agc_2-X/branches/agc_2.0.5/www/vicidial/AST_CLOSERstats.php +++ b/agc_2-X/branches/agc_2.0.5/www/vicidial/AST_CLOSERstats.php @@ -20,6 +20,7 @@ # 81109-2340 - Added custom indicators section # 90116-1040 - Rewrite of the 15-minute sections to speed it up and allow multi-day calculations # 90310-2037 - Admin header +# 90711-0950 - Fixed time display bug # require("dbconnect.php"); @@ -68,11 +69,12 @@ $stmt = "SELECT local_gmt FROM servers where active='Y' limit 1;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $gmt_conf_ct = mysql_num_rows($rslt); +$dst = date("I"); if ($gmt_conf_ct > 0) { $row=mysql_fetch_row($rslt); $local_gmt = $row[0]; - $epoch_offset = ($local_gmt * 3600); + $epoch_offset = (($local_gmt + $dst) * 3600); } $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level >= 7 and view_reports='1';";