Added on-hook phone agent features for inbound calls

Added ring_all Next-Agent-Call feature for inbound calls
  see UPGRADE doc for more details

git-svn-id: svn://192.168.202.10@1611 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2011-03-04 15:36:10 +00:00
parent d42bfdee09
commit c631aaf556
20 changed files with 1247 additions and 712 deletions
+20
View File
@@ -479,6 +479,26 @@ OTHER CHANGES:
callback and lead information, including call history and call notes,
without having to dial the lead.
114. Added on-hook agent phone feature. This feature allows inbound calls from
customers to ring on an on-hook agent phone, but not be transferred to
that agent until the agent's phone is answered. If the call times out
then the call will go on to the next agent. This is defined in the
Phones record and allows the agent using the vicidial.php agent screen
to not have to stay on the phone at all times when they are logged in.
You will need to add the following lines to the default context in your
extensions.conf file:
; these are used for the ring_all function in VICIDIAL
exten => _8331*.,1,Playback(sip-silence)
exten => _8331*.,n,AGI(agi-VDAD_RINGALL.agi,${EXTEN})
exten => _8331*.,n,AGI(agi-VDAD_RINGALL.agi,${EXTEN})
exten => _8331*.,n,Hangup
115. Added ring_all Next Agent Call option for in-groups. This works with on-
hook agent phones to allow all available agents to have their phones
ring at the same time, with the first agent to pick up their phone
receiving the call. It is not recommended to use this on high-volume
systems or systems with many agents available.
File diff suppressed because it is too large Load Diff
+5 -4
View File
@@ -81,6 +81,7 @@
# 101207-0713 - Added fix for rare VDAC-entry-missing issue
# 110213-0008 - Added scheduled callbacks custom statuses compatibility
# 110224-1733 - Added compatibility with QM phone environment logging
# 110303-2316 - Added condition that would not allow calls to be sent to agent with ringing inbound call
#
$script = 'agi-VDAD_ALL_outbound.agi';
@@ -1536,7 +1537,7 @@ while ($drop_timer <= $DROP_TIME)
if ($rec_countWAITIN > 0)
{
### get a list of the in-groups that the READY agents are able to take calls from
$stmtA = "SELECT closer_campaigns,user FROM vicidial_live_agents where status = 'READY' and server_ip='$VARserver_ip' and lead_id<1 and campaign_id='$VDADcampaign' and last_update_time > '$BDtsSQLdate';";
$stmtA = "SELECT closer_campaigns,user FROM vicidial_live_agents where status = 'READY' and ring_callerid='' and server_ip='$VARserver_ip' and lead_id<1 and campaign_id='$VDADcampaign' and last_update_time > '$BDtsSQLdate';";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
@@ -1608,7 +1609,7 @@ while ($drop_timer <= $DROP_TIME)
$rec_countWAIT = ($rec_countWAITOUT + $rec_countWAITIN);
if ($rec_countWAIT < $concurrent_transfers)
{
$stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$CIDlead_id',uniqueid='$unique_id', channel='$channel', call_server_ip='$VARserver_ip', callerid='$callerid',comments='AUTO' where status = 'READY' and lead_id<1 and server_ip='$VARserver_ip' and campaign_id='$VDADcampaign' and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;";
$stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$CIDlead_id',uniqueid='$unique_id', channel='$channel', call_server_ip='$VARserver_ip', callerid='$callerid',comments='AUTO' where status = 'READY' and lead_id<1 and server_ip='$VARserver_ip' and ring_callerid='' and campaign_id='$VDADcampaign' and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01035'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
@@ -1911,7 +1912,7 @@ while ($drop_timer <= $DROP_TIME)
if ($rec_countWAITremIN > 0)
{
### get a list of the in-groups that the READY agents are able to take calls from
$stmtA = "SELECT closer_campaigns,user FROM vicidial_live_agents where status = 'READY' and lead_id<1 and campaign_id='$VDADcampaign' and last_update_time > '$BDtsSQLdate';";
$stmtA = "SELECT closer_campaigns,user FROM vicidial_live_agents where status = 'READY' and lead_id<1 and ring_callerid='' and campaign_id='$VDADcampaign' and last_update_time > '$BDtsSQLdate';";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
@@ -1983,7 +1984,7 @@ while ($drop_timer <= $DROP_TIME)
$rec_countWAITrem = ($rec_countWAITremOUT + $rec_countWAITremIN);
if ($rec_countWAITrem < $concurrent_transfers)
{
$stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$CIDlead_id',uniqueid='$unique_id', channel='$channel', call_server_ip='$VARserver_ip', callerid='$callerid',comments='AUTO' where status = 'READY' and lead_id<1 and campaign_id='$VDADcampaign' and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;";
$stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$CIDlead_id',uniqueid='$unique_id', channel='$channel', call_server_ip='$VARserver_ip', callerid='$callerid',comments='AUTO' where status = 'READY' and lead_id<1 and ring_callerid='' and campaign_id='$VDADcampaign' and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01042'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
+438
View File
@@ -0,0 +1,438 @@
#!/usr/bin/perl
#
# agi-VDAD_RINGALL.agi version 2.4
#
# NOTE: this script is used for on-hook agents to be connected to customer calls
# when they answer their ringing phones
#
# In the default dialplan context, this is set to the following:
# ; these are used for the ring_all function in VICIDIAL
# exten => _8331*.,1,Playback(sip-silence)
# exten => _8331*.,n,AGI(agi-VDAD_RINGALL.agi,${EXTEN})
# exten => _8331*.,n,AGI(agi-VDAD_RINGALL.agi,${EXTEN})
# exten => _8331*.,n,Hangup
#
# Copyright (C) 2011 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# changes:
# 110303-2325 - First build
#
$script = 'agi-VDAD_RINGALL.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) {$hour = "0$hour";}
if ($min < 10) {$min = "0$min";}
if ($sec < 10) {$sec = "0$sec";}
$now_date_epoch = time();
$now_date = "$year-$mon-$mday $hour:$min:$sec";
$now_num = "$year$mon$mday$hour$min$sec";
$S='*';
# default path to astguiclient configuration file:
$PATHconf = '/etc/astguiclient.conf';
open(conf, "$PATHconf") || die "can't open $PATHconf: $!\n";
@conf = <conf>;
close(conf);
$i=0;
foreach(@conf)
{
$line = $conf[$i];
$line =~ s/ |>|\n|\r|\t|\#.*|;.*//gi;
if ( ($line =~ /^PATHhome/) && ($CLIhome < 1) )
{$PATHhome = $line; $PATHhome =~ s/.*=//gi;}
if ( ($line =~ /^PATHlogs/) && ($CLIlogs < 1) )
{$PATHlogs = $line; $PATHlogs =~ s/.*=//gi;}
if ( ($line =~ /^PATHagi/) && ($CLIagi < 1) )
{$PATHagi = $line; $PATHagi =~ s/.*=//gi;}
if ( ($line =~ /^PATHweb/) && ($CLIweb < 1) )
{$PATHweb = $line; $PATHweb =~ s/.*=//gi;}
if ( ($line =~ /^PATHsounds/) && ($CLIsounds < 1) )
{$PATHsounds = $line; $PATHsounds =~ s/.*=//gi;}
if ( ($line =~ /^PATHmonitor/) && ($CLImonitor < 1) )
{$PATHmonitor = $line; $PATHmonitor =~ s/.*=//gi;}
if ( ($line =~ /^VARserver_ip/) && ($CLIserver_ip < 1) )
{$VARserver_ip = $line; $VARserver_ip =~ s/.*=//gi;}
if ( ($line =~ /^VARDB_server/) && ($CLIDB_server < 1) )
{$VARDB_server = $line; $VARDB_server =~ s/.*=//gi;}
if ( ($line =~ /^VARDB_database/) && ($CLIDB_database < 1) )
{$VARDB_database = $line; $VARDB_database =~ s/.*=//gi;}
if ( ($line =~ /^VARDB_user/) && ($CLIDB_user < 1) )
{$VARDB_user = $line; $VARDB_user =~ s/.*=//gi;}
if ( ($line =~ /^VARDB_pass/) && ($CLIDB_pass < 1) )
{$VARDB_pass = $line; $VARDB_pass =~ s/.*=//gi;}
if ( ($line =~ /^VARDB_port/) && ($CLIDB_port < 1) )
{$VARDB_port = $line; $VARDB_port =~ s/.*=//gi;}
$i++;
}
if (!$VARDB_port) {$VARDB_port='3306';}
if (!$AGILOGfile) {$AGILOGfile = "$PATHlogs/agiout.$year-$mon-$mday";}
use DBI;
use Asterisk::AGI;
$AGI = new Asterisk::AGI;
$dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VARDB_user", "$VARDB_pass")
or die "Couldn't connect to database: " . DBI->errstr;
### Grab Server values from the database
$stmtA = "SELECT agi_output,ext_context FROM servers where server_ip = '$VARserver_ip';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$rec_count=0;
while ($sthArows > $rec_count)
{
$AGILOG = '0';
@aryA = $sthA->fetchrow_array;
$DBagi_output = $aryA[0];
$ext_context = $aryA[1];
if ($DBagi_output =~ /STDERR/) {$AGILOG = '1';}
if ($DBagi_output =~ /FILE/) {$AGILOG = '2';}
if ($DBagi_output =~ /BOTH/) {$AGILOG = '3';}
$rec_count++;
}
$sthA->finish();
### begin parsing run-time options ###
$|=1;
while(<STDIN>)
{
chomp;
last unless length($_);
if ($AGILOG)
{
if (/^agi_(\w+)\:\s+(.*)$/)
{
$AGI{$1} = $2;
}
}
if (/^agi_uniqueid\:\s+(.*)$/) {$unique_id = $1;}
if (/^agi_channel\:\s+(.*)$/) {$channel = $1;}
if (/^agi_extension\:\s+(.*)$/) {$extension = $1;}
if (/^agi_type\:\s+(.*)$/) {$type = $1;}
if (/^agi_callerid\:\s+(.*)$/) {$callerid = $1;}
if (/^agi_calleridname\:\s+(.*)$/) {$calleridname = $1;}
if ( $calleridname =~ /\"/) {$calleridname =~ s/\"//gi;}
if ( (!$callerid) or ($callerid =~ /unknown/) or ( ($calleridname =~ /\d\d\d\d\d\d\d\d\d/) && (length($calleridname) > 16) ) )
{$callerid = $calleridname;}
if ( ($callerid =~ / /) && (length($callerid) > 20) )
{$callerid =~ s/ .*//gi;}
$calleridname = $callerid;
if ($extension =~ /^8331\*\d/)
{
@EXTEN_vars = split(/\*/, $extension);
$auto_call_id = $EXTEN_vars[1];
$call_callerid = $EXTEN_vars[2];
$dial_user = $EXTEN_vars[3];
$phone_exten = $EXTEN_vars[4];
$channel_root = $channel;
$channel_root =~ s/\,.*//gi;
}
}
if ($AGILOG) {$agi_string = "AGI Environment Dump:"; &agi_output;}
foreach $i (sort keys %AGI)
{
if ($AGILOG) {$agi_string = " -- $i = $AGI{$i}"; &agi_output;}
}
if ($AGILOG) {$agi_string = "AGI Variables: |$unique_id|$channel|$extension|$type|$callerid|$auto_call_id|"; &agi_output;}
if ($AGILOG) {$agi_string = "RING-AGENT AGI STARTED"; &agi_output;}
### Hangup if Local/ channel, since these are usually invalid or voicemail
if ($channel =~ /^Local/)
{
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
if ($AGILOG) {$agi_string = "RING-ALL AGI Local Channel, exiting..."; &agi_output;}
exit;
}
### Check that the call exists, if not then buzz and hangup ###
$stmtA = "SELECT campaign_id,call_type,extension,phone_number,lead_id FROM vicidial_auto_calls where auto_call_id='$auto_call_id';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$VACcount=$sthA->rows;
if ($VACcount > 0)
{
@aryA = $sthA->fetchrow_array;
$VAC_campaign_id = $aryA[0];
$VAC_call_type = $aryA[1];
$VAC_extension = $aryA[2];
$VAC_phone_number = $aryA[3];
$VAC_lead_id = $aryA[4];
if ($AGILOG) {$agi_string = "-- VAC Call Found: |$callerid|$VAC_campaign_id|$VAC_call_type|$VAC_extension|$VAC_phone_number|$VAC_lead_id|$auto_call_id|"; &agi_output;}
$sthA->finish();
}
else
{
if ($AGILOG) {$agi_string = "-- VAC Call Not Found, exiting: |$callerid|$auto_call_id|"; &agi_output;}
$AGI->stream_file('buzz');
$AGI->hangup();
exit;
}
### Check that the user exists in vicidial_live_agents, if not then buzz and hangup ###
$stmtA = "SELECT conf_exten,extension,server_ip,ra_user,campaign_id from vicidial_live_agents WHERE user='$dial_user' and status IN('READY','CLOSER');";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$VLAcount=$sthA->rows;
if ($VLAcount > 0)
{
@aryA = $sthA->fetchrow_array;
$VLAconf_exten = $aryA[0];
$VLAextension = $aryA[1];
$VLAserver_ip = $aryA[2];
$VLAra_user = $aryA[3];
$VLAcampaign_id = $aryA[4];
if ($AGILOG) {$agi_string = "-- VLA Agent Found: |$callerid|$VLAconf_exten|$VLAextension|$VLAserver_ip|$VLAra_user|$VLAcampaign_id|$auto_call_id|"; &agi_output;}
$sthA->finish();
}
else
{
if ($AGILOG) {$agi_string = "-- VLA Agent Not Found, exiting: |$callerid|$auto_call_id|$dial_user|"; &agi_output;}
$AGI->stream_file('buzz');
$AGI->hangup();
exit;
}
### Check that the call has not been grabbed already, if it has then buzz and hangup ###
$stmtA = "SELECT count(*) FROM vicidial_auto_calls where auto_call_id='$auto_call_id' and agent_grab='';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$NAGcount=$sthA->rows;
if ($NAGcount > 0)
{
@aryA = $sthA->fetchrow_array;
$not_grabbed_count = $aryA[0];
$sthA->finish();
if ($not_grabbed_count > 0)
{
if ($VLAextension =~ /^R\//)
{
### BEGIN If remote agent, then reserve a vicidial_conferences session on their server to send the calls to ###
$stmtA="SELECT count(*) FROM vicidial_conferences where server_ip='$VLAserver_ip' and ((extension='') or (extension is null)) and conf_exten != '$VLAconf_exten';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$AVCcount=$sthA->rows;
if ($AVCcount > 0)
{
@aryA = $sthA->fetchrow_array;
$available_sessions = $aryA[0];
$sthA->finish();
if ($available_sessions > 0)
{
$stmtA="UPDATE vicidial_conferences set extension='3WAY_$dial_user', leave_3way='1', leave_3way_datetime='$now_date' where server_ip='$VLAserver_ip' and ((extension='') or (extension is null)) and conf_exten != '$VLAconf_exten' limit 1;";
$AVCaffected_rows = $dbhA->do($stmtA);
if ($AVCaffected_rows)
{
$stmtA="SELECT conf_exten from vicidial_conferences where server_ip='$VLAserver_ip' and extension='3WAY_$dial_user' and leave_3way_datetime='$now_date' and conf_exten != '$VLAconf_exten';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$SVCcount=$sthA->rows;
if ($SVCcount > 0)
{
@aryA = $sthA->fetchrow_array;
$VLAconf_exten = $aryA[0];
$sthA->finish();
if ($AGILOG) {$agi_string = "-- AVC Session Reserved: |$callerid|$auto_call_id|$dial_user|3WAY_$dial_user|$now_date|$VLAconf_exten|"; &agi_output;}
}
else
{
if ($AGILOG) {$agi_string = "-- AVC No Available Sessions(SELECT3), exiting: |$VLAserver_ip|$auto_call_id|$dial_user|$VLAextension$now_num|"; &agi_output;}
$AGI->stream_file('buzz');
$AGI->hangup();
exit;
}
}
else
{
if ($AGILOG) {$agi_string = "-- AVC No Available Sessions(UPDATE), exiting: |$VLAserver_ip|$auto_call_id|$dial_user|"; &agi_output;}
$AGI->stream_file('buzz');
$AGI->hangup();
exit;
}
}
else
{
if ($AGILOG) {$agi_string = "-- AVC No Available Sessions(SELECT2), exiting: |$VLAserver_ip|$auto_call_id|$dial_user|"; &agi_output;}
$AGI->stream_file('buzz');
$AGI->hangup();
exit;
}
}
else
{
if ($AGILOG) {$agi_string = "-- AVC No Available Sessions(SELECT), exiting: |$VLAserver_ip|$auto_call_id|$dial_user|"; &agi_output;}
$AGI->stream_file('buzz');
$AGI->hangup();
exit;
}
### END If remote agent, then reserve a vicidial_conferences session on their server to send the calls to ###
}
### Try to grab the call for this agent, if already grabbed then buzz and hangup ###
$stmtA = "UPDATE vicidial_auto_calls SET agent_grab='$dial_user',agent_grab_extension='$VLAconf_exten' where auto_call_id='$auto_call_id' and agent_grab='';";
$AGaffected_rows = $dbhA->do($stmtA);
if ($AGaffected_rows)
{
if ($AGILOG) {$agi_string = "-- VAC Call Grabbed: |$callerid|$auto_call_id|$dial_user|$AGaffected_rows|"; &agi_output;}
### send agent to their session ###
if($VLAserver_ip =~ m/(\S+)\.(\S+)\.(\S+)\.(\S+)/ )
{
$a = leading_zero($1);
$b = leading_zero($2);
$c = leading_zero($3);
$d = leading_zero($4);
$VLA_DIALstr = "$a$S$b$S$c$S$d$S";
}
$VLA_DIALstr .= "7$VLAconf_exten";
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
if ($AGILOG) {$agi_string = "-- Ring-Agent Sending Call: |$callerid|$auto_call_id|$dial_user|$VLA_DIALstr|"; &agi_output;}
print "SET CONTEXT $ext_context\n";
checkresult($result);
print "SET EXTENSION $VLA_DIALstr\n";
checkresult($result);
print "SET PRIORITY 1\n";
checkresult($result);
$dbhA->disconnect();
exit;
}
else
{
if ($AGILOG) {$agi_string = "-- VAC Call Already Grabbed(UPDATE2), exiting: |$callerid|$auto_call_id|$dial_user|$AGaffected_rows|"; &agi_output;}
$AGI->stream_file('buzz');
$AGI->hangup();
exit;
}
}
else
{
if ($AGILOG) {$agi_string = "-- VAC Call Already Grabbed(UPDATE), exiting: |$callerid|$auto_call_id|$dial_user|$AGaffected_rows|"; &agi_output;}
$AGI->stream_file('buzz');
$AGI->hangup();
exit;
}
}
else
{
if ($AGILOG) {$agi_string = "-- VAC Call Already Grabbed(SELECT), exiting: |$callerid|$auto_call_id|$dial_user|$AGaffected_rows|"; &agi_output;}
$AGI->stream_file('buzz');
$AGI->hangup();
exit;
}
if ($AGILOG) {$agi_string = "-- sleeping: |$callerid|$auto_call_id|"; &agi_output;}
sleep(10);
exit;
$dbhA->disconnect();
$AGI->stream_file('sip-silence');
if ($AGILOG) {$agi_string = "-- Exiting Ring-Agent AGI: |$callerid|"; &agi_output;}
exit;
sub agi_output
{
if ($AGILOG >=2)
{
### open the log file for writing ###
open(Lout, ">>$AGILOGfile")
|| die "Can't open $AGILOGfile: $!\n";
print Lout "$now_date|$script|$agi_string\n";
close(Lout);
}
### send to STDERR writing ###
if ( ($AGILOG == '1') || ($AGILOG == '3') )
{print STDERR "$now_date|$script|$agi_string\n";}
$agi_string='';
}
sub checkresult
{
my ($res) = @_;
my $retval;
$tests++;
chomp $res;
if ($res =~ /^200/)
{
$res =~ /result=(-?\d+)/;
if (!length($1))
{
# print STDERR "FAIL ($res)\n";
$fail++;
}
else
{
# print STDERR "PASS ($1)\n";
$pass++;
}
}
else
{
# print STDERR "FAIL (unexpected result '$res')\n";
$fail++;
}
}
sub leading_zero($)
{
$_ = $_[0];
s/^(\d)$/0$1/;
s/^(\d\d)$/0$1/;
return $_;
} # End of the leading_zero() routine.
@@ -0,0 +1,116 @@
#!/usr/bin/perl
#
# AST_DB_territory_populate.pl version 2.4
#
# DESCRIPTION:
# OPTIONAL!!! CUSTOMIZE THIS SCRIPT FIRST!!!
# - populates the owner field with a territory based upon the state
#
# It is recommended that you run this program on the local Asterisk machine
#
# Copyright (C) 2011 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# CHANGES
# 110305-0959 - first build
#
### begin parsing run-time options ###
if (length($ARGV[0])>1)
{
$i=0;
while ($#ARGV >= $i)
{
$args = "$args $ARGV[$i]";
$i++;
}
if ($args =~ /--help/i)
{
print "allowed run time options:\n [-t] = test\n [-debug] = verbose debug messages\n\n";
}
else
{
if ($args =~ /-debug/i)
{
$DB=1; # Debug flag, set to 0 for no debug messages, On an active system this will generate hundreds of lines of output per minute
}
if ($args =~ /-t/i)
{
$TEST=1;
$T=1;
}
}
}
else
{
print "no command line options set\n";
}
### end parsing run-time options ###
# default path to astguiclient configuration file:
$PATHconf = '/etc/astguiclient.conf';
open(conf, "$PATHconf") || die "can't open $PATHconf: $!\n";
@conf = <conf>;
close(conf);
$i=0;
foreach(@conf)
{
$line = $conf[$i];
$line =~ s/ |>|\n|\r|\t|\#.*|;.*//gi;
if ( ($line =~ /^PATHhome/) && ($CLIhome < 1) )
{$PATHhome = $line; $PATHhome =~ s/.*=//gi;}
if ( ($line =~ /^PATHlogs/) && ($CLIlogs < 1) )
{$PATHlogs = $line; $PATHlogs =~ s/.*=//gi;}
if ( ($line =~ /^PATHagi/) && ($CLIagi < 1) )
{$PATHagi = $line; $PATHagi =~ s/.*=//gi;}
if ( ($line =~ /^PATHweb/) && ($CLIweb < 1) )
{$PATHweb = $line; $PATHweb =~ s/.*=//gi;}
if ( ($line =~ /^PATHsounds/) && ($CLIsounds < 1) )
{$PATHsounds = $line; $PATHsounds =~ s/.*=//gi;}
if ( ($line =~ /^PATHmonitor/) && ($CLImonitor < 1) )
{$PATHmonitor = $line; $PATHmonitor =~ s/.*=//gi;}
if ( ($line =~ /^VARserver_ip/) && ($CLIserver_ip < 1) )
{$VARserver_ip = $line; $VARserver_ip =~ s/.*=//gi;}
if ( ($line =~ /^VARDB_server/) && ($CLIDB_server < 1) )
{$VARDB_server = $line; $VARDB_server =~ s/.*=//gi;}
if ( ($line =~ /^VARDB_database/) && ($CLIDB_database < 1) )
{$VARDB_database = $line; $VARDB_database =~ s/.*=//gi;}
if ( ($line =~ /^VARDB_user/) && ($CLIDB_user < 1) )
{$VARDB_user = $line; $VARDB_user =~ s/.*=//gi;}
if ( ($line =~ /^VARDB_pass/) && ($CLIDB_pass < 1) )
{$VARDB_pass = $line; $VARDB_pass =~ s/.*=//gi;}
if ( ($line =~ /^VARDB_port/) && ($CLIDB_port < 1) )
{$VARDB_port = $line; $VARDB_port =~ s/.*=//gi;}
$i++;
}
# Customized Variables
$server_ip = $VARserver_ip; # Asterisk server IP
if (!$VARDB_port) {$VARDB_port='3306';}
use DBI;
$dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VARDB_user", "$VARDB_pass")
or die "Couldn't connect to database: " . DBI->errstr;
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
##### Populate the owner field with a new territory based upon the state
$stmtA = "UPDATE vicidial_list SET owner=CONCAT('MUTO2822',state) where owner='' and list_id IN('1295','1298') and state!='' and state is NOT NULL;";
if($DB){print STDERR "\n|$stmtA|\n";}
if (!$T)
{
$affected_rows = $dbhA->do($stmtA);
if($DB){print STDERR "\n|$affected_rows records changed|\n";}
}
$dbhA->disconnect();
exit;
+15 -5
View File
@@ -98,6 +98,7 @@
# 110124-1134 - Small query fix for large queue_log tables
# 110224-1408 - Fixed trunk reservation bug
# 110224-1859 - Added compatibility with QM phone environment logging
# 110303-1710 - Added clearing of ring_callerid when vicidial_auto_calls deleted
#
@@ -1215,7 +1216,7 @@ while($one_day_interval > 0)
$CLlead_id=''; $auto_call_id=''; $CLstatus=''; $CLcampaign_id=''; $CLphone_number=''; $CLphone_code='';
$stmtA = "SELECT auto_call_id,lead_id,phone_number,status,campaign_id,phone_code,alt_dial,stage,call_type,UNIX_TIMESTAMP(last_update_time) FROM vicidial_auto_calls where callerid='$KLcallerid[$kill_vac]'";
$stmtA = "SELECT auto_call_id,lead_id,phone_number,status,campaign_id,phone_code,alt_dial,stage,call_type,UNIX_TIMESTAMP(last_update_time) FROM vicidial_auto_calls where callerid='$KLcallerid[$kill_vac]';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -1291,7 +1292,10 @@ while($one_day_interval > 0)
$stmtA = "DELETE from vicidial_auto_calls where auto_call_id='$auto_call_id'";
$affected_rows = $dbhA->do($stmtA);
$event_string = "| dead call vac deleted|$auto_call_id|$CLlead_id|$KLcallerid[$kill_vac]|$end_epoch|$affected_rows|$KLchannel[$kill_vac]|$CLcall_type|$CLdial_timeout|$CLdrop_call_seconds|$call_timeout|$dialtime_log|$dialtime_catch|";
$stmtA = "UPDATE vicidial_live_agents set ring_callerid='' where ring_callerid='$KLcallerid[$kill_vac]';";
$affected_rowsX = $dbhA->do($stmtA);
$event_string = "| dead call vac deleted|$auto_call_id|$CLlead_id|$KLcallerid[$kill_vac]|$end_epoch|$affected_rows|$KLchannel[$kill_vac]|$CLcall_type|$CLdial_timeout|$CLdrop_call_seconds|$call_timeout|$dialtime_log|$dialtime_catch|$affected_rowsX|";
&event_logger;
$CLstage =~ s/LIVE|-//gi;
@@ -1817,7 +1821,10 @@ while($one_day_interval > 0)
$stmtA = "DELETE from vicidial_auto_calls where auto_call_id='$auto_call_id'";
$affected_rows = $dbhA->do($stmtA);
$event_string = "| M dead call vac deleted|$auto_call_id|$CLlead_id|$KLcallerid[$kill_vac]|$end_epoch|$affected_rows|$KLchannel[$kill_vac]|$CLcall_type|$CLlast_update_time < $XDtarget|";
$stmtA = "UPDATE vicidial_live_agents set ring_callerid='' where ring_callerid='$KLcallerid[$kill_vac]';";
$affected_rowsX = $dbhA->do($stmtA);
$event_string = "| M dead call vac deleted|$auto_call_id|$CLlead_id|$KLcallerid[$kill_vac]|$end_epoch|$affected_rows|$KLchannel[$kill_vac]|$CLcall_type|$CLlast_update_time < $XDtarget|$affected_rowsX|";
&event_logger;
}
@@ -2116,10 +2123,13 @@ while($one_day_interval > 0)
$rec_count=0;
while ($sthArows > $rec_count)
{
$stmtA = "DELETE from vicidial_auto_calls where auto_call_id='$auto_call_id'";
$stmtA = "DELETE from vicidial_auto_calls where auto_call_id='$auto_call_id';";
$affected_rows = $dbhA->do($stmtA);
$event_string = "| lagged call vdac call DELETED $affected_rows|$BDtsSQLdate|$auto_call_id|$CLcallerid|$CLuniqueid|$CLphone_number|$CLstatus|";
$stmtA = "UPDATE vicidial_live_agents set ring_callerid='' where ring_callerid='$CLcallerid';";
$affected_rowsX = $dbhA->do($stmtA);
$event_string = "| lagged call vdac call DELETED $affected_rows|$affected_rowsX|$BDtsSQLdate|$auto_call_id|$CLcallerid|$CLuniqueid|$CLphone_number|$CLstatus|";
&event_logger;
if ( ($affected_rows > 0) && ($CLlead_id > 0) )
+15 -5
View File
@@ -39,6 +39,7 @@
# 110103-1230 - Added queuemetrics_loginout NONE option
# 110124-1134 - Small query fix for large queue_log tables
# 110224-1903 - Added compatibility with QM phone environment logging
# 110304-0007 - Added agent on-hook compatibility
#
### begin parsing run-time options ###
@@ -410,6 +411,8 @@ while($one_day_interval > 0)
@DBremote_conf_exten=@MT;
@DBremote_closer=@MT;
@DBremote_random=@MT;
@DBon_hook_agent=@MT;
@DBon_hook_ring_time=@MT;
@loginexistsRANDOM=@MT;
@loginexistsALL=@MT;
@VD_user=@MT;
@@ -424,7 +427,7 @@ while($one_day_interval > 0)
###############################################################################
###### first, grab all of the ACTIVE remote agents information from the database
###############################################################################
$stmtA = "SELECT remote_agent_id,user_start,number_of_lines,server_ip,conf_exten,status,campaign_id,closer_campaigns FROM vicidial_remote_agents where status IN('ACTIVE') and server_ip='$server_ip' order by user_start;";
$stmtA = "SELECT remote_agent_id,user_start,number_of_lines,server_ip,conf_exten,status,campaign_id,closer_campaigns,on_hook_agent,on_hook_ring_time FROM vicidial_remote_agents where status IN('ACTIVE') and server_ip='$server_ip' order by user_start;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -438,6 +441,8 @@ while($one_day_interval > 0)
$conf_exten = $aryA[4];
$campaign_id = $aryA[6];
$closer_campaigns = $aryA[7];
$on_hook_agent = $aryA[8];
$on_hook_ring_time = $aryA[9];
$y=0;
while ($y < $number_of_lines)
@@ -456,6 +461,8 @@ while($one_day_interval > 0)
}
$DBremote_closer[$user_counter] = $closer_campaigns;
$DBremote_random[$user_counter] = $random;
$DBon_hook_agent[$user_counter] = $on_hook_agent;
$DBon_hook_ring_time[$user_counter] = $on_hook_ring_time;
$y++;
$user_counter++;
@@ -520,9 +527,12 @@ while($one_day_interval > 0)
{$CAMPAIGN_autodial[$h] = 'N';}
}
$sthA->finish();
$DBon_hook_agent[$user_counter] = $on_hook_agent;
$DBon_hook_ring_time[$user_counter] = $on_hook_ring_time;
### check to see if the record exists and only needs random number update
$stmtA = "SELECT count(*) FROM vicidial_live_agents where user='$DBremote_user[$h]' and server_ip='$server_ip' and campaign_id='$DBremote_campaign[$h]' and conf_exten='$DBremote_conf_exten[$h]' and closer_campaigns='$DBremote_closer[$h]' and outbound_autodial='$CAMPAIGN_autodial[$h]';";
$stmtA = "SELECT count(*) FROM vicidial_live_agents where user='$DBremote_user[$h]' and server_ip='$server_ip' and campaign_id='$DBremote_campaign[$h]' and conf_exten='$DBremote_conf_exten[$h]' and closer_campaigns='$DBremote_closer[$h]' and outbound_autodial='$CAMPAIGN_autodial[$h]' and on_hook_agent='$DBon_hook_agent[$h]' and on_hook_ring_time='$DBon_hook_ring_time[$h]';";
if ($DBX) {print STDERR "|$stmtA|\n";}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
@@ -557,7 +567,7 @@ while($one_day_interval > 0)
if ($loginexistsALL[$h] > 0)
{
$stmtA = "UPDATE vicidial_live_agents set random_id='$DBremote_random[$h]',campaign_id='$DBremote_campaign[$h]',conf_exten='$DBremote_conf_exten[$h]',closer_campaigns='$DBremote_closer[$h]',status='READY',last_state_change='$SQLdate',outbound_autodial='$CAMPAIGN_autodial[$h]' where user='$DBremote_user[$h]' and server_ip='$server_ip';";
$stmtA = "UPDATE vicidial_live_agents set random_id='$DBremote_random[$h]',campaign_id='$DBremote_campaign[$h]',conf_exten='$DBremote_conf_exten[$h]',closer_campaigns='$DBremote_closer[$h]',status='READY',last_state_change='$SQLdate',outbound_autodial='$CAMPAIGN_autodial[$h]',on_hook_agent='$DBon_hook_agent[$h]',on_hook_ring_time='$DBon_hook_ring_time[$h]' where user='$DBremote_user[$h]' and server_ip='$server_ip';";
$affected_rows = $dbhA->do($stmtA);
if ($DBX) {print STDERR "$DBremote_user[$h] ALL UPDATE: $affected_rows\n";}
# if ($affected_rows>0)
@@ -596,7 +606,7 @@ while($one_day_interval > 0)
}
$sthA->finish();
$stmtA = "INSERT INTO vicidial_live_agents (user,server_ip,conf_exten,extension,status,campaign_id,random_id,last_call_time,last_update_time,last_call_finish,closer_campaigns,channel,uniqueid,callerid,user_level,comments,last_state_change,outbound_autodial,ra_user) values('$DBremote_user[$h]','$server_ip','$DBremote_conf_exten[$h]','R/$DBremote_user[$h]','READY','$DBremote_campaign[$h]','$DBremote_random[$h]','$SQLdate','$FDtsSQLdate','$SQLdate','$DBremote_closer[$h]','','','','$DBuser_level[$h]','REMOTE','$SQLdate','$CAMPAIGN_autodial[$h]','$DBuser_start[$h]');";
$stmtA = "INSERT INTO vicidial_live_agents (user,server_ip,conf_exten,extension,status,campaign_id,random_id,last_call_time,last_update_time,last_call_finish,closer_campaigns,channel,uniqueid,callerid,user_level,comments,last_state_change,outbound_autodial,ra_user,on_hook_agent,on_hook_ring_time) values('$DBremote_user[$h]','$server_ip','$DBremote_conf_exten[$h]','R/$DBremote_user[$h]','READY','$DBremote_campaign[$h]','$DBremote_random[$h]','$SQLdate','$FDtsSQLdate','$SQLdate','$DBremote_closer[$h]','','','','$DBuser_level[$h]','REMOTE','$SQLdate','$CAMPAIGN_autodial[$h]','$DBuser_start[$h]','$DBon_hook_agent[$h]','$DBon_hook_ring_time[$h]');";
$affected_rows = $dbhA->do($stmtA);
if ($DBX) {print STDERR "$DBremote_user[$h] NEW INSERT\n";}
if ($TESTrun > 0)
+44 -36
View File
@@ -59,6 +59,7 @@
# 101111-1556 - Added source to vicidial_hopper inserts
# 101123-0443 - Fixed minor parked call manual dial bug
# 110224-1854 - Added compatibility with QM phone environment logging
# 110304-0005 - Small changes for CPD and on-hook agent features
#
# defaults for PreFork
@@ -771,40 +772,46 @@ sub process_request
if ($channel =~ /^Local/)
{
$CPDfound=0;
##############################################################
### BEGIN - CPD Look for result for B/DC calls
##############################################################
$stmtA = "SELECT result FROM vicidial_cpd_log where callerid='$callerid' and result NOT IN('Voice','Unknown','???','') order by cpd_id desc 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;
$sthArows=$sthA->rows;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$cpd_result = $aryA[0];
$sthA->finish();
if ($cpd_result =~ /Busy/i) {$VDL_status='CPDB'; $VDAC_status='BUSY'; $CPDfound++;}
if ($cpd_result =~ /Unknown/i) {$VDL_status='CPDUK'; $VDAC_status='NA'; $CPDfound++;}
if ($cpd_result =~ /All-Trunks-Busy/i) {$VDL_status='CPDATB'; $VDAC_status='CONGESTION'; $CPDfound++;}
if ($cpd_result =~ /No-Answer/i) {$VDL_status='CPDNA'; $VDAC_status='NA'; $CPDfound++;}
if ($cpd_result =~ /Reject/i) {$VDL_status='CPDREJ'; $VDAC_status='DISCONNECT'; $CPDfound++;}
if ($cpd_result =~ /Invalid-Number/i) {$VDL_status='CPDINV'; $VDAC_status='DISCONNECT'; $CPDfound++;}
if ($cpd_result =~ /Service-Unavailable/i) {$VDL_status='CPDSUA'; $VDAC_status='CONGESTION'; $CPDfound++;}
if ($cpd_result =~ /Sit-Intercept/i) {$VDL_status='CPDSI'; $VDAC_status='DISCONNECT'; $CPDfound++;}
if ($cpd_result =~ /Sit-No-Circuit/i) {$VDL_status='CPDSNC'; $VDAC_status='CONGESTION'; $CPDfound++;}
if ($cpd_result =~ /Sit-Reorder/i) {$VDL_status='CPDSR'; $VDAC_status='CONGESTION'; $CPDfound++;}
if ($cpd_result =~ /Sit-Unknown/i) {$VDL_status='CPDSUK'; $VDAC_status='CONGESTION'; $CPDfound++;}
if ($cpd_result =~ /Sit-Vacant/i) {$VDL_status='CPDSV'; $VDAC_status='CONGESTION'; $CPDfound++;}
if ($cpd_result =~ /\?\?\?/i) {$VDL_status='CPDERR'; $VDAC_status='NA'; $CPDfound++;}
if ($cpd_result =~ /Fax|Modem/i) {$VDL_status='AFAX'; $VDAC_status='FAX'; $CPDfound++;}
if ($cpd_result =~ /Answering-Machine/i) {$VDL_status='AA'; $VDAC_status='AMD'; $CPDfound++;}
}
$sthA->finish();
##############################################################
### END - CPD Look for result for B/DC calls
##############################################################
# V2251502010052435563
if ($callerid =~ /^V\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d/)
{
##############################################################
### BEGIN - CPD Look for result for B/DC calls
##############################################################
sleep(1);
$stmtA = "SELECT result FROM vicidial_cpd_log where callerid='$callerid' and result NOT IN('Voice','Unknown','???','') order by cpd_id desc 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;
$sthArows=$sthA->rows;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$cpd_result = $aryA[0];
$sthA->finish();
if ($cpd_result =~ /Busy/i) {$VDL_status='CPDB'; $VDAC_status='BUSY'; $CPDfound++;}
if ($cpd_result =~ /Unknown/i) {$VDL_status='CPDUK'; $VDAC_status='NA'; $CPDfound++;}
if ($cpd_result =~ /All-Trunks-Busy/i) {$VDL_status='CPDATB'; $VDAC_status='CONGESTION'; $CPDfound++;}
if ($cpd_result =~ /No-Answer/i) {$VDL_status='CPDNA'; $VDAC_status='NA'; $CPDfound++;}
if ($cpd_result =~ /Reject/i) {$VDL_status='CPDREJ'; $VDAC_status='DISCONNECT'; $CPDfound++;}
if ($cpd_result =~ /Invalid-Number/i) {$VDL_status='CPDINV'; $VDAC_status='DISCONNECT'; $CPDfound++;}
if ($cpd_result =~ /Service-Unavailable/i) {$VDL_status='CPDSUA'; $VDAC_status='CONGESTION'; $CPDfound++;}
if ($cpd_result =~ /Sit-Intercept/i) {$VDL_status='CPDSI'; $VDAC_status='DISCONNECT'; $CPDfound++;}
if ($cpd_result =~ /Sit-No-Circuit/i) {$VDL_status='CPDSNC'; $VDAC_status='CONGESTION'; $CPDfound++;}
if ($cpd_result =~ /Sit-Reorder/i) {$VDL_status='CPDSR'; $VDAC_status='CONGESTION'; $CPDfound++;}
if ($cpd_result =~ /Sit-Unknown/i) {$VDL_status='CPDSUK'; $VDAC_status='CONGESTION'; $CPDfound++;}
if ($cpd_result =~ /Sit-Vacant/i) {$VDL_status='CPDSV'; $VDAC_status='CONGESTION'; $CPDfound++;}
if ($cpd_result =~ /\?\?\?/i) {$VDL_status='CPDERR'; $VDAC_status='NA'; $CPDfound++;}
if ($cpd_result =~ /Fax|Modem/i) {$VDL_status='AFAX'; $VDAC_status='FAX'; $CPDfound++;}
if ($cpd_result =~ /Answering-Machine/i) {$VDL_status='AA'; $VDAC_status='AMD'; $CPDfound++;}
}
$sthA->finish();
##############################################################
### END - CPD Look for result for B/DC calls
##############################################################
}
if ( ($PRI =~ /^PRI$/) && ($callerid =~ /\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d/) && ( ( ($dialstatus =~ /BUSY/) || ( ($dialstatus =~ /CHANUNAVAIL/) && ($hangup_cause =~ /^1$|^28$/) ) ) || ($CPDfound > 0) ))
{
if ($CPDfound < 1)
@@ -829,12 +836,10 @@ sub process_request
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$VDLaffected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDAD vicidial_log update: |$VDLaffected_rows|$uniqueid|$VDACuniqueid|"; &agi_output;}
sleep(1);
}
else
{
if ($AGILOG) {$agi_string = "-- VD_hangup Local DEBUG: |$PRI|$callerid|$dialstatus|$hangup_cause|"; &agi_output;}
if ($AGILOG) {$agi_string = "-- VD_hangup Local DEBUG: |$PRI|$callerid|$dialstatus|$hangup_cause|$CPDfound|$VDL_status|"; &agi_output;}
}
if ($AGILOG) {$agi_string = "+++++ VDAD START LOCAL CHANNEL: EXITING- $priority"; &agi_output;}
@@ -915,6 +920,9 @@ sub process_request
$VACaffected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDAC record deleted: |$VACaffected_rows| |$VD_lead_id|$uniqueid|$VD_uniqueid|$VD_callerid|$VARserver_ip|$VD_status|"; &agi_output;}
$stmtA = "UPDATE vicidial_live_agents SET ring_callerid='' where ring_callerid='$callerid';";
$VLACaffected_rows = $dbhA->do($stmtA);
#############################################
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmtA = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;";
@@ -325,7 +325,7 @@ exten => _86000[5-9]X,1,Meetme,${EXTEN}|F
exten => _86000[5-9]X,n,Hangup
exten => _8600[1-2]XX,1,Meetme,${EXTEN}|F
exten => _8600[1-2]XX,n,Hangup
; quiet entry and leaving conferences for VICIDIAL (inbound announce and SendDTMF)
; quiet entry and leaving conferences for VICIDIAL (inbound announce, SendDTMF and ring-agent)
exten => _78600XXX,1,Meetme,${EXTEN:1}|Fq
exten => _78600XXX,n,Hangup
; quiet monitor-only extensions for meetme rooms (for room managers)
@@ -378,6 +378,13 @@ exten => 8320,2,Hangup
exten => _8320*.,1,AGI(VD_amd.agi,${EXTEN}-----YES)
exten => _8320*.,2,Hangup
; these are used for the ring_all function in VICIDIAL
exten => _8331*.,1,Playback(sip-silence)
exten => _8331*.,n,AGI(agi-VDAD_RINGALL.agi,${EXTEN})
exten => _8331*.,n,AGI(agi-VDAD_RINGALL.agi,${EXTEN})
exten => _8331*.,n,Hangup
; use for selective CallerID hangup by area code(hard-coded)
exten => 8352,1,AGI(agi-VDADselective_CID_hangup.agi,${EXTEN})
exten => 8352,2,Playback(safe_harbor)
@@ -329,7 +329,7 @@ exten => _86000[5-9]X,1,Meetme,${EXTEN}|F
exten => _86000[5-9]X,n,Hangup
exten => _8600[1-2]XX,1,Meetme,${EXTEN}|F
exten => _8600[1-2]XX,n,Hangup
; quiet entry and leaving conferences for VICIDIAL (inbound announce and SendDTMF)
; quiet entry and leaving conferences for VICIDIAL (inbound announce, SendDTMF and ring-agent)
exten => _78600XXX,1,Meetme,${EXTEN:1}|Fq
exten => _78600XXX,n,Hangup
; quiet monitor-only extensions for meetme rooms (for room managers)
@@ -382,6 +382,13 @@ exten => 8320,2,Hangup
exten => _8320*.,1,AGI(VD_amd.agi,${EXTEN}-----YES)
exten => _8320*.,2,Hangup
; these are used for the ring_all function in VICIDIAL
exten => _8331*.,1,Playback(sip-silence)
exten => _8331*.,n,AGI(agi-VDAD_RINGALL.agi,${EXTEN})
exten => _8331*.,n,AGI(agi-VDAD_RINGALL.agi,${EXTEN})
exten => _8331*.,n,Hangup
; use for selective CallerID hangup by area code(hard-coded)
exten => 8352,1,AGI(agi-VDADselective_CID_hangup.agi,${EXTEN})
exten => 8352,2,Playback(safe_harbor)
@@ -78,6 +78,7 @@ use_external_server_ip ENUM('Y','N') default 'N',
codecs_list VARCHAR(100) default '',
codecs_with_template ENUM('0','1') default '0',
webphone_dialpad ENUM('Y','N','TOGGLE','TOGGLE_OFF') default 'Y',
on_hook_agent ENUM('Y','N') default 'N',
index (server_ip),
unique index extenserver (extension, server_ip)
);
@@ -388,7 +389,10 @@ external_timer_action_destination VARCHAR(100) default '',
index (random_id),
index (last_call_time),
index (last_update_time),
index (last_call_finish)
index (last_call_finish),
on_hook_agent ENUM('Y','N') default 'N',
on_hook_ring_time SMALLINT(5) default '15',
ring_callerid VARCHAR(20) default ''
);
CREATE TABLE vicidial_auto_calls (
@@ -412,6 +416,7 @@ agent_only VARCHAR(20) default '',
agent_grab VARCHAR(20) default '',
queue_position SMALLINT(4) UNSIGNED default '1',
extension VARCHAR(100) default '',
agent_grab_extension VARCHAR(100) default '',
index (uniqueid),
index (callerid),
index (call_time),
@@ -882,7 +887,7 @@ group_color VARCHAR(7),
active ENUM('Y','N'),
web_form_address TEXT,
voicemail_ext VARCHAR(10),
next_agent_call ENUM('random','oldest_call_start','oldest_call_finish','overall_user_level','inbound_group_rank','campaign_rank','fewest_calls','fewest_calls_campaign','longest_wait_time') default 'longest_wait_time',
next_agent_call ENUM('random','oldest_call_start','oldest_call_finish','overall_user_level','inbound_group_rank','campaign_rank','fewest_calls','fewest_calls_campaign','longest_wait_time','ring_all') default 'longest_wait_time',
fronter_display ENUM('Y','N') default 'Y',
ingroup_script VARCHAR(10),
get_call_launch ENUM('NONE','SCRIPT','WEBFORM','WEBFORMTWO','FORM') default 'NONE',
@@ -976,7 +981,8 @@ calculate_estimated_hold_seconds SMALLINT(5) UNSIGNED default '0',
add_lead_url TEXT,
eht_minimum_prompt_filename VARCHAR(255) default '',
eht_minimum_prompt_no_block ENUM('N','Y') default 'N',
eht_minimum_prompt_seconds SMALLINT(5) default '10'
eht_minimum_prompt_seconds SMALLINT(5) default '10',
on_hook_ring_time SMALLINT(5) default '15'
);
CREATE TABLE vicidial_stations (
@@ -1000,7 +1006,9 @@ status ENUM('ACTIVE','INACTIVE') default 'INACTIVE',
campaign_id VARCHAR(8),
closer_campaigns TEXT,
extension_group VARCHAR(20) default 'NONE',
extension_group_order VARCHAR(20) default 'NONE'
extension_group_order VARCHAR(20) default 'NONE',
on_hook_agent ENUM('Y','N') default 'N',
on_hook_ring_time SMALLINT(5) default '15'
);
CREATE TABLE live_inbound_log (
@@ -2442,7 +2450,7 @@ ALTER TABLE vicidial_call_notes_archive MODIFY notesid INT(9) UNSIGNED NOT NULL;
CREATE TABLE vicidial_lead_search_log_archive LIKE vicidial_lead_search_log;
ALTER TABLE vicidial_lead_search_log_archive MODIFY search_log_id INT(9) UNSIGNED NOT NULL;
UPDATE system_settings SET db_schema_version='1263',db_schema_update_date=NOW();
UPDATE system_settings SET db_schema_version='1264',db_schema_update_date=NOW();
GRANT RELOAD ON *.* TO cron@'%';
GRANT RELOAD ON *.* TO cron@localhost;
+15
View File
@@ -696,3 +696,18 @@ ALTER TABLE servers ADD active_twin_server_ip VARCHAR(15) default '';
UPDATE system_settings SET db_schema_version='1263',db_schema_update_date=NOW();
ALTER TABLE vicidial_inbound_groups ADD on_hook_ring_time SMALLINT(5) default '15';
ALTER TABLE vicidial_inbound_groups MODIFY next_agent_call ENUM('random','oldest_call_start','oldest_call_finish','overall_user_level','inbound_group_rank','campaign_rank','fewest_calls','fewest_calls_campaign','longest_wait_time','ring_all') default 'longest_wait_time';
ALTER TABLE vicidial_live_agents ADD on_hook_agent ENUM('Y','N') default 'N';
ALTER TABLE vicidial_live_agents ADD on_hook_ring_time SMALLINT(5) default '15';
ALTER TABLE vicidial_live_agents ADD ring_callerid VARCHAR(20) default '';
ALTER TABLE phones ADD on_hook_agent ENUM('Y','N') default 'N';
ALTER TABLE vicidial_remote_agents ADD on_hook_agent ENUM('Y','N') default 'N';
ALTER TABLE vicidial_remote_agents ADD on_hook_ring_time SMALLINT(5) default '15';
ALTER TABLE vicidial_auto_calls ADD agent_grab_extension VARCHAR(100) default '';
UPDATE system_settings SET db_schema_version='1264',db_schema_update_date=NOW();
@@ -585,6 +585,17 @@ Callback Entry Time||
Callback Trigger Time||
Callback Comments||
To see information on one of the callbacks below, click on the INFO link. To call the customer back now, click on the DIAL link. If you click on a record below to dial it, it will be removed from the list||
rings all available agents until one picks up the phone||
NOTES: For ring_all, the agents that are using phones that have On Hook Agent enabled will have their phones ring and the first one to answer will receive the call and the information on the agent screen. Since ring_all ignores agent wait time and ranking and will call every agent that is available for the queue, we do not recommend using this method for large queues. When using ring_all, agents logged with phones that have the On Hook Agent disabled will have to use the Calls In Queue panel and click on the TAKE CALL link to take calls in queue. The amount of time the agents phone will ring for ring_all is set to the On-Hook Ring Time setting or the shortest ring time of the phones that will be called. We do not recommend using ring_all on high call volume queues, or queues with many agents. The ring_all method is intended to be used with only a few agents and on low call volume in-groups||
This option is only used for agents that are logged in with phones that have the agent-on-hook feature enabled. This is the number of seconds that each call attempt to the agent will ring for until the system will wait one second and start ringing the available agent phones again. This field can be overridden if the agent phones are set to a lower ring time which may be necessary to prevent calls from being sent one phones voicemail. Default is 15||
On-Hook Agent||
On-Hook Ring Time||
This option is only used for inbound calls going to this remote agent. This feature will call the remote agent and will not send the customer to the remote agent until the line is answered. Default is N for disabled||
This option is only used when the On-Hook Agent field above is set to Y and then only for inbound calls coming to this remote agent. This is the number of seconds that each call attempt will ring to try to get an answer. It is recommended that you set this to a few seconds less than it takes for a call to be sent to voicemail. Default is 15||
On-Hook Agent Login||
This option is only used for inbound calls going to an agent logged in with this phone. This feature will call the agent and will not send the customer to the agents session until the line is answered. Default is N for disabled||
This is a Phone On-Hook Agent||
Maximum Ring Time||
############################################################ MANAGER Manual
+4
View File
@@ -2035,6 +2035,10 @@ if ($function == 'ra_call_control')
$stmt = "DELETE from vicidial_auto_calls where callerid='$value';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$stmt = "UPDATE vicidial_live_agents set ring_callerid='' where ring_callerid='$value';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
}
}
else
+38 -4
View File
@@ -276,12 +276,13 @@
# 110222-2228 - Added owner restriction to agent lead search
# 110224-1712 - Added compatibility with QM phone environment logging and QM pause code last call logging
# 110225-1237 - Added scheduled callback lead info display to the lead info view function
# 110303-1616 - Added vicidial_log_extended logging for manual dial calls
#
$version = '2.4-181';
$build = '110225-1237';
$version = '2.4-182';
$build = '110303-1616';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=398;
$mysql_log_count=403;
$one_mysql_log=0;
require("dbconnect.php");
@@ -3054,6 +3055,11 @@ if ($ACTION == 'manDiaLlookCaLL')
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00293',$user,$server_ip,$session_name,$one_mysql_log);}
$stmt="UPDATE vicidial_live_agents set ring_callerid='' where ring_callerid='$MDnextCID';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00399',$user,$server_ip,$session_name,$one_mysql_log);}
}
}
}
@@ -3140,6 +3146,13 @@ if ($stage == "start")
$user_group = trim("$row[0]");
}
##### insert log into vicidial_log_extended for manual VICIDiaL call
$stmt="INSERT IGNORE INTO vicidial_log_extended SET uniqueid='$uniqueid',server_ip='$server_ip',call_date='$NOW_TIME',lead_id='$lead_id',caller_code='$MDnextCID',custom_call_id='' ON DUPLICATE KEY UPDATE server_ip='$server_ip',call_date='$NOW_TIME',lead_id='$lead_id',caller_code='$MDnextCID';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00400',$user,$server_ip,$session_name,$one_mysql_log);}
$affected_rowsX = mysql_affected_rows($link);
$manualVLexists=0;
$beginUNIQUEID = preg_replace("/\..*/","",$uniqueid);
$stmt="SELECT count(*) from vicidial_log where lead_id='$lead_id' and user='$user' and phone_number='$phone_number' and uniqueid LIKE \"$beginUNIQUEID%\";";
@@ -3877,6 +3890,13 @@ if ($stage == "end")
}
}
##### insert log into vicidial_log_extended for manual VICIDiaL call
$stmt="INSERT IGNORE INTO vicidial_log_extended SET uniqueid='$uniqueid',server_ip='$server_ip',call_date='$NOW_TIME',lead_id='$lead_id',caller_code='$MDnextCID',custom_call_id='' ON DUPLICATE KEY UPDATE server_ip='$server_ip',call_date='$NOW_TIME',lead_id='$lead_id',caller_code='$MDnextCID';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00401',$user,$server_ip,$session_name,$one_mysql_log);}
$affected_rowsX = mysql_affected_rows($link);
### check to see if the vicidial_log record exists, if not, insert it
$manualVLexists=0;
$beginUNIQUEID = preg_replace("/\..*/","",$uniqueid);
@@ -5908,6 +5928,13 @@ if ($ACTION == 'updateDISPO')
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00215',$user,$server_ip,$session_name,$one_mysql_log);}
##### insert log into vicidial_log_extended for manual VICIDiaL call
$stmt="INSERT IGNORE INTO vicidial_log_extended SET uniqueid='$FAKEcall_id',server_ip='$server_ip',call_date='$NOW_TIME',lead_id='$lead_id',caller_code='$MDnextCID',custom_call_id='' ON DUPLICATE KEY UPDATE server_ip='$server_ip',call_date='$NOW_TIME',lead_id='$lead_id',caller_code='$MDnextCID';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00402',$user,$server_ip,$session_name,$one_mysql_log);}
$affected_rowsX = mysql_affected_rows($link);
$MAN_vl_insert++;
}
@@ -5915,6 +5942,11 @@ if ($ACTION == 'updateDISPO')
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00219',$user,$server_ip,$session_name,$one_mysql_log);}
$stmt="UPDATE vicidial_live_agents set ring_callerid='' where ring_callerid='$MDnextCID';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00403',$user,$server_ip,$session_name,$one_mysql_log);}
}
else
{
@@ -7193,7 +7225,9 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') )
$vla_lead_wipeSQL='';
if ($ACTION == 'VDADready')
{$vla_lead_wipeSQL = ",lead_id=0";}
$stmt="UPDATE vicidial_live_agents set status='$stage' $vla_lead_wipeSQL where user='$user' and server_ip='$server_ip';";
if ($ACTION == 'VDADpause')
{$vla_ring_resetSQL = ",ring_callerid=''";}
$stmt="UPDATE vicidial_live_agents set status='$stage' $vla_lead_wipeSQL $vla_ring_resetSQL where user='$user' and server_ip='$server_ip';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {$errno = mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00166',$user,$server_ip,$session_name,$one_mysql_log);}
+30 -10
View File
@@ -338,12 +338,13 @@
# 110221-1251 - Changed statuses display to keep track of non-selectable statuses
# 110224-1713 - Added compatibility with QM phone environment logging, QM pause code last call logging and active server twin check
# 110225-1231 - Changed scheduled callbacks list to allow clicking to see lead info without dialing, and separate dial link
# 110303-2321 - Added notice of on-hook phone use, and ability to click 'ring' to call into session, minor queue_log fix
#
$version = '2.4-315c';
$build = '110225-1231';
$version = '2.4-316c';
$build = '110303-2321';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=71;
$mysql_log_count=72;
$one_mysql_log=0;
require("dbconnect.php");
@@ -1937,7 +1938,7 @@ else
echo "<!-- Phones balance selection: $phone_login|$pb_server_ip|$past_minutes_date| |$pb_log -->\n";
}
echo "<title>Agent web client</title>\n";
$stmt="SELECT extension,dialplan_number,voicemail_id,phone_ip,computer_ip,server_ip,login,pass,status,active,phone_type,fullname,company,picture,messages,old_messages,protocol,local_gmt,ASTmgrUSERNAME,ASTmgrSECRET,login_user,login_pass,login_campaign,park_on_extension,conf_on_extension,VICIDIAL_park_on_extension,VICIDIAL_park_on_filename,monitor_prefix,recording_exten,voicemail_exten,voicemail_dump_exten,ext_context,dtmf_send_extension,call_out_number_group,client_browser,install_directory,local_web_callerID_URL,VICIDIAL_web_URL,AGI_call_logging_enabled,user_switching_enabled,conferencing_enabled,admin_hangup_enabled,admin_hijack_enabled,admin_monitor_enabled,call_parking_enabled,updater_check_enabled,AFLogging_enabled,QUEUE_ACTION_enabled,CallerID_popup_enabled,voicemail_button_enabled,enable_fast_refresh,fast_refresh_rate,enable_persistant_mysql,auto_dial_next_number,VDstop_rec_after_each_call,DBX_server,DBX_database,DBX_user,DBX_pass,DBX_port,DBY_server,DBY_database,DBY_user,DBY_pass,DBY_port,outbound_cid,enable_sipsak_messages,email,template_id,conf_override,phone_context,phone_ring_timeout,conf_secret,is_webphone,use_external_server_ip,codecs_list,webphone_dialpad from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';";
$stmt="SELECT extension,dialplan_number,voicemail_id,phone_ip,computer_ip,server_ip,login,pass,status,active,phone_type,fullname,company,picture,messages,old_messages,protocol,local_gmt,ASTmgrUSERNAME,ASTmgrSECRET,login_user,login_pass,login_campaign,park_on_extension,conf_on_extension,VICIDIAL_park_on_extension,VICIDIAL_park_on_filename,monitor_prefix,recording_exten,voicemail_exten,voicemail_dump_exten,ext_context,dtmf_send_extension,call_out_number_group,client_browser,install_directory,local_web_callerID_URL,VICIDIAL_web_URL,AGI_call_logging_enabled,user_switching_enabled,conferencing_enabled,admin_hangup_enabled,admin_hijack_enabled,admin_monitor_enabled,call_parking_enabled,updater_check_enabled,AFLogging_enabled,QUEUE_ACTION_enabled,CallerID_popup_enabled,voicemail_button_enabled,enable_fast_refresh,fast_refresh_rate,enable_persistant_mysql,auto_dial_next_number,VDstop_rec_after_each_call,DBX_server,DBX_database,DBX_user,DBX_pass,DBX_port,DBY_server,DBY_database,DBY_user,DBY_pass,DBY_port,outbound_cid,enable_sipsak_messages,email,template_id,conf_override,phone_context,phone_ring_timeout,conf_secret,is_webphone,use_external_server_ip,codecs_list,webphone_dialpad,phone_ring_timeout,on_hook_agent from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01025',$VD_login,$server_ip,$session_name,$one_mysql_log);}
@@ -2009,9 +2010,11 @@ else
$use_external_server_ip=$row[74];
$codecs_list=$row[75];
$webphone_dialpad=$row[76];
$phone_ring_timeout=$row[77];
$on_hook_agent=$row[78];
$no_empty_session_warnings=0;
if ($phone_login == 'nophone')
if ( ($phone_login == 'nophone') or ($on_hook_agent == 'Y') )
{
$no_empty_session_warnings=1;
}
@@ -2244,8 +2247,11 @@ else
$webphone_content='';
if ($is_webphone != 'Y')
{
$TEMP_SIP_user_DiaL = $SIP_user_DiaL;
if ($on_hook_agent == 'Y')
{$TEMP_SIP_user_DiaL = 'Local/8300@default';}
### insert a NEW record to the vicidial_manager table to be processed
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$SIqueryCID','Channel: $SIP_user_DiaL','Context: $ext_context','Exten: $session_id','Priority: 1','Callerid: \"$SIqueryCID\" <$campaign_cid>','','','','','');";
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$SIqueryCID','Channel: $TEMP_SIP_user_DiaL','Context: $ext_context','Exten: $session_id','Priority: 1','Callerid: \"$SIqueryCID\" <$campaign_cid>','','','','','');";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01041',$VD_login,$server_ip,$session_name,$one_mysql_log);}
@@ -2358,9 +2364,8 @@ else
{
echo "<!-- campaign is set to auto_dial_level: $auto_dial_level -->\n";
$closer_chooser_string='';
$stmt="INSERT INTO vicidial_live_agents (user,server_ip,conf_exten,extension,status,lead_id,campaign_id,uniqueid,callerid,channel,random_id,last_call_time,last_update_time,last_call_finish,closer_campaigns,user_level,campaign_weight,calls_today,last_state_change,outbound_autodial,manager_ingroup_set) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$closer_chooser_string','$user_level','$campaign_weight','$calls_today','$NOW_TIME','Y','N');";
$stmt="INSERT INTO vicidial_live_agents (user,server_ip,conf_exten,extension,status,lead_id,campaign_id,uniqueid,callerid,channel,random_id,last_call_time,last_update_time,last_call_finish,closer_campaigns,user_level,campaign_weight,calls_today,last_state_change,outbound_autodial,manager_ingroup_set,on_hook_ring_time,on_hook_agent) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$closer_chooser_string','$user_level','$campaign_weight','$calls_today','$NOW_TIME','Y','N','$phone_ring_timeout','$on_hook_agent');";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01044',$VD_login,$server_ip,$session_name,$one_mysql_log);}
@@ -2420,7 +2425,7 @@ else
{
print "<!-- campaign is set to manual dial: $auto_dial_level -->\n";
$stmt="INSERT INTO vicidial_live_agents (user,server_ip,conf_exten,extension,status,lead_id,campaign_id,uniqueid,callerid,channel,random_id,last_call_time,last_update_time,last_call_finish,user_level,campaign_weight,calls_today,last_state_change,outbound_autodial,manager_ingroup_set) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$user_level', '$campaign_weight', '$calls_today','$NOW_TIME','N','N');";
$stmt="INSERT INTO vicidial_live_agents (user,server_ip,conf_exten,extension,status,lead_id,campaign_id,uniqueid,callerid,channel,random_id,last_call_time,last_update_time,last_call_finish,user_level,campaign_weight,calls_today,last_state_change,outbound_autodial,manager_ingroup_set,on_hook_ring_time,on_hook_agent) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$user_level', '$campaign_weight', '$calls_today','$NOW_TIME','N','N','$phone_ring_timeout','$on_hook_agent');";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01047',$VD_login,$server_ip,$session_name,$one_mysql_log);}
@@ -2456,6 +2461,16 @@ else
$affected_rows = mysql_affected_rows($linkB);
echo "<!-- queue_log PAUSE entry added: $VD_login|$affected_rows -->\n";
if ($queuemetrics_addmember_enabled > 0)
{
$stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='$VD_campaign',agent='Agent/$VD_login',verb='ADDMEMBER2',data1='$QM_PHONE',serverid='$queuemetrics_log_id',data4='$qm_phone_environment';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $linkB);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$linkB,$mel,$stmt,'01072',$VD_login,$server_ip,$session_name,$one_mysql_log);}
$affected_rows = mysql_affected_rows($linkB);
echo "<!-- queue_log ADDMEMBER2 entry added: $VD_login|$affected_rows -->\n";
}
mysql_close($linkB);
mysql_select_db("$VARDB_database", $link);
}
@@ -11776,7 +11791,12 @@ $zi=2;
<input type="hidden" name="FORM_LOADED" id="FORM_LOADED" value="0" />
<font class="queue_text">
<a href="#" onclick="start_all_refresh();"><font class="queue_text">Logged in as User</font></a>
<?php echo ": $VD_login on Phone: $SIP_user to campaign: $VD_campaign&nbsp; \n"; ?>
<?php
echo ": $VD_login on Phone: $SIP_user";
if ($on_hook_agent == 'Y')
{echo "(<a href=\"#\" onclick=\"NoneInSessionCalL();return false;\">ring</a>)";}
echo "&nbsp; to campaign: $VD_campaign&nbsp; \n";
?>
&nbsp; &nbsp; <span id="agentchannelSPAN"></span></font>
</td><td colspan="3" valign="top" align="right"><font class="body_text">
<?php if ($territoryCT > 0) {echo "<a href=\"#\" onclick=\"OpeNTerritorYSelectioN();return false;\">TERRITORIES</a> &nbsp; &nbsp; \n";} ?>
@@ -1,7 +1,7 @@
<?php
# AST_timeonVDADall.php
#
# Copyright (C) 2010 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2011 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# live real-time stats for the VICIDIAL Auto-Dialer all servers
#
@@ -72,10 +72,11 @@
# 101109-1448 - Added Auto Hopper Level display (MikeC)
# 101216-1358 - Added functions to work with new realtime_report.php script
# 110218-1037 - Fixed query that was causing load spikes on systems with millions of log entries
# 110303-2125 - Added agent on-hook phone indication and RING status and color
#
$version = '2.4-63';
$build = '110218-1037';
$version = '2.4-64';
$build = '110303-2125';
header ("Content-type: text/html; charset=utf-8");
@@ -824,6 +825,7 @@ else
.khaki {color: black; background-color: #F0E68C}
.orange {color: black; background-color: orange}
.black {color: white; background-color: black}
.salmon {color: white; background-color: #FA8072}
.r1 {color: black; background-color: #FFCCCC}
.r2 {color: black; background-color: #FF9999}
@@ -2167,7 +2169,8 @@ else {$UgroupSQL = " and vicidial_live_agents.campaign_id IN($group_SQL)";}
if (strlen($usergroup)<1) {$usergroupSQL = '';}
else {$usergroupSQL = " and user_group='" . mysql_real_escape_string($usergroup) . "'";}
$stmt="select extension,vicidial_live_agents.user,conf_exten,vicidial_live_agents.status,vicidial_live_agents.server_ip,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),call_server_ip,vicidial_live_agents.campaign_id,vicidial_users.user_group,vicidial_users.full_name,vicidial_live_agents.comments,vicidial_live_agents.calls_today,vicidial_live_agents.callerid,lead_id,UNIX_TIMESTAMP(last_state_change) from vicidial_live_agents,vicidial_users where vicidial_live_agents.user=vicidial_users.user $UgroupSQL $usergroupSQL order by $orderSQL;";
$ring_agents=0;
$stmt="select extension,vicidial_live_agents.user,conf_exten,vicidial_live_agents.status,vicidial_live_agents.server_ip,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),call_server_ip,vicidial_live_agents.campaign_id,vicidial_users.user_group,vicidial_users.full_name,vicidial_live_agents.comments,vicidial_live_agents.calls_today,vicidial_live_agents.callerid,lead_id,UNIX_TIMESTAMP(last_state_change),on_hook_agent,ring_callerid from vicidial_live_agents,vicidial_users where vicidial_live_agents.user=vicidial_users.user $UgroupSQL $usergroupSQL order by $orderSQL;";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$talking_to_print = mysql_num_rows($rslt);
@@ -2194,6 +2197,18 @@ $talking_to_print = mysql_num_rows($rslt);
$Acallerid[$i] = $row[13];
$Alead_id[$i] = $row[14];
$Astate_change[$i] = $row[15];
$Aon_hook_agent[$i] = $row[16];
$Aring_callerid[$i] = $row[17];
$Aring_note[$i] = ' ';
if ($Aon_hook_agent[$i] == 'Y')
{
$Aring_note[$i] = '*';
$ring_agents++;
if (strlen($Aring_callerid[$i]) > 18)
{$Astatus[$i]="RING";}
}
### 3-WAY Check ###
if ($Alead_id[$i]!=0)
@@ -2212,26 +2227,26 @@ $talking_to_print = mysql_num_rows($rslt);
$i++;
}
$callerids='';
$pausecode='';
$stmt="select callerid,lead_id,phone_number from vicidial_auto_calls;";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$calls_to_list = mysql_num_rows($rslt);
$callerids='';
$pausecode='';
$stmt="select callerid,lead_id,phone_number from vicidial_auto_calls;";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$calls_to_list = mysql_num_rows($rslt);
if ($calls_to_list > 0)
{
$i=0;
while ($i < $calls_to_list)
{
$row=mysql_fetch_row($rslt);
$callerids .= "$row[0]|";
$VAClead_ids[$i] = $row[1];
$VACphones[$i] = $row[2];
$i++;
$i=0;
while ($i < $calls_to_list)
{
$row=mysql_fetch_row($rslt);
$callerids .= "$row[0]|";
$VAClead_ids[$i] = $row[1];
$VACphones[$i] = $row[2];
$i++;
}
}
}
### Lookup phone logins
### Lookup phone logins
$i=0;
while ($i < $talking_to_print)
{
@@ -2509,6 +2524,13 @@ $calls_to_list = mysql_num_rows($rslt);
if ($call_time_S >= 300) {$G='<SPAN class="midnightblue"><B>'; $EG='</B></SPAN>';}
}
if ($Astatus[$i] == 'RING')
{
$agent_total++;
$G=''; $EG='';
if ($call_time_S >= 0) {$G='<SPAN class="salmon"><B>'; $EG='</B></SPAN>';}
}
$L='';
$R='';
if ($SIPmonitorLINK>0) {$L=" <a href=\"sip:0$Lsessionid@$server_ip\">LISTEN</a>"; $R='';}
@@ -2556,11 +2578,11 @@ $calls_to_list = mysql_num_rows($rslt);
if ($realtime_block_user_info > 0)
{
$Aecho .= "|$UGD $G$sessionid$EG$L$R | $G$status$EG $CM $pausecode|$CP$SVD$G$call_time_MS$EG | $G$campaign_id$EG | $G$calls_today$EG |$INGRP\n";
$Aecho .= "|$UGD $G$sessionid$EG$L$R$Aring_note[$i]| $G$status$EG $CM $pausecode|$CP$SVD$G$call_time_MS$EG | $G$campaign_id$EG | $G$calls_today$EG |$INGRP\n";
}
if ($realtime_block_user_info < 1)
{
$Aecho .= "| $G$extension$EG |$phoneD<a href=\"./user_status.php?user=$Luser\" target=\"_blank\">$G$user$EG</a> <a href=\"javascript:ingroup_info('$Luser','$j');\">+</a> |$UGD $G$sessionid$EG$L$R | $G$status$EG $CM $pausecode|$CP$SVD$G$call_time_MS$EG | $G$campaign_id$EG | $G$calls_today$EG |$INGRP\n";
$Aecho .= "| $G$extension$EG$Aring_note[$i]|$phoneD<a href=\"./user_status.php?user=$Luser\" target=\"_blank\">$G$user$EG</a> <a href=\"javascript:ingroup_info('$Luser','$j');\">+</a> |$UGD $G$sessionid$EG$L$R | $G$status$EG $CM $pausecode|$CP$SVD$G$call_time_MS$EG | $G$campaign_id$EG | $G$calls_today$EG |$INGRP\n";
}
$j++;
}
@@ -2582,6 +2604,12 @@ $calls_to_list = mysql_num_rows($rslt);
$Aecho .= " <SPAN class=\"lime\"><B> </SPAN> - Agent in 3-WAY > 10 seconds</B>\n";
$Aecho .= " <SPAN class=\"black\"><B> </SPAN> - Agent on a dead call</B>\n";
if ($ring_agents > 0)
{
$Aecho .= " <SPAN class=\"salmon\"><B> </SPAN> - Agent phone ringing</B>\n";
$Aecho .= " <SPAN><B>* Denotes on-hook agent</B></SPAN>\n";
}
if ($agent_ready > 0) {$B='<FONT class="b1">'; $BG='</FONT>';}
if ($agent_ready > 4) {$B='<FONT class="b2">'; $BG='</FONT>';}
if ($agent_ready > 9) {$B='<FONT class="b3">'; $BG='</FONT>';}
+48 -11
View File
@@ -1516,6 +1516,10 @@ if (isset($_GET["queuemetrics_phone_environment"])) {$queuemetrics_phone_envi
elseif (isset($_POST["queuemetrics_phone_environment"])) {$queuemetrics_phone_environment=$_POST["queuemetrics_phone_environment"];}
if (isset($_GET["active_twin_server_ip"])) {$active_twin_server_ip=$_GET["active_twin_server_ip"];}
elseif (isset($_POST["active_twin_server_ip"])) {$active_twin_server_ip=$_POST["active_twin_server_ip"];}
if (isset($_GET["on_hook_agent"])) {$on_hook_agent=$_GET["on_hook_agent"];}
elseif (isset($_POST["on_hook_agent"])) {$on_hook_agent=$_POST["on_hook_agent"];}
if (isset($_GET["on_hook_ring_time"])) {$on_hook_ring_time=$_GET["on_hook_ring_time"];}
elseif (isset($_POST["on_hook_ring_time"])) {$on_hook_ring_time=$_POST["on_hook_ring_time"];}
if (isset($script_id)) {$script_id= strtoupper($script_id);}
@@ -1751,6 +1755,7 @@ if ($non_latin < 1)
$generate_cross_server_exten = ereg_replace("[^0-9]","",$generate_cross_server_exten);
$queuemetrics_addmember_enabled = ereg_replace("[^0-9]","",$queuemetrics_addmember_enabled);
$modify_page = ereg_replace("[^0-9]","",$modify_page);
$on_hook_ring_time = ereg_replace("[^0-9]","",$on_hook_ring_time);
$drop_call_seconds = ereg_replace("[^-0-9]","",$drop_call_seconds);
@@ -1840,6 +1845,7 @@ if ($non_latin < 1)
$first_login_trigger = ereg_replace("[^NY]","",$first_login_trigger);
$eht_minimum_prompt_no_block = ereg_replace("[^NY]","",$eht_minimum_prompt_no_block);
$lead_order_randomize = ereg_replace("[^NY]","",$lead_order_randomize);
$on_hook_agent = ereg_replace("[^NY]","",$on_hook_agent);
$qc_enabled = ereg_replace("[^0-9NY]","",$qc_enabled);
$active = ereg_replace("[^0-9NY]","",$active);
@@ -2659,12 +2665,13 @@ else
# 110215-2135 - Added agent_lead_search options to user and campaign
# 110222-2039 - Added USER, GROUP and TERRITORY restrictions to agent lead search
# 110224-1427 - Added queuemetrics_phone_environment and active_twin_server_ip options
# 110301-1206 - Added options for ring-all in-group next-agent-call
#
# 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.4-303a';
$build = '110224-1427';
$admin_version = '2.4-304a';
$build = '110301-1206';
$STARTtime = date("U");
$SQLdate = date("Y-m-d H:i:s");
@@ -5082,8 +5089,15 @@ if ($ADD==99999)
<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> &nbsp; - longest_wait_time: orders by the amount of time agent has been actively waiting for a call.
<BR> &nbsp; - ring_all: rings all available agents until one picks up the phone.
<BR> NOTES: For ring_all, the agents that are using phones that have On Hook Agent enabled will have their phones ring and the first one to answer will receive the call and the information on the agent screen. Since ring_all ignores agent wait time and ranking and will call every agent that is available for the queue, we do not recommend using this method for large queues. When using ring_all, agents logged with phones that have the On Hook Agent disabled will have to use the Calls In Queue panel and click on the TAKE CALL link to take calls in queue. The amount of time the agents phone will ring for ring_all is set to the On-Hook Ring Time setting or the shortest ring time of the phones that will be called. We do not recommend using ring_all on high call volume queues, or queues with many agents. The ring_all method is intended to be used with only a few agents and on low call volume in-groups.
<BR>
<BR>
<A NAME="vicidial_inbound_groups-on_hook_ring_time">
<BR>
<B>On-Hook Ring Time -</B> This option is only used for agents that are logged in with phones that have the agent-on-hook feature enabled. This is the number of seconds that each call attempt to the agent will ring for until the system will wait one second and start ringing the available agent phones again. This field can be overridden if the agent phones are set to a lower ring time which may be necessary to prevent calls from being sent one phones voicemail. Default is 15.
<BR>
<A NAME="vicidial_inbound_groups-queue_priority">
<BR>
@@ -5813,6 +5827,16 @@ if ($ADD==99999)
<BR>
<B>Campaign -</B> Here is where you select the campaign that these remote agents will be logged into. Inbound needs to use the CLOSER campaign and select the inbound campaigns below that you want to receive calls from.
<BR>
<A NAME="vicidial_remote_agents-on_hook_agent">
<BR>
<B>On-Hook Agent -</B> This option is only used for inbound calls going to this remote agent. This feature will call the remote agent and will not send the customer to the remote agent until the line is answered. Default is N for disabled.
<BR>
<A NAME="vicidial_remote_agents-on_hook_ring_time">
<BR>
<B>On-Hook Ring Time -</B> This option is only used when the On-Hook Agent field above is set to Y and then only for inbound calls coming to this remote agent. This is the number of seconds that each call attempt will ring to try to get an answer. It is recommended that you set this to a few seconds less than it takes for a call to be sent to voicemail. Default is 15.
<BR>
<A NAME="vicidial_remote_agents-closer_campaigns">
<BR>
@@ -6418,6 +6442,11 @@ if ($ADD==99999)
<BR>
<B>Phone Ring Timeout -</B> This is the amount of time, in seconds, that the phone will ring in the dialplan before sending the call to voicemail. Default is 60 seconds.
<BR>
<A NAME="phones-on_hook_agent">
<BR>
<B>On-Hook Agent Login -</B> This option is only used for inbound calls going to an agent logged in with this phone. This feature will call the agent and will not send the customer to the agents session until the line is answered. Default is N for disabled.
<BR>
<A NAME="phones-ASTmgrUSERNAME">
<BR>
@@ -8491,7 +8520,7 @@ if ($ADD==1111)
echo "<tr bgcolor=#B6D3FC><td align=right>Active: </td><td align=left><select size=1 name=active><option SELECTED>Y</option><option>N</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=70 maxlength=1055 value=\"$web_form_address\">$NWB#vicidial_inbound_groups-web_form_address$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Voicemail: </td><td align=left><input type=text name=voicemail_ext size=10 maxlength=10 value=\"$voicemail_ext\">$NWB#vicidial_inbound_groups-voicemail_ext$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>longest_wait_time</option></select>$NWB#vicidial_inbound_groups-next_agent_call$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>longest_wait_time</option><option>ring_all</option></select>$NWB#vicidial_inbound_groups-next_agent_call$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Fronter Display: </td><td align=left><select size=1 name=fronter_display><option SELECTED>Y</option><option>N</option></select>$NWB#vicidial_inbound_groups-fronter_display$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Script: </td><td align=left><select size=1 name=script_id>\n";
echo "$scripts_list";
@@ -10848,7 +10877,7 @@ if ($ADD==2011)
}
else
{
$stmt="INSERT INTO vicidial_inbound_groups (group_id,group_name,group_color,active,web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,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,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,play_place_in_line,play_estimate_hold_time,hold_time_option,hold_time_option_seconds,hold_time_option_exten,hold_time_option_voicemail,hold_time_option_xfer_group,hold_time_option_callback_filename,hold_time_option_callback_list_id,hold_recall_xfer_group,no_delay_call_route,play_welcome_message,answer_sec_pct_rt_stat_one,answer_sec_pct_rt_stat_two,default_group_alias,no_agent_no_queue,no_agent_action,no_agent_action_value,web_form_address_two,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,ignore_list_script_override,extension_appended_cidname,uniqueid_status_display,uniqueid_status_prefix,hold_time_option_minimum,hold_time_option_press_filename,hold_time_option_callmenu,onhold_prompt_no_block,onhold_prompt_seconds,hold_time_option_no_block,hold_time_option_prompt_seconds,hold_time_second_option,hold_time_third_option,wait_hold_option_priority,wait_time_option,wait_time_second_option,wait_time_third_option,wait_time_option_seconds,wait_time_option_exten,wait_time_option_voicemail,wait_time_option_xfer_group,wait_time_option_callmenu,wait_time_option_callback_filename,wait_time_option_callback_list_id,wait_time_option_press_filename,wait_time_option_no_block,wait_time_option_prompt_seconds,timer_action_destination,calculate_estimated_hold_seconds,add_lead_url,eht_minimum_prompt_filename,eht_minimum_prompt_no_block,eht_minimum_prompt_seconds) SELECT \"$group_id\",\"$group_name\",group_color,\"N\",web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,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,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,play_place_in_line,play_estimate_hold_time,hold_time_option,hold_time_option_seconds,hold_time_option_exten,hold_time_option_voicemail,hold_time_option_xfer_group,hold_time_option_callback_filename,hold_time_option_callback_list_id,hold_recall_xfer_group,no_delay_call_route,play_welcome_message,answer_sec_pct_rt_stat_one,answer_sec_pct_rt_stat_two,default_group_alias,no_agent_no_queue,no_agent_action,no_agent_action_value,web_form_address_two,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,ignore_list_script_override,extension_appended_cidname,uniqueid_status_display,uniqueid_status_prefix,hold_time_option_minimum,hold_time_option_press_filename,hold_time_option_callmenu,onhold_prompt_no_block,onhold_prompt_seconds,hold_time_option_no_block,hold_time_option_prompt_seconds,hold_time_second_option,hold_time_third_option,wait_hold_option_priority,wait_time_option,wait_time_second_option,wait_time_third_option,wait_time_option_seconds,wait_time_option_exten,wait_time_option_voicemail,wait_time_option_xfer_group,wait_time_option_callmenu,wait_time_option_callback_filename,wait_time_option_callback_list_id,wait_time_option_press_filename,wait_time_option_no_block,wait_time_option_prompt_seconds,timer_action_destination,calculate_estimated_hold_seconds,add_lead_url,eht_minimum_prompt_filename,eht_minimum_prompt_no_block,eht_minimum_prompt_seconds from vicidial_inbound_groups where group_id=\"$source_group_id\";";
$stmt="INSERT INTO vicidial_inbound_groups (group_id,group_name,group_color,active,web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,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,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,play_place_in_line,play_estimate_hold_time,hold_time_option,hold_time_option_seconds,hold_time_option_exten,hold_time_option_voicemail,hold_time_option_xfer_group,hold_time_option_callback_filename,hold_time_option_callback_list_id,hold_recall_xfer_group,no_delay_call_route,play_welcome_message,answer_sec_pct_rt_stat_one,answer_sec_pct_rt_stat_two,default_group_alias,no_agent_no_queue,no_agent_action,no_agent_action_value,web_form_address_two,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,ignore_list_script_override,extension_appended_cidname,uniqueid_status_display,uniqueid_status_prefix,hold_time_option_minimum,hold_time_option_press_filename,hold_time_option_callmenu,onhold_prompt_no_block,onhold_prompt_seconds,hold_time_option_no_block,hold_time_option_prompt_seconds,hold_time_second_option,hold_time_third_option,wait_hold_option_priority,wait_time_option,wait_time_second_option,wait_time_third_option,wait_time_option_seconds,wait_time_option_exten,wait_time_option_voicemail,wait_time_option_xfer_group,wait_time_option_callmenu,wait_time_option_callback_filename,wait_time_option_callback_list_id,wait_time_option_press_filename,wait_time_option_no_block,wait_time_option_prompt_seconds,timer_action_destination,calculate_estimated_hold_seconds,add_lead_url,eht_minimum_prompt_filename,eht_minimum_prompt_no_block,eht_minimum_prompt_seconds,on_hook_ring_time) SELECT \"$group_id\",\"$group_name\",group_color,\"N\",web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,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,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,play_place_in_line,play_estimate_hold_time,hold_time_option,hold_time_option_seconds,hold_time_option_exten,hold_time_option_voicemail,hold_time_option_xfer_group,hold_time_option_callback_filename,hold_time_option_callback_list_id,hold_recall_xfer_group,no_delay_call_route,play_welcome_message,answer_sec_pct_rt_stat_one,answer_sec_pct_rt_stat_two,default_group_alias,no_agent_no_queue,no_agent_action,no_agent_action_value,web_form_address_two,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,ignore_list_script_override,extension_appended_cidname,uniqueid_status_display,uniqueid_status_prefix,hold_time_option_minimum,hold_time_option_press_filename,hold_time_option_callmenu,onhold_prompt_no_block,onhold_prompt_seconds,hold_time_option_no_block,hold_time_option_prompt_seconds,hold_time_second_option,hold_time_third_option,wait_hold_option_priority,wait_time_option,wait_time_second_option,wait_time_third_option,wait_time_option_seconds,wait_time_option_exten,wait_time_option_voicemail,wait_time_option_xfer_group,wait_time_option_callmenu,wait_time_option_callback_filename,wait_time_option_callback_list_id,wait_time_option_press_filename,wait_time_option_no_block,wait_time_option_prompt_seconds,timer_action_destination,calculate_estimated_hold_seconds,add_lead_url,eht_minimum_prompt_filename,eht_minimum_prompt_no_block,eht_minimum_prompt_seconds,on_hook_ring_time from vicidial_inbound_groups where group_id=\"$source_group_id\";";
$rslt=mysql_query($stmt, $link);
echo "<br><B>GROUP ADDED: $group_id</B>\n";
@@ -14118,7 +14147,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_action='$drop_action',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',drop_inbound_group='$drop_inbound_group',ingroup_recording_override='$ingroup_recording_override',ingroup_rec_filename='$ingroup_rec_filename',afterhours_xfer_group='$afterhours_xfer_group',qc_enabled='$qc_enabled',qc_statuses='$QC_statuses',qc_shift_id='$qc_shift_id',qc_get_record_launch='$qc_get_record_launch',qc_show_recording='$qc_show_recording',qc_web_form_address='$qc_web_form_address',qc_script='$qc_script',play_place_in_line='$play_place_in_line',play_estimate_hold_time='$play_estimate_hold_time',hold_time_option='$hold_time_option',hold_time_option_seconds='$hold_time_option_seconds',hold_time_option_exten='$hold_time_option_exten',hold_time_option_voicemail='$hold_time_option_voicemail',hold_time_option_xfer_group='$hold_time_option_xfer_group',hold_time_option_callback_filename='$hold_time_option_callback_filename',hold_time_option_callback_list_id='$hold_time_option_callback_list_id',hold_recall_xfer_group='$hold_recall_xfer_group',no_delay_call_route='$no_delay_call_route',play_welcome_message='$play_welcome_message',answer_sec_pct_rt_stat_one='$answer_sec_pct_rt_stat_one',answer_sec_pct_rt_stat_two='$answer_sec_pct_rt_stat_two',default_group_alias='$default_group_alias',no_agent_no_queue='$no_agent_no_queue',no_agent_action='$no_agent_action',no_agent_action_value='$no_agent_action_value',web_form_address_two='" . mysql_real_escape_string($web_form_address_two) . "',timer_action='$timer_action',timer_action_message='$timer_action_message',timer_action_seconds='$timer_action_seconds',start_call_url='" . mysql_real_escape_string($start_call_url) . "',dispo_call_url='" . mysql_real_escape_string($dispo_call_url) . "',xferconf_c_number='$xferconf_c_number',xferconf_d_number='$xferconf_d_number',xferconf_e_number='$xferconf_e_number',ignore_list_script_override='$ignore_list_script_override',extension_appended_cidname='$extension_appended_cidname',uniqueid_status_display='$uniqueid_status_display',uniqueid_status_prefix='$uniqueid_status_prefix',hold_time_option_minimum='$hold_time_option_minimum',hold_time_option_press_filename='$hold_time_option_press_filename',hold_time_option_callmenu='$hold_time_option_callmenu',onhold_prompt_no_block='$onhold_prompt_no_block',onhold_prompt_seconds='$onhold_prompt_seconds',hold_time_option_no_block='$hold_time_option_no_block',hold_time_option_prompt_seconds='$hold_time_option_prompt_seconds',hold_time_second_option='$hold_time_second_option',hold_time_third_option='$hold_time_third_option',wait_hold_option_priority='$wait_hold_option_priority',wait_time_option='$wait_time_option',wait_time_second_option='$wait_time_second_option',wait_time_third_option='$wait_time_third_option',wait_time_option_seconds='$wait_time_option_seconds',wait_time_option_exten='$wait_time_option_exten',wait_time_option_voicemail='$wait_time_option_voicemail',wait_time_option_xfer_group='$wait_time_option_xfer_group',wait_time_option_callmenu='$wait_time_option_callmenu',wait_time_option_callback_filename='$wait_time_option_callback_filename',wait_time_option_callback_list_id='$wait_time_option_callback_list_id',wait_time_option_press_filename='$wait_time_option_press_filename',wait_time_option_no_block='$wait_time_option_no_block',wait_time_option_prompt_seconds='$wait_time_option_prompt_seconds',timer_action_destination='$timer_action_destination',calculate_estimated_hold_seconds='$calculate_estimated_hold_seconds',add_lead_url='" . mysql_real_escape_string($add_lead_url) . "',eht_minimum_prompt_filename='$eht_minimum_prompt_filename',eht_minimum_prompt_no_block='$eht_minimum_prompt_no_block',eht_minimum_prompt_seconds='$eht_minimum_prompt_seconds' 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_action='$drop_action',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',drop_inbound_group='$drop_inbound_group',ingroup_recording_override='$ingroup_recording_override',ingroup_rec_filename='$ingroup_rec_filename',afterhours_xfer_group='$afterhours_xfer_group',qc_enabled='$qc_enabled',qc_statuses='$QC_statuses',qc_shift_id='$qc_shift_id',qc_get_record_launch='$qc_get_record_launch',qc_show_recording='$qc_show_recording',qc_web_form_address='$qc_web_form_address',qc_script='$qc_script',play_place_in_line='$play_place_in_line',play_estimate_hold_time='$play_estimate_hold_time',hold_time_option='$hold_time_option',hold_time_option_seconds='$hold_time_option_seconds',hold_time_option_exten='$hold_time_option_exten',hold_time_option_voicemail='$hold_time_option_voicemail',hold_time_option_xfer_group='$hold_time_option_xfer_group',hold_time_option_callback_filename='$hold_time_option_callback_filename',hold_time_option_callback_list_id='$hold_time_option_callback_list_id',hold_recall_xfer_group='$hold_recall_xfer_group',no_delay_call_route='$no_delay_call_route',play_welcome_message='$play_welcome_message',answer_sec_pct_rt_stat_one='$answer_sec_pct_rt_stat_one',answer_sec_pct_rt_stat_two='$answer_sec_pct_rt_stat_two',default_group_alias='$default_group_alias',no_agent_no_queue='$no_agent_no_queue',no_agent_action='$no_agent_action',no_agent_action_value='$no_agent_action_value',web_form_address_two='" . mysql_real_escape_string($web_form_address_two) . "',timer_action='$timer_action',timer_action_message='$timer_action_message',timer_action_seconds='$timer_action_seconds',start_call_url='" . mysql_real_escape_string($start_call_url) . "',dispo_call_url='" . mysql_real_escape_string($dispo_call_url) . "',xferconf_c_number='$xferconf_c_number',xferconf_d_number='$xferconf_d_number',xferconf_e_number='$xferconf_e_number',ignore_list_script_override='$ignore_list_script_override',extension_appended_cidname='$extension_appended_cidname',uniqueid_status_display='$uniqueid_status_display',uniqueid_status_prefix='$uniqueid_status_prefix',hold_time_option_minimum='$hold_time_option_minimum',hold_time_option_press_filename='$hold_time_option_press_filename',hold_time_option_callmenu='$hold_time_option_callmenu',onhold_prompt_no_block='$onhold_prompt_no_block',onhold_prompt_seconds='$onhold_prompt_seconds',hold_time_option_no_block='$hold_time_option_no_block',hold_time_option_prompt_seconds='$hold_time_option_prompt_seconds',hold_time_second_option='$hold_time_second_option',hold_time_third_option='$hold_time_third_option',wait_hold_option_priority='$wait_hold_option_priority',wait_time_option='$wait_time_option',wait_time_second_option='$wait_time_second_option',wait_time_third_option='$wait_time_third_option',wait_time_option_seconds='$wait_time_option_seconds',wait_time_option_exten='$wait_time_option_exten',wait_time_option_voicemail='$wait_time_option_voicemail',wait_time_option_xfer_group='$wait_time_option_xfer_group',wait_time_option_callmenu='$wait_time_option_callmenu',wait_time_option_callback_filename='$wait_time_option_callback_filename',wait_time_option_callback_list_id='$wait_time_option_callback_list_id',wait_time_option_press_filename='$wait_time_option_press_filename',wait_time_option_no_block='$wait_time_option_no_block',wait_time_option_prompt_seconds='$wait_time_option_prompt_seconds',timer_action_destination='$timer_action_destination',calculate_estimated_hold_seconds='$calculate_estimated_hold_seconds',add_lead_url='" . mysql_real_escape_string($add_lead_url) . "',eht_minimum_prompt_filename='$eht_minimum_prompt_filename',eht_minimum_prompt_no_block='$eht_minimum_prompt_no_block',eht_minimum_prompt_seconds='$eht_minimum_prompt_seconds',on_hook_ring_time='$on_hook_ring_time' where group_id='$group_id';";
$rslt=mysql_query($stmt, $link);
### LOG INSERTION Admin Log Table ###
@@ -14403,7 +14432,7 @@ if ($ADD==41111)
}
else
{
$stmt="UPDATE vicidial_remote_agents set user_start='$user_start', number_of_lines='$number_of_lines', server_ip='$server_ip', conf_exten='$conf_exten', status='$status', campaign_id='$campaign_id', closer_campaigns='$groups_value',extension_group='$extension_group' where remote_agent_id='$remote_agent_id';";
$stmt="UPDATE vicidial_remote_agents set user_start='$user_start', number_of_lines='$number_of_lines', server_ip='$server_ip', conf_exten='$conf_exten', status='$status', campaign_id='$campaign_id', closer_campaigns='$groups_value',extension_group='$extension_group',on_hook_agent='$on_hook_agent',on_hook_ring_time='$on_hook_ring_time' where remote_agent_id='$remote_agent_id';";
$rslt=mysql_query($stmt, $link);
echo "<br><B>REMOTE AGENTS MODIFIED</B>\n";
@@ -14887,7 +14916,7 @@ if ($ADD==41111111111)
{
echo "<br>PHONE MODIFIED: $extension\n";
$stmt="UPDATE phones set extension='$extension', dialplan_number='$dialplan_number', voicemail_id='$voicemail_id', phone_ip='$phone_ip', computer_ip='$computer_ip', server_ip='$server_ip', login='$login', pass='$pass', status='$status', active='$active', phone_type='$phone_type', fullname='$fullname', company='$company', picture='$picture', protocol='$protocol', local_gmt='$local_gmt', ASTmgrUSERNAME='$ASTmgrUSERNAME', ASTmgrSECRET='$ASTmgrSECRET', login_user='$login_user', login_pass='$login_pass', login_campaign='$login_campaign', park_on_extension='$park_on_extension', conf_on_extension='$conf_on_extension', VICIDIAL_park_on_extension='$VICIDIAL_park_on_extension', VICIDIAL_park_on_filename='$VICIDIAL_park_on_filename', monitor_prefix='$monitor_prefix', recording_exten='$recording_exten', voicemail_exten='$voicemail_exten', voicemail_dump_exten='$voicemail_dump_exten', ext_context='$ext_context', dtmf_send_extension='$dtmf_send_extension', call_out_number_group='$call_out_number_group', client_browser='$client_browser', install_directory='$install_directory', local_web_callerID_URL='" . mysql_real_escape_string($local_web_callerID_URL) . "', VICIDIAL_web_URL='" . mysql_real_escape_string($VICIDIAL_web_URL) . "', AGI_call_logging_enabled='$AGI_call_logging_enabled', user_switching_enabled='$user_switching_enabled', conferencing_enabled='$conferencing_enabled', admin_hangup_enabled='$admin_hangup_enabled', admin_hijack_enabled='$admin_hijack_enabled', admin_monitor_enabled='$admin_monitor_enabled', call_parking_enabled='$call_parking_enabled', updater_check_enabled='$updater_check_enabled', AFLogging_enabled='$AFLogging_enabled', QUEUE_ACTION_enabled='$QUEUE_ACTION_enabled', CallerID_popup_enabled='$CallerID_popup_enabled', voicemail_button_enabled='$voicemail_button_enabled', enable_fast_refresh='$enable_fast_refresh', fast_refresh_rate='$fast_refresh_rate', enable_persistant_mysql='$enable_persistant_mysql', auto_dial_next_number='$auto_dial_next_number', VDstop_rec_after_each_call='$VDstop_rec_after_each_call', DBX_server='$DBX_server', DBX_database='$DBX_database', DBX_user='$DBX_user', DBX_pass='$DBX_pass', DBX_port='$DBX_port', DBY_server='$DBY_server', DBY_database='$DBY_database', DBY_user='$DBY_user', DBY_pass='$DBY_pass', DBY_port='$DBY_port', outbound_cid='$outbound_cid', enable_sipsak_messages='$enable_sipsak_messages', email='$email', template_id='$template_id', conf_override='$conf_override',phone_context='$phone_context',phone_ring_timeout='$phone_ring_timeout',conf_secret='$conf_secret', delete_vm_after_email='$delete_vm_after_email',is_webphone='$is_webphone',use_external_server_ip='$use_external_server_ip',codecs_list='$codecs_list',codecs_with_template='$codecs_with_template',webphone_dialpad='$webphone_dialpad' where extension='$old_extension' and server_ip='$old_server_ip';";
$stmt="UPDATE phones set extension='$extension', dialplan_number='$dialplan_number', voicemail_id='$voicemail_id', phone_ip='$phone_ip', computer_ip='$computer_ip', server_ip='$server_ip', login='$login', pass='$pass', status='$status', active='$active', phone_type='$phone_type', fullname='$fullname', company='$company', picture='$picture', protocol='$protocol', local_gmt='$local_gmt', ASTmgrUSERNAME='$ASTmgrUSERNAME', ASTmgrSECRET='$ASTmgrSECRET', login_user='$login_user', login_pass='$login_pass', login_campaign='$login_campaign', park_on_extension='$park_on_extension', conf_on_extension='$conf_on_extension', VICIDIAL_park_on_extension='$VICIDIAL_park_on_extension', VICIDIAL_park_on_filename='$VICIDIAL_park_on_filename', monitor_prefix='$monitor_prefix', recording_exten='$recording_exten', voicemail_exten='$voicemail_exten', voicemail_dump_exten='$voicemail_dump_exten', ext_context='$ext_context', dtmf_send_extension='$dtmf_send_extension', call_out_number_group='$call_out_number_group', client_browser='$client_browser', install_directory='$install_directory', local_web_callerID_URL='" . mysql_real_escape_string($local_web_callerID_URL) . "', VICIDIAL_web_URL='" . mysql_real_escape_string($VICIDIAL_web_URL) . "', AGI_call_logging_enabled='$AGI_call_logging_enabled', user_switching_enabled='$user_switching_enabled', conferencing_enabled='$conferencing_enabled', admin_hangup_enabled='$admin_hangup_enabled', admin_hijack_enabled='$admin_hijack_enabled', admin_monitor_enabled='$admin_monitor_enabled', call_parking_enabled='$call_parking_enabled', updater_check_enabled='$updater_check_enabled', AFLogging_enabled='$AFLogging_enabled', QUEUE_ACTION_enabled='$QUEUE_ACTION_enabled', CallerID_popup_enabled='$CallerID_popup_enabled', voicemail_button_enabled='$voicemail_button_enabled', enable_fast_refresh='$enable_fast_refresh', fast_refresh_rate='$fast_refresh_rate', enable_persistant_mysql='$enable_persistant_mysql', auto_dial_next_number='$auto_dial_next_number', VDstop_rec_after_each_call='$VDstop_rec_after_each_call', DBX_server='$DBX_server', DBX_database='$DBX_database', DBX_user='$DBX_user', DBX_pass='$DBX_pass', DBX_port='$DBX_port', DBY_server='$DBY_server', DBY_database='$DBY_database', DBY_user='$DBY_user', DBY_pass='$DBY_pass', DBY_port='$DBY_port', outbound_cid='$outbound_cid', enable_sipsak_messages='$enable_sipsak_messages', email='$email', template_id='$template_id', conf_override='$conf_override',phone_context='$phone_context',phone_ring_timeout='$phone_ring_timeout',conf_secret='$conf_secret', delete_vm_after_email='$delete_vm_after_email',is_webphone='$is_webphone',use_external_server_ip='$use_external_server_ip',codecs_list='$codecs_list',codecs_with_template='$codecs_with_template',webphone_dialpad='$webphone_dialpad',on_hook_agent='$on_hook_agent' where extension='$old_extension' and server_ip='$old_server_ip';";
$rslt=mysql_query($stmt, $link);
$stmtA="UPDATE servers SET rebuild_conf_files='Y' where generate_vicidial_conf='Y' and active_asterisk_server='Y' and server_ip='$server_ip';";
@@ -22217,7 +22246,7 @@ if ($ADD==3111)
echo "<TABLE><TR><TD>\n";
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
$stmt="SELECT group_id,group_name,group_color,active,web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,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,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,play_place_in_line,play_estimate_hold_time,hold_time_option,hold_time_option_seconds,hold_time_option_exten,hold_time_option_voicemail,hold_time_option_xfer_group,hold_time_option_callback_filename,hold_time_option_callback_list_id,hold_recall_xfer_group,no_delay_call_route,play_welcome_message,answer_sec_pct_rt_stat_one,answer_sec_pct_rt_stat_two,default_group_alias,no_agent_no_queue,no_agent_action,no_agent_action_value,web_form_address_two,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,ignore_list_script_override,extension_appended_cidname,uniqueid_status_display,uniqueid_status_prefix,hold_time_option_minimum,hold_time_option_press_filename,hold_time_option_callmenu,onhold_prompt_no_block,onhold_prompt_seconds,hold_time_option_no_block,hold_time_option_prompt_seconds,hold_time_second_option,hold_time_third_option,wait_hold_option_priority,wait_time_option,wait_time_second_option,wait_time_third_option,wait_time_option_seconds,wait_time_option_exten,wait_time_option_voicemail,wait_time_option_xfer_group,wait_time_option_callmenu,wait_time_option_callback_filename,wait_time_option_callback_list_id,wait_time_option_press_filename,wait_time_option_no_block,wait_time_option_prompt_seconds,timer_action_destination,calculate_estimated_hold_seconds,add_lead_url,eht_minimum_prompt_filename, eht_minimum_prompt_no_block, eht_minimum_prompt_seconds from vicidial_inbound_groups where group_id='$group_id';";
$stmt="SELECT group_id,group_name,group_color,active,web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,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,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,play_place_in_line,play_estimate_hold_time,hold_time_option,hold_time_option_seconds,hold_time_option_exten,hold_time_option_voicemail,hold_time_option_xfer_group,hold_time_option_callback_filename,hold_time_option_callback_list_id,hold_recall_xfer_group,no_delay_call_route,play_welcome_message,answer_sec_pct_rt_stat_one,answer_sec_pct_rt_stat_two,default_group_alias,no_agent_no_queue,no_agent_action,no_agent_action_value,web_form_address_two,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,ignore_list_script_override,extension_appended_cidname,uniqueid_status_display,uniqueid_status_prefix,hold_time_option_minimum,hold_time_option_press_filename,hold_time_option_callmenu,onhold_prompt_no_block,onhold_prompt_seconds,hold_time_option_no_block,hold_time_option_prompt_seconds,hold_time_second_option,hold_time_third_option,wait_hold_option_priority,wait_time_option,wait_time_second_option,wait_time_third_option,wait_time_option_seconds,wait_time_option_exten,wait_time_option_voicemail,wait_time_option_xfer_group,wait_time_option_callmenu,wait_time_option_callback_filename,wait_time_option_callback_list_id,wait_time_option_press_filename,wait_time_option_no_block,wait_time_option_prompt_seconds,timer_action_destination,calculate_estimated_hold_seconds,add_lead_url,eht_minimum_prompt_filename, eht_minimum_prompt_no_block, eht_minimum_prompt_seconds,on_hook_ring_time from vicidial_inbound_groups where group_id='$group_id';";
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
@@ -22321,6 +22350,7 @@ if ($ADD==3111)
$eht_minimum_prompt_filename = $row[98];
$eht_minimum_prompt_no_block = $row[99];
$eht_minimum_prompt_seconds = $row[100];
$on_hook_ring_time = $row[101];
##### get callmenu listings for dynamic pulldown
@@ -22440,7 +22470,7 @@ if ($ADD==3111)
{
echo "<tr bgcolor=#B6D3FC><td align=right>Web Form Two: </td><td align=left><input type=text name=web_form_address_two size=70 maxlength=1055 value=\"$web_form_address_two\">$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>longest_wait_time</option><option SELECTED>$next_agent_call</option></select>$NWB#vicidial_inbound_groups-next_agent_call$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>longest_wait_time</option><option>ring_all</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;
@@ -22457,6 +22487,8 @@ if ($ADD==3111)
}
echo "</select> $NWB#vicidial_inbound_groups-queue_priority$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>On-Hook Ring Time: </td><td align=left><input type=text name=on_hook_ring_time size=5 maxlength=4 value=\"$on_hook_ring_time\">$NWB#vicidial_inbound_groups-on_hook_ring_time$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";
@@ -23735,7 +23767,7 @@ if ($ADD==31111)
echo "<TABLE><TR><TD>\n";
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
$stmt="SELECT remote_agent_id,user_start,number_of_lines,server_ip,conf_exten,status,campaign_id,closer_campaigns,extension_group from vicidial_remote_agents where remote_agent_id='$remote_agent_id';";
$stmt="SELECT remote_agent_id,user_start,number_of_lines,server_ip,conf_exten,status,campaign_id,closer_campaigns,extension_group,on_hook_agent,on_hook_ring_time from vicidial_remote_agents where remote_agent_id='$remote_agent_id';";
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$remote_agent_id = $row[0];
@@ -23746,6 +23778,8 @@ if ($ADD==31111)
$status = $row[5];
$campaign_id = $row[6];
$extension_group = $row[8];
$on_hook_agent = $row[9];
$on_hook_ring_time =$row[10];
##### get extension group listing for dynamic pulldown
$stmt="SELECT extension_group_id,count(*) from vicidial_extension_groups group by extension_group_id order by extension_group_id;";
@@ -23780,6 +23814,8 @@ if ($ADD==31111)
echo "<tr bgcolor=#B6D3FC><td align=right>Campaign: </td><td align=left><select size=1 name=campaign_id>\n";
echo "$campaigns_list";
echo "<option SELECTED>$campaign_id</option>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>On-Hook Agent: </td><td align=left><select size=1 name=on_hook_agent><option>Y</option><option>N</option><option SELECTED>$on_hook_agent</option></select>$NWB#vicidial_remote_agents-on_hook_agent$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>On-Hook Ring Time: </td><td align=left><input type=text name=on_hook_ring_time size=5 maxlength=4 value=\"$on_hook_ring_time\"> $NWB#vicidial_remote_agents-on_hook_ring_time$NWE</td></tr>\n";
echo "</select>$NWB#vicidial_remote_agents-campaign_id$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Inbound Groups: </td><td align=left>\n";
echo "$groups_list";
@@ -24872,7 +24908,7 @@ if ($ADD==31111111111)
echo "<TABLE><TR><TD>\n";
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
$stmt="SELECT extension,dialplan_number,voicemail_id,phone_ip,computer_ip,server_ip,login,pass,status,active,phone_type,fullname,company,picture,messages,old_messages,protocol,local_gmt,ASTmgrUSERNAME,ASTmgrSECRET,login_user,login_pass,login_campaign,park_on_extension,conf_on_extension,VICIDIAL_park_on_extension,VICIDIAL_park_on_filename,monitor_prefix,recording_exten,voicemail_exten,voicemail_dump_exten,ext_context,dtmf_send_extension,call_out_number_group,client_browser,install_directory,local_web_callerID_URL,VICIDIAL_web_URL,AGI_call_logging_enabled,user_switching_enabled,conferencing_enabled,admin_hangup_enabled,admin_hijack_enabled,admin_monitor_enabled,call_parking_enabled,updater_check_enabled,AFLogging_enabled,QUEUE_ACTION_enabled,CallerID_popup_enabled,voicemail_button_enabled,enable_fast_refresh,fast_refresh_rate,enable_persistant_mysql,auto_dial_next_number,VDstop_rec_after_each_call,DBX_server,DBX_database,DBX_user,DBX_pass,DBX_port,DBY_server,DBY_database,DBY_user,DBY_pass,DBY_port,outbound_cid,enable_sipsak_messages,email,template_id,conf_override,phone_context,phone_ring_timeout,conf_secret,delete_vm_after_email,is_webphone,use_external_server_ip,codecs_list,codecs_with_template,webphone_dialpad from phones where extension='$extension' and server_ip='$server_ip';";
$stmt="SELECT extension,dialplan_number,voicemail_id,phone_ip,computer_ip,server_ip,login,pass,status,active,phone_type,fullname,company,picture,messages,old_messages,protocol,local_gmt,ASTmgrUSERNAME,ASTmgrSECRET,login_user,login_pass,login_campaign,park_on_extension,conf_on_extension,VICIDIAL_park_on_extension,VICIDIAL_park_on_filename,monitor_prefix,recording_exten,voicemail_exten,voicemail_dump_exten,ext_context,dtmf_send_extension,call_out_number_group,client_browser,install_directory,local_web_callerID_URL,VICIDIAL_web_URL,AGI_call_logging_enabled,user_switching_enabled,conferencing_enabled,admin_hangup_enabled,admin_hijack_enabled,admin_monitor_enabled,call_parking_enabled,updater_check_enabled,AFLogging_enabled,QUEUE_ACTION_enabled,CallerID_popup_enabled,voicemail_button_enabled,enable_fast_refresh,fast_refresh_rate,enable_persistant_mysql,auto_dial_next_number,VDstop_rec_after_each_call,DBX_server,DBX_database,DBX_user,DBX_pass,DBX_port,DBY_server,DBY_database,DBY_user,DBY_pass,DBY_port,outbound_cid,enable_sipsak_messages,email,template_id,conf_override,phone_context,phone_ring_timeout,conf_secret,delete_vm_after_email,is_webphone,use_external_server_ip,codecs_list,codecs_with_template,webphone_dialpad,on_hook_agent from phones where extension='$extension' and server_ip='$server_ip';";
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
@@ -24914,6 +24950,7 @@ if ($ADD==31111111111)
echo "<tr bgcolor=#B6D3FC><td align=right>Client Protocol: </td><td align=left><select size=1 name=protocol><option>SIP</option><option>Zap</option><option>IAX2</option><option>EXTERNAL</option><option selected>$row[16]</option></select>$NWB#phones-protocol$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Local GMT: </td><td align=left><select size=1 name=local_gmt><option>12.75</option><option>12.00</option><option>11.00</option><option>10.00</option><option>9.50</option><option>9.00</option><option>8.00</option><option>7.00</option><option>6.50</option><option>6.00</option><option>5.75</option><option>5.50</option><option>5.00</option><option>4.50</option><option>4.00</option><option>3.50</option><option>3.00</option><option>2.00</option><option>1.00</option><option>0.00</option><option>-1.00</option><option>-2.00</option><option>-3.00</option><option>-3.50</option><option>-4.00</option><option>-5.00</option><option>-6.00</option><option>-7.00</option><option>-8.00</option><option>-9.00</option><option>-10.00</option><option>-11.00</option><option>-12.00</option><option selected>$row[17]</option></select> (Do NOT Adjust for DST)$NWB#phones-local_gmt$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Phone Ring Timeout: </td><td align=left><input type=text name=phone_ring_timeout size=4 maxlength=5 value=\"$row[71]\">$NWB#phones-phone_ring_timeout$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>On-Hook Agent: </td><td align=left><select size=1 name=on_hook_agent><option>Y</option><option>N</option><option selected>$row[79]</option></select>$NWB#phones-on_hook_agent$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Manager Login: </td><td align=left><input type=text name=ASTmgrUSERNAME size=20 maxlength=20 value=\"$row[18]\">$NWB#phones-ASTmgrUSERNAME$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Manager Secret: </td><td align=left><input type=text name=ASTmgrSECRET size=20 maxlength=20 value=\"$row[19]\">$NWB#phones-ASTmgrSECRET$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>VICIDIAL Default User: </td><td align=left><input type=text name=login_user size=20 maxlength=20 value=\"$row[20]\">$NWB#phones-login_user$NWE</td></tr>\n";
+10 -3
View File
@@ -41,10 +41,11 @@
# 101117-1104 - Added callback and custom field entry delete to delete_lead option
# 101206-2126 - Added recording_lookup and did_log_export functions
# 110127-2245 - Added add_user and add_phone functions
# 110303-2122 - Added information on agent-on-hook phone to real-time report popup
#
$version = '2.4-27';
$build = '110127-2245';
$version = '2.4-28';
$build = '110303-2122';
require("dbconnect.php");
@@ -884,7 +885,7 @@ if ($function == 'agent_ingroup_info')
}
else
{
$stmt="SELECT campaign_id,closer_campaigns,outbound_autodial,manager_ingroup_set,external_igb_set_user from vicidial_live_agents where user='$agent_user';";
$stmt="SELECT campaign_id,closer_campaigns,outbound_autodial,manager_ingroup_set,external_igb_set_user,on_hook_agent,on_hook_ring_time from vicidial_live_agents where user='$agent_user';";
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$campaign_id = $row[0];
@@ -892,6 +893,8 @@ if ($function == 'agent_ingroup_info')
$blended = $row[2];
$manager_ingroup_set = $row[3];
$external_igb_set_user = $row[4];
$on_hook_agent = $row[5];
$on_hook_ring_time = $row[6];
$stmt="SELECT full_name from vicidial_users where user='$agent_user';";
$rslt=mysql_query($stmt, $link);
@@ -974,6 +977,10 @@ if ($function == 'agent_ingroup_info')
if ( ($allowed_user_change_ingroups > 0) and ($stage == 'change') )
{
$output .= "<TABLE CELLPADDING=0 CELLSPACING=3 BORDER=0>\n";
if ($on_hook_agent == 'Y')
{
$output .= "<TR><TD ALIGN=CENTER VALIGN=TOP COLSPAN=2><B>This is a Phone On-Hook Agent</B> &nbsp; Maximum Ring Time: $on_hook_ring_time</TD></TR>\n";
}
$output .= "<TR><TD ALIGN=RIGHT VALIGN=TOP>Selected In-Groups: </TD><TD ALIGN=LEFT>\n";
$output .= "<INPUT TYPE=HIDDEN NAME=agent_user ID=agent_user value=\"$agent_user\">\n";
$output .= "<SELECT SIZE=10 NAME=ingroup_new_selections ID=ingroup_new_selections multiple>\n";
@@ -1,7 +1,7 @@
<?php
# realtime_report.php
#
# Copyright (C) 2010 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2011 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# live real-time stats for the VICIDIAL Auto-Dialer all servers
#
@@ -12,13 +12,14 @@
#
# CHANGELOG:
# 101216-1355 - First Build
# 101218-1520 - small time reload bug fix and formatting fixes
# 101218-1520 - Small time reload bug fix and formatting fixes
# 110111-1557 - Added options.php options, minor bug fixes
# 110113-1736 - Small fix
# 110303-2124 - Added agent on-hook phone indication and RING status and color
#
$version = '2.4-4';
$build = '110113-1736';
$version = '2.4-5';
$build = '110303-2124';
header ("Content-type: text/html; charset=utf-8");
@@ -1163,6 +1164,7 @@ function update_variables(task_option,task_choice,force_reload)
.khaki {color: black; background-color: #F0E68C}
.orange {color: black; background-color: orange}
.black {color: white; background-color: black}
.salmon {color: white; background-color: #FA8072}
.r1 {color: black; background-color: #FFCCCC}
.r2 {color: black; background-color: #FF9999}