From d82d30a9ef4bd5746c0e871b1baf864289009047 Mon Sep 17 00:00:00 2001 From: mattf Date: Fri, 7 Jul 2006 15:16:35 +0000 Subject: [PATCH] 2006-04-19_snapshot git-svn-id: svn://192.168.202.10@4 3d104415-ff17-0410-8863-d5cf3c621b8a --- AST_VDhopper.pl | 71 ++- DTMF_sounds/buzz.gsm | Bin 0 -> 363 bytes DTMF_sounds/ding.gsm | Bin 0 -> 363 bytes MySQL_AST_CREATE_tables.sql | 12 +- TO_BE_TRANSLATED.txt | 73 +++ VICIDIAL_web/admin.php | 685 ++++++++++++++++++++++++----- VICIDIAL_web/admin_modify_lead.php | 91 ++++ agc/vdc_db_query.php | 13 +- agc/vicidial.php | 206 ++++++--- agi-VDADlisten_DTMF.agi | 191 ++++++++ docs/SCRATCH_INSTALL.txt | 93 ++-- docs/TODO.txt | 65 ++- upgrade_1.1.11.sql | 41 ++ 13 files changed, 1289 insertions(+), 252 deletions(-) create mode 100644 DTMF_sounds/buzz.gsm create mode 100644 DTMF_sounds/ding.gsm create mode 100644 TO_BE_TRANSLATED.txt create mode 100644 agi-VDADlisten_DTMF.agi create mode 100644 upgrade_1.1.11.sql diff --git a/AST_VDhopper.pl b/AST_VDhopper.pl index 965ad5b..2d78bba 100644 --- a/AST_VDhopper.pl +++ b/AST_VDhopper.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl # -# AST_VDhopper.pl version 0.5 +# AST_VDhopper.pl version 0.7 # # DESCRIPTION: # 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 # 60320-0932 - Added inactive lead list hopper deletion (Thanks Vic Jolin) # 60322-1030 - Added super debug output +# 60418-0947 - Added lead filter per campaign # # constants @@ -38,6 +39,10 @@ $DB=0; # Debug flag, set to 0 for no debug messages, On an active system this w $US='__'; $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); $year = ($year + 1900); $mon++; @@ -206,7 +211,7 @@ if ($inactive_lists_count > 0) ### 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"); if ($dbhA->has_selected_record) { @@ -222,16 +227,26 @@ if ($dbhA->has_selected_record) if ($CBHOLD_count > 0) { $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"); if ($dbhA->has_selected_record) { $iter=$dbhA->create_record_iterator; $cbc=0; + $cba=0; while ( $record = $iter->each) { $lead_ids[$cbc] = $record->[0]; + $recipient = $record->[1]; $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++; } } @@ -254,6 +269,20 @@ if ($CBHOLD_count > 0) &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 @@ -289,6 +318,7 @@ if ($dbhA->has_selected_record) else {$hopper_level[$rec_count] = "$CLIlevel";} $local_call_time[$rec_count] = "$record->[16]"; + $lead_filter_id[$rec_count] = "$record->[35]"; $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";} + ### Get list of the lists in the campaign ### $stmtA = "SELECT list_id FROM vicidial_lists where campaign_id='$campaign_id[$i]' and active='Y';"; $dbhA->query("$stmtA"); if ($dbhA->has_selected_record) @@ -424,7 +455,33 @@ foreach(@campaign_id) if ($DB) {print " campaign lists count: $rec_countLISTS | $camp_lists\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"); $campaign_leads_to_call=0; 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") ) { - $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"); $NEW_campaign_leads_to_call=0; if ($dbhA->has_selected_record) @@ -509,7 +566,7 @@ foreach(@campaign_id) $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";} - $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";} $dbhA->query("$stmtA"); if ($dbhA->has_selected_record) @@ -535,7 +592,7 @@ foreach(@campaign_id) 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";} $dbhA->query("$stmtA"); if ($dbhA->has_selected_record) diff --git a/DTMF_sounds/buzz.gsm b/DTMF_sounds/buzz.gsm new file mode 100644 index 0000000000000000000000000000000000000000..9549d64c881153910e1cd8bcbb7c1359427f00e6 GIT binary patch literal 363 zcmV-x0hIpQr-dr4P-!>YajuRUuip)`{$~$W{oKuI`oQiRh+GmAkGUn%7Z$u4PzJM@UA&TqlSf{(aPOXqXBS~ze`buV&xgNaM|dU zCgh{&Nfm86;8BJ6oo%;cqvPakNz6N=j_x7{v2YIeKxtecL#pX%{g%Cn%!a5sPKkUQ%qBzg*T=?>0L1^x1mF`_b_wwK?P4Y z^Vn;)Z!{M*FSL2RDSU43fs0&fGP}bU+|E9=3aD;MfXkvQ*X&LMtzftwH_77hVFk6- z*IuT+TTtBVJ44~UgT$Q3)Htvk-Y1yN%G@e@=z+!KN$xT`9=J>ASv-2z5Ghk+@%WnE zZpEmZ2P|$E9*+%guzFnRDxJH)?Qx&go7@E+PXgVg!EOjY;I7$;AxjD!tofVBrc0UI6`ksTu$P literal 0 HcmV?d00001 diff --git a/MySQL_AST_CREATE_tables.sql b/MySQL_AST_CREATE_tables.sql index 5897764..8c5e2ef 100644 --- a/MySQL_AST_CREATE_tables.sql +++ b/MySQL_AST_CREATE_tables.sql @@ -446,7 +446,10 @@ amd_send_to_vmx ENUM('Y','N') default 'N', xferconf_a_dtmf VARCHAR(50), xferconf_a_number 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 ( @@ -645,3 +648,10 @@ index (lead_id), index (phone_number), 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 +); diff --git a/TO_BE_TRANSLATED.txt b/TO_BE_TRANSLATED.txt new file mode 100644 index 0000000..0c10831 --- /dev/null +++ b/TO_BE_TRANSLATED.txt @@ -0,0 +1,73 @@ +############################################################ ADMIN + +Add New Filter +New Filter Addition +Modify Filter +Delete Filter +Filters +Filter ID - 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 - 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 - 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 - 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 - 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 - This option allows an agent to manually dial the alternate phone number or address3 field after the main number has been called +Scheduled Callbacks - 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 - 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 - 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 - 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 - 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 - 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 diff --git a/VICIDIAL_web/admin.php b/VICIDIAL_web/admin.php index 269da19..f905ab9 100644 --- a/VICIDIAL_web/admin.php +++ b/VICIDIAL_web/admin.php @@ -95,8 +95,17 @@ $modify_leads=$_GET["modify_leads"]; if (!$modify_leads) {$modify_leads=$_POST[ $hotkeys_active=$_GET["hotkeys_active"]; if (!$hotkeys_active) {$hotkeys_active=$_POST["hotkeys_active"];} $change_agent_campaign=$_GET["change_agent_campaign"]; if (!$change_agent_campaign) {$change_agent_campaign=$_POST["change_agent_campaign"];} $agent_choose_ingroups=$_GET["agent_choose_ingroups"]; if (!$agent_choose_ingroups) {$agent_choose_ingroups=$_POST["agent_choose_ingroups"];} - - +$alt_number_dialing=$_GET["alt_number_dialing"]; if (!$alt_number_dialing) {$alt_number_dialing=$_POST["alt_number_dialing"];} +$scheduled_callbacks=$_GET["scheduled_callbacks"]; if (!$scheduled_callbacks) {$scheduled_callbacks=$_POST["scheduled_callbacks"];} +$lead_filter_id=$_GET["lead_filter_id"]; if (!$lead_filter_id) {$lead_filter_id=$_POST["lead_filter_id"];} +$lead_filter_name=$_GET["lead_filter_name"]; if (!$lead_filter_name) {$lead_filter_name=$_POST["lead_filter_name"];} +$lead_filter_comments=$_GET["lead_filter_comments"]; if (!$lead_filter_comments) {$lead_filter_comments=$_POST["lead_filter_comments"];} +$lead_filter_sql=$_GET["lead_filter_sql"]; if (!$lead_filter_sql) {$lead_filter_sql=$_POST["lead_filter_sql"];} +$agentonly_callbacks=$_GET["agentonly_callbacks"]; if (!$agentonly_callbacks) {$agentonly_callbacks=$_POST["agentonly_callbacks"];} +$agentcall_manual=$_GET["agentcall_manual"]; if (!$agentcall_manual) {$agentcall_manual=$_POST["agentcall_manual"];} +$vicidial_recording=$_GET["vicidial_recording"]; if (!$vicidial_recording) {$vicidial_recording=$_POST["vicidial_recording"];} +$vicidial_transfers=$_GET["vicidial_transfers"]; if (!$vicidial_transfers) {$vicidial_transfers=$_POST["vicidial_transfers"];} +$delete_filters=$_GET["delete_filters"]; if (!$delete_filters) {$delete_filters=$_POST["delete_filters"];} ### AST GUI database administration @@ -133,12 +142,18 @@ $agent_choose_ingroups=$_GET["agent_choose_ingroups"]; if (!$agent_choose_ingrou ### 60227-1226 - Fixed vicidial_inbound_groups insert bug ### 60413-1308 - Fixed list display to have 1 row/status: count and time zone tables ### - Added status name in selected dial statuses in campaign screen +### 60417-1416 - Added vicidial_lead_filters sections +### - Changed the header links to color-coded sectional with sublinks below +### - Added filter name and script name to campaign and in-group modify sections +### - Added callback and alt dial options to campaigns section +### - Added callback, alt dial and other options to users section +### 60419-1628 - Alter Callbacks display to include status and LIVE listings, reordered ### ### make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time -$version = '1.1.10-6'; -$build = '60413-1308'; +$version = '1.1.10-8'; +$build = '60419-1628'; $STARTtime = date("U"); @@ -194,6 +209,7 @@ $browser = getenv("HTTP_USER_AGENT"); $LOGload_leads =$row[14]; $LOGcampaign_detail =$row[15]; $LOGdelete_scripts =$row[18]; + $LOGdelete_filters =$row[29]; if ($WeBRooTWritablE > 0) { @@ -217,71 +233,78 @@ echo "\n"; echo "\n"; echo "VICIDIAL ADMIN: "; -if ($ADD==1) {echo "Add New User";} -if ($ADD==11) {echo "Add New Campaign";} -if ($ADD==111) {echo "Add New List";} -if ($ADD==1111) {echo "Add New In-Group";} -if ($ADD==11111) {echo "Add New Remote Agents";} -if ($ADD==111111) {echo "Add New Users Group";} -if ($ADD==1111111) {echo "Add New Script";} -if ($ADD==2) {echo "New User Addition";} -if ($ADD==21) {echo "New Campaign Addition";} -if ($ADD==22) {echo "New Campaign Status Addition";} -if ($ADD==23) {echo "New Campaign HotKey Addition";} -if ($ADD==211) {echo "New List Addition";} -if ($ADD==2111) {echo "New In-Group Addition";} -if ($ADD==21111) {echo "New Remote Agents Addition";} -if ($ADD==211111) {echo "New Users Group Addition";} -if ($ADD==2111111) {echo "New Script Addition";} -if ($ADD==3) {echo "Modify User";} -if ($ADD==31) {echo "Modify Campaign";} -if ($ADD==34) {echo "Modify Campaign - Basic View";} -if ($ADD==311) {echo "Modify List";} -if ($ADD==3111) {echo "Modify In-Group";} -if ($ADD==31111) {echo "Modify Remote Agents";} -if ($ADD==311111) {echo "Modify Users Groups";} -if ($ADD==3111111) {echo "Modify Script";} -if ($ADD=="4A") {echo "Modify User - Admin";} -if ($ADD==4) {echo "Modify User";} -if ($ADD==41) {echo "Modify Campaign";} -if ($ADD==42) {echo "Modify Campaign Status";} -if ($ADD==43) {echo "Modify Campaign HotKey";} -if ($ADD==44) {echo "Modify Campaign - Basic View";} -if ($ADD==411) {echo "Modify List";} -if ($ADD==4111) {echo "Modify In-Group";} -if ($ADD==41111) {echo "Modify Remote Agents";} -if ($ADD==411111) {echo "Modify Users Groups";} -if ($ADD==4111111) {echo "Modify Script";} -if ($ADD==5) {echo "Delete User";} -if ($ADD==51) {echo "Delete Campaign";} -if ($ADD==52) {echo "Logout Agents";} -if ($ADD==511) {echo "Delete List";} -if ($ADD==5111) {echo "Delete In-Group";} -if ($ADD==51111) {echo "Delete Remote Agents";} -if ($ADD==511111) {echo "Delete Users Group";} -if ($ADD==5111111) {echo "Delete Script";} -if ($ADD==6) {echo "Delete User";} -if ($ADD==61) {echo "Delete Campaign";} -if ($ADD==62) {echo "Logout Agents";} -if ($ADD==611) {echo "Delete List";} -if ($ADD==6111) {echo "Delete In-Group";} -if ($ADD==61111) {echo "Delete Remote Agents";} -if ($ADD==611111) {echo "Delete Users Group";} -if ($ADD==6111111) {echo "Delete Script";} -if ($ADD==7111111) {echo "Preview Script";} -if ($ADD==0) {echo "Welcome";} -if ($ADD==8) {echo "CallBacks Within Agent";} -if ($ADD==81) {echo "CallBacks Within Campaign";} -if ($ADD==811) {echo "CallBacks Within List";} -if ($ADD==10) {echo "Campaigns";} -if ($ADD==100) {echo "Lists";} -if ($ADD==1000) {echo "In-Groups";} -if ($ADD==10000) {echo "Remote Agents";} -if ($ADD==100000) {echo "User Groups";} -if ($ADD==1000000) {echo "Scripts";} -if ($ADD==55) {echo "Search Form";} -if ($ADD==66) {echo "Search Results";} -if ($ADD==99999) {echo "HELP";} +if ($ADD==1) {$hh='users'; echo "Add New User";} +if ($ADD==11) {$hh='campaigns'; echo "Add New Campaign";} +if ($ADD==111) {$hh='lists'; echo "Add New List";} +if ($ADD==1111) {$hh='ingroups'; echo "Add New In-Group";} +if ($ADD==11111) {$hh='remoteagent'; echo "Add New Remote Agents";} +if ($ADD==111111) {$hh='usergroups'; echo "Add New Users Group";} +if ($ADD==1111111) {$hh='scripts'; echo "Add New Script";} +if ($ADD==11111111) {$hh='filters'; echo "Add New Filter";} +if ($ADD==2) {$hh='users'; echo "New User Addition";} +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==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";} +if ($ADD==211111) {$hh='usergroups'; echo "New Users Group Addition";} +if ($ADD==2111111) {$hh='scripts'; echo "New Script Addition";} +if ($ADD==21111111) {$hh='filters'; echo "New Filter Addition";} +if ($ADD==3) {$hh='users'; echo "Modify User";} +if ($ADD==31) {$hh='campaigns'; echo "Modify Campaign";} +if ($ADD==34) {$hh='campaigns'; echo "Modify Campaign - Basic View";} +if ($ADD==311) {$hh='lists'; echo "Modify List";} +if ($ADD==3111) {$hh='ingroups'; echo "Modify In-Group";} +if ($ADD==31111) {$hh='remoteagent'; echo "Modify Remote Agents";} +if ($ADD==311111) {$hh='usergroups'; echo "Modify Users Groups";} +if ($ADD==3111111) {$hh='scripts'; echo "Modify Script";} +if ($ADD==31111111) {$hh='filters'; echo "Modify Filter";} +if ($ADD=="4A") {$hh='users'; echo "Modify User - Admin";} +if ($ADD==4) {$hh='users'; echo "Modify User";} +if ($ADD==41) {$hh='campaigns'; echo "Modify Campaign";} +if ($ADD==42) {$hh='campaigns'; echo "Modify Campaign Status";} +if ($ADD==43) {$hh='campaigns'; echo "Modify Campaign HotKey";} +if ($ADD==44) {$hh='campaigns'; echo "Modify Campaign - Basic View";} +if ($ADD==411) {$hh='lists'; echo "Modify List";} +if ($ADD==4111) {$hh='ingroups'; echo "Modify In-Group";} +if ($ADD==41111) {$hh='remoteagent'; echo "Modify Remote Agents";} +if ($ADD==411111) {$hh='usergroups'; echo "Modify Users Groups";} +if ($ADD==4111111) {$hh='scripts'; echo "Modify Script";} +if ($ADD==41111111) {$hh='filters'; echo "Modify Filter";} +if ($ADD==5) {$hh='users'; echo "Delete User";} +if ($ADD==51) {$hh='campaigns'; echo "Delete Campaign";} +if ($ADD==52) {$hh='campaigns'; echo "Logout Agents";} +if ($ADD==511) {$hh='lists'; echo "Delete List";} +if ($ADD==5111) {$hh='ingroups'; echo "Delete In-Group";} +if ($ADD==51111) {$hh='remoteagent'; echo "Delete Remote Agents";} +if ($ADD==511111) {$hh='usergroups'; echo "Delete Users Group";} +if ($ADD==5111111) {$hh='scripts'; echo "Delete Script";} +if ($ADD==51111111) {$hh='filters'; echo "Delete Filter";} +if ($ADD==6) {$hh='users'; echo "Delete User";} +if ($ADD==61) {$hh='campaigns'; echo "Delete Campaign";} +if ($ADD==62) {$hh='campaigns'; echo "Logout Agents";} +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";} +if ($ADD==611111) {$hh='usergroups'; echo "Delete Users Group";} +if ($ADD==6111111) {$hh='scripts'; echo "Delete Script";} +if ($ADD==61111111) {$hh='filters'; echo "Delete Filter";} +if ($ADD==7111111) {$hh='scripts'; echo "Preview Script";} +if ($ADD==0) {$hh='users'; echo "Welcome";} +if ($ADD==8) {$hh='users'; echo "CallBacks Within Agent";} +if ($ADD==81) {$hh='campaigns'; echo "CallBacks Within Campaign";} +if ($ADD==811) {$hh='campaigns'; echo "CallBacks Within List";} +if ($ADD==10) {$hh='campaigns'; echo "Campaigns";} +if ($ADD==100) {$hh='lists'; echo "Lists";} +if ($ADD==1000) {$hh='ingroups'; echo "In-Groups";} +if ($ADD==10000) {$hh='remoteagent'; echo "Remote Agents";} +if ($ADD==100000) {$hh='usergroups'; echo "User Groups";} +if ($ADD==1000000) {$hh='scripts'; echo "Scripts";} +if ($ADD==10000000) {$hh='filters'; echo "Filters";} +if ($ADD==55) {$hh='users'; echo "Search Form";} +if ($ADD==66) {$hh='users'; echo "Search Results";} +if ($ADD==99999) {$hh='users'; echo "HELP";} if ( ($ADD>9) && ($ADD < 99998) ) { @@ -296,6 +319,23 @@ if ( ($ADD>9) && ($ADD < 99998) ) { $rowx=mysql_fetch_row($rsltx); $scripts_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n"; + $scriptname_list["$rowx[0]"] = "$rowx[1]"; + $o++; + } + + ##### get filters listing for dynamic pulldown + $stmt="SELECT lead_filter_id,lead_filter_name,lead_filter_sql from vicidial_lead_filters order by lead_filter_id"; + $rsltx=mysql_query($stmt, $link); + $filters_to_print = mysql_num_rows($rsltx); + $filters_list="<option value=\"\">NONE</option>\n"; + + $o=0; + while ($filters_to_print > $o) + { + $rowx=mysql_fetch_row($rsltx); + $filters_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n"; + $filtername_list["$rowx[0]"] = "$rowx[1]"; + $filtersql_list["$rowx[0]"] = "$rowx[2]"; $o++; } } @@ -514,6 +554,37 @@ echo "<TABLE WIDTH=98% BGCOLOR=#E6E6E6 cellpadding=2 cellspacing=0><TR><TD ALIGN <BR> <B>Inbound Groups -</B> Here is where you select the inbound groups you want to receive calls from if you have selected the CLOSER campaign. +<BR> +<A NAME="vicidial_users-scheduled_callbacks"> +<BR> +<B>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. + +<BR> +<A NAME="vicidial_users-agentonly_callbacks"> +<BR> +<B>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. + +<BR> +<A NAME="vicidial_users-agentcall_manual"> +<BR> +<B>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. + +<BR> +<A NAME="vicidial_users-vicidial_recording"> +<BR> +<B>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. + +<BR> +<A NAME="vicidial_users-vicidial_transfers"> +<BR> +<B>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. + +<BR> +<A NAME="vicidial_users-delete_filters"> +<BR> +<B>Delete Filters -</B> This option allows the user to be able to delete vicidial lead filters from the system. + + <BR><BR><BR><BR> @@ -579,6 +650,11 @@ echo "<TABLE WIDTH=98% BGCOLOR=#E6E6E6 cellpadding=2 cellspacing=0><TR><TD ALIGN <BR> <B>Hopper Level -</B> This is how many leads the VDhopper script tries to keep in the vicidial_hopper table for this campaign. If running VDhopper script every minute, make this slightly greater than the number of leads you go through in a minute. +<BR> +<A NAME="vicidial_campaigns-lead_filter_id"> +<BR> +<B>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. + <BR> <A NAME="vicidial_campaigns-force_reset_hopper"> <BR> @@ -668,6 +744,17 @@ echo "<TABLE WIDTH=98% BGCOLOR=#E6E6E6 cellpadding=2 cellspacing=0><TR><TD ALIGN <BR> <B>Xfer-Conf DTMF -</B> These four fields allow for you to have two sets of Transfer Conference and DTMF presets. When the call or campaign is loaded, the vicidial.php script will show two buttons on the transfer-conference frame and auto-populate the number-to-dial and the send-dtmf fields when pressed. +<BR> +<A NAME="vicidial_campaigns-alt_number_dialing"> +<BR> +<B>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. + +<BR> +<A NAME="vicidial_campaigns-scheduled_callbacks"> +<BR> +<B>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. + + <BR><BR><BR><BR> @@ -872,6 +959,29 @@ echo "<TABLE WIDTH=98% BGCOLOR=#E6E6E6 cellpadding=2 cellspacing=0><TR><TD ALIGN +<BR><BR><BR><BR> + +<B><FONT SIZE=3>VICIDIAL_LEAD_FILTERS TABLE</FONT></B><BR><BR> +<A NAME="vicidial_lead_filters-lead_filter_id"> +<BR> +<B>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. + +<BR> +<A NAME="vicidial_lead_filters-lead_filter_name"> +<B>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. + +<BR> +<A NAME="vicidial_lead_filters-lead_filter_comments"> +<B>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. + +<BR> +<A NAME="vicidial_lead_filters-lead_filter_sql"> +<B>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 -. + + + + + <BR><BR><BR><BR> <B><FONT SIZE=3>VICIDIAL LIST LOADER FUNCTIONALITY</FONT></B><BR><BR> @@ -1008,6 +1118,23 @@ exit; +######################### HTML HEADER BEGIN ####################################### +if ($hh=='users') {$users_hh='bgcolor ="#FFFF99"'; $users_fc='BLACK';} # yellow + else {$users_hh=''; $users_fc='WHITE';} +if ($hh=='campaigns') {$campaigns_hh='bgcolor ="#FFCC99"'; $campaigns_fc='BLACK';} # orange + else {$campaigns_hh=''; $campaigns_fc='WHITE';} +if ($hh=='lists') {$lists_hh='bgcolor ="#FFCCCC"'; $lists_fc='BLACK';} # red + else {$lists_hh=''; $lists_fc='WHITE';} +if ($hh=='ingroups') {$ingroups_hh='bgcolor ="#CC99FF"'; $ingroups_fc='BLACK';} # purple + else {$ingroups_hh=''; $ingroups_fc='WHITE';} +if ($hh=='remoteagent') {$remoteagent_hh='bgcolor ="#CCFFCC"'; $remoteagent_fc='BLACK';} # green + else {$remoteagent_hh=''; $remoteagent_fc='WHITE';} +if ($hh=='usergroups') {$usergroups_hh='bgcolor ="#CCFFFF"'; $usergroups_fc='BLACK';} # cyan + else {$usergroups_hh=''; $usergroups_fc='WHITE';} +if ($hh=='scripts') {$scripts_hh='bgcolor ="#99FFCC"'; $scripts_fc='BLACK';} # teal + else {$scripts_hh=''; $scripts_fc='WHITE';} +if ($hh=='filters') {$filters_hh='bgcolor ="#CCCCCC"'; $filters_fc='BLACK';} # grey + else {$filters_hh=''; $filters_fc='WHITE';} ?> @@ -1022,15 +1149,67 @@ function openNewWindow(url) { echo "\n"; ?>
- - - - - +
  VICIDIAL ADMIN - Logout  
  LIST USERS | ADD A NEW USER | SEARCH FOR A USER |               |ADD USER GROUP | LIST USER GROUPS
  ADD CAMPAIGN | LIST CAMPAIGNS |              | SHOW LISTS | ADD NEW LIST |               | LOAD NEW LEADS
  SHOW IN-GROUPS | ADD NEW IN-GROUP |               | SHOW REMOTE AGENTS | ADD NEW REMOTE AGENTS
  STATS AND REPORTS               | ADD SCRIPT | VIEW SCRIPTS |             | SEARCH FOR A LEAD | GROUP HOURLY
+ + + + + + + + + + + + - + 1) { + ?> + + 1) { + ?> + + 1) { + ?> + + 1) { + ?> + + 1) { + ?> + + 1) { + ?> + + 1) { + ?> + + 1) { + ?> + + + + + +
  VICIDIAL ADMIN - Logout  
> SIZE=1> USERS > SIZE=1> CAMPAIGNS > SIZE=1> LISTS > SIZE=1> SCRIPTS > SIZE=1> FILTERS > SIZE=1> IN-GROUPS > SIZE=1> USER GROUPS > SIZE=1> REMOTE AGENTS > REPORTS
+ 1) { + ?> +
  LIST USERS     |     ADD A NEW USER     |     SEARCH FOR A USER
  ADD CAMPAIGN     |     LIST CAMPAIGNS
  SHOW LISTS     |     ADD NEW LIST     |     SEARCH FOR A LEAD |                   |     LOAD NEW LEADS
  ADD SCRIPT     |     VIEW SCRIPTS
  ADD FILTER     |     VIEW FILTERS
  SHOW IN-GROUPS     |     ADD NEW IN-GROUP
  ADD USER GROUP     |     LIST USER GROUPS     |     GROUP HOURLY
  SHOW REMOTE AGENTS     |     ADD NEW REMOTE AGENTS
 
\n"; if ($ADD==1) { +echo "
\n"; echo ""; echo "
ADD A NEW USER
\n"; @@ -1091,6 +1271,7 @@ echo "
\n"; if ($ADD==11) { +echo "
\n"; echo ""; echo "
ADD A NEW CAMPAIGN\n"; @@ -1124,6 +1305,7 @@ echo "
\n"; if ($ADD==111) { +echo "
\n"; echo ""; echo "
ADD A NEW LIST\n"; @@ -1160,6 +1342,7 @@ echo "
\n"; if ($ADD==1111) { +echo "
\n"; echo ""; echo "
ADD A NEW INBOUND GROUP\n"; @@ -1189,6 +1372,7 @@ echo "
\n"; if ($ADD==11111) { +echo "
\n"; echo ""; echo "
ADD NEW REMOTE AGENTS\n"; @@ -1220,6 +1404,7 @@ echo "NOTE: It can take up to 30 seconds for changes submitted on this screen to if ($ADD==111111) { +echo "
\n"; echo ""; echo "
ADD NEW USERS GROUP\n"; @@ -1239,6 +1424,7 @@ echo "
\n"; if ($ADD==1111111) { +echo "
\n"; echo ""; echo "
ADD NEW SCRIPT\n"; @@ -1255,6 +1441,27 @@ echo "
\n"; } +###################### +# ADD=11111111 display the ADD NEW FILTER SCREEN +###################### + +if ($ADD==11111111) +{ +echo "
\n"; +echo ""; + +echo "
ADD NEW FILTER\n"; +echo "\n"; +echo "
\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "
Filter ID: (no spaces or punctuation)$NWB#vicidial_lead_filters-lead_filter_id$NWE
Filter Name: (short description of the filter)$NWB#vicidial_lead_filters-lead_filter_name$NWE
Filter Comments: $NWB#vicidial_lead_filters-lead_filter_comments$NWE
Filter SQL: $NWB#vicidial_lead_filters-lead_filter_sql$NWE
\n"; +} + + ###################################################################################################### ###################################################################################################### ####### 2 series, validates form data and inserts the new record into the database @@ -1632,6 +1839,45 @@ $ADD=1000000; } +###################### +# ADD=21111111 adds new filter to the system +###################### + +if ($ADD==21111111) +{ + echo ""; + $stmt="SELECT count(*) from vicidial_lead_filters where lead_filter_id='$lead_filter_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + {echo "
FILTER NOT ADDED - there is already a filter entry with this ID\n";} + else + { + if ( (strlen($lead_filter_id) < 2) or (strlen($lead_filter_name) < 2) or (strlen($lead_filter_sql) < 2) ) + { + echo "
FILTER NOT ADDED - Please go back and look at the data you entered\n"; + echo "
Filter ID, name and SQL must be at least 2 characters in length\n"; + } + else + { + $stmt="INSERT INTO vicidial_lead_filters SET lead_filter_id='$lead_filter_id',lead_filter_name='$lead_filter_name',lead_filter_comments='$lead_filter_comments',lead_filter_sql='$lead_filter_sql';"; + $rslt=mysql_query($stmt, $link); + + echo "
FILTER ADDED: $lead_filter_id\n"; + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|ADD A NEW FILTER ENTRY |$PHP_AUTH_USER|$ip|lead_filter_id='$lead_filter_id',lead_filter_name='$lead_filter_name',lead_filter_comments='$lead_filter_comments',lead_filter_sql='$lead_filter_sql'|\n"); + fclose($fp); + } + } + } +$ADD=10000000; +} + + @@ -1660,14 +1906,16 @@ if ($ADD=="4A") { echo "
USER MODIFIED - ADMIN: $user\n"; - $stmt="UPDATE vicidial_users set pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass',delete_users='$delete_users',delete_user_groups='$delete_user_groups',delete_lists='$delete_lists',delete_campaigns='$delete_campaigns',delete_ingroups='$delete_ingroups',delete_remote_agents='$delete_remote_agents',load_leads='$load_leads',campaign_detail='$campaign_detail',ast_admin_access='$ast_admin_access',ast_delete_phones='$ast_delete_phones',delete_scripts='$delete_scripts',modify_leads='$modify_leads',hotkeys_active='$hotkeys_active',change_agent_campaign='$change_agent_campaign',agent_choose_ingroups='$agent_choose_ingroups', closer_campaigns='$groups_value' where user='$user';"; + $stmt="UPDATE vicidial_users set pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass',delete_users='$delete_users',delete_user_groups='$delete_user_groups',delete_lists='$delete_lists',delete_campaigns='$delete_campaigns',delete_ingroups='$delete_ingroups',delete_remote_agents='$delete_remote_agents',load_leads='$load_leads',campaign_detail='$campaign_detail',ast_admin_access='$ast_admin_access',ast_delete_phones='$ast_delete_phones',delete_scripts='$delete_scripts',modify_leads='$modify_leads',hotkeys_active='$hotkeys_active',change_agent_campaign='$change_agent_campaign',agent_choose_ingroups='$agent_choose_ingroups',closer_campaigns='$groups_value',scheduled_callbacks='$scheduled_callbacks',agentonly_callbacks='$agentonly_callbacks',agentcall_manual='$agentcall_manual',vicidial_recording='$vicidial_recording',vicidial_transfers='$vicidial_transfers',delete_filters='$delete_filters' where user='$user';"; $rslt=mysql_query($stmt, $link); + + ### LOG CHANGES TO LOG FILE ### if ($WeBRooTWritablE > 0) { $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY USER INFO |$PHP_AUTH_USER|$ip|pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass',delete_users='$delete_users',delete_user_groups='$delete_user_groups',delete_lists='$delete_lists',delete_campaigns='$delete_campaigns',delete_ingroups='$delete_ingroups',delete_remote_agents='$delete_remote_agents',load_leads='$load_leads',campaign_detail='$campaign_detail',ast_admin_access='$ast_admin_access',ast_delete_phones='$ast_delete_phones',delete_scripts='$delete_scripts',modify_leads='$modify_leads',hotkeys_active='$hotkeys_active',change_agent_campaign='$change_agent_campaign',agent_choose_ingroups='$agent_choose_ingroups', closer_campaigns='$groups_value' where user='$user'|\n"); + fwrite ($fp, "$date|MODIFY USER INFO |$PHP_AUTH_USER|$ip|pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass',delete_users='$delete_users',delete_user_groups='$delete_user_groups',delete_lists='$delete_lists',delete_campaigns='$delete_campaigns',delete_ingroups='$delete_ingroups',delete_remote_agents='$delete_remote_agents',load_leads='$load_leads',campaign_detail='$campaign_detail',ast_admin_access='$ast_admin_access',ast_delete_phones='$ast_delete_phones',delete_scripts='$delete_scripts',modify_leads='$modify_leads',hotkeys_active='$hotkeys_active',change_agent_campaign='$change_agent_campaign',agent_choose_ingroups='$agent_choose_ingroups', closer_campaigns='$groups_value',scheduled_callbacks='$scheduled_callbacks',agentonly_callbacks='$agentonly_callbacks',agentcall_manual='$agentcall_manual',vicidial_recording='$vicidial_recording',vicidial_transfers='$vicidial_transfers',delete_filters='$delete_filters' where user='$user'|\n"); fclose($fp); } } @@ -1724,7 +1972,7 @@ if ($ADD==41) { echo "
CAMPAIGN MODIFIED: $campaign_id\n"; - $stmt="UPDATE vicidial_campaigns set campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',allow_closers='$allow_closers',hopper_level='$hopper_level', auto_dial_level='$auto_dial_level', next_agent_call='$next_agent_call', local_call_time='$local_call_time', voicemail_ext='$voicemail_ext', dial_timeout='$dial_timeout', dial_prefix='$dial_prefix', campaign_cid='$campaign_cid', campaign_vdad_exten='$campaign_vdad_exten', web_form_address='$web_form_address', park_ext='$park_ext', park_file_name='$park_file_name', campaign_rec_exten='$campaign_rec_exten', campaign_recording='$campaign_recording', campaign_rec_filename='$campaign_rec_filename', campaign_script='$script_id', get_call_launch='$get_call_launch', am_message_exten='$am_message_exten', amd_send_to_vmx='$amd_send_to_vmx', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number', xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number' where campaign_id='$campaign_id';"; + $stmt="UPDATE vicidial_campaigns set campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',allow_closers='$allow_closers',hopper_level='$hopper_level', auto_dial_level='$auto_dial_level', next_agent_call='$next_agent_call', local_call_time='$local_call_time', voicemail_ext='$voicemail_ext', dial_timeout='$dial_timeout', dial_prefix='$dial_prefix', campaign_cid='$campaign_cid', campaign_vdad_exten='$campaign_vdad_exten', web_form_address='$web_form_address', park_ext='$park_ext', park_file_name='$park_file_name', campaign_rec_exten='$campaign_rec_exten', campaign_recording='$campaign_recording', campaign_rec_filename='$campaign_rec_filename', campaign_script='$script_id', get_call_launch='$get_call_launch', am_message_exten='$am_message_exten', amd_send_to_vmx='$amd_send_to_vmx', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number', xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',lead_filter_id='$lead_filter_id',alt_number_dialing='$alt_number_dialing',scheduled_callbacks='$scheduled_callbacks' where campaign_id='$campaign_id';"; $rslt=mysql_query($stmt, $link); if ($reset_hopper == 'Y') @@ -1747,7 +1995,7 @@ if ($ADD==41) if ($WeBRooTWritablE > 0) { $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY CAMPAIGN INFO|$PHP_AUTH_USER|$ip|campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',allow_closers='$allow_closers',hopper_level='$hopper_level', auto_dial_level='$auto_dial_level', next_agent_call='$next_agent_call', local_call_time='$local_call_time', voicemail_ext='$voicemail_ext', dial_timeout='$dial_timeout', dial_prefix='$dial_prefix', campaign_cid='$campaign_cid', campaign_vdad_exten='$campaign_vdad_exten', web_form_address='$web_form_address', park_ext='$park_ext', park_file_name='$park_file_name', campaign_rec_exten='$campaign_rec_exten', campaign_recording='$campaign_recording', campaign_rec_filename='$campaign_rec_filename', campaign_script='$script_id', get_call_launch='$get_call_launch', am_message_exten='$am_message_exten', amd_send_to_vmx='$amd_send_to_vmx', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number', xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number' where campaign_id='$campaign_id'|$reset_hopper|\n"); + fwrite ($fp, "$date|MODIFY CAMPAIGN INFO|$PHP_AUTH_USER|$ip|campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',allow_closers='$allow_closers',hopper_level='$hopper_level', auto_dial_level='$auto_dial_level', next_agent_call='$next_agent_call', local_call_time='$local_call_time', voicemail_ext='$voicemail_ext', dial_timeout='$dial_timeout', dial_prefix='$dial_prefix', campaign_cid='$campaign_cid', campaign_vdad_exten='$campaign_vdad_exten', web_form_address='$web_form_address', park_ext='$park_ext', park_file_name='$park_file_name', campaign_rec_exten='$campaign_rec_exten', campaign_recording='$campaign_recording', campaign_rec_filename='$campaign_rec_filename', campaign_script='$script_id', get_call_launch='$get_call_launch', am_message_exten='$am_message_exten', amd_send_to_vmx='$amd_send_to_vmx', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number', xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',lead_filter_id='$lead_filter_id',alt_number_dialing='$alt_number_dialing',scheduled_callbacks='$scheduled_callbacks' where campaign_id='$campaign_id'|$reset_hopper|\n"); fclose($fp); } } @@ -1839,7 +2087,7 @@ if ($ADD==44) { echo "
CAMPAIGN MODIFIED: $campaign_id\n"; - $stmt="UPDATE vicidial_campaigns set campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',hopper_level='$hopper_level', auto_dial_level='$auto_dial_level' where campaign_id='$campaign_id';"; + $stmt="UPDATE vicidial_campaigns set campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',hopper_level='$hopper_level', auto_dial_level='$auto_dial_level',lead_filter_id='$lead_filter_id' where campaign_id='$campaign_id';"; $rslt=mysql_query($stmt, $link); if ($reset_hopper == 'Y') @@ -1862,7 +2110,7 @@ if ($ADD==44) if ($WeBRooTWritablE > 0) { $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY CAMPAIGN INFO|$PHP_AUTH_USER|$ip|campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',hopper_level='$hopper_level', auto_dial_level='$auto_dial_level' where campaign_id='$campaign_id'|$reset_hopper|\n"); + fwrite ($fp, "$date|MODIFY CAMPAIGN INFO|$PHP_AUTH_USER|$ip|campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',hopper_level='$hopper_level', auto_dial_level='$auto_dial_level',lead_filter_id='$lead_filter_id' where campaign_id='$campaign_id'|$reset_hopper|\n"); fclose($fp); } } @@ -2056,6 +2304,41 @@ $ADD=3111111; # go to script modification form below } +###################### +# ADD=41111111 modify filter in the system +###################### + +if ($ADD==41111111) +{ + echo ""; + + if ( (strlen($lead_filter_id) < 2) or (strlen($lead_filter_name) < 2) or (strlen($lead_filter_sql) < 2) ) + { + echo "
FILTER NOT MODIFIED - Please go back and look at the data you entered\n"; + echo "
Filter ID, name and SQL must be at least 2 characters in length\n"; + } + else + { + $stmt="UPDATE vicidial_lead_filters set lead_filter_name='$lead_filter_name', lead_filter_comments='$lead_filter_comments', lead_filter_sql='$lead_filter_sql' where lead_filter_id='$lead_filter_id';"; + $rslt=mysql_query($stmt, $link); + + echo "
FILTER MODIFIED\n"; + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|MODIFY FILTER ENTRY |$PHP_AUTH_USER|$ip|lead_filter_name='$lead_filter_name', lead_filter_comments='$lead_filter_comments', lead_filter_sql='$lead_filter_sql' where lead_filter_id='$lead_filter_id'|\n"); + fclose($fp); + } + } + +$ADD=31111111; # go to filter modification form below +} + + + + ###################################################################################################### ###################################################################################################### ####### 5 series, delete records confirmation @@ -2228,15 +2511,37 @@ if ($ADD==5111111) if ( (strlen($script_id) < 2) or ($LOGdelete_scripts < 1) ) { echo "
SCRIPT NOT DELETED - Please go back and look at the data you entered\n"; - echo "
Script_id be at least 2 characters in length\n"; + echo "
Script_id must be at least 2 characters in length\n"; } else { - echo "
SCRIPT DELETION CONFIRMATION: $user_group\n"; + echo "
SCRIPT DELETION CONFIRMATION: $script_id\n"; echo "

Click here to delete script $script_id


\n"; } -$ADD='3111111'; # go to user group modification below +$ADD='3111111'; # go to script modification below +} + +###################### +# ADD=51111111 confirmation before deletion of filter record +###################### + +if ($ADD==51111111) +{ + echo ""; + + if ( (strlen($lead_filter_id) < 2) or ($LOGdelete_filters < 1) ) + { + echo "
FILTER NOT DELETED - Please go back and look at the data you entered\n"; + echo "
Filter ID must be at least 2 characters in length\n"; + } + else + { + echo "
FILTER DELETION CONFIRMATION: $lead_filter_id\n"; + echo "

Click here to delete filter $lead_filter_id


\n"; + } + +$ADD='31111111'; # go to filter modification below } @@ -2518,6 +2823,39 @@ $ADD='1000000'; # go to user group list } +###################### +# ADD=61111111 delete script record +###################### + +if ($ADD==61111111) +{ + echo ""; + + if ( (strlen($lead_filter_id) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_filters < 1) ) + { + echo "
FILTER NOT DELETED - Please go back and look at the data you entered\n"; + echo "
Filter ID must be at least 2 characters in length\n"; + } + else + { + $stmt="DELETE from vicidial_lead_filters where lead_filter_id='$lead_filter_id' limit 1;"; + $rslt=mysql_query($stmt, $link); + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|!DELETING FILTER!!!!|$PHP_AUTH_USER|$ip|lead_filter_id='$lead_filter_id'|\n"); + fclose($fp); + } + echo "
FILTER DELETION COMPLETED: $lead_filter_id\n"; + echo "

\n"; + } + +$ADD='10000000'; # go to user group list +} + + ###################################################################################################### @@ -2535,6 +2873,7 @@ $ADD='1000000'; # go to user group list if ($ADD==3) { +echo "\n"; echo "\n"; echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; @@ -2647,6 +2999,7 @@ if ( ($LOGcampaign_detail < 1) and ($ADD==31) ) {$ADD=34;} # send to Basic if no if ($ADD==31) { +echo "
\n"; echo ""; $stmt="SELECT * from vicidial_users where user='$user';"; @@ -2559,6 +2898,12 @@ if ($ADD==3) $hotkeys_active = $row[20]; $change_agent_campaign =$row[21]; $agent_choose_ingroups =$row[22]; + $scheduled_callbacks = $row[24]; + $agentonly_callbacks = $row[25]; + $agentcall_manual = $row[26]; + $vicidial_recording = $row[27]; + $vicidial_transfers = $row[28]; + $delete_filters = $row[29]; if ( ($user_level >= $LOGuser_level) and ($LOGuser_level < 9) ) { @@ -2620,6 +2965,13 @@ else echo "
AGC Delete Phones: $NWB#vicidial_users-ast_delete_phones$NWE
Modify Leads: $NWB#vicidial_users-modify_leads$NWE
Change Agent Campaign: $NWB#vicidial_users-change_agent_campaign$NWE
Scheduled Callbacks: $NWB#vicidial_users-scheduled_callbacks$NWE
Agent-Only Callbacks: $NWB#vicidial_users-agentonly_callbacks$NWE
Agent Call Manual: $NWB#vicidial_users-agentcall_manual$NWE
Vicidial Recording: $NWB#vicidial_users-vicidial_recording$NWE
Vicidial Transfers: $NWB#vicidial_users-vicidial_transfers$NWE
Delete Filters: $NWB#vicidial_users-delete_filters$NWE
Inbound Groups: \n"; echo "$groups_list"; echo "$NWB#vicidial_users-closer_campaigns$NWE
\n"; echo "\n"; +echo "\n"; + echo "\n"; echo "\n"; @@ -2767,9 +3129,9 @@ echo "\n"; -echo "\n"; echo "\n"; @@ -2786,6 +3148,10 @@ echo "\n"; +echo "\n"; + +echo "\n"; + echo "\n"; echo "
\n"; echo ""; $stmt="SELECT * from vicidial_campaigns where campaign_id='$campaign_id';"; @@ -2678,6 +3031,10 @@ if ($ADD==31) $xferconf_a_number = $row[30]; $xferconf_b_dtmf = $row[31]; $xferconf_b_number = $row[32]; + $alt_number_dialing = $row[33]; + $scheduled_callbacks = $row[34]; + $lead_filter_id = $row[35]; + if ($lead_filter_id=='') {$lead_filter_id='NONE';} echo "
MODIFY A CAMPAIGNS RECORD: $row[0] - Basic View | Detail View\n"; echo "\n"; @@ -2741,6 +3098,11 @@ echo "$NWB#vicidial_campaigns-dial_status$NWE
List Order: $NWB#vicidial_campaigns-lead_order$NWE
Lead Filter: $NWB#vicidial_campaigns-lead_filter_id$NWE
Hopper Level: $NWB#vicidial_campaigns-hopper_level$NWE
Force Reset of Hopper: $NWB#vicidial_campaigns-force_reset_hopper$NWE
Campaign Recording: Campaign Rec Filename: $NWB#vicidial_campaigns-campaign_rec_filename$NWE
Script:
Script: $NWB#vicidial_campaigns-campaign_script$NWE
Get Call Launch: $NWB#vicidial_campaigns-get_call_launch$NWE
Transfer-Conf DTMF 2: Transfer-Conf Number 2: $NWB#vicidial_campaigns-xferconf_a_dtmf$NWE
Scheduled Callbacks: $NWB#vicidial_campaigns-scheduled_callbacks$NWE
Agent Alt Num Dialing: $NWB#vicidial_campaigns-alt_number_dialing$NWE
\n"; @@ -2864,14 +3230,6 @@ echo "
\n"; $GMT_allowed = "$GMT_allowed'99'"; - - - - - - - - echo "
\n"; echo "
LISTS WITHIN THIS CAMPAIGN:   $NWB#vicidial_campaign_lists$NWE
\n"; echo "\n"; @@ -2903,9 +3261,16 @@ echo "\n"; echo "
LIST IDLIST NAMEACTIVE

\n"; echo "
\n"; +$filterSQL = $filtersql_list[$lead_filter_id]; +$filterSQL = eregi_replace("^and|and$|^or|or$","",$filterSQL); +if (strlen($filterSQL)>4) + {$fSQL = "and $filterSQL";} +else + {$fSQL = '';} + $camp_lists = eregi_replace(".$","",$camp_lists); echo "This campaign has $active_lists active lists and $inactive_lists inactive lists

\n"; - $stmt="SELECT count(*) FROM vicidial_list where called_since_last_reset='N' and status IN('$dial_status_a','$dial_status_b','$dial_status_c','$dial_status_d','$dial_status_e') and list_id IN($camp_lists) and gmt_offset_now IN($GMT_allowed)"; + $stmt="SELECT count(*) FROM vicidial_list where called_since_last_reset='N' and status IN('$dial_status_a','$dial_status_b','$dial_status_c','$dial_status_d','$dial_status_e') and list_id IN($camp_lists) and gmt_offset_now IN($GMT_allowed) $fSQL"; if ($DB) {echo "$stmt\n";} $rsltx=mysql_query($stmt, $link); $rsltx_rows = mysql_num_rows($rsltx); @@ -3028,6 +3393,7 @@ if ($LOGdelete_campaigns > 0) if ($ADD==34) { +echo "\n"; echo "\n"; +echo "\n"; + echo "\n"; echo "\n"; echo "\n"; -echo "\n"; +echo "\n"; echo "\n"; @@ -3229,9 +3602,16 @@ echo "\n"; echo "
\n"; echo ""; $stmt="SELECT * from vicidial_campaigns where campaign_id='$campaign_id';"; @@ -3050,6 +3416,8 @@ if ($ADD==34) $campaign_vdad_exten = $row[21]; $script_id = $row[25]; $get_call_launch = $row[26]; + $lead_filter_id = $row[35]; + if ($lead_filter_id=='') {$lead_filter_id='NONE';} echo "
MODIFY A CAMPAIGN'S RECORD: $row[0] - Basic View | Detail View
\n"; echo "\n"; @@ -3109,13 +3477,18 @@ echo "$NWB#vicidial_campaigns-dial_status$NWE
List Order: $NWB#vicidial_campaigns-lead_order$NWE
Lead Filter: $NWB#vicidial_campaigns-lead_filter_id$NWE
Hopper Level: $NWB#vicidial_campaigns-hopper_level$NWE
Force Reset of Hopper: $NWB#vicidial_campaigns-force_reset_hopper$NWE
Auto Dial Level: (0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE
Script: $script_id
Script: $script_id
Get Call Launch: $get_call_launch
LIST IDLIST NAMEACTIVE

\n"; echo "
\n"; +$filterSQL = $filtersql_list[$lead_filter_id]; +$filterSQL = eregi_replace("^and|and$|^or|or$","",$filterSQL); +if (strlen($filterSQL)>4) + {$fSQL = "and $filterSQL";} +else + {$fSQL = '';} + $camp_lists = eregi_replace(".$","",$camp_lists); echo "This campaign has $active_lists active lists and $inactive_lists inactive lists

\n"; - $stmt="SELECT count(*) FROM vicidial_list where called_since_last_reset='N' and status IN('$dial_status_a','$dial_status_b','$dial_status_c','$dial_status_d','$dial_status_e') and list_id IN($camp_lists) and gmt_offset_now IN($GMT_allowed)"; + $stmt="SELECT count(*) FROM vicidial_list where called_since_last_reset='N' and status IN('$dial_status_a','$dial_status_b','$dial_status_c','$dial_status_d','$dial_status_e') and list_id IN($camp_lists) and gmt_offset_now IN($GMT_allowed) $fSQL"; if ($DB) {echo "$stmt\n";} $rsltx=mysql_query($stmt, $link); $rsltx_rows = mysql_num_rows($rsltx); @@ -3274,6 +3654,7 @@ if ($LOGdelete_campaigns > 0) if ($ADD==311) { +echo "
\n"; echo ""; $stmt="SELECT * from vicidial_lists where list_id='$list_id';"; @@ -3611,6 +3992,7 @@ if ($LOGdelete_lists > 0) if ($ADD==3111) { +echo "\n"; echo "\n"; -echo "\n"; echo "\n"; @@ -3680,6 +4062,7 @@ if ($LOGdelete_ingroups > 0) if ($ADD==31111) { +echo "
\n"; echo ""; $stmt="SELECT * from vicidial_inbound_groups where group_id='$group_id';"; @@ -3643,9 +4025,9 @@ echo "
Voicemail: Next Agent Call: $NWB#vicidial_inbound_groups-next_agent_call$NWE
Fronter Display: $NWB#vicidial_inbound_groups-fronter_display$NWE
Script:
Script: $NWB#vicidial_inbound_groups-ingroup_script$NWE
Get Call Launch: $NWB#vicidial_inbound_groups-get_call_launch$NWE
\n"; echo ""; $stmt="SELECT * from vicidial_remote_agents where remote_agent_id='$remote_agent_id';"; @@ -3731,6 +4114,7 @@ if ($LOGdelete_remote_agents > 0) if ($ADD==311111) { +echo "
\n"; echo ""; $stmt="SELECT * from vicidial_user_groups where user_group='$user_group';"; @@ -3763,6 +4147,7 @@ if ($LOGdelete_user_groups > 0) if ($ADD==3111111) { +echo "
\n"; echo ""; $stmt="SELECT * from vicidial_scripts where script_id='$script_id';"; @@ -3793,6 +4178,42 @@ if ($LOGdelete_scripts > 0) } +###################### +# ADD=31111111 modify filter info in the system +###################### + +if ($ADD==31111111) +{ +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "
\n"; + echo ""; + + $stmt="SELECT * from vicidial_lead_filters where lead_filter_id='$lead_filter_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $lead_filter_name = $row[1]; + $lead_filter_comments = $row[2]; + $lead_filter_sql = $row[3]; +echo ""; + +echo "
MODIFY A FILTER\n"; +echo "\n"; +echo "\n"; +echo "
Filter ID: $lead_filter_id$NWB#vicidial_lead_filters-lead_filter_id$NWE
Filter Name: (short description of the filter)$NWB#vicidial_lead_filters-lead_filter_name$NWE
Filter Comments: $NWB#vicidial_lead_filters-lead_filter_comments$NWE
Filter SQL: $NWB#vicidial_lead_filters-lead_filter_sql$NWE
\n"; + +if ($LOGdelete_filters > 0) + { + echo "

DELETE THIS FILTER\n"; + } + +} + + + @@ -3803,6 +4224,7 @@ if ($LOGdelete_scripts > 0) if ($ADD==55) { +echo "
\n"; echo ""; echo "
SEARCH FOR A USER\n"; @@ -3836,6 +4258,7 @@ echo "
\n"; if ($ADD==66) { +echo "
\n"; echo ""; $SQL = ''; @@ -3884,7 +4307,7 @@ if ($ADD==8) { echo ""; - $stmt="SELECT * from vicidial_callbacks where status='ACTIVE' and user='$user' order by callback_time desc"; + $stmt="SELECT * from vicidial_callbacks where status IN('ACTIVE','LIVE') and user='$user' order by recipient,status desc,callback_time desc"; $rslt=mysql_query($stmt, $link); $cb_to_print = mysql_num_rows($rslt); @@ -3899,7 +4322,7 @@ if ($ADD==81) { echo ""; - $stmt="SELECT * from vicidial_callbacks where status='ACTIVE' and campaign_id='$campaign_id' order by callback_time desc"; + $stmt="SELECT * from vicidial_callbacks where status IN('ACTIVE','LIVE') and campaign_id='$campaign_id' order by recipient,status desc,callback_time desc"; $rslt=mysql_query($stmt, $link); $cb_to_print = mysql_num_rows($rslt); @@ -3914,7 +4337,7 @@ if ($ADD==811) { echo ""; - $stmt="SELECT * from vicidial_callbacks where status='ACTIVE' and list_id='$list_id' order by callback_time desc"; + $stmt="SELECT * from vicidial_callbacks where status IN('ACTIVE','LIVE') and list_id='$list_id' order by recipient,status desc,callback_time desc"; $rslt=mysql_query($stmt, $link); $cb_to_print = mysql_num_rows($rslt); @@ -3927,8 +4350,9 @@ $ADD='82'; ###################### if ($ADD==82) { +echo "
\n"; echo "
\n"; -echo "\n"; +echo "\n"; $o=0; while ($cb_to_print > $o) { @@ -3945,6 +4369,7 @@ echo ""; echo ""; echo ""; + echo ""; echo "\n"; $o++; } @@ -3965,6 +4390,7 @@ echo "
LEADLISTCAMPAIGNENTRY DATECALLBACK DATEUSERRECIPIENT
LEADLISTCAMPAIGNENTRY DATECALLBACK DATEUSERRECIPIENTSTATUS
LEAD$row[6]$row[8]$row[9]$row[4]
\n"; ###################### if ($ADD==0) { +echo "
\n"; echo ""; $stmt="SELECT * from vicidial_users order by full_name"; @@ -3994,6 +4420,7 @@ echo "
\n"; ###################### if ($ADD==10) { +echo "
\n"; echo ""; $stmt="SELECT * from vicidial_campaigns order by campaign_id"; @@ -4028,6 +4455,7 @@ echo "
\n"; ###################### if ($ADD==100) { +echo "
\n"; echo ""; $stmt="SELECT * from vicidial_lists order by list_id"; @@ -4062,6 +4490,7 @@ echo "
\n"; ###################### if ($ADD==1000) { +echo "
\n"; echo ""; $stmt="SELECT * from vicidial_inbound_groups order by group_id"; @@ -4096,6 +4525,7 @@ echo "
\n"; ###################### if ($ADD==10000) { +echo "
\n"; echo ""; $stmt="SELECT * from vicidial_remote_agents order by server_ip,campaign_id,user_start"; @@ -4131,6 +4561,7 @@ echo "
\n"; ###################### if ($ADD==100000) { +echo "
\n"; echo ""; $stmt="SELECT * from vicidial_user_groups order by user_group"; @@ -4162,6 +4593,7 @@ echo "
\n"; ###################### if ($ADD==1000000) { +echo "
\n"; echo ""; $stmt="SELECT * from vicidial_scripts order by script_id"; @@ -4188,6 +4620,42 @@ echo "
\n"; } +###################### +# ADD=10000000 display all filters +###################### +if ($ADD==10000000) +{ +echo "
\n"; + + echo ""; + + $stmt="SELECT * from vicidial_lead_filters order by lead_filter_id"; + $rslt=mysql_query($stmt, $link); + $filters_to_print = mysql_num_rows($rslt); + +echo "
LEAD FILTER LISTINGS:\n"; +echo "
\n"; + + $o=0; + while ($filters_to_print > $o) { + $row=mysql_fetch_row($rslt); + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + echo ""; + echo ""; + echo "\n"; + $o++; + } + +echo "
$row[0] $row[1]MODIFY
\n"; +} + + + + +echo "
\n"; $ENDtime = date("U"); @@ -4196,7 +4664,9 @@ $RUNtime = ($ENDtime - $STARTtime); echo "\n\n\n


\n\n"; -echo "\n\n\n


\nscript runtime: $RUNtime seconds
"; +echo "\n\n\n


\nscript runtime: $RUNtime seconds"; +echo "             VERSION: $version"; +echo "             BUILD: $build
\n"; ?> @@ -4210,11 +4680,4 @@ echo "\n\n\n


\nscript runtime: $RUNtime seconds
"; exit; - - ?> - - - - - diff --git a/VICIDIAL_web/admin_modify_lead.php b/VICIDIAL_web/admin_modify_lead.php index 9440ee5..614aae4 100644 --- a/VICIDIAL_web/admin_modify_lead.php +++ b/VICIDIAL_web/admin_modify_lead.php @@ -42,12 +42,22 @@ $comments=$_GET["comments"]; if (!$comments) {$comments=$_POST["comments"];} $status=$_GET["status"]; if (!$status) {$status=$_POST["status"];} $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 ### 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 +# CHANGES +# +# 60419-1705 Added ability to change lead callback record from USERONLY to ANYONE or USERONLY-user +# $STARTtime = date("U"); $TODAY = date("Y-m-d"); @@ -144,6 +154,37 @@ $call_length = ($STARTtime - $call_began); } 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 "
vicidial_callback record changed to ANYONE
\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 "
vicidial_callback record user changed to $CBuser
\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 "
vicidial_callback record changed to USERONLY, user: $CBuser
\n"; + } + + + $stmt="SELECT count(*) from vicidial_list where lead_id='$lead_id'"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} @@ -243,6 +284,56 @@ else echo "
\n"; echo "


\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 "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "

\n"; + + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "New Callback Owner UserID: \n"; + echo "

\n"; + } + else + { + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "New Callback Owner UserID: \n"; + echo "

\n"; + } + } + else + { + echo "
No Callback records found
\n"; + } + } + + + + + + } else { diff --git a/agc/vdc_db_query.php b/agc/vdc_db_query.php index f68ef1c..fc56aac 100644 --- a/agc/vdc_db_query.php +++ b/agc/vdc_db_query.php @@ -95,10 +95,11 @@ # 60413-1541 Added USERONLY Callback listings output - CalLBacKLisT # Added USERONLY Callback count output - CalLBacKCounT # 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'; -$build = '60414-1140'; +$version = '0.0.29'; +$build = '60419-1517'; 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';"; if ($format=='debug') {echo "\n";} $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";} + $rslt=mysql_query($stmt, $link); + } } else { diff --git a/agc/vicidial.php b/agc/vicidial.php index 25bd9b7..ad3a322 100644 --- a/agc/vicidial.php +++ b/agc/vicidial.php @@ -95,6 +95,10 @@ ### 60414-1039 - Changed manual dial preview and alt dial checkboxes to spans ### - Added beta-level USERONLY callback 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"); @@ -113,8 +117,8 @@ $relogin=$_GET['relogin']; if (!$relogin) {$relogin=$_POST["relogin"];} $forever_stop=0; -$version = '1.1.71'; -$build = '60414-1039'; +$version = '1.1.74'; +$build = '60419-1529'; 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 $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_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 $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 -$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 $agentcallsstatus = '1'; # set to 1 to show agent status and call count $campagentstatctmax = '0'; # Number of seconds for campaign call and agent stats $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='_'; $CL=':'; $AT='@'; @@ -368,13 +374,18 @@ $VDloginDISPLAY=0; $login=strtoupper($VD_login); $password=strtoupper($VD_pass); ##### 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); $row=mysql_fetch_row($rslt); $LOGfullname=$row[0]; $user_level=$row[1]; $VU_hotkeys_active=$row[2]; $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"); fclose($fp); @@ -481,7 +492,7 @@ $VDloginDISPLAY=0; } ##### 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); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); @@ -509,6 +520,17 @@ $VDloginDISPLAY=0; $xferconf_a_number = $row[21]; $xferconf_b_dtmf = $row[22]; $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 $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 = '' var campagentstatctmax = '' 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 VU_vicidial_transfers = '' var agentonly_callbacks = '' var agentcall_manual = '' var manual_dial_preview = '' - var manual_dial_alt_phone = '' + var alt_phone_dialing = '' var DiaLControl_auto_HTML = "\"Pause\"\"Resume\""; var DiaLControl_auto_HTML_ready = "\"Pause\"\"Resume\""; var DiaLControl_auto_HTML_OFF = "\"Pause\"\"Resume\""; - var DiaLControl_manual_HTML = "\"Dial"; + var DiaLControl_manual_HTML = "\"Dial"; var image_blank = new Image(); image_blank.src="./images/blank.gif"; 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 - function basic_originate_call(tasknum,taskprefix,taskreverse,taskdialvalue) + function basic_originate_call(tasknum,taskprefix,taskreverse,taskdialvalue,tasknowait) { var xmlhttp=false; /*@cc_on @*/ @@ -1484,7 +1511,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { alert(xmlhttp.responseText); - if (taskdialvalue.length > 0) + if ((taskdialvalue.length > 0) && (tasknowait != 'YES')) { XDnextCID = queryCID; 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 function ManualDialAltDonE() { + alt_dial_active = 0; open_dispo_screen=1; 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;} else { - if (auto_dial_level == 0) + if (alt_phone_dialing == 1) { if (document.vicidial_form.DiaLAltPhonE.checked==true) { + reselect_alt_dial = 1; + alt_dial_active = 1; var man_status = "Dial Alt Phone Number: MAIN PHONE or ALT PHONE or ADDRESS3 or FINISH LEAD"; 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 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"); } @@ -2199,25 +2229,25 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} function new_callback_call(taskCBid,taskLEADid) { auto_dial_level=0; - callback_in_progress=1; + manual_dial_in_progress=1; MainPanelToFront(); buildDiv('DiaLLeaDPrevieW'); buildDiv('DiaLDiaLAltPhonE'); document.vicidial_form.LeadPreview.checked=true; document.vicidial_form.DiaLAltPhonE.checked=true; hideDiv('CallBacKsLisTBox'); - ManualDialNext(taskCBid,taskLEADid); + ManualDialNext(taskCBid,taskLEADid,'',''); } // ################################################################################ // Finish Callback and go back to original screen - function callback_finished() + function manual_dial_finished() { auto_dial_level=starting_dial_level; MainPanelToFront(); 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 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"); } @@ -2247,12 +2277,12 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (MDDiaLOverridEform.length > 0) { - basic_originate_call(session_id,'NO','YES',MDDiaLOverridEform); + basic_originate_call(session_id,'NO','YES',MDDiaLOverridEform,'YES'); } else { auto_dial_level=0; - callback_in_progress=1; + manual_dial_in_progress=1; MainPanelToFront(); buildDiv('DiaLLeaDPrevieW'); buildDiv('DiaLDiaLAltPhonE'); @@ -2426,11 +2456,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.getElementById("DiaLControl").innerHTML = "\"Dial"; if (document.vicidial_form.LeadPreview.checked==true) { + reselect_preview_dial = 1; var man_preview = 'YES'; var man_status = "Preview the Lead then DIAL LEAD or SKIP LEAD"; } else { + reselect_preview_dial = 0; var man_preview = 'NO'; 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) { + reselect_preview_dial = 0; MD_channel_look=1; custchannellive=1; @@ -2613,12 +2646,10 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } } - - - - - // else - // {alert(document.vicidial_form.lead_id.value);} + else + { + reselect_preview_dial = 1; + } } } } @@ -2631,7 +2662,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // Send the Manual Dial Skip 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'); } @@ -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("DiaLControl").innerHTML = "\"Dial"; + document.getElementById("DiaLControl").innerHTML = "\"Dial"; } } } @@ -3337,16 +3368,33 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { if (document.vicidial_form.DiaLAltPhonE.checked==true) { + reselect_alt_dial = 1; open_dispo_screen=0; } else - {open_dispo_screen=1;} + { + reselect_alt_dial = 0; + open_dispo_screen=1; + } } 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 document.vicidial_form.callchannel.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) { - // do nothing + reselect_alt_dial = 1; } else { - document.getElementById("DiaLControl").innerHTML = "\"Dial"; + document.getElementById("DiaLControl").innerHTML = "\"Dial"; + reselect_alt_dial = 0; } } else { - document.getElementById("MainStatuSSpan").style.background = panel_bgcolor; - document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_OFF; + if (document.vicidial_form.DiaLAltPhonE.checked==true) + { + 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'); @@ -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 function xfercall_send_hangup() @@ -3715,9 +3773,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} VDCL_group_id = ''; fronter = ''; - if (callback_in_progress==1) + if (manual_dial_in_progress==1) { - callback_finished(); + manual_dial_finished(); } hideDiv('DispoSelectBox'); hideDiv('DispoButtonHideA'); @@ -4332,7 +4390,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {hideDiv('AgentStatusSpan');} if ( (auto_dial_level != 0) || (manual_dial_preview != 1) ) {clearDiv('DiaLLeaDPrevieW');} - if ( (auto_dial_level != 0) || (manual_dial_alt_phone != 1) ) + if (alt_phone_dialing != 1) {clearDiv('DiaLDiaLAltPhonE');} 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) { - document.getElementById("DiaLControl").innerHTML = "\"Dial"; + reselect_alt_dial = 1; + document.getElementById("DiaLControl").innerHTML = "\"Dial"; document.getElementById("MainStatuSSpan").innerHTML = "Dial Next Call"; } + else + { + reselect_alt_dial = 0; + } } } if (AgentDispoing==1) @@ -4626,15 +4689,21 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (divvar == 'DiaLLeaDPrevieW') { var buildDivHTML = " LEAD PREVIEW
"; + document.getElementById(divvar).innerHTML = buildDivHTML; + if (reselect_preview_dial==1) + {document.vicidial_form.LeadPreview.checked=true} } if (divvar == 'DiaLDiaLAltPhonE') { var buildDivHTML = " ALT PHONE DIAL
"; + 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) { 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) { - if (showxfervar == 'ON') + if (VU_vicidial_transfers == '1') { - HKbutton_allowed = 0; - showDiv('TransferMain'); - document.getElementById("XferControl").innerHTML = "\"Transfer"; + if (showxfervar == 'ON') + { + HKbutton_allowed = 0; + showDiv('TransferMain'); + document.getElementById("XferControl").innerHTML = "\"Transfer"; + } + else + { + HKbutton_allowed = 1; + hideDiv('TransferMain'); + if (showoffvar == 'YES') + { + document.getElementById("XferControl").innerHTML = "\"Transfer"; + } + } } else { - HKbutton_allowed = 1; - hideDiv('TransferMain'); - if (showoffvar == 'YES') - { - document.getElementById("XferControl").innerHTML = "\"Transfer"; - } + alert('YOU DO NOT HAVE PERMISSIONS TO TRANSFER CALLS'); } - } function MainPanelToFront(resumevar) @@ -4715,19 +4790,28 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} showDiv('MainPanel'); if (resumevar != 'NO') { + if (alt_phone_dialing == 1) + {buildDiv('DiaLDiaLAltPhonE');} + else + {clearDiv('DiaLDiaLAltPhonE');} if (auto_dial_level == 0) { - document.getElementById("DiaLControl").innerHTML = DiaLControl_manual_HTML; - if (manual_dial_preview == 1) - {buildDiv('DiaLLeaDPrevieW');} - if (manual_dial_alt_phone != 1) - {buildDiv('DiaLDiaLAltPhonE');} + if (auto_dial_alt_dial==1) + { + auto_dial_alt_dial=0; + document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_OFF; + } + else + { + document.getElementById("DiaLControl").innerHTML = DiaLControl_manual_HTML; + if (manual_dial_preview == 1) + {buildDiv('DiaLLeaDPrevieW');} + } } else { document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML; clearDiv('DiaLLeaDPrevieW'); - clearDiv('DiaLDiaLAltPhonE'); } } panel_bgcolor='#E0C2D6'; @@ -5056,7 +5140,7 @@ Your Status:
Calls Dialing:
-Dial Next Number
+Dial Next Number
LEAD PREVIEW
ALT PHONE DIAL
@@ -5064,7 +5148,7 @@ Your Status:
Calls Dialing: LEAD PREVIEW
";} -if ( ($manual_dial_alt_phone) and ($auto_dial_level==0) ) +if ( ($alt_phone_dialing) and ($auto_dial_level==0) ) {echo " ALT PHONE DIAL
";} diff --git a/agi-VDADlisten_DTMF.agi b/agi-VDADlisten_DTMF.agi new file mode 100644 index 0000000..b77dca7 --- /dev/null +++ b/agi-VDADlisten_DTMF.agi @@ -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 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() { + 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"); +} + diff --git a/docs/SCRATCH_INSTALL.txt b/docs/SCRATCH_INSTALL.txt index f8679c1..ca8e710 100644 --- a/docs/SCRATCH_INSTALL.txt +++ b/docs/SCRATCH_INSTALL.txt @@ -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: - 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 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 typing "screen -r " find which screen by typing "screen -r" and 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 VICIDIAL campaign and users diff --git a/docs/TODO.txt b/docs/TODO.txt index 5948434..ca4d18c 100644 --- a/docs/TODO.txt +++ b/docs/TODO.txt @@ -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 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 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 @@ -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 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 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 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 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 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 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 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. diff --git a/upgrade_1.1.11.sql b/upgrade_1.1.11.sql new file mode 100644 index 0000000..92980bb --- /dev/null +++ b/upgrade_1.1.11.sql @@ -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';