From 03eabdd7a0b86c0526f7e2d3d8cb569c33624c21 Mon Sep 17 00:00:00 2001 From: mattf Date: Wed, 3 Feb 2010 11:49:28 +0000 Subject: [PATCH] fixes issues with logging in INBOUND_MAN dial method git-svn-id: svn://192.168.202.10@1328 3d104415-ff17-0410-8863-d5cf3c621b8a --- .../agc_2.2.0/www/agc/vdc_db_query.php | 50 ++++++++++++++++++- .../branches/agc_2.2.0/www/agc/vicidial.php | 21 +++++--- .../agc_2.2.0/www/vicidial/AST_VDADstats.php | 4 +- agc_2-X/trunk/www/agc/vdc_db_query.php | 49 +++++++++++++++++- agc_2-X/trunk/www/agc/vicidial.php | 20 +++++--- agc_2-X/trunk/www/vicidial/AST_VDADstats.php | 4 +- 6 files changed, 125 insertions(+), 23 deletions(-) diff --git a/agc_2-X/branches/agc_2.2.0/www/agc/vdc_db_query.php b/agc_2-X/branches/agc_2.2.0/www/agc/vdc_db_query.php index 3c48a770..8d604db8 100644 --- a/agc_2-X/branches/agc_2.2.0/www/agc/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.2.0/www/agc/vdc_db_query.php @@ -231,10 +231,11 @@ # 100109-0745 - Added alt_num_status for ALTNUM dialing status # 100109-1336 - Fixed Manual dial live call detection # 100113-1949 - Fixed dispo_choice bug and added dispo_status to dispo URL call +# 100202-2306 - Fixed logging issues related to INBOUND_MAN dial_method # -$version = '2.2.0-139'; -$build = '100113-1949'; +$version = '2.2.0-140'; +$build = '100202-2306'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=300; $one_mysql_log=0; @@ -430,6 +431,7 @@ $CIDdate = date("mdHis"); $ENTRYdate = date("YmdHis"); $MT[0]=''; $agents='@agents'; +$US='_'; ############################################# ##### START SYSTEM_SETTINGS LOOKUP ##### @@ -1855,6 +1857,28 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00036',$user,$server_ip,$session_name,$one_mysql_log);} + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -2262,6 +2286,28 @@ if ($ACTION == 'manDiaLonly') echo "$MqueryCID\n"; + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; diff --git a/agc_2-X/branches/agc_2.2.0/www/agc/vicidial.php b/agc_2-X/branches/agc_2.2.0/www/agc/vicidial.php index 43179bdd..71275b8f 100644 --- a/agc_2-X/branches/agc_2.2.0/www/agc/vicidial.php +++ b/agc_2-X/branches/agc_2.2.0/www/agc/vicidial.php @@ -272,10 +272,11 @@ # 100109-0801 - Added ALTNUM alt number status, fixed alt number dialing from setting # 100109-1338 - Fixed Manual dial live call detection # 100116-0709 - Added presets to script and web form variables +# 100203-0640 - Fixed logging issues related to INBOUND_MAN dial method # -$version = '2.2.0-250'; -$build = '100116-0709'; +$version = '2.2.0-251'; +$build = '100203-0640'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=64; $one_mysql_log=0; @@ -5129,9 +5130,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { auto_dial_level=0; - agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); + if (VDRP_stage != 'PAUSED') + { + agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); - PauseCodeSelect_submit("NXDIAL"); + PauseCodeSelect_submit("NXDIAL"); + } + else + {auto_dial_level=starting_dial_level;} document.getElementById("DiaLControl").innerHTML = "\"\"Resume\"
\"Dial"; } @@ -5182,7 +5188,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id; + manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id + "&dial_method=" + dial_method; // alert(manual_dial_filter + "\n" +manDiaLnext_query); xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); @@ -5890,7 +5896,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type; + manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&dial_method=" + dial_method + "&agent_log_id=" + agent_log_id; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(manDiaLonly_query); @@ -7467,7 +7473,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.custdatetime.value = ''; - if (auto_dial_level == 0) + if ( (auto_dial_level == 0) && (dial_method != 'INBOUND_MAN') ) { if (document.vicidial_form.DiaLAltPhonE.checked==true) { @@ -8231,7 +8237,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} function NoneInSession() { showDiv('NoneInSessionBox'); - document.getElementById("NoneInSessionID").innerHTML = session_id; WaitingForNextStep=1; } diff --git a/agc_2-X/branches/agc_2.2.0/www/vicidial/AST_VDADstats.php b/agc_2-X/branches/agc_2.2.0/www/vicidial/AST_VDADstats.php index 5fc0c958..b7063771 100644 --- a/agc_2-X/branches/agc_2.2.0/www/vicidial/AST_VDADstats.php +++ b/agc_2-X/branches/agc_2.2.0/www/vicidial/AST_VDADstats.php @@ -626,7 +626,7 @@ else $OUToutput .= "\n"; - $OUToutput .= "---------- AUTO-DIAL NO ANSWERS\n"; + $OUToutput .= "---------- NO ANSWERS\n"; $stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' $group_SQLand and status IN('NA','ADC','AB','CPDB','CPDUK','CPDATB','CPDNA','CPDREJ','CPDINV','CPDSUA','CPDSI','CPDSNC','CPDSR','CPDSUK','CPDSV','CPDERR') and (length_in_sec <= 60 or length_in_sec is null);"; $rslt=mysql_query($stmt, $link); @@ -634,7 +634,7 @@ else $row=mysql_fetch_row($rslt); $autoNAcalls = sprintf("%10s", $row[0]); - $stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' $group_SQLand and status IN('B','DC') and (length_in_sec <= 60 or length_in_sec is null);"; + $stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' $group_SQLand and status IN('B','DC','N') and (length_in_sec <= 60 or length_in_sec is null);"; $rslt=mysql_query($stmt, $link); if ($DB) {$OUToutput .= "$stmt\n";} $row=mysql_fetch_row($rslt); 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 cc7e5531..5753df08 100644 --- a/agc_2-X/trunk/www/agc/vdc_db_query.php +++ b/agc_2-X/trunk/www/agc/vdc_db_query.php @@ -232,10 +232,11 @@ # 100109-1336 - Fixed Manual dial live call detection # 100113-1949 - Fixed dispo_choice bug and added dispo_status to dispo URL call # 100122-0757 - Added NOT-LOGGED-IN-AGENTS option for sidebar view and transfer view +# 100202-2305 - Fixed logging issues related to INBOUND_MAN dial_method # -$version = '2.4-140'; -$build = '100122-0757'; +$version = '2.4-141'; +$build = '100202-2305'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=301; $one_mysql_log=0; @@ -1857,6 +1858,28 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00036',$user,$server_ip,$session_name,$one_mysql_log);} + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -2264,6 +2287,28 @@ if ($ACTION == 'manDiaLonly') echo "$MqueryCID\n"; + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; diff --git a/agc_2-X/trunk/www/agc/vicidial.php b/agc_2-X/trunk/www/agc/vicidial.php index cc03c0cd..04950421 100644 --- a/agc_2-X/trunk/www/agc/vicidial.php +++ b/agc_2-X/trunk/www/agc/vicidial.php @@ -274,10 +274,11 @@ # 100116-0709 - Added presets to script and web form variables # 100123-0954 - changes to AGENTDIRECT selection span # 100131-2233 - Added functions to allow for a webphone loaded in a separate IFRAME +# 100203-0639 - Fixed logging issues related to INBOUND_MAN dial method # -$version = '2.4-252'; -$build = '100131-2233'; +$version = '2.4-253'; +$build = '100203-0639'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=64; $one_mysql_log=0; @@ -5179,9 +5180,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { auto_dial_level=0; - agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); + if (VDRP_stage != 'PAUSED') + { + agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); - PauseCodeSelect_submit("NXDIAL"); + PauseCodeSelect_submit("NXDIAL"); + } + else + {auto_dial_level=starting_dial_level;} document.getElementById("DiaLControl").innerHTML = "\"\"Resume\"
\"Dial"; } @@ -5232,7 +5238,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id; + manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id + "&dial_method=" + dial_method; // alert(manual_dial_filter + "\n" +manDiaLnext_query); xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); @@ -5940,7 +5946,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type; + manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&dial_method=" + dial_method + "&agent_log_id=" + agent_log_id; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(manDiaLonly_query); @@ -7517,7 +7523,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.custdatetime.value = ''; - if (auto_dial_level == 0) + if ( (auto_dial_level == 0) && (dial_method != 'INBOUND_MAN') ) { if (document.vicidial_form.DiaLAltPhonE.checked==true) { diff --git a/agc_2-X/trunk/www/vicidial/AST_VDADstats.php b/agc_2-X/trunk/www/vicidial/AST_VDADstats.php index 5fc0c958..b7063771 100644 --- a/agc_2-X/trunk/www/vicidial/AST_VDADstats.php +++ b/agc_2-X/trunk/www/vicidial/AST_VDADstats.php @@ -626,7 +626,7 @@ else $OUToutput .= "\n"; - $OUToutput .= "---------- AUTO-DIAL NO ANSWERS\n"; + $OUToutput .= "---------- NO ANSWERS\n"; $stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' $group_SQLand and status IN('NA','ADC','AB','CPDB','CPDUK','CPDATB','CPDNA','CPDREJ','CPDINV','CPDSUA','CPDSI','CPDSNC','CPDSR','CPDSUK','CPDSV','CPDERR') and (length_in_sec <= 60 or length_in_sec is null);"; $rslt=mysql_query($stmt, $link); @@ -634,7 +634,7 @@ else $row=mysql_fetch_row($rslt); $autoNAcalls = sprintf("%10s", $row[0]); - $stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' $group_SQLand and status IN('B','DC') and (length_in_sec <= 60 or length_in_sec is null);"; + $stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' $group_SQLand and status IN('B','DC','N') and (length_in_sec <= 60 or length_in_sec is null);"; $rslt=mysql_query($stmt, $link); if ($DB) {$OUToutput .= "$stmt\n";} $row=mysql_fetch_row($rslt);