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
This commit is contained in:
mattf
2009-04-30 14:19:28 +00:00
parent be7adb9616
commit 6f8f1c7775
6 changed files with 163 additions and 12 deletions
+1
View File
@@ -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
+6 -2
View File
@@ -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 <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> 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;}
+7 -3
View File
@@ -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 <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> 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;
@@ -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
@@ -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 = '';
+143 -5
View File
@@ -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)
<BR> &nbsp; - 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
<BR> &nbsp; - 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
<BR> &nbsp; - 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
<BR> &nbsp; - RANDOM: Randomly grabs lead within the statuses and lists defined
<BR> &nbsp; - UP LAST CALL TIME: Sorts by the newest local call time for the leads
<BR> &nbsp; - DOWN LAST CALL TIME: Sorts by the oldest local call time for the leads
<BR>
<A NAME="vicidial_campaigns-hopper_level">
@@ -13590,7 +13594,74 @@ if ($ADD==31)
echo "</select> &nbsp; \n";
echo "<input type=submit name=submit value=ADD> &nbsp; &nbsp; $NWB#vicidial_campaigns-dial_status$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>List Order: </td><td align=left><select size=1 name=lead_order ><option>DOWN</option><option>UP</option><option>DOWN PHONE</option><option>UP PHONE</option><option>DOWN LAST NAME</option><option>UP LAST NAME</option><option>DOWN COUNT</option><option>UP COUNT</option><option>DOWN 2nd NEW</option><option>DOWN 3rd NEW</option><option>DOWN 4th NEW</option><option>DOWN 5th NEW</option><option>DOWN 6th NEW</option><option>UP 2nd NEW</option><option>UP 3rd NEW</option><option>UP 4th NEW</option><option>UP 5th NEW</option><option>UP 6th NEW</option><option>DOWN PHONE 2nd NEW</option><option>DOWN PHONE 3rd NEW</option><option>DOWN PHONE 4th NEW</option><option>DOWN PHONE 5th NEW</option><option>DOWN PHONE 6th NEW</option><option>UP PHONE 2nd NEW</option><option>UP PHONE 3rd NEW</option><option>UP PHONE 4th NEW</option><option>UP PHONE 5th NEW</option><option>UP PHONE 6th NEW</option><option>DOWN LAST NAME 2nd NEW</option><option>DOWN LAST NAME 3rd NEW</option><option>DOWN LAST NAME 4th NEW</option><option>DOWN LAST NAME 5th NEW</option><option>DOWN LAST NAME 6th NEW</option><option>UP LAST NAME 2nd NEW</option><option>UP LAST NAME 3rd NEW</option><option>UP LAST NAME 4th NEW</option><option>UP LAST NAME 5th NEW</option><option>UP LAST NAME 6th NEW</option><option>DOWN COUNT 2nd NEW</option><option>DOWN COUNT 3rd NEW</option><option>DOWN COUNT 4th NEW</option><option>DOWN COUNT 5th NEW</option><option>DOWN COUNT 6th NEW</option><option>UP COUNT 2nd NEW</option><option>UP COUNT 3rd NEW</option><option>UP COUNT 4th NEW</option><option>UP COUNT 5th NEW</option><option>UP COUNT 6th NEW</option><option SELECTED>$lead_order</option></select>$NWB#vicidial_campaigns-lead_order$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>List Order: </td><td align=left><select size=1 name=lead_order>
<option>DOWN</option>
<option>UP</option>
<option>DOWN PHONE</option>
<option>UP PHONE</option>
<option>DOWN LAST NAME</option>
<option>UP LAST NAME</option>
<option>DOWN COUNT</option>
<option>UP COUNT</option>
<option>RANDOM</option>
<option>DOWN LAST CALL TIME</option>
<option>UP LAST CALL TIME</option>
<option>DOWN 2nd NEW</option>
<option>DOWN 3rd NEW</option>
<option>DOWN 4th NEW</option>
<option>DOWN 5th NEW</option>
<option>DOWN 6th NEW</option>
<option>UP 2nd NEW</option>
<option>UP 3rd NEW</option>
<option>UP 4th NEW</option>
<option>UP 5th NEW</option>
<option>UP 6th NEW</option>
<option>DOWN PHONE 2nd NEW</option>
<option>DOWN PHONE 3rd NEW</option>
<option>DOWN PHONE 4th NEW</option>
<option>DOWN PHONE 5th NEW</option>
<option>DOWN PHONE 6th NEW</option>
<option>UP PHONE 2nd NEW</option>
<option>UP PHONE 3rd NEW</option>
<option>UP PHONE 4th NEW</option>
<option>UP PHONE 5th NEW</option>
<option>UP PHONE 6th NEW</option>
<option>DOWN LAST NAME 2nd NEW</option>
<option>DOWN LAST NAME 3rd NEW</option>
<option>DOWN LAST NAME 4th NEW</option>
<option>DOWN LAST NAME 5th NEW</option>
<option>DOWN LAST NAME 6th NEW</option>
<option>UP LAST NAME 2nd NEW</option>
<option>UP LAST NAME 3rd NEW</option>
<option>UP LAST NAME 4th NEW</option>
<option>UP LAST NAME 5th NEW</option>
<option>UP LAST NAME 6th NEW</option>
<option>DOWN COUNT 2nd NEW</option>
<option>DOWN COUNT 3rd NEW</option>
<option>DOWN COUNT 4th NEW</option>
<option>DOWN COUNT 5th NEW</option>
<option>DOWN COUNT 6th NEW</option>
<option>UP COUNT 2nd NEW</option>
<option>UP COUNT 3rd NEW</option>
<option>UP COUNT 4th NEW</option>
<option>UP COUNT 5th NEW</option>
<option>UP COUNT 6th NEW</option>
<option>RANDOM 2nd NEW</option>
<option>RANDOM 3rd NEW</option>
<option>RANDOM 4th NEW</option>
<option>RANDOM 5th NEW</option>
<option>RANDOM 6th NEW</option>
<option>DOWN LAST CALL TIME 2nd NEW</option>
<option>DOWN LAST CALL TIME 3rd NEW</option>
<option>DOWN LAST CALL TIME 4th NEW</option>
<option>DOWN LAST CALL TIME 5th NEW</option>
<option>DOWN LAST CALL TIME 6th NEW</option>
<option>UP LAST CALL TIME 2nd NEW</option>
<option>UP LAST CALL TIME 3rd NEW</option>
<option>UP LAST CALL TIME 4th NEW</option>
<option>UP LAST CALL TIME 5th NEW</option>
<option>UP LAST CALL TIME 6th NEW</option>
<option SELECTED>$lead_order</option></select>$NWB#vicidial_campaigns-lead_order$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right><a href=\"$PHP_SELF?ADD=31&SUB=29&campaign_id=$campaign_id&vcl_id=$list_order_mix\">List Mix</a>: </td><td align=left><select size=1 name=list_order_mix>\n";
echo "$mixes_list";
@@ -14660,7 +14731,74 @@ if ($ADD==34)
echo "</select> &nbsp; \n";
echo "<input type=submit name=submit value=ADD> &nbsp; &nbsp; $NWB#vicidial_campaigns-dial_status$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>List Order: </td><td align=left><select size=1 name=lead_order><option>DOWN</option><option>UP</option><option>DOWN PHONE</option><option>UP PHONE</option><option>DOWN LAST NAME</option><option>UP LAST NAME</option><option>DOWN COUNT</option><option>UP COUNT</option><option>DOWN 2nd NEW</option><option>DOWN 3rd NEW</option><option>DOWN 4th NEW</option><option>DOWN 5th NEW</option><option>DOWN 6th NEW</option><option>UP 2nd NEW</option><option>UP 3rd NEW</option><option>UP 4th NEW</option><option>UP 5th NEW</option><option>UP 6th NEW</option><option>DOWN PHONE 2nd NEW</option><option>DOWN PHONE 3rd NEW</option><option>DOWN PHONE 4th NEW</option><option>DOWN PHONE 5th NEW</option><option>DOWN PHONE 6th NEW</option><option>UP PHONE 2nd NEW</option><option>UP PHONE 3rd NEW</option><option>UP PHONE 4th NEW</option><option>UP PHONE 5th NEW</option><option>UP PHONE 6th NEW</option><option>DOWN LAST NAME 2nd NEW</option><option>DOWN LAST NAME 3rd NEW</option><option>DOWN LAST NAME 4th NEW</option><option>DOWN LAST NAME 5th NEW</option><option>DOWN LAST NAME 6th NEW</option><option>UP LAST NAME 2nd NEW</option><option>UP LAST NAME 3rd NEW</option><option>UP LAST NAME 4th NEW</option><option>UP LAST NAME 5th NEW</option><option>UP LAST NAME 6th NEW</option><option>DOWN COUNT 2nd NEW</option><option>DOWN COUNT 3rd NEW</option><option>DOWN COUNT 4th NEW</option><option>DOWN COUNT 5th NEW</option><option>DOWN COUNT 6th NEW</option><option>UP COUNT 2nd NEW</option><option>UP COUNT 3rd NEW</option><option>UP COUNT 4th NEW</option><option>UP COUNT 5th NEW</option><option>UP COUNT 6th NEW</option><option SELECTED>$lead_order</option></select>$NWB#vicidial_campaigns-lead_order$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>List Order: </td><td align=left><select size=1 name=lead_order>
<option>DOWN</option>
<option>UP</option>
<option>DOWN PHONE</option>
<option>UP PHONE</option>
<option>DOWN LAST NAME</option>
<option>UP LAST NAME</option>
<option>DOWN COUNT</option>
<option>UP COUNT</option>
<option>RANDOM</option>
<option>DOWN LAST CALL TIME</option>
<option>UP LAST CALL TIME</option>
<option>DOWN 2nd NEW</option>
<option>DOWN 3rd NEW</option>
<option>DOWN 4th NEW</option>
<option>DOWN 5th NEW</option>
<option>DOWN 6th NEW</option>
<option>UP 2nd NEW</option>
<option>UP 3rd NEW</option>
<option>UP 4th NEW</option>
<option>UP 5th NEW</option>
<option>UP 6th NEW</option>
<option>DOWN PHONE 2nd NEW</option>
<option>DOWN PHONE 3rd NEW</option>
<option>DOWN PHONE 4th NEW</option>
<option>DOWN PHONE 5th NEW</option>
<option>DOWN PHONE 6th NEW</option>
<option>UP PHONE 2nd NEW</option>
<option>UP PHONE 3rd NEW</option>
<option>UP PHONE 4th NEW</option>
<option>UP PHONE 5th NEW</option>
<option>UP PHONE 6th NEW</option>
<option>DOWN LAST NAME 2nd NEW</option>
<option>DOWN LAST NAME 3rd NEW</option>
<option>DOWN LAST NAME 4th NEW</option>
<option>DOWN LAST NAME 5th NEW</option>
<option>DOWN LAST NAME 6th NEW</option>
<option>UP LAST NAME 2nd NEW</option>
<option>UP LAST NAME 3rd NEW</option>
<option>UP LAST NAME 4th NEW</option>
<option>UP LAST NAME 5th NEW</option>
<option>UP LAST NAME 6th NEW</option>
<option>DOWN COUNT 2nd NEW</option>
<option>DOWN COUNT 3rd NEW</option>
<option>DOWN COUNT 4th NEW</option>
<option>DOWN COUNT 5th NEW</option>
<option>DOWN COUNT 6th NEW</option>
<option>UP COUNT 2nd NEW</option>
<option>UP COUNT 3rd NEW</option>
<option>UP COUNT 4th NEW</option>
<option>UP COUNT 5th NEW</option>
<option>UP COUNT 6th NEW</option>
<option>RANDOM 2nd NEW</option>
<option>RANDOM 3rd NEW</option>
<option>RANDOM 4th NEW</option>
<option>RANDOM 5th NEW</option>
<option>RANDOM 6th NEW</option>
<option>DOWN LAST CALL TIME 2nd NEW</option>
<option>DOWN LAST CALL TIME 3rd NEW</option>
<option>DOWN LAST CALL TIME 4th NEW</option>
<option>DOWN LAST CALL TIME 5th NEW</option>
<option>DOWN LAST CALL TIME 6th NEW</option>
<option>UP LAST CALL TIME 2nd NEW</option>
<option>UP LAST CALL TIME 3rd NEW</option>
<option>UP LAST CALL TIME 4th NEW</option>
<option>UP LAST CALL TIME 5th NEW</option>
<option>UP LAST CALL TIME 6th NEW</option>
<option SELECTED>$lead_order</option></select>$NWB#vicidial_campaigns-lead_order$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right><a href=\"$PHP_SELF?ADD=31&SUB=29&campaign_id=$campaign_id&vcl_id=$list_order_mix\">List Mix</a>: </td><td align=left><select size=1 name=list_order_mix>\n";
echo "$mixes_list";
@@ -14908,7 +15046,7 @@ if ( ($ADD==34) or ($ADD==31) )
echo "<br><br><b>LIST MIXES FOR THIS CAMPAIGN: &nbsp; $NWB#vicidial_campaigns-list_order_mix$NWE</b><br>\n";
echo "<br><br><b>Experimental Feature in development!!! NON-FUNCTIONAL</b><br>\n";
echo "<br><b>WARNING, we only recommend List Mix for advanced users, Please read the ViciDial Manager Manual</b><br>\n";
$stmt="SELECT * from vicidial_campaigns_list_mix where campaign_id='$campaign_id' order by status, vcl_id";