diff --git a/agc_2-X/trunk/docs/VICIDIAL_statuses.txt b/agc_2-X/trunk/docs/VICIDIAL_statuses.txt index 18ba5e68..3c9ef3bb 100644 --- a/agc_2-X/trunk/docs/VICIDIAL_statuses.txt +++ b/agc_2-X/trunk/docs/VICIDIAL_statuses.txt @@ -16,6 +16,7 @@ DC - Disconnected Number - Disconnected number DEC - Declined Sale - Agent-defined status DNC - DO NOT CALL - If defined, lead will also go int he VICIDIAL DNC list DNCL - DO NOT CALL Hopper Match - status of a lead that matches the phone number of a lead that has been placed in the VICIDIAL DNC list +DNCC - DO NOT CALL Hopper Match Campaign- status of a lead that matches the phone number of a lead that has been placed in the VICIDIAL Campaign-specific DNC list for this Campaign SALE - Sale Made - Agent-defined status N - No Answer - Agent-defined status NI - Not Interested - Agent-defined status 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 3da4bfe3..c0f8570d 100644 --- a/agc_2-X/trunk/www/agc/vdc_db_query.php +++ b/agc_2-X/trunk/www/agc/vdc_db_query.php @@ -188,7 +188,7 @@ $version = '2.0.5-100'; $build = '90128-0231'; $mel=1; # Mysql Error Log enabled = 1 -$mysql_log_count=185; +$mysql_log_count=186; $one_mysql_log=0; require("dbconnect.php"); @@ -1363,7 +1363,7 @@ if (strlen($MDnextCID)<18) else { ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT uniqueid,channel FROM vicidial_manager where callerid='$MDnextCID' and server_ip='$server_ip' and status='UPDATED' LIMIT 1;"; + $stmt="SELECT uniqueid,channel FROM vicidial_manager where callerid='$MDnextCID' and server_ip='$server_ip' and status IN('UPDATED','DEAD') LIMIT 1;"; $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00052',$user,$server_ip,$session_name,$one_mysql_log);} if ($DB) {echo "$stmt\n";} @@ -1420,6 +1420,10 @@ if ($stage == "start") { if ( (strlen($uniqueid)<1) || (strlen($lead_id)<1) || (strlen($list_id)<1) || (strlen($phone_number)<1) || (strlen($campaign)<1) ) { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|VL_LOG_0|$uniqueid|$lead_id|$user|$list_id|$campaign|$start_epoch|$phone_number|$agent_log_id|\n"); + fclose($fp); + echo "LOG NOT ENTERED\n"; echo "uniqueid $uniqueid or lead_id: $lead_id or list_id: $list_id or phone_number: $phone_number or campaign: $campaign is not valid\n"; exit; @@ -2040,6 +2044,36 @@ if ($stage == "end") } } + ### check to see if the vicidial_log record exists, if not, insert it + $stmt="SELECT count(*) from vicidial_log where uniqueid='$uniqueid' and lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00186',$user,$server_ip,$session_name,$one_mysql_log);} + $VAC_vld_ct = mysql_num_rows($rslt); + if ($VAC_vld_ct > 0) + { + $row=mysql_fetch_row($rslt); + $VLD_count = $row[0]; + if ($VLD_count < 1) + { + ##### insert log into vicidial_log for manual VICIDiaL call + $stmt="INSERT INTO vicidial_log (uniqueid,lead_id,list_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,comments,processed,user_group,alt_dial) values('$uniqueid','$lead_id','$list_id','$campaign','$NOW_TIME','$StarTtime','DONEM','$phone_code','$phone_number','$user','MANUAL','N','$user_group','$alt_dial');"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00057',$user,$server_ip,$session_name,$one_mysql_log);} + $affected_rows = mysql_affected_rows($link); + + if ($affected_rows > 0) + { + echo "VICIDiaL_LOG Inserted: $uniqueid|$channel|$NOW_TIME\n"; + echo "$StarTtime\n"; + } + else + { + echo "LOG NOT ENTERED\n"; + } + } + } + ##### update the duration and end time in the vicidial_log table $stmt="UPDATE vicidial_log set $SQLterm end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id' and user='$user' order by call_date desc limit 1;"; if ($DB) {echo "$stmt\n";} diff --git a/agc_2-X/trunk/www/vicidial/AST_VDADstats.php b/agc_2-X/trunk/www/vicidial/AST_VDADstats.php index df4b260f..4d09d807 100644 --- a/agc_2-X/trunk/www/vicidial/AST_VDADstats.php +++ b/agc_2-X/trunk/www/vicidial/AST_VDADstats.php @@ -253,7 +253,7 @@ echo "Average Call Length for all Calls in seconds: $average_hold_seconds\n"; echo "\n"; echo "---------- DROPS\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='DROP' 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='DROP' and (length_in_sec <= 6000 or length_in_sec is null);"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); diff --git a/agc_2-X/trunk/www/vicidial/AST_timeonVDADall.php b/agc_2-X/trunk/www/vicidial/AST_timeonVDADall.php index 3aa712f2..0fd3bbe7 100644 --- a/agc_2-X/trunk/www/vicidial/AST_timeonVDADall.php +++ b/agc_2-X/trunk/www/vicidial/AST_timeonVDADall.php @@ -1042,6 +1042,21 @@ $parked_to_print = mysql_num_rows($rslt); $i++; } + ##### MIDI alert audio file test ##### + # $test_midi=1; + # if ($test_midi > 0) + # { + # # echo ""; + # # echo ""; + # echo ""; + # echo " "; + # echo " "; + # echo " "; + # echo " "; + # echo " alt : test.mid"; + # echo ""; + # } + if ($out_live > 0) {$F=''; $FG='';} if ($out_live > 4) {$F=''; $FG='';} if ($out_live > 9) {$F=''; $FG='';} diff --git a/agc_2-X/trunk/www/vicidial/high_pitch.mid b/agc_2-X/trunk/www/vicidial/high_pitch.mid new file mode 100644 index 00000000..40b32750 Binary files /dev/null and b/agc_2-X/trunk/www/vicidial/high_pitch.mid differ diff --git a/agc_2-X/trunk/www/vicidial/loud.mid b/agc_2-X/trunk/www/vicidial/loud.mid new file mode 100644 index 00000000..e44094b8 Binary files /dev/null and b/agc_2-X/trunk/www/vicidial/loud.mid differ diff --git a/agc_2-X/trunk/www/vicidial/loud_phone.mid b/agc_2-X/trunk/www/vicidial/loud_phone.mid new file mode 100644 index 00000000..f5d9c4f7 Binary files /dev/null and b/agc_2-X/trunk/www/vicidial/loud_phone.mid differ diff --git a/agc_2-X/trunk/www/vicidial/quick.mid b/agc_2-X/trunk/www/vicidial/quick.mid new file mode 100644 index 00000000..99406b01 Binary files /dev/null and b/agc_2-X/trunk/www/vicidial/quick.mid differ diff --git a/agc_2-X/trunk/www/vicidial/quick_ring.mid b/agc_2-X/trunk/www/vicidial/quick_ring.mid new file mode 100644 index 00000000..ea4ff61b Binary files /dev/null and b/agc_2-X/trunk/www/vicidial/quick_ring.mid differ diff --git a/agc_2-X/trunk/www/vicidial/short_long.mid b/agc_2-X/trunk/www/vicidial/short_long.mid new file mode 100644 index 00000000..f10433c2 Binary files /dev/null and b/agc_2-X/trunk/www/vicidial/short_long.mid differ diff --git a/agc_2-X/trunk/www/vicidial/up_down.mid b/agc_2-X/trunk/www/vicidial/up_down.mid new file mode 100644 index 00000000..f3c944a3 Binary files /dev/null and b/agc_2-X/trunk/www/vicidial/up_down.mid differ