diff --git a/agc_2-X/trunk/bin/AST_DB_optimize.pl b/agc_2-X/trunk/bin/AST_DB_optimize.pl index c2aac765..32a22159 100644 --- a/agc_2-X/trunk/bin/AST_DB_optimize.pl +++ b/agc_2-X/trunk/bin/AST_DB_optimize.pl @@ -12,6 +12,7 @@ # CHANGES # 60717-1242 - changed to DBI by Marin Blu # 60718-1645 - changed to use /etc/astguiclient.conf for configs +# 71030-2020 - Added deletions of stats and inbound live agents # # default path to astguiclient configuration file: @@ -246,6 +247,39 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA $sthA->finish(); } + $stmtA = "delect from vicidial_campaign_stats;"; + if($DB){print STDERR "\n|$stmtA|\n";} + if (!$T) { + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + @aryA = $sthA->fetchrow_array; + if (!$Q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";} + $sthA->finish(); + } + + $stmtA = "delect from vicidial_campaign_server_stats;"; + if($DB){print STDERR "\n|$stmtA|\n";} + if (!$T) { + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + @aryA = $sthA->fetchrow_array; + if (!$Q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";} + $sthA->finish(); + } + + $stmtA = "delect from vicidial_live_inbound_agents;"; + if($DB){print STDERR "\n|$stmtA|\n";} + if (!$T) { + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + @aryA = $sthA->fetchrow_array; + if (!$Q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";} + $sthA->finish(); + } + $dbhA->disconnect(); diff --git a/agc_2-X/trunk/bin/AST_VDauto_dial.pl b/agc_2-X/trunk/bin/AST_VDauto_dial.pl index e2039440..ae4822bc 100644 --- a/agc_2-X/trunk/bin/AST_VDauto_dial.pl +++ b/agc_2-X/trunk/bin/AST_VDauto_dial.pl @@ -64,6 +64,7 @@ # 70302-1412 - Fixed max_vicidial_trunks update if set to 0 # 70320-1458 - Fixed several errors in calculating trunk shortage for campaigns # 71029-1909 - Changed CLOSER-type campaign_id restriction +# 71030-2054 - Added hopper priority sorting # @@ -693,7 +694,7 @@ while($one_day_interval > 0) my $UDaffected_rows=0; if ($call_CMPIPct < $DBIPmakecalls[$user_CIPct]) { - $stmtA = "UPDATE vicidial_hopper set status='QUEUE', user='VDAD_$server_ip' where campaign_id='$DBIPcampaign[$user_CIPct]' and status='READY' order by hopper_id LIMIT $DBIPmakecalls[$user_CIPct]"; + $stmtA = "UPDATE vicidial_hopper set status='QUEUE', user='VDAD_$server_ip' where campaign_id='$DBIPcampaign[$user_CIPct]' and status='READY' order by priority desc,hopper_id LIMIT $DBIPmakecalls[$user_CIPct]"; print "|$stmtA|\n"; $UDaffected_rows = $dbhA->do($stmtA); print "hopper rows updated to QUEUE: |$UDaffected_rows|\n"; @@ -703,7 +704,7 @@ while($one_day_interval > 0) $lead_id=''; $phone_code=''; $phone_number=''; $called_count=''; while ($call_CMPIPct < $UDaffected_rows) { - $stmtA = "SELECT lead_id,alt_dial FROM vicidial_hopper where campaign_id='$DBIPcampaign[$user_CIPct]' and status='QUEUE' and user='VDAD_$server_ip' LIMIT 1"; + $stmtA = "SELECT lead_id,alt_dial FROM vicidial_hopper where campaign_id='$DBIPcampaign[$user_CIPct]' and status='QUEUE' and user='VDAD_$server_ip' order by priority desc,hopper_id LIMIT 1"; print "|$stmtA|\n"; $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; @@ -1059,7 +1060,7 @@ while($one_day_interval > 0) $sthA->finish(); if (length($VD_alt_phone)>5) { - $stmtA = "INSERT INTO vicidial_hopper SET lead_id='$CLlead_id',campaign_id='$CLcampaign_id',status='READY',list_id='$VD_list_id',gmt_offset_now='$VD_gmt_offset_now',state='$VD_state',alt_dial='ALT',user='';"; + $stmtA = "INSERT INTO vicidial_hopper SET lead_id='$CLlead_id',campaign_id='$CLcampaign_id',status='READY',list_id='$VD_list_id',gmt_offset_now='$VD_gmt_offset_now',state='$VD_state',alt_dial='ALT',user='',priority='25';"; $affected_rows = $dbhA->do($stmtA); if ($AGILOG) {$agi_string = "-- VDH record inserted: |$affected_rows| |$stmtA|"; &agi_output;} } @@ -1086,7 +1087,7 @@ while($one_day_interval > 0) $sthA->finish(); if (length($VD_address3)>5) { - $stmtA = "INSERT INTO vicidial_hopper SET lead_id='$CLlead_id',campaign_id='$CLcampaign_id',status='READY',list_id='$VD_list_id',gmt_offset_now='$VD_gmt_offset_now',state='$VD_state',alt_dial='ADDR3',user='';"; + $stmtA = "INSERT INTO vicidial_hopper SET lead_id='$CLlead_id',campaign_id='$CLcampaign_id',status='READY',list_id='$VD_list_id',gmt_offset_now='$VD_gmt_offset_now',state='$VD_state',alt_dial='ADDR3',user='',priority='20';"; $affected_rows = $dbhA->do($stmtA); if ($AGILOG) {$agi_string = "-- VDH record inserted: |$affected_rows| |$stmtA|"; &agi_output;} } diff --git a/agc_2-X/trunk/bin/AST_VDauto_dial_FILL.pl b/agc_2-X/trunk/bin/AST_VDauto_dial_FILL.pl index 0d8cd6ab..737025ea 100644 --- a/agc_2-X/trunk/bin/AST_VDauto_dial_FILL.pl +++ b/agc_2-X/trunk/bin/AST_VDauto_dial_FILL.pl @@ -18,6 +18,7 @@ # 61115-1246 - First build, framework setup, non-functional # 61120-2008 - second alpha version, functional and tested in production # 70205-1425 - Added code for last called date update +# 71030-2054 - Added hopper priority sorting # @@ -540,7 +541,7 @@ while($one_day_interval > 0) my $UDaffected_rows=0; if ($call_CMPIPct < $DB_camp_server_trunks_to_dial[$server_CIPct]) { - $stmtA = "UPDATE vicidial_hopper set status='QUEUE', user='VDAD_$DB_camp_server_server_ip[$server_CIPct]' where campaign_id='$DBfill_campaign[$camp_CIPct]' and status='READY' order by hopper_id LIMIT $DB_camp_server_trunks_to_dial[$server_CIPct]"; + $stmtA = "UPDATE vicidial_hopper set status='QUEUE', user='VDAD_$DB_camp_server_server_ip[$server_CIPct]' where campaign_id='$DBfill_campaign[$camp_CIPct]' and status='READY' order by priority desc,hopper_id LIMIT $DB_camp_server_trunks_to_dial[$server_CIPct]"; print "|$stmtA|\n"; $UDaffected_rows = $dbhA->do($stmtA); print "hopper rows updated to QUEUE: |$UDaffected_rows|\n"; @@ -550,7 +551,7 @@ while($one_day_interval > 0) $lead_id=''; $phone_code=''; $phone_number=''; $called_count=''; while ($call_CMPIPct < $UDaffected_rows) { - $stmtA = "SELECT lead_id FROM vicidial_hopper where campaign_id='$DBfill_campaign[$camp_CIPct]' and status='QUEUE' and user='VDAD_$DB_camp_server_server_ip[$server_CIPct]' LIMIT 1"; + $stmtA = "SELECT lead_id FROM vicidial_hopper where campaign_id='$DBfill_campaign[$camp_CIPct]' and status='QUEUE' and user='VDAD_$DB_camp_server_server_ip[$server_CIPct]' order by priority desc,hopper_id LIMIT 1"; print "|$stmtA|\n"; $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; diff --git a/agc_2-X/trunk/bin/AST_VDhopper.pl b/agc_2-X/trunk/bin/AST_VDhopper.pl index 8145290b..924b7327 100644 --- a/agc_2-X/trunk/bin/AST_VDhopper.pl +++ b/agc_2-X/trunk/bin/AST_VDhopper.pl @@ -45,6 +45,7 @@ # 61110-1513 - Changed Xth NEW to fill to hopper_level with standard if not enough NEW # 70219-1247 - Changed to use dial_statuses field instead of dial_status_x fields # 71029-1929 - Added 5th and 6th NEW to list order +# 71030-2043 - Added hopper priority for callbacks # # constants @@ -360,7 +361,7 @@ if ($CBHOLD_count > 0) $event_string = "|CALLBACKS LISTACT|$affected_rows|"; &event_logger; - $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]',user='',state='$CA_state[$CAu]';"; + $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]',user='',state='$CA_state[$CAu]',priority='50';"; $affected_rows = $dbhA->do($stmtA); if ($DB) {print "ANYONE Scheduled Callback Inserted into hopper: $affected_rows|$CA_lead_id[$CAu]\n";} $CAu++; @@ -1246,7 +1247,7 @@ foreach(@campaign_id) } if ($DNClead == '0') { - $stmtA = "INSERT INTO $vicidial_hopper (lead_id,campaign_id,status,user,list_id,gmt_offset_now,state) values('$leads_to_hopper[$h]','$campaign_id[$i]','READY','','$lists_to_hopper[$h]','$gmt_to_hopper[$h]','$state_to_hopper[$h]');"; + $stmtA = "INSERT INTO $vicidial_hopper (lead_id,campaign_id,status,user,list_id,gmt_offset_now,state,priority) values('$leads_to_hopper[$h]','$campaign_id[$i]','READY','','$lists_to_hopper[$h]','$gmt_to_hopper[$h]','$state_to_hopper[$h]','0');"; $affected_rows = $dbhA->do($stmtA); if ($DBX) {print "LEAD INSERTED: $affected_rows|$leads_to_hopper[$h]|\n";} } diff --git a/agc_2-X/trunk/bin/AST_VDhopper_MIXtest.pl b/agc_2-X/trunk/bin/AST_VDhopper_MIXtest.pl index bf95eba3..75bb1a6d 100644 --- a/agc_2-X/trunk/bin/AST_VDhopper_MIXtest.pl +++ b/agc_2-X/trunk/bin/AST_VDhopper_MIXtest.pl @@ -47,6 +47,7 @@ # 70708-1218 - Start of List-Mix-aware version of the hopper script # 70709-2033 - Functional Beta of List-Mix-aware version of the hopper script # 71029-1929 - Added 5th and 6th NEW to list order +# 71030-2043 - Added hopper priority for callbacks # # constants @@ -362,7 +363,7 @@ if ($CBHOLD_count > 0) $event_string = "|CALLBACKS LISTACT|$affected_rows|"; &event_logger; - $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]',user='',state='$CA_state[$CAu]';"; + $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]',user='',state='$CA_state[$CAu]',priority='50';"; $affected_rows = $dbhA->do($stmtA); if ($DB) {print "ANYONE Scheduled Callback Inserted into hopper: $affected_rows|$CA_lead_id[$CAu]\n";} $CAu++; @@ -1382,7 +1383,7 @@ foreach(@campaign_id) } if ($DNClead == '0') { - $stmtA = "INSERT INTO $vicidial_hopper (lead_id,campaign_id,status,user,list_id,gmt_offset_now,state) values('$leads_to_hopper[$h]','$campaign_id[$i]','READY','','$lists_to_hopper[$h]','$gmt_to_hopper[$h]','$state_to_hopper[$h]');"; + $stmtA = "INSERT INTO $vicidial_hopper (lead_id,campaign_id,status,user,list_id,gmt_offset_now,state,priority) values('$leads_to_hopper[$h]','$campaign_id[$i]','READY','','$lists_to_hopper[$h]','$gmt_to_hopper[$h]','$state_to_hopper[$h]','0');"; $affected_rows = $dbhA->do($stmtA); if ($DBX) {print "LEAD INSERTED: $affected_rows|$leads_to_hopper[$h]|\n";} } diff --git a/agc_2-X/trunk/bin/FastAGI_log.pl b/agc_2-X/trunk/bin/FastAGI_log.pl index dc53eee2..8efa3bb9 100644 --- a/agc_2-X/trunk/bin/FastAGI_log.pl +++ b/agc_2-X/trunk/bin/FastAGI_log.pl @@ -32,7 +32,8 @@ # 70116-1619 - Added Auto Alt Dial code # 70215-1258 - Added queue_log entry when deleting vac record # 70808-1425 - Moved VD_hangup section to the call_log end stage to improve efficiency -# +# 71030-2039 - Added priority to hopper insertions +# # defaults for PreFork @@ -812,7 +813,7 @@ sub process_request { $sthA->finish(); if (length($VD_alt_phone)>5) { - $stmtA = "INSERT INTO vicidial_hopper SET lead_id='$VD_lead_id',campaign_id='$VD_campaign_id',status='READY',list_id='$VD_list_id',gmt_offset_now='$VD_gmt_offset_now',state='$VD_state',alt_dial='ALT',user='';"; + $stmtA = "INSERT INTO vicidial_hopper SET lead_id='$VD_lead_id',campaign_id='$VD_campaign_id',status='READY',list_id='$VD_list_id',gmt_offset_now='$VD_gmt_offset_now',state='$VD_state',alt_dial='ALT',user='',priority='25';"; $affected_rows = $dbhA->do($stmtA); if ($AGILOG) {$agi_string = "-- VDH record inserted: |$affected_rows| |$stmtA|"; &agi_output;} } @@ -839,7 +840,7 @@ sub process_request { $sthA->finish(); if (length($VD_address3)>5) { - $stmtA = "INSERT INTO vicidial_hopper SET lead_id='$VD_lead_id',campaign_id='$VD_campaign_id',status='READY',list_id='$VD_list_id',gmt_offset_now='$VD_gmt_offset_now',state='$VD_state',alt_dial='ADDR3',user='';"; + $stmtA = "INSERT INTO vicidial_hopper SET lead_id='$VD_lead_id',campaign_id='$VD_campaign_id',status='READY',list_id='$VD_list_id',gmt_offset_now='$VD_gmt_offset_now',state='$VD_state',alt_dial='ADDR3',user='',priority='20';"; $affected_rows = $dbhA->do($stmtA); if ($AGILOG) {$agi_string = "-- VDH record inserted: |$affected_rows| |$stmtA|"; &agi_output;} } diff --git a/agc_2-X/trunk/docs/IE_INCOMPATIBILITIES.txt b/agc_2-X/trunk/docs/IE_INCOMPATIBILITIES.txt index 25bed9fb..ea564347 100644 --- a/agc_2-X/trunk/docs/IE_INCOMPATIBILITIES.txt +++ b/agc_2-X/trunk/docs/IE_INCOMPATIBILITIES.txt @@ -1,10 +1,12 @@ Microsoft Internet Explorer Incompatibilities with VICIDIAL Agent Interface 2007-06-13 +*** AS OF RELEASE 2.0.4 VICIDIAL IS COMPATIBLE WITH IE 6.0 *** + There are quite a few issues with using Microsoft Internet Explorer(IE) with VICIDIAL because of incompatibilites with the W3C standards as well as stability and architectural issues. -The decision was made to stop testing on IE because of time constraints as well as the lack of cross-compatibility of IE and lack of compatibility with standards. Firefox meets both of those requirements which is why that is the recommended platform for VICIDIAL agents. +The decision was made to stop testing on IE because of time constraints as well as the lack of cross-compatibility of IE and lack of compatibility with standards, even between IE versions. Firefox meets all compatibility requirements which is why that is the recommended platform for VICIDIAL agents. -If enough time is available during developent of 2.0.4, there will be some time put into addressing these IE incompatibilities. +As of release 2.0.4 of astguiclient, IE 5.0 and 5.5 compatibility was broken to make VICIDIAL fully compatible with IE 6.0. Along with this change, all of the memory issues were fixed, along with several features that were not working before in IE like HotKeys. Some of the issues include the following: diff --git a/agc_2-X/trunk/docs/INBOUND-CLOSER_PROCESS.txt b/agc_2-X/trunk/docs/INBOUND-CLOSER_PROCESS.txt index 26937804..056fbed6 100644 --- a/agc_2-X/trunk/docs/INBOUND-CLOSER_PROCESS.txt +++ b/agc_2-X/trunk/docs/INBOUND-CLOSER_PROCESS.txt @@ -3,9 +3,10 @@ INOUND/CLOSER proces flow 2007-05-02 ** THIS FULLY REDONE INBOUND-CLOSER PROSESS IS PLANNED FOR THE 2.0.4 RELEASE ** This will outline the process I have thought through in my head for rewriting the inbound and closer call queueing and handling processes within VICIDIAL. The objective is to add the following features to make VICIDIAL a more well-rounded product: -- consolidate the 9 VDAD inbound scripts into one script with CLI options +- consolidate the 12 VDAD inbound and closer scripts into one script with CLI options - custom hold music per in-group - put call_times into effect for in-groups allowing calls coming in after hours to be directed to another extension or voicemail box +- allow any campaign to take inbound calls, removing the restriction on campaign_id name for that purpose - add concurrent-transfers options to inbound groups - announce estimated time on hold - announce place in line @@ -54,6 +55,8 @@ ALTER TABLE vicidial_user_groups ADD default_xfer_inbound_group VARCHAR(20) The Server Side: For inbound and closer transfers, the agi_VDAD... scripts will still run as they normally do now, but after 5 seconds, without a transfer to an agent, the customer will be put into the new call-queue manager which will consist of a constantly running perl script(we will call it "AST_VD_hold_queue.pl") that will keep track of the call while it is still active and before it gets sent to an agent, and an AGI script(we will call this one agi-VD_queue_prompts.agi) that will perform the dynamic functions of speaking the customer's place in line, estimated hold time and offer the option to press a DTMF digit and either leave a message for the agent to take the call or leave a callback number to be called back when their turn arrives. This script will also have to somehow keep the vicidial_auto_calls records active even after a customer has hung up in order to preserve place-in-line and allow for playing of a customer message or callback to a customer. +*** This section to be removed due to change in architecture it was not implemented *** + Here is a process flow explanation of how a call would move through the hold queue: - Call comes in to the agi_VDADcloser... script and cannot find an agent to send the call to within 5 seconds - the agi_VDADcloser script changes the status of the call in vicidial_auto_calls to HOLDP and sends the call to the extension that the agi-VD_queue_prompts.agi script is on(defined in the servers table, default will be 8359) diff --git a/agc_2-X/trunk/docs/SCRATCH_INSTALL.txt b/agc_2-X/trunk/docs/SCRATCH_INSTALL.txt index b17e071e..67026470 100644 --- a/agc_2-X/trunk/docs/SCRATCH_INSTALL.txt +++ b/agc_2-X/trunk/docs/SCRATCH_INSTALL.txt @@ -2852,8 +2852,13 @@ 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 -### VICIDIAL agent time log weekly summary report generation +### VICIDIAL agent time log weekly and daily summary report generation 2 0 * * 0 /usr/share/astguiclient/AST_agent_week.pl +22 0 * * * /usr/share/astguiclient/AST_agent_day.pl + +### VICIDIAL campaign export scripts (OPTIONAL) +#32 0 * * * /usr/share/astguiclient/AST_VDsales_export.pl +#42 0 * * * /usr/share/astguiclient/AST_sourceID_summary_export.pl ### remove old recordings more than 7 days old 24 0 * * * /usr/bin/find /var/spool/asterisk/monitor -maxdepth 2 -type f -mtime +7 -print | xargs rm -f @@ -2871,6 +2876,12 @@ looking for the lowest screen number. Then to detach again from the screen while you are in it type 'Ctrl+a' then 'd' - you are done +NOTES: +- The AST_agent_day.pl and AST_agent_week.pl scripts create an ASCII fixed-length report of all agent activity on the system +- The AST_VDsales_export.pl script allows for the exporting(into several different formats) of specified vicidial_list data based on status and campaign as well as inbound group +- The AST_sourceID_summary_export.pl script summarizes leads in the system by source_id and generates a text report + + diff --git a/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql b/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql index 77c38a9b..da7a60ae 100644 --- a/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql +++ b/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql @@ -287,6 +287,7 @@ list_id BIGINT(14) UNSIGNED NOT NULL, gmt_offset_now DECIMAL(4,2) DEFAULT '0.00', state VARCHAR(2) default '', alt_dial ENUM('NONE','ALT','ADDR3') default 'NONE', +priority TINYINT(2) default '0', index (lead_id) ); @@ -525,7 +526,9 @@ campaign_logindate DATETIME, dial_statuses VARCHAR(255) default ' NEW -', disable_alter_custdata ENUM('Y','N') default 'N', no_hopper_leads_logins ENUM('Y','N') default 'N', -list_order_mix VARCHAR(20) default 'DISABLED' +list_order_mix VARCHAR(20) default 'DISABLED', +campaign_allow_inbound ENUM('Y','N') default 'N', +manual_dial_list_id BIGINT(14) UNSIGNED ); CREATE TABLE vicidial_lists ( diff --git a/agc_2-X/trunk/agi/VD_hangup.agi b/agc_2-X/trunk/extras/old_agi/VD_hangup.agi similarity index 100% rename from agc_2-X/trunk/agi/VD_hangup.agi rename to agc_2-X/trunk/extras/old_agi/VD_hangup.agi diff --git a/agc_2-X/trunk/agi/call_log.agi b/agc_2-X/trunk/extras/old_agi/call_log.agi similarity index 100% rename from agc_2-X/trunk/agi/call_log.agi rename to agc_2-X/trunk/extras/old_agi/call_log.agi diff --git a/agc_2-X/trunk/agi/call_logCID.agi b/agc_2-X/trunk/extras/old_agi/call_logCID.agi similarity index 100% rename from agc_2-X/trunk/agi/call_logCID.agi rename to agc_2-X/trunk/extras/old_agi/call_logCID.agi diff --git a/agc_2-X/trunk/extras/upgrade_2.0.4.sql b/agc_2-X/trunk/extras/upgrade_2.0.4.sql index 22550862..d54d45d5 100644 --- a/agc_2-X/trunk/extras/upgrade_2.0.4.sql +++ b/agc_2-X/trunk/extras/upgrade_2.0.4.sql @@ -103,8 +103,15 @@ index (group_id), index (user) ); +ALTER TABLE vicidial_campaigns ADD campaign_allow_inbound ENUM('Y','N') default 'N'; +UPDATE vicidial_campaigns SET campaign_allow_inbound='Y' where campaign_id REGEXP '(CLOSER|BLEND|INBND|_C\$|_B\$|_I\$)'; +INSERT INTO vicidial_lists SET list_id='999',list_name='Default inbound list',campaign_id='TESTCAMP',active='N'; + +ALTER TABLE vicidial_campaigns ADD manual_dial_list_id BIGINT(14) UNSIGNED default '999'; + +ALTER TABLE vicidial_hopper ADD priority TINYINT(2) default '0'; CREATE TABLE vicidial_live_inbound_agents ( @@ -118,19 +125,10 @@ index (group_id), index (group_weight) ); -ALTER TABLE vicidial_campaigns ADD campaign_allow_inbound ENUM('Y','N') default 'N'; - -UPDATE vicidial_campaigns SET campaign_allow_inbound='Y' where campaign_id REGEXP '(CLOSER|BLEND|INBND|_C\$|_B\$|_I\$)'; - -INSERT INTO vicidial_lists SET list_id='999',list_name='Default inbound list',campaign_id='TESTCAMP',active='N'; - #!!!!!!! CHANGES BELOW THIS LINE ARE NOT FOR PRODUCTION USE YET, DO NOT APPLY THEM!!!!!!!!!!!!!!!!!!!!! # -# -#ALTER TABLE vicidial_hopper ADD priority TINYINT(2) default '50'; -# #ALTER TABLE vicidial_inbound_groups ADD announce_place_in_line ENUM('Y','N') default 'N'; #ALTER TABLE vicidial_inbound_groups ADD announce_estimate_hold_time ENUM('Y','N') default 'N'; #ALTER TABLE vicidial_inbound_groups ADD allow_leave_queue_place ENUM('Y','N') default 'N'; diff --git a/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.4.txt b/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.4.txt index 19413bb6..d7517da0 100644 --- a/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.4.txt +++ b/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.4.txt @@ -107,6 +107,8 @@ Agent Alert Delay: || You will also be able to set the rank, or skill level, in this section for each of the inbound groups as well as being able to see the number of calls received from each inbound group for this specific agent|| Allow Inbound and Blended -<\/B> This is where you can set whether the users of this campaign will have the option to take inbound calls with this campaign. If you want to do blended inbound and outbound then this must be set to Y. If you only want to do outbound dialing on this campaign set this to N. Default is N|| Allow Inbound and Blended: || +Manual Dial List ID -<\/B> The default list_id to be used when an agent placces a manual call and a new lead record is created in vicidial_list. Default is 999. This field can contain digits only|| +Manual Dial List ID: || ############################################################ CLIENT diff --git a/agc_2-X/trunk/www/agc/vdc_db_query.php b/agc_2-X/trunk/www/agc/vdc_db_query.php index cc9a00f0..592c1100 100644 --- a/agc_2-X/trunk/www/agc/vdc_db_query.php +++ b/agc_2-X/trunk/www/agc/vdc_db_query.php @@ -133,10 +133,11 @@ # 70802-1729 - Fixed bugs with pause_sec and wait_sec under certain call handling # 70828-1443 - Added source_id to output of SCRIPTtab-IFRAME and WEBFORM # 71029-1855 - removed campaign_id naming restrictions for CLOSER-type campaigns +# 71030-2047 - added hopper priority for auto alt dial entries # -$version = '2.0.4-60'; -$build = '71029-1855'; +$version = '2.0.4-61'; +$build = '71030-2047'; require("dbconnect.php"); @@ -1064,8 +1065,8 @@ if ($stage == "end") else {$alt_phone = '';} if (strlen($alt_phone)>5) { - ### insert record into vicidial_hopper for address3 call attempt - $stmt = "INSERT INTO vicidial_hopper SET lead_id='$lead_id',campaign_id='$campaign',status='HOLD',list_id='$list_id',gmt_offset_now='$gmt_offset_now',state='$state',alt_dial='ALT',user='';"; + ### insert record into vicidial_hopper for alt_phone call attempt + $stmt = "INSERT INTO vicidial_hopper SET lead_id='$lead_id',campaign_id='$campaign',status='HOLD',list_id='$list_id',gmt_offset_now='$gmt_offset_now',state='$state',alt_dial='ALT',user='',priority='25';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); } @@ -1088,7 +1089,7 @@ if ($stage == "end") if (strlen($address3)>5) { ### insert record into vicidial_hopper for address3 call attempt - $stmt = "INSERT INTO vicidial_hopper SET lead_id='$lead_id',campaign_id='$campaign',status='HOLD',list_id='$list_id',gmt_offset_now='$gmt_offset_now',state='$state',alt_dial='ADDR3',user='';"; + $stmt = "INSERT INTO vicidial_hopper SET lead_id='$lead_id',campaign_id='$campaign',status='HOLD',list_id='$list_id',gmt_offset_now='$gmt_offset_now',state='$state',alt_dial='ADDR3',user='',priority='20';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); } diff --git a/agc_2-X/trunk/www/agc/vicidial.php b/agc_2-X/trunk/www/agc/vicidial.php index 4f911856..159d1fa0 100644 --- a/agc_2-X/trunk/www/agc/vicidial.php +++ b/agc_2-X/trunk/www/agc/vicidial.php @@ -622,7 +622,7 @@ $VDloginDISPLAY=0; $HKstatusnames = substr("$HKstatusnames", 0, -1); ##### grab the statuses to be dialed for your campaign as well as other campaign settings - $stmt="SELECT 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,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,agent_pause_codes_active,no_hopper_leads_logins,campaign_allow_inbound FROM vicidial_campaigns where campaign_id = '$VD_campaign';"; + $stmt="SELECT 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,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,agent_pause_codes_active,no_hopper_leads_logins,campaign_allow_inbound,manual_dial_list_id FROM vicidial_campaigns where campaign_id = '$VD_campaign';"; if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} @@ -657,6 +657,7 @@ $VDloginDISPLAY=0; $agent_pause_codes_active = $row[27]; $no_hopper_leads_logins = $row[28]; $campaign_allow_inbound = $row[29]; + $manual_dial_list_id = $row[30]; if ( (!ereg('DISABLED',$VU_vicidial_recording_override)) and ($VU_vicidial_recording > 0) ) { @@ -1603,7 +1604,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var reselect_preview_dial = 0; var reselect_alt_dial = 0; var alt_dial_active = 0; - var mdnLisT_id = '999'; + var mdnLisT_id = ''; var VU_vicidial_transfers = ''; var agentonly_callbacks = ''; var agentcall_manual = ''; @@ -6177,7 +6178,7 @@ echo "\n"; echo "Note: a dial prefix of $dial_prefix will be added to the beginning of this number
\n"; } ?> - Note: all new manual dial leads will go into list 999

+ Note: all new manual dial leads will go into list

diff --git a/agc_2-X/trunk/www/vicidial/AST_VICIDIAL_hopperlist.php b/agc_2-X/trunk/www/vicidial/AST_VICIDIAL_hopperlist.php index 97bbe4fe..a30832be 100644 --- a/agc_2-X/trunk/www/vicidial/AST_VICIDIAL_hopperlist.php +++ b/agc_2-X/trunk/www/vicidial/AST_VICIDIAL_hopperlist.php @@ -9,6 +9,7 @@ # - Added required user/pass to gain access to this page # 70115-1614 - Added ALT field for vicidial_hopper alt_dial column # 71029-0852 - Added list_id to the output +# 71030-2118 - Added priority to display # require("dbconnect.php"); @@ -124,11 +125,11 @@ echo "Total leads in hopper right now: $TOTALcalls\n"; echo "\n"; echo "---------- LEADS IN HOPPER\n"; -echo "+------+-----------+------------+------------+-------+--------+-------+--------+-------+\n"; -echo "| | LEAD_ID | LIST ID | PHONE NUM | STATE | STATUS | COUNT | GMT | ALT |\n"; -echo "+------+-----------+------------+------------+-------+--------+-------+--------+-------+\n"; +echo "+------+--------+-----------+------------+------------+-------+--------+-------+--------+-------+\n"; +echo "|ORDER |PRIORITY| LEAD ID | LIST ID | PHONE NUM | STATE | STATUS | COUNT | GMT | ALT |\n"; +echo "+------+--------+-----------+------------+------------+-------+--------+-------+--------+-------+\n"; -$stmt="select vicidial_hopper.lead_id,phone_number,vicidial_hopper.state,vicidial_list.status,called_count,vicidial_hopper.gmt_offset_now,hopper_id,alt_dial,vicidial_hopper.list_id from vicidial_hopper,vicidial_list where vicidial_hopper.campaign_id='" . mysql_real_escape_string($group) . "' and vicidial_hopper.lead_id=vicidial_list.lead_id order by hopper_id limit 2000;"; +$stmt="select vicidial_hopper.lead_id,phone_number,vicidial_hopper.state,vicidial_list.status,called_count,vicidial_hopper.gmt_offset_now,hopper_id,alt_dial,vicidial_hopper.list_id,vicidial_hopper.priority from vicidial_hopper,vicidial_list where vicidial_hopper.campaign_id='" . mysql_real_escape_string($group) . "' and vicidial_hopper.lead_id=vicidial_list.lead_id order by priority desc,hopper_id limit 2000;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $users_to_print = mysql_num_rows($rslt); @@ -147,14 +148,15 @@ while ($i < $users_to_print) $hopper_id = sprintf("%-6s", $row[6]); $alt_dial = sprintf("%-5s", $row[7]); $list_id = sprintf("%-10s", $row[8]); + $priority = sprintf("%-6s", $row[9]); -if ($DB) {echo "| $FMT_i | $lead_id | $list_id | $phone_number | $state | $status | $count | $gmt | $hopper_id |\n";} -else {echo "| $FMT_i | $lead_id | $list_id | $phone_number | $state | $status | $count | $gmt | $alt_dial |\n";} +if ($DB) {echo "| $FMT_i | $priority | $lead_id | $list_id | $phone_number | $state | $status | $count | $gmt | $hopper_id |\n";} +else {echo "| $FMT_i | $priority | $lead_id | $list_id | $phone_number | $state | $status | $count | $gmt | $alt_dial |\n";} $i++; } -echo "+------+-----------+------------+------------+-------+--------+-------+--------+-------+\n"; +echo "+------+--------+-----------+------------+------------+-------+--------+-------+--------+-------+\n"; } diff --git a/agc_2-X/trunk/www/vicidial/admin.php b/agc_2-X/trunk/www/vicidial/admin.php index a1b73363..97b2ed94 100644 --- a/agc_2-X/trunk/www/vicidial/admin.php +++ b/agc_2-X/trunk/www/vicidial/admin.php @@ -655,6 +655,8 @@ if (isset($_GET["group_rank"])) {$group_rank=$_GET["group_rank"];} elseif (isset($_POST["group_rank"])) {$group_rank=$_POST["group_rank"];} if (isset($_GET["campaign_allow_inbound"])) {$campaign_allow_inbound=$_GET["campaign_allow_inbound"];} elseif (isset($_POST["campaign_allow_inbound"])) {$campaign_allow_inbound=$_POST["campaign_allow_inbound"];} +if (isset($_GET["manual_dial_list_id"])) {$manual_dial_list_id=$_GET["manual_dial_list_id"];} + elseif (isset($_POST["manual_dial_list_id"])) {$manual_dial_list_id=$_POST["manual_dial_list_id"];} if (isset($script_id)) {$script_id= strtoupper($script_id);} @@ -792,6 +794,7 @@ $allow_sipsak_messages = ereg_replace("[^0-9]","",$allow_sipsak_messages); $mix_container_item = ereg_replace("[^0-9]","",$mix_container_item); $prompt_interval = ereg_replace("[^0-9]","",$prompt_interval); $agent_alert_delay = ereg_replace("[^0-9]","",$agent_alert_delay); +$manual_dial_list_id = ereg_replace("[^0-9]","",$manual_dial_list_id); ### DIGITS and DASHES $group_rank = ereg_replace("[^-0-9]","",$group_rank); @@ -1113,11 +1116,13 @@ $list_mix_container = ereg_replace(";","",$list_mix_container); # 71022-1343 - Added inbound group ranks for users # 71029-1710 - Added option for campaign to be inbound and/or blended with no restrictions on the campaign_id name # - Added 5th NEW and 6th NEW to the dial order options +# 71030-2010 - Added Manual Dial List ID field to campaigns table +# # # make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time -$admin_version = '2.0.4-112'; -$build = '71029-1710'; +$admin_version = '2.0.4-113'; +$build = '71030-2010'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -2210,6 +2215,12 @@ echo "
Dial Code:   (This is usually a 1 in the USA-Canada)
\n"; + echo "\n"; + $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id' and campaign_allow_inbound='Y'"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt);
List Mix Method - The method of mixing all of the parts of the List Mix Detail together. EVEN_MIX will mix leads from each part interleaved with the other parts, like this 1,2,3,1,2,3,1,2,3. IN_ORDER will put the leads in the order in which they are listed in the List Mix Detail screen 1,1,1,2,2,2,3,3,3. RANDOM will put them in RANDOM order 1,3,2,1,1,3,2,1,3. Default is IN_ORDER. +
+ +
+Manual Dial List ID - The default list_id to be used when an agent placces a manual call and a new lead record is created in vicidial_list. Default is 999. This field can contain digits only. + +



@@ -5543,7 +5554,7 @@ if ($ADD==41) if ( (!ereg("DISABLED",$list_order_mix)) and ($hopper_level < 100) ) {$hopper_level='100';} - $stmtA="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', $adlSQL 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='" . mysql_real_escape_string($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',safe_harbor_message='$safe_harbor_message',drop_call_seconds='$drop_call_seconds',safe_harbor_exten='$safe_harbor_exten',wrapup_seconds='$wrapup_seconds',wrapup_message='$wrapup_message',closer_campaigns='$groups_value',use_internal_dnc='$use_internal_dnc',allcalls_delay='$allcalls_delay',omit_phone_code='$omit_phone_code',dial_method='$dial_method',available_only_ratio_tally='$available_only_ratio_tally',adaptive_dropped_percentage='$adaptive_dropped_percentage',adaptive_maximum_level='$adaptive_maximum_level',adaptive_latest_server_time='$adaptive_latest_server_time',adaptive_intensity='$adaptive_intensity',adaptive_dl_diff_target='$adaptive_dl_diff_target',concurrent_transfers='$concurrent_transfers',auto_alt_dial='$auto_alt_dial',agent_pause_codes_active='$agent_pause_codes_active',campaign_description='$campaign_description',campaign_changedate='$SQLdate',campaign_stats_refresh='$campaign_stats_refresh',disable_alter_custdata='$disable_alter_custdata',no_hopper_leads_logins='$no_hopper_leads_logins',list_order_mix='$list_order_mix',campaign_allow_inbound='$campaign_allow_inbound' where campaign_id='$campaign_id';"; + $stmtA="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', $adlSQL 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='" . mysql_real_escape_string($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',safe_harbor_message='$safe_harbor_message',drop_call_seconds='$drop_call_seconds',safe_harbor_exten='$safe_harbor_exten',wrapup_seconds='$wrapup_seconds',wrapup_message='$wrapup_message',closer_campaigns='$groups_value',use_internal_dnc='$use_internal_dnc',allcalls_delay='$allcalls_delay',omit_phone_code='$omit_phone_code',dial_method='$dial_method',available_only_ratio_tally='$available_only_ratio_tally',adaptive_dropped_percentage='$adaptive_dropped_percentage',adaptive_maximum_level='$adaptive_maximum_level',adaptive_latest_server_time='$adaptive_latest_server_time',adaptive_intensity='$adaptive_intensity',adaptive_dl_diff_target='$adaptive_dl_diff_target',concurrent_transfers='$concurrent_transfers',auto_alt_dial='$auto_alt_dial',agent_pause_codes_active='$agent_pause_codes_active',campaign_description='$campaign_description',campaign_changedate='$SQLdate',campaign_stats_refresh='$campaign_stats_refresh',disable_alter_custdata='$disable_alter_custdata',no_hopper_leads_logins='$no_hopper_leads_logins',list_order_mix='$list_order_mix',campaign_allow_inbound='$campaign_allow_inbound',manual_dial_list_id='$manual_dial_list_id' where campaign_id='$campaign_id';"; $rslt=mysql_query($stmtA, $link); if ($reset_hopper == 'Y') @@ -8348,6 +8359,7 @@ if ($ADD==31) $no_hopper_leads_logins = $row[63]; $list_order_mix = $row[64]; $campaign_allow_inbound = $row[65]; + $manual_dial_list_id = $row[66]; if (ereg("DISABLED",$list_order_mix)) {$DEFlistDISABLE = ''; $DEFstatusDISABLED=0;} @@ -8640,6 +8652,8 @@ if ($ADD==31) echo "
Allow No-Hopper-Leads Logins: $NWB#vicidial_campaigns-no_hopper_leads_logins$NWE
Manual Dial List ID: $NWB#vicidial_campaigns-manual_dial_list_id$NWE