From 6f8f1c7775391f8d156f6ba0643740695601fde1 Mon Sep 17 00:00:00 2001 From: mattf Date: Thu, 30 Apr 2009 14:19:28 +0000 Subject: [PATCH] Added RANDOM and LAST CALL TIME lead sort options to campaigns Fixed minor realtime screen bug Added Sangoma netborder CPD documentation to docs git-svn-id: svn://192.168.202.10@1103 3d104415-ff17-0410-8863-d5cf3c621b8a --- agc_2-X/trunk/UPGRADE | 1 + agc_2-X/trunk/bin/AST_VDhopper.pl | 8 +- agc_2-X/trunk/bin/AST_VDhopper_MIXtest.pl | 10 +- .../TO_BE_TRANSLATED_2.2.0.txt | 4 + .../trunk/www/vicidial/AST_timeonVDADall.php | 4 +- agc_2-X/trunk/www/vicidial/admin.php | 148 +++++++++++++++++- 6 files changed, 163 insertions(+), 12 deletions(-) diff --git a/agc_2-X/trunk/UPGRADE b/agc_2-X/trunk/UPGRADE index 544cb60f..c1ab6de8 100644 --- a/agc_2-X/trunk/UPGRADE +++ b/agc_2-X/trunk/UPGRADE @@ -25,6 +25,7 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom 4. Outbound Survey option for using Cepstral Text-to-speech. Requires some manual configuration and tweaking of TTS scripts. +5. Added RANDOM and LAST CALL TIME lead order options to campaigns diff --git a/agc_2-X/trunk/bin/AST_VDhopper.pl b/agc_2-X/trunk/bin/AST_VDhopper.pl index dbb2a3e6..6f8e98ba 100644 --- a/agc_2-X/trunk/bin/AST_VDhopper.pl +++ b/agc_2-X/trunk/bin/AST_VDhopper.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl # -# AST_VDhopper.pl version 2.0.5 *DBI-version* +# AST_VDhopper.pl version 2.2.0 *DBI-version* # # DESCRIPTION: # uses DBD::MySQL to update the VICIDIAL leads hopper for the streamlined @@ -23,7 +23,7 @@ # a minute, you may want to play with the variables below to streamline for # your usage # -# Copyright (C) 2008 Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 # # CHANGELOG # 50810-1613 - Added database server variable definitions lookup @@ -50,6 +50,7 @@ # 80125-0821 - Added detail logging of each lead inserted # 80713-0028 - Changed Recycling methodology # 80909-1901 - Added support for campaign-specific DNC lists +# 90430-0117 - Added last call time and random sorting options # # constants @@ -1239,6 +1240,9 @@ foreach(@campaign_id) if ($lead_order[$i] =~ /^DOWN PHONE/) {$order_stmt = 'order by phone_number, lead_id asc';} if ($lead_order[$i] =~ /^UP COUNT/) {$order_stmt = 'order by called_count desc, lead_id asc';} if ($lead_order[$i] =~ /^DOWN COUNT/) {$order_stmt = 'order by called_count, lead_id asc';} + if ($lead_order[$i] =~ /^UP LAST CALL TIME/) {$order_stmt = 'order by last_local_call_time desc, lead_id asc';} + if ($lead_order[$i] =~ /^DOWN LAST CALL TIME/) {$order_stmt = 'order by last_local_call_time, lead_id asc';} + if ($lead_order[$i] =~ /^RANDOM/) {$order_stmt = 'order by RAND()';} if ($lead_order[$i] =~ / 2nd NEW$/) {$NEW_count = 2;} if ($lead_order[$i] =~ / 3rd NEW$/) {$NEW_count = 3;} if ($lead_order[$i] =~ / 4th NEW$/) {$NEW_count = 4;} diff --git a/agc_2-X/trunk/bin/AST_VDhopper_MIXtest.pl b/agc_2-X/trunk/bin/AST_VDhopper_MIXtest.pl index e7c862f1..ef59d542 100644 --- a/agc_2-X/trunk/bin/AST_VDhopper_MIXtest.pl +++ b/agc_2-X/trunk/bin/AST_VDhopper_MIXtest.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl # -# AST_VDhopper.pl version 2.0.5 *TEST List Mix version* +# AST_VDhopper.pl version 2.2.0 *TEST List Mix version* # # DESCRIPTION: # uses DBD::MySQL to update the VICIDIAL leads hopper for the streamlined @@ -23,7 +23,7 @@ # a minute, you may want to play with the variables below to streamline for # your usage # -# Copyright (C) 2008 Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 # # CHANGELOG # 50810-1613 - Added database server variable definitions lookup @@ -52,6 +52,7 @@ # 80125-0821 - Added detail logging of each lead inserted # 80713-0028 - Changed Recycling methodology # 80909-1901 - Added support for campaign-specific DNC lists +# 90430-0117 - Added last call time and random sorting options # # constants @@ -1289,6 +1290,9 @@ foreach(@campaign_id) if ($lead_order[$i] =~ /^DOWN PHONE/) {$order_stmt = 'order by phone_number, lead_id asc';} if ($lead_order[$i] =~ /^UP COUNT/) {$order_stmt = 'order by called_count desc, lead_id asc';} if ($lead_order[$i] =~ /^DOWN COUNT/) {$order_stmt = 'order by called_count, lead_id asc';} + if ($lead_order[$i] =~ /^UP LAST CALL TIME/) {$order_stmt = 'order by last_local_call_time desc, lead_id asc';} + if ($lead_order[$i] =~ /^DOWN LAST CALL TIME/) {$order_stmt = 'order by last_local_call_time, lead_id asc';} + if ($lead_order[$i] =~ /^RANDOM/) {$order_stmt = 'order by RAND()';} if ($lead_order[$i] =~ / 2nd NEW$/) {$NEW_count = 2;} if ($lead_order[$i] =~ / 3rd NEW$/) {$NEW_count = 3;} if ($lead_order[$i] =~ / 4th NEW$/) {$NEW_count = 4;} @@ -1388,7 +1392,7 @@ foreach(@campaign_id) if ($DB) {print " lead call order: $order_stmt\n";} if ($list_order_mix[$i] =~ /DISABLED/) - { + { $stmtA = "SELECT lead_id,list_id,gmt_offset_now,phone_number,state,status FROM vicidial_list where called_since_last_reset='N' and status IN($STATUSsql[$i]) and list_id IN($camp_lists[$i]) and lead_id NOT IN($lead_id_lists) and ($all_gmtSQL[$i]) $lead_filter_sql[$i] $order_stmt limit $OTHER_level;"; if ($DBX) {print " |$stmtA|\n";} $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; diff --git a/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.2.0.txt b/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.2.0.txt index 843108dc..625c0659 100644 --- a/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.2.0.txt +++ b/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.2.0.txt @@ -31,6 +31,10 @@ This is the third status used for the call upon the selection by the customer of Survey Third Extension|| Survey Fourth Extension|| This is the third extension used for the call upon the selection by the customer of the Third Digit option. Default is 8300 which immediately hangs up the call after the Audio File message is played|| +RANDOM: Randomly grabs lead within the statuses and lists defined|| +UP LAST CALL TIME: Sorts by the newest local call time for the leads|| +DOWN LAST CALL TIME: Sorts by the oldest local call time for the leads|| +WARNING, we only recommend List Mix for advanced users, Please read the ViciDial Manager Manual|| ############################################################ CLIENT diff --git a/agc_2-X/trunk/www/vicidial/AST_timeonVDADall.php b/agc_2-X/trunk/www/vicidial/AST_timeonVDADall.php index 01a2557e..91b2feb5 100644 --- a/agc_2-X/trunk/www/vicidial/AST_timeonVDADall.php +++ b/agc_2-X/trunk/www/vicidial/AST_timeonVDADall.php @@ -1303,12 +1303,12 @@ if ($UGdisplay < 1) $HDusergroup = ''; $HTusergroup = ''; } -if ( ($SIPmonitorLINK<1) and ($IAXmonitorLINK<1) and (strlen($monitor_active)<5) ) +if ( ($SIPmonitorLINK<1) and ($IAXmonitorLINK<1) and (!preg_match("/MONITOR|BARGE/",$monitor_active) ) ) { $HDsessionid = "-----------+"; $HTsessionid = " SESSIONID |"; } -if ( ($SIPmonitorLINK<2) and ($IAXmonitorLINK<2) and (strlen($monitor_active)>5) ) +if ( ($SIPmonitorLINK<2) and ($IAXmonitorLINK<2) and (!preg_match("/BARGE/",$monitor_active) ) ) { $HDbarge = ''; $HTbarge = ''; diff --git a/agc_2-X/trunk/www/vicidial/admin.php b/agc_2-X/trunk/www/vicidial/admin.php index 2929664a..4ab3da4e 100644 --- a/agc_2-X/trunk/www/vicidial/admin.php +++ b/agc_2-X/trunk/www/vicidial/admin.php @@ -1706,11 +1706,12 @@ $dialplan_entry = ereg_replace(";","",$dialplan_entry); # 90417-0211 - Fixed filter and script slashes issues # 90422-0613 - Added user_code, territory and email to vicidial_users # 90429-0542 - Added 3rd&4th options to SURVEY campaigns +# 90430-0154 - Added RANDOM and LAST CALL TIME options to lead order for campaigns # # make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time -$admin_version = '2.2.0-180'; -$build = '90429-0542'; +$admin_version = '2.2.0-181'; +$build = '90430-0154'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -3031,6 +3032,9 @@ if ($SSoutbound_autodial_active > 0)
  - DOWN COUNT 2nd NEW: starts with least called leads and works its way up inserting a NEW lead in every other lead - Must NOT have NEW selected in the dial statuses
  - DOWN COUNT 3nd NEW: starts with least called leads and works its way up inserting a NEW lead in every third lead - Must NOT have NEW selected in the dial statuses
  - DOWN COUNT 4th NEW: starts with least called leads and works its way up inserting a NEW lead in every forth lead - Must NOT have NEW selected in the dial statuses +
  - RANDOM: Randomly grabs lead within the statuses and lists defined +
  - UP LAST CALL TIME: Sorts by the newest local call time for the leads +
  - DOWN LAST CALL TIME: Sorts by the oldest local call time for the leads
@@ -13590,7 +13594,74 @@ if ($ADD==31) echo "   \n"; echo "     $NWB#vicidial_campaigns-dial_status$NWE\n"; - echo "List Order: $NWB#vicidial_campaigns-lead_order$NWE\n"; + echo "List Order: $NWB#vicidial_campaigns-lead_order$NWE\n"; echo "List Mix:   \n"; echo "     $NWB#vicidial_campaigns-dial_status$NWE\n"; - echo "List Order: $NWB#vicidial_campaigns-lead_order$NWE\n"; + echo "List Order: $NWB#vicidial_campaigns-lead_order$NWE\n"; echo "List Mix: