2006-04-19_snapshot

git-svn-id: svn://192.168.202.10@4 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2006-07-07 15:16:35 +00:00
parent 23592859ca
commit 4862328b6e
13 changed files with 1289 additions and 252 deletions
+64 -7
View File
@@ -1,6 +1,6 @@
#!/usr/bin/perl #!/usr/bin/perl
# #
# AST_VDhopper.pl version 0.5 # AST_VDhopper.pl version 0.7
# #
# DESCRIPTION: # DESCRIPTION:
# uses Net::MySQL to update the VICIDIAL leads hopper for the new streamlined # uses Net::MySQL to update the VICIDIAL leads hopper for the new streamlined
@@ -31,6 +31,7 @@
# 60228-1735 - Added hopper gmt validation to remove gmt outside of time range # 60228-1735 - Added hopper gmt validation to remove gmt outside of time range
# 60320-0932 - Added inactive lead list hopper deletion (Thanks Vic Jolin) # 60320-0932 - Added inactive lead list hopper deletion (Thanks Vic Jolin)
# 60322-1030 - Added super debug output # 60322-1030 - Added super debug output
# 60418-0947 - Added lead filter per campaign
# #
# constants # constants
@@ -38,6 +39,10 @@ $DB=0; # Debug flag, set to 0 for no debug messages, On an active system this w
$US='__'; $US='__';
$MT[0]=''; $MT[0]='';
# options
$insert_auto_CB_to_hopper = 1; # set to 1 to automatically insert ANYONE callbacks into the hopper
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
$year = ($year + 1900); $year = ($year + 1900);
$mon++; $mon++;
@@ -206,7 +211,7 @@ if ($inactive_lists_count > 0)
### BEGIN Change CBHOLD status leads to CALLBK if their vicidial_callbacks time has passed ### BEGIN Change CBHOLD status leads to CALLBK if their vicidial_callbacks time has passed
$stmtA = "SELECT count(*) FROM vicidial_callbacks where callback_time <= '$now_date' and status='ACTIVE' and recipient='ANYONE';"; $stmtA = "SELECT count(*) FROM vicidial_callbacks where callback_time <= '$now_date' and status='ACTIVE';";
$dbhA->query("$stmtA"); $dbhA->query("$stmtA");
if ($dbhA->has_selected_record) if ($dbhA->has_selected_record)
{ {
@@ -222,16 +227,26 @@ if ($dbhA->has_selected_record)
if ($CBHOLD_count > 0) if ($CBHOLD_count > 0)
{ {
$update_leads=''; $update_leads='';
$stmtA = "SELECT lead_id FROM vicidial_callbacks where callback_time <= '$now_date' and status='ACTIVE' and recipient='ANYONE';"; $stmtA = "SELECT vicidial_callbacks.lead_id,recipient,campaign_id,vicidial_callbacks.list_id,gmt_offset_now FROM vicidial_callbacks,vicidial_list where callback_time <= '$now_date' and vicidial_callbacks.status='ACTIVE' and vicidial_callbacks.lead_id=vicidial_list.lead_id;";
$dbhA->query("$stmtA"); $dbhA->query("$stmtA");
if ($dbhA->has_selected_record) if ($dbhA->has_selected_record)
{ {
$iter=$dbhA->create_record_iterator; $iter=$dbhA->create_record_iterator;
$cbc=0; $cbc=0;
$cba=0;
while ( $record = $iter->each) while ( $record = $iter->each)
{ {
$lead_ids[$cbc] = $record->[0]; $lead_ids[$cbc] = $record->[0];
$recipient = $record->[1];
$update_leads .= "'$lead_ids[$cbc]',"; $update_leads .= "'$lead_ids[$cbc]',";
if ($recipient == 'ANYONE')
{
$CA_lead_id[$cba] = $record->[0];
$CA_campaign_id[$cba] = $record->[2];
$CA_list_id[$cba] = $record->[3];
$CA_gmt_offset_now[$cba] = $record->[4];
$cba++;
}
$cbc++; $cbc++;
} }
} }
@@ -254,6 +269,20 @@ if ($CBHOLD_count > 0)
&event_logger; &event_logger;
} }
### INSERT ANYONE CALLBACKS INTO HOPPER DIRECTLY ###
if ( ($cba > 0) && ($insert_auto_CB_to_hopper) )
{
if ($DB) {print "ANYONE Scheduled Callbacks Inserted into hopper: $cba\n";}
$event_string = "|ANYONE CB HOPPER |$cba|";
&event_logger;
$CAu=0;
foreach(@CA_lead_id)
{
$stmtA = "INSERT INTO vicidial_hopper SET lead_id='$CA_lead_id[$CAu]',campaign_id='$CA_campaign_id[$CAu]',list_id='$CA_list_id[$CAu]',gmt_offset_now='$CA_gmt_offset_now[$CAu]';";
$dbhA->query("$stmtA");
$CAu++;
}
}
} }
### END Change CBHOLD status leads to CALLBK if their vicidial_callbacks time has passed ### END Change CBHOLD status leads to CALLBK if their vicidial_callbacks time has passed
@@ -289,6 +318,7 @@ if ($dbhA->has_selected_record)
else else
{$hopper_level[$rec_count] = "$CLIlevel";} {$hopper_level[$rec_count] = "$CLIlevel";}
$local_call_time[$rec_count] = "$record->[16]"; $local_call_time[$rec_count] = "$record->[16]";
$lead_filter_id[$rec_count] = "$record->[35]";
$rec_count++; $rec_count++;
} }
} }
@@ -407,6 +437,7 @@ foreach(@campaign_id)
{ {
if ($DB) {print " hopper too low ($hopper_ready_count|$hopper_level[$i]) starting hopper dump\n";} if ($DB) {print " hopper too low ($hopper_ready_count|$hopper_level[$i]) starting hopper dump\n";}
### Get list of the lists in the campaign ###
$stmtA = "SELECT list_id FROM vicidial_lists where campaign_id='$campaign_id[$i]' and active='Y';"; $stmtA = "SELECT list_id FROM vicidial_lists where campaign_id='$campaign_id[$i]' and active='Y';";
$dbhA->query("$stmtA"); $dbhA->query("$stmtA");
if ($dbhA->has_selected_record) if ($dbhA->has_selected_record)
@@ -424,7 +455,33 @@ foreach(@campaign_id)
if ($DB) {print " campaign lists count: $rec_countLISTS | $camp_lists\n";} if ($DB) {print " campaign lists count: $rec_countLISTS | $camp_lists\n";}
if ($DBX) {print " |$stmtA|\n";} if ($DBX) {print " |$stmtA|\n";}
$stmtA = "SELECT count(*) FROM vicidial_list where called_since_last_reset='N' and status IN('$dial_status_a[$i]','$dial_status_b[$i]','$dial_status_c[$i]','$dial_status_d[$i]','$dial_status_e[$i]') and list_id IN($camp_lists) and gmt_offset_now IN($GMT_allowed);"; if ( ($lead_filter_id[$i] !~ /NONE/) && (length($lead_filter_id[$i])>0) )
{
### Get SQL of lead filter for the campaign ###
$stmtA = "SELECT lead_filter_sql FROM vicidial_lead_filters where lead_filter_id='$lead_filter_id[$i]';";
$dbhA->query("$stmtA");
if ($dbhA->has_selected_record)
{
$iter=$dbhA->create_record_iterator;
while ( $record = $iter->each)
{
$lead_filter_sql[$i] = "$record->[0]";
}
}
$lead_filter_sql[$i] =~ s/^and|and$|^or|or$|^ and|and $|^ or|or $//gi;
$lead_filter_sql[$i] = "and $lead_filter_sql[$i]";
if ($DB) {print " campaign lists count: $rec_countLISTS | $camp_lists\n";}
if ($DB) {print " lead filter $lead_filter_id[$i] defined for $campaign_id[$i]\n";}
if ($DBX) {print " |$lead_filter_sql[$i]|\n";}
}
else
{
$lead_filter_sql[$i] = '';
if ($DB) {print " no lead filter defined for campaign: $campaign_id[$i]\n";}
if ($DBX) {print " |$lead_filter_id[$i]|\n";}
}
$stmtA = "SELECT count(*) FROM vicidial_list where called_since_last_reset='N' and status IN('$dial_status_a[$i]','$dial_status_b[$i]','$dial_status_c[$i]','$dial_status_d[$i]','$dial_status_e[$i]') and list_id IN($camp_lists) and gmt_offset_now IN($GMT_allowed) $lead_filter_sql[$i];";
$dbhA->query("$stmtA"); $dbhA->query("$stmtA");
$campaign_leads_to_call=0; $campaign_leads_to_call=0;
if ($dbhA->has_selected_record) if ($dbhA->has_selected_record)
@@ -439,7 +496,7 @@ foreach(@campaign_id)
} }
if ( ($lead_order[$i] eq "DOWN COUNT 2nd NEW") or ($lead_order[$i] eq "DOWN COUNT 3rd NEW") or ($lead_order[$i] eq "DOWN COUNT 4th NEW") ) if ( ($lead_order[$i] eq "DOWN COUNT 2nd NEW") or ($lead_order[$i] eq "DOWN COUNT 3rd NEW") or ($lead_order[$i] eq "DOWN COUNT 4th NEW") )
{ {
$stmtA = "SELECT count(*) FROM vicidial_list where called_since_last_reset='N' and status IN('NEW') and list_id IN($camp_lists) and gmt_offset_now IN($GMT_allowed);"; $stmtA = "SELECT count(*) FROM vicidial_list where called_since_last_reset='N' and status IN('NEW') and list_id IN($camp_lists) and gmt_offset_now IN($GMT_allowed) $lead_filter_sql[$i];";
$dbhA->query("$stmtA"); $dbhA->query("$stmtA");
$NEW_campaign_leads_to_call=0; $NEW_campaign_leads_to_call=0;
if ($dbhA->has_selected_record) if ($dbhA->has_selected_record)
@@ -509,7 +566,7 @@ foreach(@campaign_id)
$order_stmt = 'order by called_count, lead_id asc'; $order_stmt = 'order by called_count, lead_id asc';
if ($DB) {print " looking for $NEW_level NEW leads mixed in with $OTHER_level other leads\n";} if ($DB) {print " looking for $NEW_level NEW leads mixed in with $OTHER_level other leads\n";}
$stmtA = "SELECT lead_id,list_id,gmt_offset_now,phone_number,state FROM vicidial_list where called_since_last_reset='N' and status IN('NEW') and list_id IN($camp_lists) and lead_id NOT IN($lead_id_lists) and gmt_offset_now IN($GMT_allowed) $order_stmt limit $NEW_level;"; $stmtA = "SELECT lead_id,list_id,gmt_offset_now,phone_number,state FROM vicidial_list where called_since_last_reset='N' and status IN('NEW') and list_id IN($camp_lists) and lead_id NOT IN($lead_id_lists) and gmt_offset_now IN($GMT_allowed) $lead_filter_sql[$i] $order_stmt limit $NEW_level;";
if ($DBX) {print " |$stmtA|\n";} if ($DBX) {print " |$stmtA|\n";}
$dbhA->query("$stmtA"); $dbhA->query("$stmtA");
if ($dbhA->has_selected_record) if ($dbhA->has_selected_record)
@@ -535,7 +592,7 @@ foreach(@campaign_id)
if ($DB) {print " lead call order: $order_stmt\n";} if ($DB) {print " lead call order: $order_stmt\n";}
$stmtA = "SELECT lead_id,list_id,gmt_offset_now,phone_number,state FROM vicidial_list where called_since_last_reset='N' and status IN('$dial_status_a[$i]','$dial_status_b[$i]','$dial_status_c[$i]','$dial_status_d[$i]','$dial_status_e[$i]') and list_id IN($camp_lists) and lead_id NOT IN($lead_id_lists) and gmt_offset_now IN($GMT_allowed) $order_stmt limit $OTHER_level;"; $stmtA = "SELECT lead_id,list_id,gmt_offset_now,phone_number,state FROM vicidial_list where called_since_last_reset='N' and status IN('$dial_status_a[$i]','$dial_status_b[$i]','$dial_status_c[$i]','$dial_status_d[$i]','$dial_status_e[$i]') and list_id IN($camp_lists) and lead_id NOT IN($lead_id_lists) and gmt_offset_now IN($GMT_allowed) $lead_filter_sql[$i] $order_stmt limit $OTHER_level;";
if ($DBX) {print " |$stmtA|\n";} if ($DBX) {print " |$stmtA|\n";}
$dbhA->query("$stmtA"); $dbhA->query("$stmtA");
if ($dbhA->has_selected_record) if ($dbhA->has_selected_record)
Binary file not shown.
Binary file not shown.
+11 -1
View File
@@ -446,7 +446,10 @@ amd_send_to_vmx ENUM('Y','N') default 'N',
xferconf_a_dtmf VARCHAR(50), xferconf_a_dtmf VARCHAR(50),
xferconf_a_number VARCHAR(50), xferconf_a_number VARCHAR(50),
xferconf_b_dtmf VARCHAR(50), xferconf_b_dtmf VARCHAR(50),
xferconf_b_number VARCHAR(50) xferconf_b_number VARCHAR(50),
alt_number_dialing ENUM('Y','N') default 'N',
scheduled_callbacks ENUM('Y','N') default 'N',
lead_filter_id VARCHAR(10) default 'NONE'
); );
CREATE TABLE vicidial_lists ( CREATE TABLE vicidial_lists (
@@ -645,3 +648,10 @@ index (lead_id),
index (phone_number), index (phone_number),
index (entry_time) index (entry_time)
); );
CREATE TABLE vicidial_lead_filters (
lead_filter_id VARCHAR(10) PRIMARY KEY NOT NULL,
lead_filter_name VARCHAR(30) NOT NULL,
lead_filter_comments VARCHAR(255),
lead_filter_sql TEXT
);
+73
View File
@@ -0,0 +1,73 @@
############################################################ ADMIN
Add New Filter
New Filter Addition
Modify Filter
Delete Filter
Filters
Filter ID -</B> This is the short name of a Vicidial Lead Filter. This needs to be a unique identifier. Do not use any spaces or punctuation for this field. max 10 characters, minimum of 2 characters
Filter Name -</B> This is a more descriptive name of the Filter. This is a short summary of the filter. max 30 characters, minimum of 2 characters
Filter Comments -</B> This is where you can place comments for a Vicidial Filter such as -calls all California leads-. max 255 characters, minimum of 2 characters
Filter SQL -</B> This is where you place the SQL query fragment that you want to filter by. do not begin or end with an AND, that will be added by the hopper cron script automatically. an example SQL query that would work here is- called_count > 4 and called_count < 8 -
ADD NEW FILTER
Filter ID:
Filter Name:
Filter Comments:
Filter SQL:
short description of the filter
FILTER NOT ADDED - there is already a filter entry with this ID
Please go back and look at the data you entered
FILTER NOT ADDED
FILTER NOT MODIFIED
FILTER NOT DELETED
Filter ID, name and SQL must be at least 2 characters in length
FILTER ADDED:
FILTER MODIFIED
Filter ID must be at least 2 characters in length
Click here to delete filter
FILTER DELETION COMPLETED:
MODIFY A FILTER
DELETE THIS FILTER
LEAD FILTER LISTINGS:
VIEW FILTERS
Lead Filter:
Lead Filter -</B> This is a method of filtering your leads using a fragment of a SQL query. Use this feature with caution, it is easy to stop dialing accidentally with the slightest alteration to the SQL statement. Default is NONE
Agent Alt Num Dialing:
Agent Alt Num Dialing -</B> This option allows an agent to manually dial the alternate phone number or address3 field after the main number has been called
Scheduled Callbacks -</B> This option allows an agent to disposition a call as CALLBK and choose the data and time at which the lead will be re-activated
Agent-Only Callbacks -</B> This option allows an agent to set a callback so that they are the only Agent that can call the customer back. This also allows the agent to see their callback listings and call them back any time they want to
Agent Call Manual -</B> This option allows an agent to manually enter a new lead into the system and call them. This also allows the calling of any phone number from their vicidial screen and puts that call into their session. Use this option with caution
Vicidial Recording -</B> This option can prevent an agent from doing any recordings after they log in to vicidial. This option must be on for vicidial to follow the campaign recording session
Vicidial Transfers -</B> This option can prevent an agent from opening the transfer - conference session of vicidial. If this is disabled, the agent cannot third party call or blind transfer any calls
Delete Filters -</B> This option allows the user to be able to delete vicidial lead filters from the system
Scheduled Callbacks:
Agent-Only Callbacks:
############################################################ CLIENT
Hangup Again
Go Back
Call Agent Again
Finish and Disposition Call
MY CALLBACK ONLY
MANUAL DIAL
ACTIVE CALLBACKS
CALLBACKS FOR AGENT
Click on a callback below to call the customer back now. If you click on a record below to call it, it will be removed from the list
YOU MUST BE PAUSED TO CHECK CALLBACKS IN AUTO-DIAL MODE
YOU CANNOT SKIP A CALLBACK OR MANUAL DIAL, YOU MUST DIAL THE LEAD
YOU MUST BE PAUSED TO MANUAL DIAL A NEW LEAD IN AUTO-DIAL MODE
NEW MANUAL DIAL LEAD FOR
Enter information below for the new lead you wish to call
Note: a dial prefix of
with be added to the beginning of this number
This is usually a 1 in the USA-Canada
Dial Code:
10 digits max - digits only
Note: all new manual dial leads will go into list 999
If you want to dial a number and have it NOT be added as a new lead, enter in the exact dialstring that you want to call in the Dial Override field below. To hangup this call you will have to open the CALLS IN THIS SESSION link at the bottom of the screen and hang it up by clicking on its channel link there
Dial Override
digits only please
Dial Now
YOU DO NOT HAVE PERMISSIONS TO TRANSFER CALLS
File diff suppressed because it is too large Load Diff
@@ -42,12 +42,22 @@ $comments=$_GET["comments"]; if (!$comments) {$comments=$_POST["comments"];}
$status=$_GET["status"]; if (!$status) {$status=$_POST["status"];} $status=$_GET["status"]; if (!$status) {$status=$_POST["status"];}
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];} $submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];} $SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];}
$CBchangeUSERtoANY=$_GET["CBchangeUSERtoANY"]; if (!$CBchangeUSERtoANY) {$CBchangeUSERtoANY=$_POST["CBchangeUSERtoANY"];}
$CBchangeUSERtoUSER=$_GET["CBchangeUSERtoUSER"]; if (!$CBchangeUSERtoUSER) {$CBchangeUSERtoUSER=$_POST["CBchangeUSERtoUSER"];}
$CBchangeANYtoUSER=$_GET["CBchangeANYtoUSER"]; if (!$CBchangeANYtoUSER) {$CBchangeANYtoUSER=$_POST["CBchangeANYtoUSER"];}
$callback_id=$_GET["callback_id"]; if (!$callback_id) {$callback_id=$_POST["callback_id"];}
$CBuser=$_GET["CBuser"]; if (!$CBuser) {$CBuser=$_POST["CBuser"];}
### AST GUI database administration modify lead in vicidial_list ### AST GUI database administration modify lead in vicidial_list
### admin_modify_lead.php ### admin_modify_lead.php
# this is the administration lead information modifier screen, the administrator just needs to enter the leadID and then they can view and modify the information in the record for that lead # this is the administration lead information modifier screen, the administrator just needs to enter the leadID and then they can view and modify the information in the record for that lead
# CHANGES
#
# 60419-1705 Added ability to change lead callback record from USERONLY to ANYONE or USERONLY-user
#
$STARTtime = date("U"); $STARTtime = date("U");
$TODAY = date("Y-m-d"); $TODAY = date("Y-m-d");
@@ -144,6 +154,37 @@ $call_length = ($STARTtime - $call_began);
} }
else else
{ {
if ($CBchangeUSERtoANY == 'YES')
{
### inactivate vicidial_callbacks record for this lead
$stmt="UPDATE vicidial_callbacks set recipient='ANYONE' where callback_id='$callback_id';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
echo "<BR>vicidial_callback record changed to ANYONE<BR>\n";
}
if ($CBchangeUSERtoUSER == 'YES')
{
### inactivate vicidial_callbacks record for this lead
$stmt="UPDATE vicidial_callbacks set user='$CBuser' where callback_id='$callback_id';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
echo "<BR>vicidial_callback record user changed to $CBuser<BR>\n";
}
if ($CBchangeANYtoUSER == 'YES')
{
### inactivate vicidial_callbacks record for this lead
$stmt="UPDATE vicidial_callbacks set user='$CBuser',recipient='USERONLY' where callback_id='$callback_id';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
echo "<BR>vicidial_callback record changed to USERONLY, user: $CBuser<BR>\n";
}
$stmt="SELECT count(*) from vicidial_list where lead_id='$lead_id'"; $stmt="SELECT count(*) from vicidial_list where lead_id='$lead_id'";
$rslt=mysql_query($stmt, $link); $rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";} if ($DB) {echo "$stmt\n";}
@@ -243,6 +284,56 @@ else
echo "</table></form>\n"; echo "</table></form>\n";
echo "<BR><BR><BR>\n"; echo "<BR><BR><BR>\n";
if ( ($dispo == 'CALLBK') or ($dispo == 'CBHOLD') )
{
### find any vicidial_callback records for this lead
$stmt="select * from vicidial_callbacks where lead_id='$lead_id' and status IN('ACTIVE','LIVE') order by callback_id desc LIMIT 1;";
if ($DB) {echo "|$stmt|\n";}
$rsltx=mysql_query($stmt, $link);
$CB_to_print = mysql_num_rows($rsltx);
$rowx=mysql_fetch_row($rsltx);
if ($CB_to_print>0)
{
if ($rowx[9] == 'USERONLY')
{
echo "<br><form action=$PHP_SELF method=POST>\n";
echo "<input type=hidden name=CBchangeUSERtoANY value=\"YES\">\n";
echo "<input type=hidden name=DB value=\"$DB\">\n";
echo "<input type=hidden name=lead_id value=\"$lead_id\">\n";
echo "<input type=hidden name=callback_id value=\"$rowx[0]\">\n";
echo "<input type=submit name=submit value=\"CHANGE TO ANYONE CALLBACK\"></form><BR>\n";
echo "<br><form action=$PHP_SELF method=POST>\n";
echo "<input type=hidden name=CBchangeUSERtoUSER value=\"YES\">\n";
echo "<input type=hidden name=DB value=\"$DB\">\n";
echo "<input type=hidden name=lead_id value=\"$lead_id\">\n";
echo "<input type=hidden name=callback_id value=\"$rowx[0]\">\n";
echo "New Callback Owner UserID: <input type=text name=CBuser size=8 maxlength=10 value=\"$rowx[8]\"> \n";
echo "<input type=submit name=submit value=\"CHANGE USERONLY CALLBACK USER\"></form><BR>\n";
}
else
{
echo "<br><form action=$PHP_SELF method=POST>\n";
echo "<input type=hidden name=CBchangeANYtoUSER value=\"YES\">\n";
echo "<input type=hidden name=DB value=\"$DB\">\n";
echo "<input type=hidden name=lead_id value=\"$lead_id\">\n";
echo "<input type=hidden name=callback_id value=\"$rowx[0]\">\n";
echo "New Callback Owner UserID: <input type=text name=CBuser size=8 maxlength=10 value=\"$rowx[8]\"> \n";
echo "<input type=submit name=submit value=\"CHANGE TO USERONLY CALLBACK\"></form><BR>\n";
}
}
else
{
echo "<BR>No Callback records found<BR>\n";
}
}
} }
else else
{ {
+11 -2
View File
@@ -95,10 +95,11 @@
# 60413-1541 Added USERONLY Callback listings output - CalLBacKLisT # 60413-1541 Added USERONLY Callback listings output - CalLBacKLisT
# Added USERONLY Callback count output - CalLBacKCounT # Added USERONLY Callback count output - CalLBacKCounT
# 60414-1140 Added Callback lead lookup for manual dialing # 60414-1140 Added Callback lead lookup for manual dialing
# 60419-1517 After CALLBK is sent to agent, update callback record to INACTIVE
# #
$version = '0.0.28'; $version = '0.0.29';
$build = '60414-1140'; $build = '60419-1517';
require("dbconnect.php"); require("dbconnect.php");
@@ -1065,6 +1066,14 @@ if ($ACTION == 'VDADcheckINCOMING')
$stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';"; $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';";
if ($format=='debug') {echo "\n<!-- $stmt -->";} if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link); $rslt=mysql_query($stmt, $link);
### If CALLBK, change vicidial_callback record to INACTIVE
if ($dispo == 'CALLBK')
{
$stmt="UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='$lead_id' order by callback_id desc LIMIT 1;";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
}
} }
else else
{ {
+145 -61
View File
@@ -95,6 +95,10 @@
### 60414-1039 - Changed manual dial preview and alt dial checkboxes to spans ### 60414-1039 - Changed manual dial preview and alt dial checkboxes to spans
### - Added beta-level USERONLY callback functionality ### - Added beta-level USERONLY callback functionality
### - Added beta-level manual dialing with lead insertion functionality ### - Added beta-level manual dialing with lead insertion functionality
### 60415-1534 - Fixed manual dial lead preview and fixed manuald dial override bug
### 60417-1108 - Added capability to do alt-number-dialing in auto-dial mode
### - Changed several permissions to database-defined
### 60419-1529 - Prevent manual dial or callbacks when alt-dial lead not finished
### ###
require("dbconnect.php"); require("dbconnect.php");
@@ -113,8 +117,8 @@ $relogin=$_GET['relogin']; if (!$relogin) {$relogin=$_POST["relogin"];}
$forever_stop=0; $forever_stop=0;
$version = '1.1.71'; $version = '1.1.74';
$build = '60414-1039'; $build = '60419-1529';
if ($force_logout) if ($force_logout)
{ {
@@ -136,19 +140,21 @@ $conf_silent_prefix = '7'; # vicidial_conferences prefix to enter silently
$HKuser_level = '5'; # minimum vicidial user_level for HotKeys $HKuser_level = '5'; # minimum vicidial user_level for HotKeys
$campaign_login_list = '1'; # show drop-down list of campaigns at login $campaign_login_list = '1'; # show drop-down list of campaigns at login
$manual_dial_preview = '1'; # allow preview lead option when manual dial $manual_dial_preview = '1'; # allow preview lead option when manual dial
$manual_dial_alt_phone = '1'; # allow manual dial users to call alt phone number
$multi_line_comments = '1'; # set to 1 to allow multi-line comment box $multi_line_comments = '1'; # set to 1 to allow multi-line comment box
$user_login_first = '0'; # set to 1 to have the vicidial_user login before the phone login $user_login_first = '0'; # set to 1 to have the vicidial_user login before the phone login
$view_scripts = '1'; # set to 1 to show the SCRIPTS tab $view_scripts = '1'; # set to 1 to show the SCRIPTS tab
$scheduled_callbacks = '1'; # set to 1 to allow agent to choose scheduled callbacks
$agentonly_callbacks = '1'; # set to 1 to allow agent to choose agent-only scheduled callbacks
$agentcall_manual = '1'; # set to 1 to allow agent to make manual calls during autodial session
$dispo_check_all_pause = '0'; # set to 1 to allow for persistent pause after dispo $dispo_check_all_pause = '0'; # set to 1 to allow for persistent pause after dispo
$agentcallsstatus = '1'; # set to 1 to show agent status and call count $agentcallsstatus = '1'; # set to 1 to show agent status and call count
$campagentstatctmax = '0'; # Number of seconds for campaign call and agent stats $campagentstatctmax = '0'; # Number of seconds for campaign call and agent stats
$TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen $TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen
# options now set in DB:
#$alt_phone_dialing = '1'; # allow agents to call alt phone numbers
#$scheduled_callbacks = '1'; # set to 1 to allow agent to choose scheduled callbacks
# $agentonly_callbacks = '1'; # set to 1 to allow agent to choose agent-only scheduled callbacks
#$agentcall_manual = '1'; # set to 1 to allow agent to make manual calls during autodial session
$US='_'; $US='_';
$CL=':'; $CL=':';
$AT='@'; $AT='@';
@@ -368,13 +374,18 @@ $VDloginDISPLAY=0;
$login=strtoupper($VD_login); $login=strtoupper($VD_login);
$password=strtoupper($VD_pass); $password=strtoupper($VD_pass);
##### grab the full name of the agent ##### grab the full name of the agent
$stmt="SELECT full_name,user_level,hotkeys_active,agent_choose_ingroups from vicidial_users where user='$VD_login' and pass='$VD_pass'"; $stmt="SELECT full_name,user_level,hotkeys_active,agent_choose_ingroups,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers from vicidial_users where user='$VD_login' and pass='$VD_pass'";
$rslt=mysql_query($stmt, $link); $rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt); $row=mysql_fetch_row($rslt);
$LOGfullname=$row[0]; $LOGfullname=$row[0];
$user_level=$row[1]; $user_level=$row[1];
$VU_hotkeys_active=$row[2]; $VU_hotkeys_active=$row[2];
$VU_agent_choose_ingroups=$row[3]; $VU_agent_choose_ingroups=$row[3];
$VU_scheduled_callbacks=$row[4];
$agentonly_callbacks=$row[5];
$agentcall_manual=$row[6];
$VU_vicidial_recording=$row[7];
$VU_vicidial_transfers=$row[8];
fwrite ($fp, "vdweb|GOOD|$date|$VD_login|$VD_pass|$ip|$browser|$LOGfullname|\n"); fwrite ($fp, "vdweb|GOOD|$date|$VD_login|$VD_pass|$ip|$browser|$LOGfullname|\n");
fclose($fp); fclose($fp);
@@ -481,7 +492,7 @@ $VDloginDISPLAY=0;
} }
##### grab the statuses to be dialed for your campaign as well as other campaign settings ##### grab the statuses to be dialed for your campaign as well as other campaign settings
$stmt="SELECT dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number FROM vicidial_campaigns where campaign_id = '$VD_campaign';"; $stmt="SELECT dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks FROM vicidial_campaigns where campaign_id = '$VD_campaign';";
$rslt=mysql_query($stmt, $link); $rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";} if ($DB) {echo "$stmt\n";}
$row=mysql_fetch_row($rslt); $row=mysql_fetch_row($rslt);
@@ -509,6 +520,17 @@ $VDloginDISPLAY=0;
$xferconf_a_number = $row[21]; $xferconf_a_number = $row[21];
$xferconf_b_dtmf = $row[22]; $xferconf_b_dtmf = $row[22];
$xferconf_b_number = $row[23]; $xferconf_b_number = $row[23];
$alt_number_dialing=$row[24];
$VC_scheduled_callbacks=$row[25];
if ( ($VC_scheduled_callbacks=='Y') and ($VU_scheduled_callbacks=='1') )
{$scheduled_callbacks='1';}
if ($VU_vicidial_recording=='0')
{$campaign_recording='NEVER';}
if ($alt_number_dialing=='Y')
{$alt_phone_dialing='1';}
else
{$alt_phone_dialing='0';}
##### grab the number of leads in the hopper for this campaign ##### grab the number of leads in the hopper for this campaign
$stmt="SELECT count(*) FROM vicidial_hopper where campaign_id = '$VD_campaign' and status='READY';"; $stmt="SELECT count(*) FROM vicidial_hopper where campaign_id = '$VD_campaign' and status='READY';";
@@ -1252,16 +1274,21 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var agentcallsstatus = '<? echo $agentcallsstatus ?>' var agentcallsstatus = '<? echo $agentcallsstatus ?>'
var campagentstatctmax = '<? echo $campagentstatctmax ?>' var campagentstatctmax = '<? echo $campagentstatctmax ?>'
var campagentstatct = '0' var campagentstatct = '0'
var callback_in_progress = 0; var manual_dial_in_progress = 0;
var auto_dial_alt_dial = 0;
var reselect_preview_dial = 0;
var reselect_alt_dial = 0;
var alt_dial_active = 0;
var mdnLisT_id = '999'; var mdnLisT_id = '999';
var VU_vicidial_transfers = '<? echo $VU_vicidial_transfers ?>'
var agentonly_callbacks = '<? echo $agentonly_callbacks ?>' var agentonly_callbacks = '<? echo $agentonly_callbacks ?>'
var agentcall_manual = '<? echo $agentcall_manual ?>' var agentcall_manual = '<? echo $agentcall_manual ?>'
var manual_dial_preview = '<? echo $manual_dial_preview ?>' var manual_dial_preview = '<? echo $manual_dial_preview ?>'
var manual_dial_alt_phone = '<? echo $manual_dial_alt_phone ?>' var alt_phone_dialing = '<? echo $alt_phone_dialing ?>'
var DiaLControl_auto_HTML = "<IMG SRC=\"./images/vdc_LB_pause_OFF.gif\" border=0 alt=\"Pause\"><a href=\"#\" onclick=\"AutoDial_ReSume_PauSe('VDADready');\"><IMG SRC=\"./images/vdc_LB_resume.gif\" border=0 alt=\"Resume\"></a>"; var DiaLControl_auto_HTML = "<IMG SRC=\"./images/vdc_LB_pause_OFF.gif\" border=0 alt=\"Pause\"><a href=\"#\" onclick=\"AutoDial_ReSume_PauSe('VDADready');\"><IMG SRC=\"./images/vdc_LB_resume.gif\" border=0 alt=\"Resume\"></a>";
var DiaLControl_auto_HTML_ready = "<a href=\"#\" onclick=\"AutoDial_ReSume_PauSe('VDADpause');\"><IMG SRC=\"./images/vdc_LB_pause.gif\" border=0 alt=\"Pause\"></a><IMG SRC=\"./images/vdc_LB_resume_OFF.gif\" border=0 alt=\"Resume\">"; var DiaLControl_auto_HTML_ready = "<a href=\"#\" onclick=\"AutoDial_ReSume_PauSe('VDADpause');\"><IMG SRC=\"./images/vdc_LB_pause.gif\" border=0 alt=\"Pause\"></a><IMG SRC=\"./images/vdc_LB_resume_OFF.gif\" border=0 alt=\"Resume\">";
var DiaLControl_auto_HTML_OFF = "<IMG SRC=\"./images/vdc_LB_pause_OFF.gif\" border=0 alt=\"Pause\"><IMG SRC=\"./images/vdc_LB_resume_OFF.gif\" border=0 alt=\"Resume\">"; var DiaLControl_auto_HTML_OFF = "<IMG SRC=\"./images/vdc_LB_pause_OFF.gif\" border=0 alt=\"Pause\"><IMG SRC=\"./images/vdc_LB_resume_OFF.gif\" border=0 alt=\"Resume\">";
var DiaLControl_manual_HTML = "<a href=\"#\" onclick=\"ManualDialNext();\"><IMG SRC=\"./images/vdc_LB_dialnextnumber.gif\" border=0 alt=\"Dial Next Number\"></a>"; var DiaLControl_manual_HTML = "<a href=\"#\" onclick=\"ManualDialNext('','','','');\"><IMG SRC=\"./images/vdc_LB_dialnextnumber.gif\" border=0 alt=\"Dial Next Number\"></a>";
var image_blank = new Image(); var image_blank = new Image();
image_blank.src="./images/blank.gif"; image_blank.src="./images/blank.gif";
var image_livecall_OFF = new Image(); var image_livecall_OFF = new Image();
@@ -1423,7 +1450,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
// ################################################################################ // ################################################################################
// Send Originate command to manager to place a phone call // Send Originate command to manager to place a phone call
function basic_originate_call(tasknum,taskprefix,taskreverse,taskdialvalue) function basic_originate_call(tasknum,taskprefix,taskreverse,taskdialvalue,tasknowait)
{ {
var xmlhttp=false; var xmlhttp=false;
/*@cc_on @*/ /*@cc_on @*/
@@ -1484,7 +1511,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{ {
alert(xmlhttp.responseText); alert(xmlhttp.responseText);
if (taskdialvalue.length > 0) if ((taskdialvalue.length > 0) && (tasknowait != 'YES'))
{ {
XDnextCID = queryCID; XDnextCID = queryCID;
MD_channel_look=1; MD_channel_look=1;
@@ -1973,6 +2000,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
// Finish the alternate dialing and move on to disposition the call // Finish the alternate dialing and move on to disposition the call
function ManualDialAltDonE() function ManualDialAltDonE()
{ {
alt_dial_active = 0;
open_dispo_screen=1; open_dispo_screen=1;
document.getElementById("MainStatuSSpan").innerHTML = "Dial Next Number"; document.getElementById("MainStatuSSpan").innerHTML = "Dial Next Number";
} }
@@ -1983,10 +2011,12 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
if (taskMDstage == "start") {var MDlogEPOCH = 0;} if (taskMDstage == "start") {var MDlogEPOCH = 0;}
else else
{ {
if (auto_dial_level == 0) if (alt_phone_dialing == 1)
{ {
if (document.vicidial_form.DiaLAltPhonE.checked==true) if (document.vicidial_form.DiaLAltPhonE.checked==true)
{ {
reselect_alt_dial = 1;
alt_dial_active = 1;
var man_status = "Dial Alt Phone Number: <a href=\"#\" onclick=\"ManualDialOnly('MaiNPhonE')\"><font class=\"preview_text\">MAIN PHONE</font></a> or <a href=\"#\" onclick=\"ManualDialOnly('ALTPhoneE')\"><font class=\"preview_text\">ALT PHONE</font></a> or <a href=\"#\" onclick=\"ManualDialOnly('AddresS3')\"><font class=\"preview_text\">ADDRESS3</font></a> or <a href=\"#\" onclick=\"ManualDialAltDonE()\"><font class=\"preview_text_red\">FINISH LEAD</font></a>"; var man_status = "Dial Alt Phone Number: <a href=\"#\" onclick=\"ManualDialOnly('MaiNPhonE')\"><font class=\"preview_text\">MAIN PHONE</font></a> or <a href=\"#\" onclick=\"ManualDialOnly('ALTPhoneE')\"><font class=\"preview_text\">ALT PHONE</font></a> or <a href=\"#\" onclick=\"ManualDialOnly('AddresS3')\"><font class=\"preview_text\">ADDRESS3</font></a> or <a href=\"#\" onclick=\"ManualDialAltDonE()\"><font class=\"preview_text_red\">FINISH LEAD</font></a>";
document.getElementById("MainStatuSSpan").innerHTML = man_status; document.getElementById("MainStatuSSpan").innerHTML = man_status;
} }
@@ -2117,7 +2147,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
// Request list of USERONLY callbacks for this agent // Request list of USERONLY callbacks for this agent
function CalLBacKsLisTCheck() function CalLBacKsLisTCheck()
{ {
if ( (AutoDialWaiting == 1) || (VD_live_customer_call==1) ) if ( (AutoDialWaiting == 1) || (VD_live_customer_call==1) || (alt_dial_active==1) )
{ {
alert("YOU MUST BE PAUSED TO CHECK CALLBACKS IN AUTO-DIAL MODE"); alert("YOU MUST BE PAUSED TO CHECK CALLBACKS IN AUTO-DIAL MODE");
} }
@@ -2199,25 +2229,25 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
function new_callback_call(taskCBid,taskLEADid) function new_callback_call(taskCBid,taskLEADid)
{ {
auto_dial_level=0; auto_dial_level=0;
callback_in_progress=1; manual_dial_in_progress=1;
MainPanelToFront(); MainPanelToFront();
buildDiv('DiaLLeaDPrevieW'); buildDiv('DiaLLeaDPrevieW');
buildDiv('DiaLDiaLAltPhonE'); buildDiv('DiaLDiaLAltPhonE');
document.vicidial_form.LeadPreview.checked=true; document.vicidial_form.LeadPreview.checked=true;
document.vicidial_form.DiaLAltPhonE.checked=true; document.vicidial_form.DiaLAltPhonE.checked=true;
hideDiv('CallBacKsLisTBox'); hideDiv('CallBacKsLisTBox');
ManualDialNext(taskCBid,taskLEADid); ManualDialNext(taskCBid,taskLEADid,'','');
} }
// ################################################################################ // ################################################################################
// Finish Callback and go back to original screen // Finish Callback and go back to original screen
function callback_finished() function manual_dial_finished()
{ {
auto_dial_level=starting_dial_level; auto_dial_level=starting_dial_level;
MainPanelToFront(); MainPanelToFront();
CalLBacKsCounTCheck(); CalLBacKsCounTCheck();
callback_in_progress=0; manual_dial_in_progress=0;
} }
@@ -2225,7 +2255,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
// Open page to enter details for a new manual dial lead // Open page to enter details for a new manual dial lead
function NeWManuaLDiaLCalL() function NeWManuaLDiaLCalL()
{ {
if ( (AutoDialWaiting == 1) || (VD_live_customer_call==1) ) if ( (AutoDialWaiting == 1) || (VD_live_customer_call==1) || (alt_dial_active==1) )
{ {
alert("YOU MUST BE PAUSED TO MANUAL DIAL A NEW LEAD IN AUTO-DIAL MODE"); alert("YOU MUST BE PAUSED TO MANUAL DIAL A NEW LEAD IN AUTO-DIAL MODE");
} }
@@ -2247,12 +2277,12 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
if (MDDiaLOverridEform.length > 0) if (MDDiaLOverridEform.length > 0)
{ {
basic_originate_call(session_id,'NO','YES',MDDiaLOverridEform); basic_originate_call(session_id,'NO','YES',MDDiaLOverridEform,'YES');
} }
else else
{ {
auto_dial_level=0; auto_dial_level=0;
callback_in_progress=1; manual_dial_in_progress=1;
MainPanelToFront(); MainPanelToFront();
buildDiv('DiaLLeaDPrevieW'); buildDiv('DiaLLeaDPrevieW');
buildDiv('DiaLDiaLAltPhonE'); buildDiv('DiaLDiaLAltPhonE');
@@ -2426,11 +2456,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
document.getElementById("DiaLControl").innerHTML = "<IMG SRC=\"./images/vdc_LB_dialnextnumber_OFF.gif\" border=0 alt=\"Dial Next Number\">"; document.getElementById("DiaLControl").innerHTML = "<IMG SRC=\"./images/vdc_LB_dialnextnumber_OFF.gif\" border=0 alt=\"Dial Next Number\">";
if (document.vicidial_form.LeadPreview.checked==true) if (document.vicidial_form.LeadPreview.checked==true)
{ {
reselect_preview_dial = 1;
var man_preview = 'YES'; var man_preview = 'YES';
var man_status = "Preview the Lead then <a href=\"#\" onclick=\"ManualDialOnly()\"><font class=\"preview_text\">DIAL LEAD</font></a> or <a href=\"#\" onclick=\"ManualDialSkip()\"><font class=\"preview_text\">SKIP LEAD</font></a>"; var man_status = "Preview the Lead then <a href=\"#\" onclick=\"ManualDialOnly()\"><font class=\"preview_text\">DIAL LEAD</font></a> or <a href=\"#\" onclick=\"ManualDialSkip()\"><font class=\"preview_text\">SKIP LEAD</font></a>";
} }
else else
{ {
reselect_preview_dial = 0;
var man_preview = 'NO'; var man_preview = 'NO';
var man_status = "Waiting for Ring..."; var man_status = "Waiting for Ring...";
} }
@@ -2583,6 +2615,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
if (document.vicidial_form.LeadPreview.checked==false) if (document.vicidial_form.LeadPreview.checked==false)
{ {
reselect_preview_dial = 0;
MD_channel_look=1; MD_channel_look=1;
custchannellive=1; custchannellive=1;
@@ -2613,12 +2646,10 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
} }
} }
else
{
reselect_preview_dial = 1;
}
// else
// {alert(document.vicidial_form.lead_id.value);}
} }
} }
} }
@@ -2631,7 +2662,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
// Send the Manual Dial Skip // Send the Manual Dial Skip
function ManualDialSkip() function ManualDialSkip()
{ {
if (callback_in_progress==1) if (manual_dial_in_progress==1)
{ {
alert('YOU CANNOT SKIP A CALLBACK OR MANUAL DIAL, YOU MUST DIAL THE LEAD'); alert('YOU CANNOT SKIP A CALLBACK OR MANUAL DIAL, YOU MUST DIAL THE LEAD');
} }
@@ -2714,7 +2745,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
document.getElementById("MainStatuSSpan").innerHTML = " Lead skipped, go on to next lead"; document.getElementById("MainStatuSSpan").innerHTML = " Lead skipped, go on to next lead";
document.getElementById("DiaLControl").innerHTML = "<a href=\"#\" onclick=\"ManualDialNext();\"><IMG SRC=\"./images/vdc_LB_dialnextnumber.gif\" border=0 alt=\"Dial Next Number\"></a>"; document.getElementById("DiaLControl").innerHTML = "<a href=\"#\" onclick=\"ManualDialNext('','','','');\"><IMG SRC=\"./images/vdc_LB_dialnextnumber.gif\" border=0 alt=\"Dial Next Number\"></a>";
} }
} }
} }
@@ -3337,16 +3368,33 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{ {
if (document.vicidial_form.DiaLAltPhonE.checked==true) if (document.vicidial_form.DiaLAltPhonE.checked==true)
{ {
reselect_alt_dial = 1;
open_dispo_screen=0; open_dispo_screen=0;
} }
else else
{open_dispo_screen=1;} {
reselect_alt_dial = 0;
open_dispo_screen=1;
}
} }
else else
{open_dispo_screen=1;} {
if (document.vicidial_form.DiaLAltPhonE.checked==true)
{
reselect_alt_dial = 1;
open_dispo_screen=0;
auto_dial_level=0;
manual_dial_in_progress=1;
auto_dial_alt_dial=1;
}
else
{
reselect_alt_dial = 0;
open_dispo_screen=1;
}
}
} }
// DEACTIVATE CHANNEL-DEPENDANT BUTTONS AND VARIABLES // DEACTIVATE CHANNEL-DEPENDANT BUTTONS AND VARIABLES
document.vicidial_form.callchannel.value = ''; document.vicidial_form.callchannel.value = '';
document.vicidial_form.callserverip.value = ''; document.vicidial_form.callserverip.value = '';
@@ -3369,17 +3417,26 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{ {
if (document.vicidial_form.DiaLAltPhonE.checked==true) if (document.vicidial_form.DiaLAltPhonE.checked==true)
{ {
// do nothing reselect_alt_dial = 1;
} }
else else
{ {
document.getElementById("DiaLControl").innerHTML = "<a href=\"#\" onclick=\"ManualDialNext();\"><IMG SRC=\"./images/vdc_LB_dialnextnumber.gif\" border=0 alt=\"Dial Next Number\"></a>"; document.getElementById("DiaLControl").innerHTML = "<a href=\"#\" onclick=\"ManualDialNext('','','','');\"><IMG SRC=\"./images/vdc_LB_dialnextnumber.gif\" border=0 alt=\"Dial Next Number\"></a>";
reselect_alt_dial = 0;
} }
} }
else else
{ {
document.getElementById("MainStatuSSpan").style.background = panel_bgcolor; if (document.vicidial_form.DiaLAltPhonE.checked==true)
document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_OFF; {
reselect_alt_dial = 1;
}
else
{
document.getElementById("MainStatuSSpan").style.background = panel_bgcolor;
document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_OFF;
reselect_alt_dial = 0;
}
} }
ShoWTransferMain('OFF'); ShoWTransferMain('OFF');
@@ -3387,6 +3444,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
} }
} }
// ################################################################################ // ################################################################################
// Send Hangup command for 3rd party call connected to the conference now to Manager // Send Hangup command for 3rd party call connected to the conference now to Manager
function xfercall_send_hangup() function xfercall_send_hangup()
@@ -3715,9 +3773,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
VDCL_group_id = ''; VDCL_group_id = '';
fronter = ''; fronter = '';
if (callback_in_progress==1) if (manual_dial_in_progress==1)
{ {
callback_finished(); manual_dial_finished();
} }
hideDiv('DispoSelectBox'); hideDiv('DispoSelectBox');
hideDiv('DispoButtonHideA'); hideDiv('DispoButtonHideA');
@@ -4332,7 +4390,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{hideDiv('AgentStatusSpan');} {hideDiv('AgentStatusSpan');}
if ( (auto_dial_level != 0) || (manual_dial_preview != 1) ) if ( (auto_dial_level != 0) || (manual_dial_preview != 1) )
{clearDiv('DiaLLeaDPrevieW');} {clearDiv('DiaLLeaDPrevieW');}
if ( (auto_dial_level != 0) || (manual_dial_alt_phone != 1) ) if (alt_phone_dialing != 1)
{clearDiv('DiaLDiaLAltPhonE');} {clearDiv('DiaLDiaLAltPhonE');}
document.getElementById("sessionIDspan").innerHTML = session_id; document.getElementById("sessionIDspan").innerHTML = session_id;
@@ -4371,10 +4429,15 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{ {
if (document.vicidial_form.DiaLAltPhonE.checked==true) if (document.vicidial_form.DiaLAltPhonE.checked==true)
{ {
document.getElementById("DiaLControl").innerHTML = "<a href=\"#\" onclick=\"ManualDialNext();\"><IMG SRC=\"./images/vdc_LB_dialnextnumber.gif\" border=0 alt=\"Dial Next Number\"></a>"; reselect_alt_dial = 1;
document.getElementById("DiaLControl").innerHTML = "<a href=\"#\" onclick=\"ManualDialNext('','','','');\"><IMG SRC=\"./images/vdc_LB_dialnextnumber.gif\" border=0 alt=\"Dial Next Number\"></a>";
document.getElementById("MainStatuSSpan").innerHTML = "Dial Next Call"; document.getElementById("MainStatuSSpan").innerHTML = "Dial Next Call";
} }
else
{
reselect_alt_dial = 0;
}
} }
} }
if (AgentDispoing==1) if (AgentDispoing==1)
@@ -4626,15 +4689,21 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
if (divvar == 'DiaLLeaDPrevieW') if (divvar == 'DiaLLeaDPrevieW')
{ {
var buildDivHTML = "<font class=\"preview_text\"> <input type=checkbox name=LeadPreview size=1 value=\"0\"> LEAD PREVIEW<BR></font>"; var buildDivHTML = "<font class=\"preview_text\"> <input type=checkbox name=LeadPreview size=1 value=\"0\"> LEAD PREVIEW<BR></font>";
document.getElementById(divvar).innerHTML = buildDivHTML;
if (reselect_preview_dial==1)
{document.vicidial_form.LeadPreview.checked=true}
} }
if (divvar == 'DiaLDiaLAltPhonE') if (divvar == 'DiaLDiaLAltPhonE')
{ {
var buildDivHTML = "<font class=\"preview_text\"> <input type=checkbox name=DiaLAltPhonE size=1 value=\"0\"> ALT PHONE DIAL<BR></font>"; var buildDivHTML = "<font class=\"preview_text\"> <input type=checkbox name=DiaLAltPhonE size=1 value=\"0\"> ALT PHONE DIAL<BR></font>";
document.getElementById(divvar).innerHTML = buildDivHTML;
if (reselect_alt_dial==1)
{document.vicidial_form.DiaLAltPhonE.checked=true}
} }
document.getElementById(divvar).innerHTML = buildDivHTML;
} }
} }
function showMainXfeR(divvar,taskxferchan,taskxferchanmain) function showMainXfeR(divvar,taskxferchan,taskxferchanmain)
{ {
document.getElementById("MainXfeRBox").style.visibility = 'visible'; document.getElementById("MainXfeRBox").style.visibility = 'visible';
@@ -4690,22 +4759,28 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
function ShoWTransferMain(showxfervar,showoffvar) function ShoWTransferMain(showxfervar,showoffvar)
{ {
if (showxfervar == 'ON') if (VU_vicidial_transfers == '1')
{ {
HKbutton_allowed = 0; if (showxfervar == 'ON')
showDiv('TransferMain'); {
document.getElementById("XferControl").innerHTML = "<a href=\"#\" onclick=\"ShoWTransferMain('OFF','YES');\"><IMG SRC=\"./images/vdc_LB_transferconf.gif\" border=0 alt=\"Transfer - Conference\"></a>"; HKbutton_allowed = 0;
showDiv('TransferMain');
document.getElementById("XferControl").innerHTML = "<a href=\"#\" onclick=\"ShoWTransferMain('OFF','YES');\"><IMG SRC=\"./images/vdc_LB_transferconf.gif\" border=0 alt=\"Transfer - Conference\"></a>";
}
else
{
HKbutton_allowed = 1;
hideDiv('TransferMain');
if (showoffvar == 'YES')
{
document.getElementById("XferControl").innerHTML = "<a href=\"#\" onclick=\"ShoWTransferMain('ON');\"><IMG SRC=\"./images/vdc_LB_transferconf.gif\" border=0 alt=\"Transfer - Conference\"></a>";
}
}
} }
else else
{ {
HKbutton_allowed = 1; alert('YOU DO NOT HAVE PERMISSIONS TO TRANSFER CALLS');
hideDiv('TransferMain');
if (showoffvar == 'YES')
{
document.getElementById("XferControl").innerHTML = "<a href=\"#\" onclick=\"ShoWTransferMain('ON');\"><IMG SRC=\"./images/vdc_LB_transferconf.gif\" border=0 alt=\"Transfer - Conference\"></a>";
}
} }
} }
function MainPanelToFront(resumevar) function MainPanelToFront(resumevar)
@@ -4715,19 +4790,28 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
showDiv('MainPanel'); showDiv('MainPanel');
if (resumevar != 'NO') if (resumevar != 'NO')
{ {
if (alt_phone_dialing == 1)
{buildDiv('DiaLDiaLAltPhonE');}
else
{clearDiv('DiaLDiaLAltPhonE');}
if (auto_dial_level == 0) if (auto_dial_level == 0)
{ {
document.getElementById("DiaLControl").innerHTML = DiaLControl_manual_HTML; if (auto_dial_alt_dial==1)
if (manual_dial_preview == 1) {
{buildDiv('DiaLLeaDPrevieW');} auto_dial_alt_dial=0;
if (manual_dial_alt_phone != 1) document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_OFF;
{buildDiv('DiaLDiaLAltPhonE');} }
else
{
document.getElementById("DiaLControl").innerHTML = DiaLControl_manual_HTML;
if (manual_dial_preview == 1)
{buildDiv('DiaLLeaDPrevieW');}
}
} }
else else
{ {
document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML; document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML;
clearDiv('DiaLLeaDPrevieW'); clearDiv('DiaLLeaDPrevieW');
clearDiv('DiaLDiaLAltPhonE');
} }
} }
panel_bgcolor='#E0C2D6'; panel_bgcolor='#E0C2D6';
@@ -5056,7 +5140,7 @@ Your Status: <span id="AgentStatusStatus"></span> <BR>Calls Dialing: <span id="A
<tr><td colspan=3><span id="busycallsdebug"></span></td></tr> <tr><td colspan=3><span id="busycallsdebug"></span></td></tr>
<tr><td width=150 align=left valign=top> <tr><td width=150 align=left valign=top>
<font class="body_text"><center> <font class="body_text"><center>
<span STYLE="background-color: #CCFFCC" id="DiaLControl"><a href="#" onclick="ManualDialNext();"><IMG SRC="./images/vdc_LB_dialnextnumber_OFF.gif" border=0 alt="Dial Next Number"></a></span><BR> <span STYLE="background-color: #CCFFCC" id="DiaLControl"><a href="#" onclick="ManualDialNext('','','','');"><IMG SRC="./images/vdc_LB_dialnextnumber_OFF.gif" border=0 alt="Dial Next Number"></a></span><BR>
<span id="DiaLLeaDPrevieW"><font class="preview_text"> <input type=checkbox name=LeadPreview size=1 value="0"> LEAD PREVIEW<BR></font></span> <span id="DiaLLeaDPrevieW"><font class="preview_text"> <input type=checkbox name=LeadPreview size=1 value="0"> LEAD PREVIEW<BR></font></span>
<span id="DiaLDiaLAltPhonE"><font class="preview_text"> <input type=checkbox name=DiaLAltPhonE size=1 value="0"> ALT PHONE DIAL<BR></font></span> <span id="DiaLDiaLAltPhonE"><font class="preview_text"> <input type=checkbox name=DiaLAltPhonE size=1 value="0"> ALT PHONE DIAL<BR></font></span>
@@ -5064,7 +5148,7 @@ Your Status: <span id="AgentStatusStatus"></span> <BR>Calls Dialing: <span id="A
<? <?
if ( ($manual_dial_preview) and ($auto_dial_level==0) ) if ( ($manual_dial_preview) and ($auto_dial_level==0) )
{echo "<font class=\"preview_text\"> <input type=checkbox name=LeadPreview size=1 value=\"0\"> LEAD PREVIEW<BR></font>";} {echo "<font class=\"preview_text\"> <input type=checkbox name=LeadPreview size=1 value=\"0\"> LEAD PREVIEW<BR></font>";}
if ( ($manual_dial_alt_phone) and ($auto_dial_level==0) ) if ( ($alt_phone_dialing) and ($auto_dial_level==0) )
{echo "<font class=\"preview_text\"> <input type=checkbox name=DiaLAltPhonE size=1 value=\"0\"> ALT PHONE DIAL<BR></font>";} {echo "<font class=\"preview_text\"> <input type=checkbox name=DiaLAltPhonE size=1 value=\"0\"> ALT PHONE DIAL<BR></font>";}
+191
View File
@@ -0,0 +1,191 @@
#!/usr/bin/perl
#
# agi-VDADlisten_DTMF.agi version 0.1
#
# To be initiated by an agent so during a call. Agent will click a PIN NUMBER
# link on a web form webpage that will Originate a new call to this script
#
# This script plays a beep and waits for entry of 4 digits then inserts record
#
# ***** THIS SCRIPT ONLY WORKS WITH A CROSSOVER T1 CABLE FROM ONE T1 PORT *****
# ***** TO ANOTHER T1 PORT WHETHER ON THE SAME SERVER OR DIFFERENT ONE *****
#
# ON THE SERVER ORIGINATING THE CALL:
#;outbound DTMF VICIDIAL calls:
#exten => _983009.,1,AGI(call_log.agi,${EXTEN})
#exten => _983009.,2,Dial(${TRUNKY}/${EXTEN:1},60)
#exten => _983009.,3,Hangup
#
# ON THE SERVER THAT HAS THIS SCRIPT:
#;inbound DTMF VICIDIAL calls:
#exten => _83009.,1,AGI(agi-VDADlisten_DTMF.agi,${EXTEN})
#exten => _83009.,2,Hangup
#
# Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
#
$V = 1; # set to 1 for verbose mode
$M = 1; # set to 1 for 2 line messages mode
### set defaults for testing
$referring_extension = '83009';
$phone_number = '9999999999';
$lead_id = '999999999';
$campaign_id = 'TESTCAMP';
$product_code = 'ABC';
$user = '1234';
$pin = '0';
### Make sure this file is in a path or put the absolute path to it
require("/home/cron/AST_SERVER_conf.pl"); # local configuration file
use Net::MySQL;
use Asterisk::AGI;
$AGI = new Asterisk::AGI;
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
$year = ($year + 1900);
$mon++;
if ($mon < 10) {$mon = "0$mon";}
if ($mday < 10) {$mday = "0$mday";}
if ($hour < 10) {$Fhour = "0$hour";}
if ($min < 10) {$min = "0$min";}
if ($sec < 10) {$sec = "0$sec";}
$SQLdate = "$year-$mon-$mday $hour:$min:$sec";
### begin parsing run-time options ###
if (length($ARGV[0])>1)
{
if ($V) {print STDERR "Perl Environment Dump:\n";}
$i=0;
while ($#ARGV >= $i)
{
$args = "$args $ARGV[$i]";
if ($V) {print STDERR "$i|$ARGV[$i]|\n";}
$i++;
}
if ($args =~ /--help/i)
{
print "allowed run time options:\n [-q] = quiet\n [-t] = test\n [-debug] = verbose debug messages\n\n";
}
else
{
if ($args =~ /-V/i)
{
$V=1;
}
if ($args =~ /-debug/i)
{
$DG=1;
}
if ($args =~ /-q/i)
{
$q=1;
$Q=1;
}
if ($args =~ /-t/i)
{
$TEST=1;
$T=1;
}
}
}
else
{
if ($V) {print "no command line options set\n";}
}
$|=1;
while(<STDIN>) {
chomp;
last unless length($_);
if ($V)
{
if (/^agi_(\w+)\:\s+(.*)$/)
{
$AGI{$1} = $2;
}
}
if (/^agi_extension\:\s+(.*)$/) {$extension = $1;}
### allow for internal transfer data string "83009*3125551212*10000123*TESTCAMP*ABC*1234*"
if ($extension =~ /^8300\d\*/)
{
@EXT_vars = split(/\*/, $extension);
$referring_extension = $EXT_vars[0]; # initial extension sent
$phone_number = $EXT_vars[1]; # phone number
$lead_id = $EXT_vars[2]; # lead_id in vicidial_list
$campaign_id = $EXT_vars[3]; # campaign id
$product_code = $EXT_vars[4]; # product code
$user = $EXT_vars[5]; # vicidial_user that sent the call here
}
}
if ($V) {print STDERR "\nINBOUND DTMF CALL VDCL STARTED\n";}
&enter_pin_number;
if (!$DB_port) {$DB_port='3306';}
my $dbhA = Net::MySQL->new(hostname=>"$DB_server", database=>"$DB_database", user=>"$DB_user", password=>"$DB_pass", port => "$DB_port") or die "Couldn't connect to database: $DB_server - $DB_database\n";
if (length($pin) < 4) {$AGI->stream_file('buzz');}
else {$AGI->stream_file('ding');}
### insert a record into the vicidial_list_pins table
$stmtA = "INSERT INTO vicidial_list_pins (entry_time,phone_number,lead_id,campaign_id,product_code,user,digits) values('$SQLdate','$phone_number','$lead_id','$campaign_id','$product_code','$user','$pin');";
$dbhA->query($stmtA);
$dbhA->query("select LAST_INSERT_ID() LIMIT 1;");
if ($dbhA->has_selected_record)
{
$iterA=$dbhA->create_record_iterator;
while ($recordA = $iterA->each)
{$insert_pin_id = "$recordA->[0]";}
}
if($M){print STDERR "\n|$stmtA|$insert_pin_id|\n";}
$dbhA->close;
exit;
sub enter_pin_number
{
$AGI->stream_file('beep');
while ( ($digit_loop_counter < 4) )
{
$digit = chr($AGI->wait_for_digit('30000')); # wait 30 seconds for input or until the pound key is pressed
if ($digit =~ /\d/)
{
$totalDTMF = "$totalDTMF$digit";
print STDERR "digit |$digit| TotalDTMF |$totalDTMF|\n";
# $AGI->say_digits("$digit");
undef $digit;
}
else
{
$digit_loop_counter=4;
}
$digit_loop_counter++;
}
$totalDTMF =~ s/\D//gi;
$pin = $totalDTMF;
if ($totalDTMF) {print STDERR "digit |$digit| TotalDTMF |$totalDTMF|\n";}
# $AGI->say_digits("$pin");
}
+47 -46
View File
@@ -2154,7 +2154,52 @@ insert into vicidial_conferences values('8600100','10.10.10.15','');
SUBPHASE 6.4: setting up astguiclient scripts for continuous running SUBPHASE 6.4: setting up asterisk and helper applications for startup
1. Make several entries in the rc.local of your system:
- on the command line type:
- vi /etc/rc.d/rc.local
- add the following entries(here's what we used):
### startup tftp server (if you have them installed)
/usr/local/sbin/in.tftpd --verbose=6 --daemon --port=69 --user cron /usr/local/tftp
### add the CVSROOT variable definition
export CVSROOT=:pserver:anoncvs@cvs.digium.com:/usr/cvsroot
### start time server
/usr/local/bin/ntpdate -u 18.145.0.30
/usr/sbin/ntpd
### start up the MySQL server
/usr/local/mysql/bin/mysqld_safe --user=mysql --skip-name-resolve --skip-host-cache &
### start up the MySQL 4.1.X server (with old passwords)
/usr/local/mysql/bin/safe_mysqld --old-passwords --skip-name-resolve --skip-host-cache &
### start up the apache web server
/usr/local/apache2/bin/apachectl start
### load digium tormenta 4xT1 drivers into system
modprobe zaptel
modprobe wct1xxp
/sbin/ztcfg -vvvvvvvvvvvv
### sybsys local login
touch /var/lock/subsys/local
### sleep for 20 seconds before launching Asterisk
sleep 20
### start up asterisk
/home/cron/start_asterisk_boot.pl
- you are done
SUBPHASE 6.5: setting up astguiclient scripts for continuous running
1. Make several entries in the cron of your system: 1. Make several entries in the cron of your system:
- on the command line type: - on the command line type:
@@ -2210,51 +2255,6 @@ AST_CRON_mix_recordings_BASIC.pl file in it's place)
## adjust time on the server with ntp ## adjust time on the server with ntp
30 * * * * /usr/local/bin/ntpdate -u 18.145.0.30 2>/dev/null 1>&2 30 * * * * /usr/local/bin/ntpdate -u 18.145.0.30 2>/dev/null 1>&2
- you are done
SUBPHASE 6.5: setting up asterisk and helper applications for startup
1. Make several entries in the rc.local of your system:
- on the command line type:
- vi /etc/rc.d/rc.local
- add the following entries(here's what we used):
### startup tftp server (if you have them installed)
/usr/local/sbin/in.tftpd --verbose=6 --daemon --port=69 --user cron /usr/local/tftp
### add the CVSROOT variable definition
export CVSROOT=:pserver:anoncvs@cvs.digium.com:/usr/cvsroot
### start time server
/usr/local/bin/ntpdate -u 18.145.0.30
/usr/sbin/ntpd
### start up the MySQL server
/usr/local/mysql/bin/mysqld_safe --user=mysql --skip-name-resolve --skip-host-cache &
### start up the MySQL 4.1.X server (with old passwords)
/usr/local/mysql/bin/safe_mysqld --old-passwords --skip-name-resolve --skip-host-cache &
### start up the apache web server
/usr/local/apache2/bin/apachectl start
### load digium tormenta 4xT1 drivers into system
modprobe zaptel
modprobe wct1xxp
/sbin/ztcfg -vvvvvvvvvvvv
### sybsys local login
touch /var/lock/subsys/local
### sleep for 20 seconds before launching Asterisk
sleep 20
### start up asterisk
/home/cron/start_asterisk_boot.pl
- once your system starts up you can attach to the screen running asterisk by - once your system starts up you can attach to the screen running asterisk by
typing "screen -r <screen>" find which screen by typing "screen -r" and typing "screen -r <screen>" find which screen by typing "screen -r" and
looking for the lowest screen number. Then to detach again from the screen looking for the lowest screen number. Then to detach again from the screen
@@ -2263,6 +2263,7 @@ while you are in it type 'Ctrl+a' then 'd'
SUBPHASE 6.6: adding test leads to the VICIDIAL database and configuring a SUBPHASE 6.6: adding test leads to the VICIDIAL database and configuring a
VICIDIAL campaign and users VICIDIAL campaign and users
+41 -24
View File
@@ -47,28 +47,53 @@
- DONE Added status name to list modification screen in admin.php. Also consolidated called and not-called into one row for each status. Added status name to campaign dial_statuses select lists - DONE Added status name to list modification screen in admin.php. Also consolidated called and not-called into one row for each status. Added status name to campaign dial_statuses select lists
- DONE Second stage Scheduled-Callback functionality: add agent-specific callback status with date and time definition to vicidial.php. This second stage will allow a callback to be restricted to the specific agent that set the callback. There will need to be some other provisions in place on the vicidial.php to handle what are basically manual dial calls happening on an auto-dial session. - DONE Second stage Scheduled-Callback functionality: add agent-specific callback status with date and time definition to vicidial.php. This second stage will allow a callback to be restricted to the specific agent that set the callback. There will need to be some other provisions in place on the vicidial.php to handle what are basically manual dial calls happening on an auto-dial session. Also, a counter on the vicidial.php page to show how many active or live callbacks the agent has and an interface for the agent to see and call back which callbacks are ready to be called back.
- DONE Add the ability to manually dial a number from within vicidial.php. There will be an option to add the number as a new lead to the campaign the agent is logged into, or just call the number and go back to the main screen(the call would then need to be dropped from the CALLS IN THIS SESSION link at the bottom). This feature will only be enabled when the agent is paused and not on a call. - DONE Add the ability to manually dial a number from within vicidial.php. There will be an option to add the number as a new lead to the campaign the agent is logged into, or just call the number and go back to the main screen(the call would then need to be dropped from the CALLS IN THIS SESSION link at the bottom). This feature will only be enabled when the agent is paused and not on a call.
- DONE Fix "waiting for ring" bug with manual dial override in vicidial.php.
- DONE Fixed manual dial lead preview bug. caused by undefined function variable created for manual dial override, just defined the variable in all function calls to fix it.
- DONE Add capability to allow manual dialing of an alt_phone or address3 phone number in vicidial.php in auto_dial mode. This required a lot of changes to the code where dial_level>0 for things to work correctly, but most of the changes were already done for the agent-only callbacks feature so it wasn't that difficult.
- DONE Change the links at the top of the vicidial admin.php page to be color-coded sectional links with sub-link row below the main sections in the same color. This will make navigating the admin.php page easier. suggested by Mike Fedyk.
- DONE Added script name to campaign and in-group modification screens in admin.php.
- DONE add a field to vicidial_campaigns for alt_number_dialing. This would override the vicidial.php hard-coded variable and would allow it per campaign. The default will be to DISABLE alt_number_dialing.
- DONE add a permission field to vicidial_campaigns for scheduled_callbacks to allow an agent to dispo a lead as a callback and choose a callback date/time. The default will be to DISABLE scheduled callbacks. Both this and the vicidial_users field must be enabled for and agent to leave scheduled callbacks.
- DONE add a permission field to vicidial_users for scheduled_callbacks to allow an agent to dispo a lead as a callback and choose a callback date/time. The default will be to ENABLE scheduled callbacks.
- DONE add a permission field to vicidial_users for agentonly_callbacks to allow an agent to set a callback as USERONLY as well as call that lead back. The default will be to DISABLE USERONLY callbacks.
- DONE add a permission field to vicidial_users for agentcall_manual manual dialing within vicidial.php. The default will be to DISABLE manual dialing.
- DONE add a permission field to vicidial_users to restrict recording in vicidial.php per user. Default would be to ENABLE recording
- DONE add a permission field to vicidial_users to restrict transfers in vicidial.php per user. Default would be to ENABLE transfers
- DONE Add a FILTERS section to the vicidial admin screen and a FILTERS feature that would operate a lot like how the lead filters work in the GnuDialer project. It would be a way of defining SQL subsets on leads that the campaign would be dialing. You would create new filters in the ADD NEW FILTER section and a vicidial_campaign can only have one active FILTER at any one time. The Filter modification page would have something like a SQL builder that would let you select a parameter field(like called_count, state, postal_code, etc...) and then a value set, or you could directly edit the SQL it generates. This feature could make it rather easy to mess up dialing for a campaign since it lets managers directly edit the SQL statement that is used to put leads into the hopper. The SQL would only be SELECT based and would not effect the order that the leads are selected in. would require a new table(vicidial_filters) as well as a new field in vicidial_campaigns(filter_id).
create table vicidial_filters (
filter_id VARCHAR(10),
filter_name VARCHAR(30),
filter_comments VARCHAR(255),
filter_sqlTEXT);
- DONE Add auto-hopper-insertion to triggered ANYONE callbacks. This will need to check on campaign and list status before insertion. This is an option at the top of the script that can be disabled if you do not want this functionality: insert_auto_CB_to_hopper
- DONE For ANYONE callbacks, alter vdc_db_query.php script to update the vicidial_callback record to INACTIVE after it has been sent to an agent.
- DONE Need to prevent launching of a manual dial call or callback when in alt-dial-mode before finishing lead.
- DONE For USERONLY callbacks there will need to be an admin interface change necessary to be able to override this and a method to change a USERONLY callback to ANYONE. Allow the other-way-around as well.
- HIGH For USERONLY callbacks there will need to be an admin interface change necessary to be able to override this and a method to change a USERONLY callback to ANYONE as well as a callback interface on the vicidial.php page so an agent can look over their callbacks and place them when the time arises.
- HIGH Fix "waiting for ring" bug with manual dial override in vicidial.php.
- HIGH add a permission field to vicidial_users for scheduled_callbacks to allow an agent to dispo a lead as a callback and choose a callback date/time. The default will be to ENABLE scheduled callbacks.
- HIGH add a permission field to vicidial_users for agentonly_callbacks to allow an agent to set a callback as USERONLY as well as call that lead back. The default will be to DISABLE USERONLY callbacks.
- HIGH add a permission field to vicidial_users for agentcall_manual manual dialing within vicidial.php. The default will be to DISABLE manual dialing.
- HIGH add a permission field to vicidial_users to restrict recording in vicidial.php per user. Default would be to ENABLE recording
- HIGH add a permission field to vicidial_users to restrict transfers in vicidial.php per user. Default would be to ENABLE transfers
- HIGH Add auto-hopper-insertion to triggered ANYONE callbacks. This will need to check on campaign and list status before insertion.
- HIGH end-user agent documentation - manual. Probably a free text-only manual and a full color print book available for sale - HIGH end-user agent documentation - manual. Probably a free text-only manual and a full color print book available for sale
@@ -79,16 +104,12 @@
- MEDIUM add new method for capping the maximum number of attempts to try leads of a specific status. This would be set up like HotKeys are, per campaign where you would select the status and define the maximum number of attempts for that type of status for that campaign and the VDhopper wouldn't allow that kind of lead into the hopper if it was over the max value of call_count. - MEDIUM add new method for capping the maximum number of attempts to try leads of a specific status. This would be set up like HotKeys are, per campaign where you would select the status and define the maximum number of attempts for that type of status for that campaign and the VDhopper wouldn't allow that kind of lead into the hopper if it was over the max value of call_count.
- MEDIUM Add a FILTERS section to the vicidial admin screen and a FILTERS feature that would operate a lot like how the lead filters work in the GnuDialer project. It would be a way of defining SQL subsets on leads that the campaign would be dialing. You would create new filters in the ADD NEW FILTER section and a vicidial_campaign can only have one active FILTER at any one time. The Filter modification page would have something like a SQL builder that would let you select a parameter field(like called_count, state, postal_code, etc...) and then a value set, or you could directly edit the SQL it generates. This feature could make it rather easy to mess up dialing for a campaign since it lets managers directly edit the SQL statement that is used to put leads into the hopper. The SQL would only be SELECT based and would not effect the order that the leads are selected in. would require a new table(vicidial_filters) as well as a new field in vicidial_campaigns(filter_id).
create table vicidial_filters (
filter_id VARCHAR(20),
filter_description VARCHAR(50),
filter SQL VARCHAR(255));
- MEDIUM add ability to call CLOSER campaigns "BLEND" or "INBND". would require many script changes from server side to client side, not set in stone yet, but considering it. - MEDIUM add ability to call CLOSER campaigns "BLEND" or "INBND". would require many script changes from server side to client side, not set in stone yet, but considering it.
- MEDIUM Add internal DNC list of phone numbers that would be scrubbed against by the AST_VDhopper.pl script while loading leads and it would kick them out with a special status as DNCL(Do-Not-Call-Load) so they would be in the system but unable to be dialed. Would need to add a mechanism to add a lead to this list upon agent-dispo of a call as DNC. Would need to create a new admin page to manually add leads to DNC list. Also, would add a parameter to vicidial_campaigns(dnc_list_enabled ENUM('Y','N')) where a campaign could be exempted from the system's DNC list restrictions(would be active by default 'Y'). - MEDIUM Add internal DNC list of phone numbers that would be scrubbed against by the AST_VDhopper.pl script while loading leads and it would kick them out with a special status as DNCL(Do-Not-Call-Load) so they would be in the system but unable to be dialed. Would need to add a mechanism to add a lead to this list upon agent-dispo of a call as DNC. Would need to create a new admin page to manually add leads to DNC list. Also, would add a parameter to vicidial_campaigns(dnc_list_enabled ENUM('Y','N')) where a campaign could be exempted from the system's DNC list restrictions(would be active by default 'Y').
- MEDIUM make 3rd party consultative transfers work for Local extensions, also for internal/local transfer to closers if possible.
- MEDIUM add link in astguiclient to login and logout from Asterisk Queues - MEDIUM add link in astguiclient to login and logout from Asterisk Queues
- MEDIUM add script to get "show queues" information and place in a DB table to be used to see who is in an Asterisk Queue. This would mostly be used to give a LOGGED-IN and LOGGED-OUT display for astguiclient.php and possibly add an Asterisk Queue display tab or popup for astguiclient.php. Info would be updated one to four times a minute so it would not be real-time. - MEDIUM add script to get "show queues" information and place in a DB table to be used to see who is in an Asterisk Queue. This would mostly be used to give a LOGGED-IN and LOGGED-OUT display for astguiclient.php and possibly add an Asterisk Queue display tab or popup for astguiclient.php. Info would be updated one to four times a minute so it would not be real-time.
@@ -119,8 +140,6 @@ Asterisk server and the default installation of only the MySQL client libs will
- MEDIUM add ability upon vicidial.php login to take a number to dial as a password and a reserved word(something like MANUAL in all caps) that would allow the use of an EXTERNAL phone without setting it up as a aasterisk.phones entry. - MEDIUM add ability upon vicidial.php login to take a number to dial as a password and a reserved word(something like MANUAL in all caps) that would allow the use of an EXTERNAL phone without setting it up as a aasterisk.phones entry.
- MEDIUM per-campaign customer SQL query selections, like city and phone prefixes
- MEDIUM rebuild the vdremote.php remote agents pages to use AJAX(PHP/Javascript/XMLHTTPRequest) for real-time popups of call data. - MEDIUM rebuild the vdremote.php remote agents pages to use AJAX(PHP/Javascript/XMLHTTPRequest) for real-time popups of call data.
- MEDIUM allow custom welcome message for vicidial campaigns. - MEDIUM allow custom welcome message for vicidial campaigns.
@@ -133,8 +152,6 @@ Asterisk server and the default installation of only the MySQL client libs will
- MEDIUM Change VICIDIAL autodialing configuration to allow dialing of alt_phone numbers as well as address3 phone numbers after dialing main number. This is already possible in manual dialing mode. Best way for this may be to reconfigure the called_since_last_reset field to allow N, 1, 2, Y. This would require reprogramming several server scripts and php pages. - MEDIUM Change VICIDIAL autodialing configuration to allow dialing of alt_phone numbers as well as address3 phone numbers after dialing main number. This is already possible in manual dialing mode. Best way for this may be to reconfigure the called_since_last_reset field to allow N, 1, 2, Y. This would require reprogramming several server scripts and php pages.
- MEDIUM Allow manual dialing of an alt_phone or address3 phone number in vicidial.php in auto_dial mode. This requires a lot of changes to the code where dial_level>0 for things to work correctly, but should be possible.
- MEDIUM Try a few of the frequently launched scripts as C programs(call_log.agi and the AST_send child scripts) to see if they reduce system load and/or speed up those processes. - MEDIUM Try a few of the frequently launched scripts as C programs(call_log.agi and the AST_send child scripts) to see if they reduce system load and/or speed up those processes.
- MEDIUM Change the autodialing system around so that there can be dialing-out-only servers and agent-only servers. This is suprisingly simple to do, but would require all servers to be controlled by a single instance of AST_VDauto_dial.pl running on one machine. - MEDIUM Change the autodialing system around so that there can be dialing-out-only servers and agent-only servers. This is suprisingly simple to do, but would require all servers to be controlled by a single instance of AST_VDauto_dial.pl running on one machine.
+41
View File
@@ -0,0 +1,41 @@
CREATE TABLE vicidial_list_pins (
pins_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
entry_time DATETIME,
phone_number VARCHAR(10),
lead_id INT(9) UNSIGNED,
campaign_id VARCHAR(20),
product_code VARCHAR(20),
user VARCHAR(20),
digits VARCHAR(20),
index (lead_id),
index (phone_number),
index (entry_time)
);
UPDATE vicidial_phone_codes set DST='Y', DST_range='FSA-LSO' where state='IN';
ALTER TABLE vicidial_list MODIFY list_id BIGINT(14) UNSIGNED;
ALTER TABLE vicidial_lists MODIFY list_id BIGINT(14) UNSIGNED;
ALTER TABLE vicidial_hopper MODIFY list_id BIGINT(14) UNSIGNED NOT NULL;
ALTER TABLE vicidial_log MODIFY list_id BIGINT(14) UNSIGNED;
ALTER TABLE vicidial_closer_log MODIFY list_id BIGINT(14) UNSIGNED;
ALTER TABLE vicidial_xfer_log MODIFY list_id BIGINT(14) UNSIGNED;
ALTER TABLE vicidial_callbacks MODIFY list_id BIGINT(14) UNSIGNED;
CREATE TABLE vicidial_lead_filters (
lead_filter_id VARCHAR(10) PRIMARY KEY NOT NULL,
lead_filter_name VARCHAR(30) NOT NULL,
lead_filter_comments VARCHAR(255),
lead_filter_sql TEXT
);
ALTER TABLE vicidial_campaigns ADD alt_number_dialing ENUM('Y','N') default 'N';
ALTER TABLE vicidial_campaigns ADD scheduled_callbacks ENUM('Y','N') default 'N';
ALTER TABLE vicidial_campaigns ADD lead_filter_id VARCHAR(10) default 'NONE';
ALTER TABLE vicidial_users ADD scheduled_callbacks ENUM('0','1') default '1';
ALTER TABLE vicidial_users ADD agentonly_callbacks ENUM('0','1') default '0';
ALTER TABLE vicidial_users ADD agentcall_manual ENUM('0','1') default '0';
ALTER TABLE vicidial_users ADD vicidial_recording ENUM('0','1') default '1';
ALTER TABLE vicidial_users ADD vicidial_transfers ENUM('0','1') default '1';
ALTER TABLE vicidial_users ADD delete_filters ENUM('0','1') default '0';