added queue priority to in-groups and campaigns(admin.php, AST_VDauto_dial.pl, AST_timeonVDADall.php, agi-VDAD_ALL_inbound.agi)

updated UPGRADE doc

git-svn-id: svn://192.168.202.10@784 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2008-02-27 09:23:54 +00:00
parent 65f86c9490
commit 147fe706f1
9 changed files with 283 additions and 43 deletions
+15
View File
@@ -19,6 +19,21 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom
\. /path/from/root/extras/upgrade_2.0.5.sql
quit
3. Several of the MySQL tables have been changed to a HEAP type to reside in
memory to improve performance.
4. Added the ability for inbound and blended agents to choose their selected
in-groups without logging out. The new GROUPS link at the top of the
agent screen(vicidial.php) can be used when an agent is Paused to
change their selected groups and whether they are set to do Blended
calling or not. There is also a new log with the details of what
groups an agent has selected each time in the user stats page.
5. The start of a new QC (Quality Control) feature [non functional right now]
6. Queue Priority has been added allowing for the prioritization of one in-group
over another in-group or outbound campaign(when in blended mode)
+136 -12
View File
@@ -55,6 +55,7 @@
# 71116-1045 - added fewest_calls_campaign agent call routing option
# 71128-1758 - added CIDLOOKUPRC method to search all lists within a campaign
# 80109-2348 - added option to trigger a system process when the call is sent to an agent
# 80227-0335 - added queue priority functionality
#
$script = 'agi-VDAD_ALL_inbound.agi';
@@ -341,7 +342,7 @@ $sthA->finish();
### Grab inbound groups values from the database
$cbc=0;
$stmtA = "SELECT call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,drop_call_seconds,drop_message,drop_exten,next_agent_call,voicemail_ext FROM vicidial_inbound_groups where group_id = '$channel_group';";
$stmtA = "SELECT call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,drop_call_seconds,drop_message,drop_exten,next_agent_call,voicemail_ext,queue_priority FROM vicidial_inbound_groups where group_id = '$channel_group';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -367,6 +368,7 @@ while ($sthArows > $cbc)
$CAMP_callorder = "$aryA[14]";
$VDADvoicemail_ext = "$aryA[15]";
$VDADvoicemail_ext =~ s/\D//gi;
$queue_priority = "$aryA[16]";
$cbc++;
}
$sthA->finish();
@@ -665,7 +667,7 @@ if ($call_handle_method =~ /CLOSER|DIGITID$/)
}
### insert a LIVE record to the vicidial_auto_calls table
$stmtA = "INSERT INTO vicidial_auto_calls (server_ip,campaign_id,status,lead_id,uniqueid,callerid,channel,phone_code,phone_number,call_time,call_type,stage) values('$VARserver_ip','$channel_group','LIVE','$insert_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate','IN','LIVE-0')";
$stmtA = "INSERT INTO vicidial_auto_calls (server_ip,campaign_id,status,lead_id,uniqueid,callerid,channel,phone_code,phone_number,call_time,call_type,stage,queue_priority) values('$VARserver_ip','$channel_group','LIVE','$insert_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate','IN','LIVE-0','$queue_priority')";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$affected_rows = $dbhA->do($stmtA);
@@ -690,6 +692,9 @@ $drop_seconds=0;
$hold_message_counter=($prompt_interval - 10);
$hold_tone_counter=0;
############################################
### Loop to try to send call to an agent ###
while ($drop_timer <= $DROP_TIME)
{
$channel_status = $AGI->channel_status("$channel");
@@ -711,6 +716,8 @@ if ($channel_status < 1)
$rec_countCUSTDATA=0;
$rec_countWAIT=0;
$gsp_countWAIT=0;
$qp_countWAIT=0;
$cbc=0;
$aco_sub=0;
$agent_call_order='order by last_call_finish';
@@ -724,16 +731,32 @@ if ($channel_status < 1)
if ($CAMP_callorder =~ /fewest_calls/i) {$aco_sub=1; $agent_call_order = 'order by calls_today';}
$vci=0;
$INBOUNDcampsSQL='';
$stmtA = "SELECT campaign_id FROM vicidial_campaigns where active='Y' and campaign_allow_inbound='Y';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
while ($sthArows > $vci)
{
@aryA = $sthA->fetchrow_array;
if ($vci==0) {$INBOUNDcampsSQL .= "'$aryA[0]'";}
else {$INBOUNDcampsSQL .= ",'$aryA[0]'";}
$vci++;
}
$sthA->finish();
################################################################
##### Attempt to send call to an agent on this server only #####
if ($agent_search_method =~ /^SO|^LO/)
{
### Get count of number of calls in this group that are ahead of this call
$stmtA = "SELECT count(*) FROM vicidial_auto_calls where status = 'LIVE' and server_ip='$VARserver_ip' and campaign_id = '$channel_group' and call_time < \"$SQLdateBEGIN\" and lead_id != '$insert_lead_id';";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
while ($sthArows > $cbc)
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$rec_countWAIT = "$aryA[0]";
@@ -743,12 +766,61 @@ if ($agent_search_method =~ /^SO|^LO/)
if ($rec_countWAIT < 1)
{
$qp_countWAIT=0;
### Get count of number of waiting calls in higher priority groups than this call or the same priority with longer wait time
$stmtA = "SELECT count(*) FROM vicidial_auto_calls where status = 'LIVE' and server_ip='$VARserver_ip' and lead_id != '$insert_lead_id' and ( (queue_priority > '$queue_priority') or (queue_priority = '$queue_priority' and call_time < \"$SQLdateBEGIN\"));";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$qp_countWAIT = "$aryA[0]";
}
$sthA->finish();
$qp_groupWAIT='';
$qp_groupWAIT_SQL='';
$qp_groupWAIT_aco='';
$qp_groupWAIT_aco_SQL='';
$qp_groupWAIT_camp_SQL='';
if ($qp_countWAIT > 0)
{
### Get group/campaign ids of calls in higher priority groups than this call or the same priority with longer wait time
$stmtA = "SELECT distinct campaign_id FROM vicidial_auto_calls where status = 'LIVE' and server_ip='$VARserver_ip' and lead_id != '$insert_lead_id' and ( (queue_priority > '$queue_priority') or (queue_priority = '$queue_priority' and call_time < \"$SQLdateBEGIN\") );";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$dbc=0;
$qp_groupWAIT='';
while ($sthArows > $dbc)
{
@aryA = $sthA->fetchrow_array;
$qp_groupWAIT_aco .= "'$aryA[0]',";
if ($dbc > 0)
{
$qp_groupWAIT .= "and ";
}
$qp_groupWAIT .= "closer_campaigns NOT LIKE \"% $aryA[0] %\" ";
$dbc++;
}
chop($qp_groupWAIT_aco);
$qp_groupWAIT_SQL = "and ($qp_groupWAIT)";
$qp_groupWAIT_aco_SQL = "and vicidial_live_inbound_agents.group_id NOT IN($qp_groupWAIT_aco)";
$qp_groupWAIT_camp_SQL = "and campaign_id NOT IN($qp_groupWAIT_aco)";
$sthA->finish();
}
if ($aco_sub>0)
{
$stmtA = "LOCK TABLES vicidial_live_agents WRITE, vicidial_live_inbound_agents WRITE;";
my $LOCKaffected_rows = $dbhA->do($stmtA);
$stmtA = "SELECT vicidial_live_agents.conf_exten,vicidial_live_agents.user,vicidial_live_agents.extension from vicidial_live_agents JOIN vicidial_live_inbound_agents ON vicidial_live_agents.user=vicidial_live_inbound_agents.user WHERE status IN('CLOSER','READY') and server_ip='$VARserver_ip' and vicidial_live_inbound_agents.group_id='$channel_group' and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;";
$stmtA = "SELECT vicidial_live_agents.conf_exten,vicidial_live_agents.user,vicidial_live_agents.extension from vicidial_live_agents JOIN vicidial_live_inbound_agents ON vicidial_live_agents.user=vicidial_live_inbound_agents.user WHERE status IN('CLOSER','READY') and server_ip='$VARserver_ip' and vicidial_live_inbound_agents.group_id='$channel_group' and last_update_time > '$BDtsSQLdate' $qp_groupWAIT_aco_SQL $qp_groupWAIT_camp_SQL $agent_call_order limit 1;";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
@@ -779,7 +851,7 @@ if ($agent_search_method =~ /^SO|^LO/)
}
else
{
$stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$insert_lead_id',uniqueid='$unique_id', channel='$channel', callerid='$callerid' where status IN('CLOSER','READY') and server_ip='$VARserver_ip' and campaign_id IN($INBOUNDcampsSQL) and closer_campaigns LIKE \"% $channel_group %\" and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;";
$stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$insert_lead_id',uniqueid='$unique_id', channel='$channel', callerid='$callerid' where status IN('CLOSER','READY') and server_ip='$VARserver_ip' and campaign_id IN($INBOUNDcampsSQL) and closer_campaigns LIKE \"% $channel_group %\" and last_update_time > '$BDtsSQLdate' $qp_groupWAIT_SQL $qp_groupWAIT_camp_SQL $agent_call_order limit 1;";
my $affected_rows = $dbhA->do($stmtA);
$found_agents=$affected_rows;
}
@@ -813,7 +885,7 @@ if ($agent_search_method =~ /^SO|^LO/)
if ($AGILOG) {$agi_string = "-- VDCL XFER : |$affected_rows|$callerid\n|$stmtA|"; &agi_output;}
if ($affected_rows < 1)
{
$stmtA = "INSERT INTO vicidial_auto_calls (server_ip,campaign_id,status,lead_id,uniqueid,callerid,channel,phone_code,phone_number,call_time,call_type,stage) values('$VARserver_ip','$channel_group','CLOSER','$insert_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate','IN','CLOSER-$drop_timer')";
$stmtA = "INSERT INTO vicidial_auto_calls (server_ip,campaign_id,status,lead_id,uniqueid,callerid,channel,phone_code,phone_number,call_time,call_type,stage,queue_priority) values('$VARserver_ip','$channel_group','CLOSER','$insert_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate','IN','CLOSER-$drop_timer','$queue_priority')";
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "$affected_rows|VDAC-reinsert|$stmtA|"; &agi_output;}
}
@@ -938,12 +1010,13 @@ if ($agent_search_method =~ /^LO|^LB/)
##### Attempt to send call to an agent on any server #####
$cbc=0;
$rec_countWAITrem=0;
### Get count of number of calls in this group that are ahead of this call
$stmtA = "SELECT count(*) FROM vicidial_auto_calls where status = 'LIVE' and campaign_id = '$channel_group' and call_time < \"$SQLdateBEGIN\" and lead_id != '$insert_lead_id';";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
while ($sthArows > $cbc)
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$rec_countWAITrem = "$aryA[0]";
@@ -953,12 +1026,63 @@ if ($agent_search_method =~ /^LO|^LB/)
if ($rec_countWAITrem < 1)
{
$qp_countWAIT=0;
### Get count of number of waiting calls in higher priority groups than this call or the same priority with longer wait time
$stmtA = "SELECT count(*) FROM vicidial_auto_calls where status = 'LIVE' and lead_id != '$insert_lead_id' and ( (queue_priority > '$queue_priority') or (queue_priority = '$queue_priority' and call_time < \"$SQLdateBEGIN\") );";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$qp_countWAIT = "$aryA[0]";
}
$sthA->finish();
$qp_groupWAIT='';
$qp_groupWAIT_SQL='';
$qp_groupWAIT_aco='';
$qp_groupWAIT_aco_SQL='';
$qp_groupWAIT_camp_SQL='';
if ($qp_countWAIT > 0)
{
### Get group/campaign ids of calls in higher priority groups than this call or the same priority with longer wait time
$stmtA = "SELECT distinct campaign_id FROM vicidial_auto_calls where status = 'LIVE' and lead_id != '$insert_lead_id' and ( (queue_priority > '$queue_priority') or (queue_priority = '$queue_priority' and call_time < \"$SQLdateBEGIN\") );";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$dbc=0;
$qp_groupWAIT='';
while ($sthArows > $dbc)
{
@aryA = $sthA->fetchrow_array;
$qp_groupWAIT_aco .= "'$aryA[0]',";
if ($dbc > 0)
{
$qp_groupWAIT .= "and ";
}
$qp_groupWAIT .= "closer_campaigns NOT LIKE \"% $aryA[0] %\" ";
$dbc++;
}
chop($qp_groupWAIT_aco);
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$qp_groupWAIT_SQL = "and ($qp_groupWAIT)";
$qp_groupWAIT_aco_SQL = "and vicidial_live_inbound_agents.group_id NOT IN($qp_groupWAIT_aco)";
$qp_groupWAIT_camp_SQL = "and campaign_id NOT IN($qp_groupWAIT_aco)";
$sthA->finish();
}
if ($aco_sub>0)
{
$stmtA = "LOCK TABLES vicidial_live_agents WRITE, vicidial_live_inbound_agents WRITE;";
my $LOCKaffected_rows = $dbhA->do($stmtA);
$stmtA = "SELECT vicidial_live_agents.conf_exten,vicidial_live_agents.user,vicidial_live_agents.extension,vicidial_live_agents.server_ip from vicidial_live_agents JOIN vicidial_live_inbound_agents ON vicidial_live_agents.user=vicidial_live_inbound_agents.user WHERE status IN('CLOSER','READY') and vicidial_live_inbound_agents.group_id='$channel_group' and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;";
$stmtA = "SELECT vicidial_live_agents.conf_exten,vicidial_live_agents.user,vicidial_live_agents.extension,vicidial_live_agents.server_ip from vicidial_live_agents JOIN vicidial_live_inbound_agents ON vicidial_live_agents.user=vicidial_live_inbound_agents.user WHERE status IN('CLOSER','READY') and vicidial_live_inbound_agents.group_id='$channel_group' and last_update_time > '$BDtsSQLdate' $qp_groupWAIT_aco_SQL $qp_groupWAIT_camp_SQL $agent_call_order limit 1;";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
@@ -991,7 +1115,7 @@ if ($agent_search_method =~ /^LO|^LB/)
}
else
{
$stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$insert_lead_id',uniqueid='$unique_id', channel='$channel', callerid='$callerid', call_server_ip='$VARserver_ip' where status IN('CLOSER','READY') and campaign_id IN($INBOUNDcampsSQL) and closer_campaigns LIKE \"% $channel_group %\" and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;";
$stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$insert_lead_id',uniqueid='$unique_id', channel='$channel', callerid='$callerid', call_server_ip='$VARserver_ip' where status IN('CLOSER','READY') and campaign_id IN($INBOUNDcampsSQL) and closer_campaigns LIKE \"% $channel_group %\" and last_update_time > '$BDtsSQLdate' $qp_groupWAIT_SQL $qp_groupWAIT_camp_SQL $agent_call_order limit 1;";
my $affected_rows = $dbhA->do($stmtA);
$found_agents=$affected_rows;
}
@@ -1023,7 +1147,7 @@ if ($agent_search_method =~ /^LO|^LB/)
if ($AGILOG) {$agi_string = "-- VDCL XFER REMOTE: |$affected_rows|update of vac table: $callerid\n|$stmtA|"; &agi_output;}
if ($affected_rows < 1)
{
$stmtA = "INSERT INTO vicidial_auto_calls (server_ip,campaign_id,status,lead_id,uniqueid,callerid,channel,phone_code,phone_number,call_time,call_type,stage) values('$VARserver_ip','$channel_group','CLOSER','$insert_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate','IN','CLOSER-$drop_timer')";
$stmtA = "INSERT INTO vicidial_auto_calls (server_ip,campaign_id,status,lead_id,uniqueid,callerid,channel,phone_code,phone_number,call_time,call_type,stage,queue_priority) values('$VARserver_ip','$channel_group','CLOSER','$insert_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate','IN','CLOSER-$drop_timer','$queue_priority')";
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "$affected_rows|VDAC-reinsert|$stmtA|"; &agi_output;}
}
@@ -1191,7 +1315,7 @@ $stmtA = "UPDATE vicidial_auto_calls set stage='LIVE-$drop_timer' where callerid
$affected_rows = $dbhA->do($stmtA);
if ($affected_rows < 1)
{
$stmtA = "INSERT INTO vicidial_auto_calls (server_ip,campaign_id,status,lead_id,uniqueid,callerid,channel,phone_code,phone_number,call_time,call_type,stage) values('$VARserver_ip','$channel_group','CLOSER','$insert_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate','IN','CLOSER-$drop_timer')";
$stmtA = "INSERT INTO vicidial_auto_calls (server_ip,campaign_id,status,lead_id,uniqueid,callerid,channel,phone_code,phone_number,call_time,call_type,stage,queue_priority) values('$VARserver_ip','$channel_group','CLOSER','$insert_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate','IN','CLOSER-$drop_timer','$queue_priority')";
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "$affected_rows|VDAC-reinsert|$stmtA|"; &agi_output;}
}
+7 -4
View File
@@ -1,6 +1,6 @@
#!/usr/bin/perl
#
# AST_VDauto_dial.pl version 2.0.3 *DBI-version*
# AST_VDauto_dial.pl version 2.0.5 *DBI-version*
#
# DESCRIPTION:
# Places auto_dial calls on the VICIDIAL dialer system
@@ -25,7 +25,7 @@
# It is good practice to keep this program running by placing the associated
# KEEPALIVE script running every minute to ensure this program is always running
#
# Copyright (C) 2007 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
#
# CHANGELOG:
# 50125-1201 - Changed dial timeout to 120 seconds from 180 seconds
@@ -65,6 +65,7 @@
# 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
# 80227-0406 - added queue_priority
#
@@ -287,6 +288,7 @@ while($one_day_interval > 0)
@DBIPserver_trunks_limit=@MT;
@DBIPserver_trunks_other=@MT;
@DBIPserver_trunks_allowed=@MT;
@DBIPqueue_priority=@MT;
$active_line_counter=0;
$user_counter=0;
@@ -439,7 +441,7 @@ while($one_day_interval > 0)
### grab the dial_level and multiply by active agents to get your goalcalls
$DBIPadlevel[$user_CIPct]=0;
$stmtA = "SELECT auto_dial_level,local_call_time,dial_timeout,dial_prefix,campaign_cid,active,campaign_vdad_exten,closer_campaigns,omit_phone_code,available_only_ratio_tally,auto_alt_dial,campaign_allow_inbound FROM vicidial_campaigns where campaign_id='$DBIPcampaign[$user_CIPct]'";
$stmtA = "SELECT auto_dial_level,local_call_time,dial_timeout,dial_prefix,campaign_cid,active,campaign_vdad_exten,closer_campaigns,omit_phone_code,available_only_ratio_tally,auto_alt_dial,campaign_allow_inbound,queue_priority FROM vicidial_campaigns where campaign_id='$DBIPcampaign[$user_CIPct]'";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -467,6 +469,7 @@ while($one_day_interval > 0)
}
$DBIPautoaltdial[$user_CIPct] = "$aryA[10]";
$DBIPcampaign_allow_inbound[$user_CIPct] = "$aryA[11]";
$DBIPqueue_priority[$user_CIPct] = "$aryA[12]";
$rec_count++;
}
$sthA->finish();
@@ -844,7 +847,7 @@ while($one_day_interval > 0)
&event_logger;
### insert a SENT record to the vicidial_auto_calls table
$stmtA = "INSERT INTO vicidial_auto_calls (server_ip,campaign_id,status,lead_id,callerid,phone_code,phone_number,call_time,call_type,alt_dial) values('$DBIPaddress[$user_CIPct]','$DBIPcampaign[$user_CIPct]','SENT','$lead_id','$VqueryCID','$phone_code','$phone_number','$SQLdate','OUT','$alt_dial')";
$stmtA = "INSERT INTO vicidial_auto_calls (server_ip,campaign_id,status,lead_id,callerid,phone_code,phone_number,call_time,call_type,alt_dial,queue_priority) values('$DBIPaddress[$user_CIPct]','$DBIPcampaign[$user_CIPct]','SENT','$lead_id','$VqueryCID','$phone_code','$phone_number','$SQLdate','OUT','$alt_dial','$DBIPqueue_priority[$user_CIPct]')";
$affected_rows = $dbhA->do($stmtA);
### sleep for a tenth of a second to not flood the server with new calls
+32 -7
View File
@@ -1,6 +1,6 @@
#!/usr/bin/perl
#
# AST_VDauto_dial_FILL.pl version 2.0.3 *DBI-version*
# AST_VDauto_dial_FILL.pl version 2.0.5 *DBI-version*
#
# DESCRIPTION:
# Places auto_dial calls on the VICIDIAL dialer system across all servers only
@@ -12,7 +12,7 @@
#
# Should only be run on one server in a multi-server Asterisk/VICIDIAL cluster
#
# Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
#
# CHANGELOG:
# 61115-1246 - First build, framework setup, non-functional
@@ -20,7 +20,8 @@
# 70205-1425 - Added code for last called date update
# 71030-2054 - Added hopper priority sorting
# 71111-2349 - fixed overdialing bug
#
# 80227-0406 - fixed auto-alt-dial and added queue_priority
#
### begin parsing run-time options ###
@@ -220,6 +221,7 @@ while($one_day_interval > 0)
@DBIPserver_trunks_limit=@MT;
@DBIPserver_trunks_other=@MT;
@DBIPserver_trunks_allowed=@MT;
@DBIPqueue_priority=@MT;
$active_line_counter=0;
$camp_counter=0;
@@ -281,7 +283,7 @@ while($one_day_interval > 0)
### grab the dial_level and multiply by active agents to get your goalcalls
$DBIPadlevel[$camp_CIPct]=0;
$stmtA = "SELECT dial_timeout,dial_prefix,campaign_cid,active,campaign_vdad_exten,omit_phone_code FROM vicidial_campaigns where campaign_id='$DBfill_campaign[$camp_CIPct]'";
$stmtA = "SELECT dial_timeout,dial_prefix,campaign_cid,active,campaign_vdad_exten,omit_phone_code,auto_alt_dial,queue_priority FROM vicidial_campaigns where campaign_id='$DBfill_campaign[$camp_CIPct]'";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -298,6 +300,9 @@ while($one_day_interval > 0)
$omit_phone_code = "$aryA[5]";
if ($omit_phone_code =~ /Y/) {$DBIPomitcode[$camp_CIPct] = 1;}
else {$DBIPomitcode[$camp_CIPct] = 0;}
$DBIPautoaltdial[$camp_CIPct] = "$aryA[6]";
$DBIPqueue_priority[$camp_CIPct] = "$aryA[7]";
$rec_count++;
}
$sthA->finish();
@@ -553,7 +558,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]' order by priority desc,hopper_id LIMIT 1";
$stmtA = "SELECT lead_id,alt_dial 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;
@@ -564,6 +569,7 @@ while($one_day_interval > 0)
{
@aryA = $sthA->fetchrow_array;
$lead_id = "$aryA[0]";
$alt_dial = "$aryA[1]";
$rec_count++;
}
$sthA->finish();
@@ -600,6 +606,8 @@ while($one_day_interval > 0)
$called_since_last_reset = "$aryA[9]";
$phone_code = "$aryA[10]";
$phone_number = "$aryA[11]";
$address3 = "$aryA[18]";
$alt_phone = "$aryA[26]";
$called_count = "$aryA[30]";
$rec_countCUSTDATA++;
@@ -623,7 +631,24 @@ while($one_day_interval > 0)
}
else {$CSLR = 'Y';}
if ( ($alt_dial =~ /ALT|ADDR3/) && ($DBIPautoaltdial[$camp_CIPct] =~ /ALT|ADDR/) )
{
if ( ($alt_dial =~ /ALT/) && ($DBIPautoaltdial[$camp_CIPct] =~ /ALT/) )
{
$alt_phone =~ s/\D//gi;
$phone_number = $alt_phone;
}
if ( ($alt_dial =~ /ADDR3/) && ($DBIPautoaltdial[$camp_CIPct] =~ /ADDR3/) )
{
$address3 =~ s/\D//gi;
$phone_number = $address3;
}
$stmtA = "UPDATE vicidial_list set called_since_last_reset='$CSLR',user='VDAD' where lead_id='$lead_id'";
}
else
{
$stmtA = "UPDATE vicidial_list set called_since_last_reset='$CSLR', called_count='$called_count',user='VDAD' where lead_id='$lead_id'";
}
$affected_rows = $dbhA->do($stmtA);
$stmtA = "DELETE FROM vicidial_hopper where lead_id='$lead_id'";
@@ -669,11 +694,11 @@ while($one_day_interval > 0)
$stmtA = "INSERT INTO vicidial_manager values('','','$SQLdate','NEW','N','$DB_camp_server_server_ip[$server_CIPct]','','Originate','$VqueryCID','Exten: $VDAD_dial_exten','Context: $ext_context','Channel: $local_DEF$Ndialstring$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','')";
$affected_rows = $dbhA->do($stmtA);
$event_string = "| number call dialed|$DBfill_campaign[$camp_CIPct]|$VqueryCID|$stmtA|$gmt_offset_now|";
$event_string = "| number call dialed|$DBfill_campaign[$camp_CIPct]|$VqueryCID|$stmtA|$gmt_offset_now|$alt_dial|";
&event_logger;
### insert a SENT record to the vicidial_auto_calls table
$stmtA = "INSERT INTO vicidial_auto_calls (server_ip,campaign_id,status,lead_id,callerid,phone_code,phone_number,call_time,call_type) values('$DB_camp_server_server_ip[$server_CIPct]','$DBfill_campaign[$camp_CIPct]','SENT','$lead_id','$VqueryCID','$phone_code','$phone_number','$SQLdate','OUTBALANCE')";
$stmtA = "INSERT INTO vicidial_auto_calls (server_ip,campaign_id,status,lead_id,callerid,phone_code,phone_number,call_time,call_type,alt_dial,queue_priority) values('$DB_camp_server_server_ip[$server_CIPct]','$DBfill_campaign[$camp_CIPct]','SENT','$lead_id','$VqueryCID','$phone_code','$phone_number','$SQLdate','OUTBALANCE','$alt_dial','$DBIPqueue_priority[$camp_CIPct]')";
$affected_rows = $dbhA->do($stmtA);
### sleep for a tenth of a second to not flood the server with new calls
+1 -2
View File
@@ -306,9 +306,8 @@ exten => _*NXXNXXXXXX*3429,6,Voicemail,u2000
; BE SURE TO CHANGE THESE FOR YOUR IP ADDRESS!
exten => _010*010*010*015*8600XXX,1,Goto(default,${EXTEN:16},1)
exten => _010*010*010*015*8600XXX*.,1,Goto(default,${EXTEN:16},1)
exten => _010*010*010*015*78600XXX,1,Goto(default,${EXTEN:16},1)
exten => _010*010*010*015*78600XXX*.,1,Goto(default,${EXTEN:16},1)
exten => _010*010*010*015*.,1,Goto(default,${EXTEN:16},1)
exten => _8600XXX*.,1,AGI(agi-VDADfixCXFER.agi)
exten => _78600XXX*.,1,AGI(agi-VDADfixCXFER.agi)
+7
View File
@@ -61,3 +61,10 @@ ALTER TABLE vicidial_log DROP INDEX uniqueid;
ALTER TABLE vicidial_log MODIFY uniqueid VARCHAR(20) PRIMARY KEY UNIQUE NOT NULL;
UPDATE system_settings SET db_schema_version='1075';
ALTER TABLE vicidial_auto_calls ADD queue_priority TINYINT(2) default '0';
ALTER TABLE vicidial_campaigns ADD queue_priority TINYINT(2) default '50';
ALTER TABLE vicidial_inbound_groups ADD queue_priority TINYINT(2) default '0';
UPDATE system_settings SET db_schema_version='1076';
@@ -24,6 +24,8 @@ USERS CAN QC ANY CAMPAIGN||
USERS CAN QC ANY INBOUND GROUP||
QC Allowed Campaigns: ||
QC Allowed Inbound Groups: ||
Queue Priority -<\/B> This setting is used to define the order in which the calls from this outbound campaign should be answered in relation to the inbound calls if this campaign is in blended mode||
Queue Priority: ||
############################################################ CLIENT
+14 -10
View File
@@ -1,7 +1,7 @@
<?
# AST_timeonVDADall.php
#
# Copyright (C) 2007 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
#
# live real-time stats for the VICIDIAL Auto-Dialer all servers
#
@@ -28,7 +28,8 @@
# 70206-1140 - Added call-type statuses to display(A-Auto, M-Manual, I-Inbound/Closer)
# 70619-1339 - Added Status Category tally display
# 71029-1900 - Changed CLOSER-type to not require campaign_id restriction
#
# 80227-0418 - Added priority to waiting calls display
#
header ("Content-type: text/html; charset=utf-8");
@@ -515,18 +516,18 @@ if ($campaign_allow_inbound > 0)
$closer_campaigns = preg_replace("/ /","','",$closer_campaigns);
$closer_campaigns = "'$closer_campaigns'";
$stmtB="from vicidial_auto_calls where status NOT IN('XFER') and ( (call_type='IN' and campaign_id IN($closer_campaigns)) or (campaign_id='" . mysql_real_escape_string($group) . "' and call_type IN('OUT','OUTBALANCE')) ) order by campaign_id,call_time;";
$stmtB="from vicidial_auto_calls where status NOT IN('XFER') and ( (call_type='IN' and campaign_id IN($closer_campaigns)) or (campaign_id='" . mysql_real_escape_string($group) . "' and call_type IN('OUT','OUTBALANCE')) ) order by queue_priority desc,campaign_id,call_time;";
}
else
{
if ($group=='XXXX-ALL-ACTIVE-XXXX') {$groupSQL = '';}
else {$groupSQL = " and campaign_id='" . mysql_real_escape_string($group) . "'";}
$stmtB="from vicidial_auto_calls where status NOT IN('XFER') $groupSQL order by campaign_id,call_time;";
$stmtB="from vicidial_auto_calls where status NOT IN('XFER') $groupSQL order by queue_priority desc,campaign_id,call_time;";
}
if ($CALLSdisplay > 0)
{
$stmtA = "SELECT status,campaign_id,phone_number,server_ip,UNIX_TIMESTAMP(call_time),call_type";
$stmtA = "SELECT status,campaign_id,phone_number,server_ip,UNIX_TIMESTAMP(call_time),call_type,queue_priority";
}
else
{
@@ -565,6 +566,7 @@ $parked_to_print = mysql_num_rows($rslt);
$CDserver_ip[$k] = $row[3];
$CDcall_time[$k] = $row[4];
$CDcall_type[$k] = $row[5];
$CDqueue_priority[$k] = $row[6];
$k++;
}
}
@@ -606,9 +608,9 @@ $parked_to_print = mysql_num_rows($rslt);
$Cecho = '';
$Cecho .= "VICIDIAL: Calls Waiting $NOW_TIME\n";
$Cecho .= "+--------+--------------+--------------+-----------------+---------+------------+\n";
$Cecho .= "| STATUS | CAMPAIGN | PHONE NUMBER | SERVER_IP | DIALTIME| CALL TYPE |\n";
$Cecho .= "+--------+--------------+--------------+-----------------+---------+------------+\n";
$Cecho .= "+--------+--------------+--------------+-----------------+---------+------------+----------+\n";
$Cecho .= "| STATUS | CAMPAIGN | PHONE NUMBER | SERVER_IP | DIALTIME| CALL TYPE | PRIORITY |\n";
$Cecho .= "+--------+--------------+--------------+-----------------+---------+------------+----------+\n";
$p=0;
while($p<$k)
@@ -618,6 +620,7 @@ while($p<$k)
$Cphone_number = sprintf("%-12s", $CDphone_number[$p]);
$Cserver_ip = sprintf("%-15s", $CDserver_ip[$p]);
$Ccall_type = sprintf("%-10s", $CDcall_type[$p]);
$Cqueue_priority = sprintf("%8s", $CDqueue_priority[$p]);
$Ccall_time_S = ($STARTtime - $CDcall_time[$p]);
$Ccall_time_M = ($Ccall_time_S / 60);
@@ -635,11 +638,11 @@ while($p<$k)
{
$G="<SPAN class=\"$CDcampaign_id[$p]\"><B>"; $EG='</B></SPAN>';
}
$Cecho .= "| $G$Cstatus$EG | $G$Ccampaign_id$EG | $G$Cphone_number$EG | $G$Cserver_ip$EG | $G$Ccall_time_MS$EG | $G$Ccall_type$EG |\n";
$Cecho .= "| $G$Cstatus$EG | $G$Ccampaign_id$EG | $G$Cphone_number$EG | $G$Cserver_ip$EG | $G$Ccall_time_MS$EG | $G$Ccall_type$EG | $G$Cqueue_priority$EG |\n";
$p++;
}
$Cecho .= "+--------+--------------+--------------+-----------------+---------+------------+\n\n";
$Cecho .= "+--------+--------------+--------------+-----------------+---------+------------+----------+\n";
if ($p<1)
{$Cecho='';}
@@ -921,6 +924,7 @@ $talking_to_print = mysql_num_rows($rslt);
else
{
echo " NO AGENTS ON CALLS \n";
echo "<PRE>$Cecho";
}
?>
+69 -8
View File
@@ -683,6 +683,8 @@ if (isset($_GET["qc_campaigns"])) {$qc_campaigns=$_GET["qc_campaigns"];}
elseif (isset($_POST["qc_campaigns"])) {$qc_campaigns=$_POST["qc_campaigns"];}
if (isset($_GET["qc_groups"])) {$qc_groups=$_GET["qc_groups"];}
elseif (isset($_POST["qc_groups"])) {$qc_groups=$_POST["qc_groups"];}
if (isset($_GET["queue_priority"])) {$queue_priority=$_GET["queue_priority"];}
elseif (isset($_POST["queue_priority"])) {$queue_priority=$_POST["queue_priority"];}
if (isset($script_id)) {$script_id= strtoupper($script_id);}
@@ -830,6 +832,7 @@ $qc_commit = ereg_replace("[^0-9]","",$qc_commit);
### DIGITS and DASHES
$group_rank = ereg_replace("[^-0-9]","",$group_rank);
$campaign_rank = ereg_replace("[^-0-9]","",$campaign_rank);
$queue_priority = ereg_replace("[^-0-9]","",$queue_priority);
### Y or N ONLY ###
$active = ereg_replace("[^NY]","",$active);
@@ -1163,12 +1166,12 @@ $list_mix_container = ereg_replace(";","",$list_mix_container);
# 80107-1204 - Started framework for new QC section
# 80112-0242 - Added more options for lead order
# 80211-1901 - Added DB Schema Version to system settings display
#
# 80224-1334 - Added Queue Priority to in-groups and campaigns
#
# make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time
$admin_version = '2.0.5-121';
$build = '80211-1901';
$admin_version = '2.0.5-122';
$build = '80224-1334';
$STARTtime = date("U");
$SQLdate = date("Y-m-d H:i:s");
@@ -1763,7 +1766,12 @@ if ( ( (strlen($ADD)>4) && ($ADD < 99998) ) or ($ADD==3) or (($ADD>20) and ($ADD
}
$p++;
}
$groups_list .= "> <a href=\"$PHP_SELF?ADD=3111&group_id=$group_id_values[$o]\">$group_id_values[$o]</a> - $group_name_values[$o] <BR>\n";
$stmt="SELECT queue_priority from vicidial_inbound_groups where group_id='$group_id_values[$o]';";
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$VIG_priority = $row[0];
$groups_list .= "> <a href=\"$PHP_SELF?ADD=3111&group_id=$group_id_values[$o]\">$group_id_values[$o]</a> - $group_name_values[$o] - $VIG_priority <BR>\n";
$XFERgroups_list .= "> <a href=\"$PHP_SELF?ADD=3111&group_id=$group_id_values[$o]\">$group_id_values[$o]</a> - $group_name_values[$o] <BR>\n";
$RANKgroups_list .= "> <a href=\"$PHP_SELF?ADD=3111&group_id=$group_id_values[$o]\">$group_id_values[$o]</a> - $group_name_values[$o] </td>";
$RANKgroups_list .= "<td> &nbsp; &nbsp; <select size=1 name=RANK_$group_id_values[$o]>\n";
@@ -2323,6 +2331,11 @@ echo "<TABLE WIDTH=98% BGCOLOR=#E6E6E6 cellpadding=2 cellspacing=0><TR><TD ALIGN
<BR>
<B>Concurrent Transfers -</B> This setting is used to define the number of calls that can be sent to agents at the same time. It is recommended that this setting is left at AUTO. This field is not used by the MANUAL dial method.
<BR>
<A NAME="vicidial_campaigns-queue_priority">
<BR>
<B>Queue Priority -</B> This setting is used to define the order in which the calls from this outbound campaign should be answered in relation to the inbound calls if this campaign is in blended mode.
<BR>
<A NAME="vicidial_campaigns-auto_alt_dial">
<BR>
@@ -2601,6 +2614,12 @@ echo "<TABLE WIDTH=98% BGCOLOR=#E6E6E6 cellpadding=2 cellspacing=0><TR><TD ALIGN
<BR> &nbsp; - campaign_rank: orders by the rank given to the agent for the campaign. Highest to Lowest.
<BR> &nbsp; - fewest_calls_campaign: orders by the number of calls received by an agent for the campaign. Least calls first.
<BR>
<BR>
<A NAME="vicidial_inbound_groups-queue_priority">
<BR>
<B>Queue Priority -</B> This setting is used to define the order in which the calls from this inbound group should be answered in relation to calls from other inbound groups.
<A NAME="vicidial_inbound_groups-fronter_display">
<BR>
<B>Fronter Display -</B> This field determines whether the inbound VICIDIAL agent would have the fronter name - if there is one - displayed in the Status field when the call comes to the agent.
@@ -3983,7 +4002,7 @@ $admin_home_url_LU = $row[0];
<? if (strlen($users_hh) > 1) {
?>
<TR BGCOLOR=<?=$users_color ?>><TD ALIGN=LEFT COLSPAN=10><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?=$subheader_font_size ?>> &nbsp; <a href="<? echo $PHP_SELF ?>"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?=$subheader_font_size ?>> Show Users </a> &nbsp; &nbsp; | &nbsp; &nbsp; <a href="<? echo $PHP_SELF ?>?ADD=1"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?=$subheader_font_size ?>> Add A New User </a> &nbsp; &nbsp; | &nbsp; &nbsp; <a href="<? echo $PHP_SELF ?>?ADD=1A"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?=$subheader_font_size ?>> Copy User </a> &nbsp; &nbsp; | &nbsp; &nbsp; <a href="<? echo $PHP_SELF ?>?ADD=550"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?=$subheader_font_size ?>> Search For A User </a></TD></TR>
<TR BGCOLOR=<?=$users_color ?>><TD ALIGN=LEFT COLSPAN=10><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?=$subheader_font_size ?>> &nbsp; <a href="<? echo $PHP_SELF ?>"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?=$subheader_font_size ?>> Show Users </a> &nbsp; &nbsp; | &nbsp; &nbsp; <a href="<? echo $PHP_SELF ?>?ADD=1"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?=$subheader_font_size ?>> Add A New User </a> &nbsp; &nbsp; | &nbsp; &nbsp; <a href="<? echo $PHP_SELF ?>?ADD=1A"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?=$subheader_font_size ?>> Copy User </a> &nbsp; &nbsp; | &nbsp; &nbsp; <a href="<? echo $PHP_SELF ?>?ADD=550"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?=$subheader_font_size ?>> Search For A User </a> &nbsp; &nbsp; | &nbsp; &nbsp; <a href="./user_stats.php?user=<?=$user ?>"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?=$subheader_font_size ?>> User Stats </a> &nbsp; &nbsp; | &nbsp; &nbsp; <a href="./user_status.php?user=<?=$user ?>"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?=$subheader_font_size ?>> User Status </a> </TD></TR>
<? }
if (strlen($campaigns_hh) > 1)
{
@@ -6159,7 +6178,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',manual_dial_list_id='$manual_dial_list_id',default_xfer_group='$default_xfer_group',xfer_groups='$XFERgroups_value' 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',default_xfer_group='$default_xfer_group',xfer_groups='$XFERgroups_value',queue_priority='$queue_priority' where campaign_id='$campaign_id';";
$rslt=mysql_query($stmtA, $link);
if ($reset_hopper == 'Y')
@@ -6808,7 +6827,7 @@ if ($ADD==4111)
{
echo "<br><B>GROUP MODIFIED: $group_id</B>\n";
$stmt="UPDATE vicidial_inbound_groups set group_name='$group_name', group_color='$group_color', active='$active', web_form_address='" . mysql_real_escape_string($web_form_address) . "', voicemail_ext='$voicemail_ext', next_agent_call='$next_agent_call', fronter_display='$fronter_display', ingroup_script='$script_id', get_call_launch='$get_call_launch', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number', xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',drop_message='$drop_message',drop_call_seconds='$drop_call_seconds',drop_exten='$drop_exten',call_time_id='$call_time_id',after_hours_action='$after_hours_action',after_hours_message_filename='$after_hours_message_filename',after_hours_exten='$after_hours_exten',after_hours_voicemail='$after_hours_voicemail',welcome_message_filename='$welcome_message_filename',moh_context='$moh_context',onhold_prompt_filename='$onhold_prompt_filename',prompt_interval='$prompt_interval',agent_alert_exten='$agent_alert_exten',agent_alert_delay='$agent_alert_delay',default_xfer_group='$default_xfer_group' where group_id='$group_id';";
$stmt="UPDATE vicidial_inbound_groups set group_name='$group_name', group_color='$group_color', active='$active', web_form_address='" . mysql_real_escape_string($web_form_address) . "', voicemail_ext='$voicemail_ext', next_agent_call='$next_agent_call', fronter_display='$fronter_display', ingroup_script='$script_id', get_call_launch='$get_call_launch', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number', xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',drop_message='$drop_message',drop_call_seconds='$drop_call_seconds',drop_exten='$drop_exten',call_time_id='$call_time_id',after_hours_action='$after_hours_action',after_hours_message_filename='$after_hours_message_filename',after_hours_exten='$after_hours_exten',after_hours_voicemail='$after_hours_voicemail',welcome_message_filename='$welcome_message_filename',moh_context='$moh_context',onhold_prompt_filename='$onhold_prompt_filename',prompt_interval='$prompt_interval',agent_alert_exten='$agent_alert_exten',agent_alert_delay='$agent_alert_delay',default_xfer_group='$default_xfer_group',queue_priority='$queue_priority' where group_id='$group_id';";
$rslt=mysql_query($stmt, $link);
### LOG CHANGES TO LOG FILE ###
@@ -9028,6 +9047,7 @@ if ($ADD==31)
$campaign_allow_inbound = $row[65];
$manual_dial_list_id = $row[66];
$default_xfer_group = $row[67];
$queue_priority = $row[69];
if (ereg("DISABLED",$list_order_mix))
{$DEFlistDISABLE = ''; $DEFstatusDISABLED=0;}
@@ -9275,6 +9295,20 @@ if ($ADD==31)
echo "<tr bgcolor=#BDFFBD><td align=right>Concurrent Transfers: </td><td align=left><select size=1 name=concurrent_transfers><option >AUTO</option><option>1</option><option>2</option><option>3</option><option>4</option><option>5</option><option>6</option><option>7</option><option>8</option><option>9</option><option>10<option SELECTED>$concurrent_transfers</option></select>$NWB#vicidial_campaigns-concurrent_transfers$NWE</td></tr>\n";
echo "<tr bgcolor=#BDFFBD><td align=right>Queue Priority: </td><td align=left><select size=1 name=queue_priority>\n";
$n=99;
while ($n>=-99)
{
$dtl = 'Even';
if ($n<0) {$dtl = 'Lower';}
if ($n>0) {$dtl = 'Higher';}
if ($n == $queue_priority)
{echo "<option SELECTED value=\"$n\">$n - $dtl</option>\n";}
else
{echo "<option value=\"$n\">$n - $dtl</option>\n";}
$n--;
}
echo "</select> $NWB#vicidial_campaigns-queue_priority$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Auto Alt-Number Dialing: </td><td align=left><select size=1 name=auto_alt_dial><option >NONE</option><option>ALT_ONLY</option><option>ADDR3_ONLY</option><option>ALT_AND_ADDR3<option SELECTED>$auto_alt_dial</option></select>$NWB#vicidial_campaigns-auto_alt_dial$NWE</td></tr>\n";
@@ -11069,6 +11103,7 @@ if ($ADD==3111)
$agent_alert_exten = $row[26];
$agent_alert_delay = $row[27];
$default_xfer_group = $row[28];
$queue_priority = $row[29];
##### get in-groups listings for dynamic pulldown
$stmt="SELECT group_id,group_name from vicidial_inbound_groups order by group_id";
@@ -11105,6 +11140,22 @@ if ($ADD==3111)
echo "<tr bgcolor=#B6D3FC><td align=right>Active: </td><td align=left><select size=1 name=active><option>Y</option><option>N</option><option SELECTED>$active</option></select>$NWB#vicidial_inbound_groups-active$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Web Form: </td><td align=left><input type=text name=web_form_address size=50 maxlength=255 value=\"$web_form_address\">$NWB#vicidial_inbound_groups-web_form_address$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Next Agent Call: </td><td align=left><select size=1 name=next_agent_call><option >random</option><option>oldest_call_start</option><option>oldest_call_finish</option><option>overall_user_level</option><option>inbound_group_rank</option><option>campaign_rank</option><option>fewest_calls</option><option>fewest_calls_campaign</option><option SELECTED>$next_agent_call</option></select>$NWB#vicidial_inbound_groups-next_agent_call$NWE</td></tr>\n";
echo "<tr bgcolor=#BDFFBD><td align=right>Queue Priority: </td><td align=left><select size=1 name=queue_priority>\n";
$n=99;
while ($n>=-99)
{
$dtl = 'Even';
if ($n<0) {$dtl = 'Lower';}
if ($n>0) {$dtl = 'Higher';}
if ($n == $queue_priority)
{echo "<option SELECTED value=\"$n\">$n - $dtl</option>\n";}
else
{echo "<option value=\"$n\">$n - $dtl</option>\n";}
$n--;
}
echo "</select> $NWB#vicidial_inbound_groups-queue_priority$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Fronter Display: </td><td align=left><select size=1 name=fronter_display><option>Y</option><option>N</option><option SELECTED>$fronter_display</option></select>$NWB#vicidial_inbound_groups-fronter_display$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right><a href=\"$PHP_SELF?ADD=3111111&script_id=$script_id\">Script</a>: </td><td align=left><select size=1 name=script_id>\n";
@@ -12886,6 +12937,15 @@ echo "<TABLE><TR><TD>\n";
echo "<br>INBOUND GROUP LISTINGS:\n";
echo "<center><TABLE width=$section_width cellspacing=0 cellpadding=1>\n";
echo "<TR BGCOLOR=BLACK>";
echo "<TD><FONT FACE=\"Arial,Helvetica\" size=2 color=white>IN-GROUP</TD>";
echo "<TD><FONT FACE=\"Arial,Helvetica\" size=2 color=white>NAME</TD>";
echo "<TD><FONT FACE=\"Arial,Helvetica\" size=2 color=white>PRIORITY</TD>\n";
echo "<TD><FONT FACE=\"Arial,Helvetica\" size=2 color=white>ACTIVE</TD>";
echo "<TD><FONT FACE=\"Arial,Helvetica\" size=2 color=white>TIME</TD>";
echo "<TD><FONT FACE=\"Arial,Helvetica\" size=2 color=white>COLOR</TD>\n";
echo "<TD><FONT FACE=\"Arial,Helvetica\" size=2 color=white>MODIFY</TD>\n";
echo "</TR>\n";
$o=0;
while ($people_to_print > $o) {
@@ -12896,8 +12956,9 @@ echo "<center><TABLE width=$section_width cellspacing=0 cellpadding=1>\n";
{$bgcolor='bgcolor="#9BB9FB"';}
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=3111&group_id=$row[0]\">$row[0]</a></td>";
echo "<td><font size=1> $row[1]</td>";
echo "<td><font size=1> $row[29]</td>";
echo "<td><font size=1> $row[3]</td>";
echo "<td><font size=1> $row[5]</td>";
echo "<td><font size=1> $row[17]</td>";
echo "<td bgcolor=\"$row[2]\"><font size=1> &nbsp;</td>";
echo "<td><font size=1><a href=\"$PHP_SELF?ADD=3111&group_id=$row[0]\">MODIFY</a></td></tr>\n";
$o++;