final AST_VDauto_dial, FastAGI_log and admin.php changes for the auto alt dial functionality on the server side

docs updated

git-svn-id: svn://192.168.202.10@467 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2007-01-16 21:37:51 +00:00
parent 0f39d2d8bd
commit a4b5355372
7 changed files with 203 additions and 28 deletions
+3 -2
View File
@@ -32,8 +32,9 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom
8. You can now use BLEND/INBND/*_C/*_B/*_I to define a campaign a a CLOSER
campaign capable of taking inbound calls.
9. IN PROCESS- Adding ability to dial alternate numbers per lead in auto-dial
mode.
9. In Auto-dialing campaigns(RATIO and ADAPT) you can now configure the dialer
to dial up to two alternate numbers per lead automatically
+95 -12
View File
@@ -37,8 +37,8 @@
# 50620-1349 - Added custom vdad transfer AGI extension per campaign
# 50810-1610 - Added database server variable definitions lookup
# 50810-1630 - Added max_vicidial_trunks server limiter on active lines
# 50812-0957 - corrected max_trunks logic, added update of server every 25 sec
# 60120-1522 - corrected time error for hour variable, caused agi problems
# 50812-0957 - Corrected max_trunks logic, added update of server every 25 sec
# 60120-1522 - Corrected time error for hour variable, caused agi problems
# 60427-1223 - Fixed Blended in/out CLOSER campaign issue
# 60608-1134 - Altered vac table field of call_type for IN OUT distinction
# 60612-1324 - Altered dead call section to accept BUSY detection from VD_hangup
@@ -46,15 +46,16 @@
# 60614-1142 - Added code to work with recycled leads, multi called_since_last_reset values
# - Removed gmt lead validation because it is already done by VDhopper
# 60807-1438 - Changed to DBI
# - changed to use /etc/astguiclient.conf for configs
# 60814-1749 - added option for no logging to file
# 60821-1546 - added option to not dial phone_code per campaign
# 60824-1437 - added available_only_ratio_tally option
# 61003-1353 - added restrictions for server trunks
# 61113-1625 - added code for clearing VDAC LIVE jams
# 61115-1725 - added OUTBALANCE to call calculation for call_type for balance dialing
# 70111-1600 - added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns
# 70115-1635 - added auto-alt-dial functionality
# - Changed to use /etc/astguiclient.conf for configs
# 60814-1749 - Added option for no logging to file
# 60821-1546 - Added option to not dial phone_code per campaign
# 60824-1437 - Added available_only_ratio_tally option
# 61003-1353 - Added restrictions for server trunks
# 61113-1625 - Added code for clearing VDAC LIVE jams
# 61115-1725 - Added OUTBALANCE to call calculation for call_type for balance dialing
# 70111-1600 - Added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns
# 70115-1635 - Added initial auto-alt-dial functionality
# 70116-1619 - Added VDAD Ring-No-Answer Auto Alt Dial code
#
@@ -854,7 +855,7 @@ while($one_day_interval > 0)
{
$CLlead_id=''; $auto_call_id=''; $CLstatus=''; $CLcampaign_id=''; $CLphone_number=''; $CLphone_code='';
$stmtA = "SELECT auto_call_id,lead_id,phone_number,status,campaign_id,phone_code FROM vicidial_auto_calls where callerid='$KLcallerid[$kill_vac]'";
$stmtA = "SELECT auto_call_id,lead_id,phone_number,status,campaign_id,phone_code,alt_dial FROM vicidial_auto_calls where callerid='$KLcallerid[$kill_vac]'";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -869,6 +870,7 @@ while($one_day_interval > 0)
$CLstatus = "$aryA[3]";
$CLcampaign_id = "$aryA[4]";
$CLphone_code = "$aryA[5]";
$CLalt_dial = "$aryA[6]";
$rec_count++;
}
$sthA->finish();
@@ -912,6 +914,87 @@ while($one_day_interval > 0)
$event_string = "| dead call vla agent PAUSED $affected_rows|$CLlead_id|$CLphone_number|$CLstatus|";
&event_logger;
##### BEGIN AUTO ALT PHONE DIAL SECTION #####
### check to see if campaign has alt_dial enabled
$VD_auto_alt_dial = 'NONE';
$VD_auto_alt_dial_statuses='';
$stmtA="SELECT auto_alt_dial,auto_alt_dial_statuses FROM vicidial_campaigns where campaign_id='$CLcampaign_id';";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$epc_countCAMPDATA=0;
while ($sthArows > $epc_countCAMPDATA)
{
@aryA = $sthA->fetchrow_array;
$VD_auto_alt_dial = "$aryA[0]";
$VD_auto_alt_dial_statuses = "$aryA[1]";
$epc_countCAMPDATA++;
}
$sthA->finish();
if ($VD_auto_alt_dial_statuses =~ / $CLnew_status /)
{
if ( ($VD_auto_alt_dial =~ /(ALT_ONLY|ALT_AND_ADDR3)/) && ($CLalt_dial =~ /NONE|MAIN/) )
{
$VD_alt_phone='';
$stmtA="SELECT alt_phone,gmt_offset_now,state,list_id FROM vicidial_list where lead_id='$CLlead_id';";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$epc_countCAMPDATA=0;
while ($sthArows > $epc_countCAMPDATA)
{
@aryA = $sthA->fetchrow_array;
$VD_alt_phone = "$aryA[0]";
$VD_alt_phone =~ s/\D//gi;
$VD_gmt_offset_now = "$aryA[1]";
$VD_state = "$aryA[2]";
$VD_list_id = "$aryA[3]";
$epc_countCAMPDATA++;
}
$sthA->finish();
if (length($VD_alt_phone)>5)
{
$stmtA = "INSERT INTO vicidial_hopper SET lead_id='$CLlead_id',campaign_id='$CLcampaign_id',status='READY',list_id='$VD_list_id',gmt_offset_now='$VD_gmt_offset_now',state='$VD_state',alt_dial='ALT',user='';";
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDH record inserted: |$affected_rows| |$stmtA|"; &agi_output;}
}
}
if ( ( ($VD_auto_alt_dial =~ /(ADDR3_ONLY)/) && ($CLalt_dial =~ /NONE|MAIN/) ) || ( ($VD_auto_alt_dial =~ /(ALT_AND_ADDR3)/) && ($CLalt_dial =~ /ALT/) ) )
{
$VD_address3='';
$stmtA="SELECT address3,gmt_offset_now,state,list_id FROM vicidial_list where lead_id='$CLlead_id';";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$epc_countCAMPDATA=0;
while ($sthArows > $epc_countCAMPDATA)
{
@aryA = $sthA->fetchrow_array;
$VD_address3 = "$aryA[0]";
$VD_address3 =~ s/\D//gi;
$VD_gmt_offset_now = "$aryA[1]";
$VD_state = "$aryA[2]";
$VD_list_id = "$aryA[3]";
$epc_countCAMPDATA++;
}
$sthA->finish();
if (length($VD_address3)>5)
{
$stmtA = "INSERT INTO vicidial_hopper SET lead_id='$CLlead_id',campaign_id='$CLcampaign_id',status='READY',list_id='$VD_list_id',gmt_offset_now='$VD_gmt_offset_now',state='$VD_state',alt_dial='ADDR3',user='';";
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDH record inserted: |$affected_rows| |$stmtA|"; &agi_output;}
}
}
}
##### END AUTO ALT PHONE DIAL SECTION #####
}
else
{
+90 -3
View File
@@ -30,6 +30,7 @@
#
# CHANGES
# 61010-1007 - First test build
# 70116-1619 - Added Auto Alt Dial code
#
@@ -566,7 +567,8 @@ sub process_request {
{
########## FIND AND DELETE vicidial_auto_calls ##########
$stmtA = "SELECT lead_id,callerid FROM vicidial_auto_calls where uniqueid = '$uniqueid' limit 1;";
$VD_alt_dial = 'NONE';
$stmtA = "SELECT lead_id,callerid,campaign_id,alt_dial FROM vicidial_auto_calls where uniqueid = '$uniqueid' limit 1;";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
@@ -575,8 +577,10 @@ sub process_request {
while ($sthArows > $rec_countCUSTDATA)
{
@aryA = $sthA->fetchrow_array;
$VD_lead_id = "$aryA[0]";
$VD_callerid = "$aryA[1]";
$VD_lead_id = "$aryA[0]";
$VD_callerid = "$aryA[1]";
$VD_campaign_id = "$aryA[2]";
$VD_alt_dial = "$aryA[3]";
$rec_countCUSTDATA++;
}
$sthA->finish();
@@ -692,6 +696,89 @@ sub process_request {
}
}
}
##### BEGIN AUTO ALT PHONE DIAL SECTION #####
### check to see if campaign has alt_dial enabled
$VD_auto_alt_dial = 'NONE';
$VD_auto_alt_dial_statuses='';
$stmtA="SELECT auto_alt_dial,auto_alt_dial_statuses FROM vicidial_campaigns where campaign_id='$VD_campaign_id';";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$epc_countCAMPDATA=0;
while ($sthArows > $epc_countCAMPDATA)
{
@aryA = $sthA->fetchrow_array;
$VD_auto_alt_dial = "$aryA[0]";
$VD_auto_alt_dial_statuses = "$aryA[1]";
$epc_countCAMPDATA++;
}
$sthA->finish();
if ($VD_auto_alt_dial_statuses =~ / $VD_status | $VDL_status /)
{
if ( ($VD_auto_alt_dial =~ /(ALT_ONLY|ALT_AND_ADDR3)/) && ($VD_alt_dial =~ /NONE|MAIN/) )
{
$VD_alt_phone='';
$stmtA="SELECT alt_phone,gmt_offset_now,state,list_id FROM vicidial_list where lead_id='$VD_lead_id';";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$epc_countCAMPDATA=0;
while ($sthArows > $epc_countCAMPDATA)
{
@aryA = $sthA->fetchrow_array;
$VD_alt_phone = "$aryA[0]";
$VD_alt_phone =~ s/\D//gi;
$VD_gmt_offset_now = "$aryA[1]";
$VD_state = "$aryA[2]";
$VD_list_id = "$aryA[3]";
$epc_countCAMPDATA++;
}
$sthA->finish();
if (length($VD_alt_phone)>5)
{
$stmtA = "INSERT INTO vicidial_hopper SET lead_id='$VD_lead_id',campaign_id='$VD_campaign_id',status='READY',list_id='$VD_list_id',gmt_offset_now='$VD_gmt_offset_now',state='$VD_state',alt_dial='ALT',user='';";
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDH record inserted: |$affected_rows| |$stmtA|"; &agi_output;}
}
}
if ( ( ($VD_auto_alt_dial =~ /(ADDR3_ONLY)/) && ($VD_alt_dial =~ /NONE|MAIN/) ) || ( ($VD_auto_alt_dial =~ /(ALT_AND_ADDR3)/) && ($VD_alt_dial =~ /ALT/) ) )
{
$VD_address3='';
$stmtA="SELECT address3,gmt_offset_now,state,list_id FROM vicidial_list where lead_id='$VD_lead_id';";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$epc_countCAMPDATA=0;
while ($sthArows > $epc_countCAMPDATA)
{
@aryA = $sthA->fetchrow_array;
$VD_address3 = "$aryA[0]";
$VD_address3 =~ s/\D//gi;
$VD_gmt_offset_now = "$aryA[1]";
$VD_state = "$aryA[2]";
$VD_list_id = "$aryA[3]";
$epc_countCAMPDATA++;
}
$sthA->finish();
if (length($VD_address3)>5)
{
$stmtA = "INSERT INTO vicidial_hopper SET lead_id='$VD_lead_id',campaign_id='$VD_campaign_id',status='READY',list_id='$VD_list_id',gmt_offset_now='$VD_gmt_offset_now',state='$VD_state',alt_dial='ADDR3',user='';";
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDH record inserted: |$affected_rows| |$stmtA|"; &agi_output;}
}
}
}
##### END AUTO ALT PHONE DIAL SECTION #####
$dbhA->disconnect();
}
###################################################################
@@ -1,6 +1,6 @@
ALTERNATE NUMBER DIALING Summary and Overview 2007-01-15
*** ALTERNATE NUMBER DIALING IN AUTODIAL MODE WILL BE ADDED IN THE 2.0.3 RELEASE ***
*** ALTERNATE NUMBER DIALING IN AUTODIAL MODE HAS BEEN ADDED IN THE 2.0.3 RELEASE ***
This document will outline the methods used to automatically dial the alt_phone and/or address3 fields containing phone numbers for a lead while in Auto-dial modes(RATIO or ADAPT*). This feature does not function for leads dialed with the MANUAL dial_method.
@@ -17,6 +17,8 @@ AUTO ALT DIAL STATUS ADDED||
AUTO ALT DIAL STATUS NOT DELETED||
AUTO ALT DIAL STATUS DELETED||
this auto alt dial status is not in this campaign||
New Auto Alt Dial Status||
Delete Auto Alt Dial Status||
############################################################ CLIENT
+2 -2
View File
@@ -905,7 +905,7 @@ if ($stage == "end")
}
else {$alt_dial = 'NONE';}
if ( (eregi("(NONE|MAIN)",$alt_dial)) and (eregi("(ALT_ONLY|ADDR3_ONLY|ALT_AND_ADDR3)",$auto_alt_dial)) )
if ( (eregi("(NONE|MAIN)",$alt_dial)) and (eregi("(ALT_ONLY|ALT_AND_ADDR3)",$auto_alt_dial)) )
{
$stmt="SELECT alt_phone,gmt_offset_now,state FROM vicidial_list where lead_id='$lead_id';";
$rslt=mysql_query($stmt, $link);
@@ -928,7 +928,7 @@ if ($stage == "end")
$rslt=mysql_query($stmt, $link);
}
}
if ( (eregi("(ALT)",$alt_dial)) and (eregi("(ADDR3_ONLY|ALT_AND_ADDR3)",$auto_alt_dial)) )
if ( ( (eregi("(ALT)",$alt_dial)) and (eregi("ALT_AND_ADDR3",$auto_alt_dial)) ) or ( (eregi("(NONE|MAIN)",$alt_dial)) and (eregi("ADDR3_ONLY",$auto_alt_dial)) ) )
{
$stmt="SELECT address3,gmt_offset_now,state FROM vicidial_list where lead_id='$lead_id';";
$rslt=mysql_query($stmt, $link);
+10 -8
View File
@@ -930,6 +930,7 @@ if ($ADD==21) {$hh='campaigns'; echo "New Campaign Addition";}
if ($ADD==22) {$hh='campaigns'; echo "New Campaign Status Addition";}
if ($ADD==23) {$hh='campaigns'; echo "New Campaign HotKey Addition";}
if ($ADD==25) {$hh='campaigns'; echo "New Campaign Lead Recycle Addition";}
if ($ADD==26) {$hh='campaigns'; echo "New Auto Alt Dial Status";}
if ($ADD==211) {$hh='lists'; echo "New List Addition";}
if ($ADD==2111) {$hh='ingroups'; echo "New In-Group Addition";}
if ($ADD==21111) {$hh='remoteagent'; echo "New Remote Agents Addition";}
@@ -1002,6 +1003,7 @@ if ($ADD==61) {$hh='campaigns'; echo "Delete Campaign";}
if ($ADD==62) {$hh='campaigns'; echo "Logout Agents";}
if ($ADD==63) {$hh='campaigns'; echo "Emergency VDAC Jam Clear";}
if ($ADD==65) {$hh='campaigns'; echo "Delete Lead Recycle";}
if ($ADD==66) {$hh='campaigns'; echo "Delete Auto Alt Dial Status";}
if ($ADD==611) {$hh='lists'; echo "Delete List";}
if ($ADD==6111) {$hh='ingroups'; echo "Delete In-Group";}
if ($ADD==61111) {$hh='remoteagent'; echo "Delete Remote Agents";}
@@ -1034,9 +1036,9 @@ if ($ADD==10000000000) {$hh='server'; echo "PHONE LIST";}
if ($ADD==100000000000) {$hh='server'; echo "SERVER LIST";}
if ($ADD==1000000000000) {$hh='server'; echo "CONFERENCE LIST";}
if ($ADD==10000000000000) {$hh='server'; echo "VICIDIAL CONFERENCE LIST";}
if ($ADD==55) {$hh='users'; echo "Search Form";}
if ($ADD==550) {$hh='users'; echo "Search Form";}
if ($ADD==551) {$hh='users'; echo "SEARCH PHONES";}
if ($ADD==66) {$hh='users'; echo "Search Results";}
if ($ADD==660) {$hh='users'; echo "Search Results";}
if ($ADD==661) {$hh='users'; echo "SEARCH PHONES RESULTS";}
if ($ADD==99999) {$hh='users'; echo "HELP";}
if ($ADD==999999) {$hh='reports'; echo "REPORTS";}
@@ -2819,7 +2821,7 @@ echo "<!-- INTERNATIONALIZATION-LINKS-PLACEHOLDER-VICIDIAL -->\n";
<? if (strlen($users_hh) > 1) {
?>
<TR BGCOLOR=#FFFF99><TD ALIGN=CENTER COLSPAN=11><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1><B> &nbsp; <a href="<? echo $PHP_SELF ?>"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1>LIST USERS</a> &nbsp; &nbsp; | &nbsp; &nbsp; <a href="<? echo $PHP_SELF ?>?ADD=1"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1>ADD A NEW USER</a> &nbsp; &nbsp; | &nbsp; &nbsp; <a href="<? echo $PHP_SELF ?>?ADD=55"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1>SEARCH FOR A USER</a></TD></TR>
<TR BGCOLOR=#FFFF99><TD ALIGN=CENTER COLSPAN=11><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1><B> &nbsp; <a href="<? echo $PHP_SELF ?>"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1>LIST USERS</a> &nbsp; &nbsp; | &nbsp; &nbsp; <a href="<? echo $PHP_SELF ?>?ADD=1"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1>ADD A NEW USER</a> &nbsp; &nbsp; | &nbsp; &nbsp; <a href="<? echo $PHP_SELF ?>?ADD=550"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1>SEARCH FOR A USER</a></TD></TR>
<? }
if (strlen($campaigns_hh) > 1) {
?>
@@ -8199,16 +8201,16 @@ if ($LOGast_delete_phones > 0)
######################
# ADD=55 search form
# ADD=550 search form
######################
if ($ADD==55)
if ($ADD==550)
{
echo "<TABLE><TR><TD>\n";
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
echo "<br>SEARCH FOR A USER<form action=$PHP_SELF method=POST>\n";
echo "<input type=hidden name=ADD value=66>\n";
echo "<input type=hidden name=ADD value=660>\n";
echo "<center><TABLE width=$section_width cellspacing=3>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>User Number: </td><td align=left><input type=text name=user size=20 maxlength=20></td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Full Name: </td><td align=left><input type=text name=full_name size=30 maxlength=30></td></tr>\n";
@@ -8233,10 +8235,10 @@ echo "</TABLE></center>\n";
}
######################
# ADD=66 user search results
# ADD=660 user search results
######################
if ($ADD==66)
if ($ADD==660)
{
echo "<TABLE><TR><TD>\n";
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";