diff --git a/AST_VDauto_dial.pl b/AST_VDauto_dial.pl index 425346d..2468b8e 100644 --- a/AST_VDauto_dial.pl +++ b/AST_VDauto_dial.pl @@ -40,6 +40,7 @@ # 50812-0957 - corrected max_trunks logic, added update of server every 25 sec # 60120-1522 - corrected time error for hour variable, caused agi problems # 60427-1223 - Fixed Blended in/out CLOSER campaign issue +# 60608-1134 - Altered vac table field of call_type for IN OUT distinction # @@ -181,6 +182,7 @@ while($one_day_interval > 0) @DBIPexistcalls=@MT; @DBIPgoalcalls=@MT; @DBIPmakecalls=@MT; + @DBIPclosercamp=@MT; $active_line_counter=0; $user_counter=0; @@ -237,7 +239,7 @@ while($one_day_interval > 0) ### grab the dial_level and multiply by active agents to get your goalcalls $DBIPadlevel[$user_CIPct]=0; - $dbhA->query("SELECT auto_dial_level,local_call_time,dial_timeout,dial_prefix,campaign_cid,active,campaign_vdad_exten FROM vicidial_campaigns where campaign_id='$DBIPcampaign[$user_CIPct]'"); + $dbhA->query("SELECT auto_dial_level,local_call_time,dial_timeout,dial_prefix,campaign_cid,active,campaign_vdad_exten,closer_campaigns FROM vicidial_campaigns where campaign_id='$DBIPcampaign[$user_CIPct]'"); if ($dbhA->has_selected_record) { $iter=$dbhA->create_record_iterator; @@ -250,6 +252,7 @@ while($one_day_interval > 0) $DBIPcampaigncid[$user_CIPct] = "$record->[4]"; $DBIPactive[$user_CIPct] = "$record->[5]"; $DBIPvdadexten[$user_CIPct] = "$record->[6]"; + $DBIPclosercamp[$user_CIPct] = "$record->[7]"; } } @@ -277,8 +280,18 @@ while($one_day_interval > 0) ### subtract that number from goalcalls to determine how many new ### calls need to be placed in this loop if ($DBIPcampaign[$user_CIPct] =~ /CLOSER/) - {$campaign_query = "(campaign_id LIKE \"CL%\" or campaign_id='$DBIPcampaign[$user_CIPct]')";} - else {$campaign_query = "campaign_id='$DBIPcampaign[$user_CIPct]'";} + { + if (length($DBIPclosercamp[$user_CIPct]) > 2) + { + $DBIPclosercamp[$user_CIPct] =~ s/^ | -$//gi; + $DBIPclosercamp[$user_CIPct] =~ s/ /','/gi; + $DBIPclosercamp[$user_CIPct] = "'$DBIPclosercamp[$user_CIPct]'"; + } + else {$DBIPclosercamp[$user_CIPct]=''} + + $campaign_query = "( (call_type='IN' and campaign_id IN($DBIPclosercamp[$user_CIPct])) or (campaign_id='$DBIPcampaign[$user_CIPct]' and call_type='OUT') )"; + } + else {$campaign_query = "(campaign_id='$DBIPcampaign[$user_CIPct]' and call_type='OUT')";} $dbhA->query("SELECT count(*) FROM vicidial_auto_calls where $campaign_query and server_ip='$DBIPaddress[$user_CIPct]' and status IN('SENT','RINGING','LIVE','XFER','CLOSER');"); if ($dbhA->has_selected_record) { @@ -511,7 +524,7 @@ while($one_day_interval > 0) &event_logger; ### insert a SENT record to the vicidial_auto_calls table - $stmtA = "INSERT INTO vicidial_auto_calls values('','$DBIPaddress[$user_CIPct]','$DBIPcampaign[$user_CIPct]','SENT','$lead_id','','$VqueryCID','','$phone_code','$phone_number','$SQLdate')"; + $stmtA = "INSERT INTO vicidial_auto_calls (server_ip,campaign_id,status,lead_id,callerid,phone_code,phone_number,call_time,call_type) values('$DBIPaddress[$user_CIPct]','$DBIPcampaign[$user_CIPct]','SENT','$lead_id','$VqueryCID','$phone_code','$phone_number','$SQLdate','OUT')"; $dbhA->query($stmtA); ### sleep for a tenth of a second to not flood the server with new calls diff --git a/AST_agent_week.pl b/AST_agent_week.pl new file mode 100644 index 0000000..e8eb993 --- /dev/null +++ b/AST_agent_week.pl @@ -0,0 +1,336 @@ +#!/usr/bin/perl + +# AST_agent_week.pl +# +# This script is designed to gather stats for all agent activity over the course +# of a week(Sunday to Saturday) and print it in an ASCI text file to be placed +# on a web server for viewing. +# +# CHANGES +# 60517-1100 - First version +# + +$txt = '.txt'; +$US = '_'; +$MT[0] = ''; + +### 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 [-q] = quiet\n [-t] = test\n\n"; + exit; + } + else + { + if ($args =~ /--debug/i) + { + $DB=1; + print "\n-----DEBUG MODE-----\n\n"; + } + if ($args =~ /-q/i) + { + $q=1; $Q=1; + } + if ($args =~ /-t/i) + { + $T=1; $TEST=1; + print "\n-----TESTING-----\n\n"; + } + } +} +else +{ +print "no command line options set\n"; +} +### end parsing run-time options ### + + +$secX = time(); + ($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";} + $filedate = "$year$mon$mday-$hour$min$sec"; + $ABIfiledate = "$mon-$mday-$year$us$hour$min$sec"; + $shipdate = "$year-$mon-$mday"; + $datestamp = "$year/$mon/$mday $hour:$min"; + + $STARTtarget = ($secX - (86400 * $wday)); + ($Ssec,$Smin,$Shour,$Smday,$Smon,$Syear,$Swday,$Syday,$Sisdst) = localtime($STARTtarget); + $Syear = ($Syear + 1900); $Smon++; + if ($Smon < 10) {$Smon = "0$Smon";} + if ($Smday < 10) {$Smday = "0$Smday";} + $START_week = (($Syday/7)+1); $START_week = sprintf("%2d", $START_week); + $STARTtarget_date = "$Syear-$Smon-$Smday"; + + $ENDtarget = ($STARTtarget + (86400 * 6)); + ($Ssec,$Smin,$Shour,$Smday,$Smon,$Syear,$Swday,$Syday,$Sisdst) = localtime($ENDtarget); + $Syear = ($Syear + 1900); $Smon++; + if ($Smon < 10) {$Smon = "0$Smon";} + if ($Smday < 10) {$Smday = "0$Smday";} + $ENDtarget_date = "$Syear-$Smon-$Smday"; + + $PAST_STARTtarget = ($STARTtarget - (86400 * 7)); + ($Ssec,$Smin,$Shour,$Smday,$Smon,$Syear,$Swday,$Syday,$Sisdst) = localtime($PAST_STARTtarget); + $Syear = ($Syear + 1900); $Smon++; + if ($Smon < 10) {$Smon = "0$Smon";} + if ($Smday < 10) {$Smday = "0$Smday";} + $PAST_START_week = (($Syday/7)+1); $PAST_START_week = sprintf("%2d", $PAST_START_week); + $PAST_STARTtarget_date = "$Syear-$Smon-$Smday"; + + $PAST_ENDtarget = ($ENDtarget - (86400 * 7)); + ($Ssec,$Smin,$Shour,$Smday,$Smon,$Syear,$Swday,$Syday,$Sisdst) = localtime($PAST_ENDtarget); + $Syear = ($Syear + 1900); $Smon++; + if ($Smon < 10) {$Smon = "0$Smon";} + if ($Smday < 10) {$Smday = "0$Smday";} + $PAST_ENDtarget_date = "$Syear-$Smon-$Smday"; + + $PAST_date[0] = $PAST_STARTtarget_date; + $PAST_day[0] = 'Sunday '; + $PAST_date[6] = $PAST_ENDtarget_date; + $PAST_day[6] = 'Saturday '; + + $PAST_Mondaytarget = ($STARTtarget - (86400 * 6)); + ($Ssec,$Smin,$Shour,$Smday,$Smon,$Syear,$Swday,$Syday,$Sisdst) = localtime($PAST_Mondaytarget); + $Syear = ($Syear + 1900); $Smon++; + if ($Smon < 10) {$Smon = "0$Smon";} + if ($Smday < 10) {$Smday = "0$Smday";} + $PAST_date[1] = "$Syear-$Smon-$Smday"; + $PAST_day[1] = 'Monday '; + + $PAST_Tuesdaytarget = ($STARTtarget - (86400 * 5)); + ($Ssec,$Smin,$Shour,$Smday,$Smon,$Syear,$Swday,$Syday,$Sisdst) = localtime($PAST_Tuesdaytarget); + $Syear = ($Syear + 1900); $Smon++; + if ($Smon < 10) {$Smon = "0$Smon";} + if ($Smday < 10) {$Smday = "0$Smday";} + $PAST_date[2] = "$Syear-$Smon-$Smday"; + $PAST_day[2] = 'Tuesday '; + + $PAST_Wednesdaytarget = ($STARTtarget - (86400 * 4)); + ($Ssec,$Smin,$Shour,$Smday,$Smon,$Syear,$Swday,$Syday,$Sisdst) = localtime($PAST_Wednesdaytarget); + $Syear = ($Syear + 1900); $Smon++; + if ($Smon < 10) {$Smon = "0$Smon";} + if ($Smday < 10) {$Smday = "0$Smday";} + $PAST_date[3] = "$Syear-$Smon-$Smday"; + $PAST_day[3] = 'Wednesday'; + + $PAST_Thursdaytarget = ($STARTtarget - (86400 * 3)); + ($Ssec,$Smin,$Shour,$Smday,$Smon,$Syear,$Swday,$Syday,$Sisdst) = localtime($PAST_Thursdaytarget); + $Syear = ($Syear + 1900); $Smon++; + if ($Smon < 10) {$Smon = "0$Smon";} + if ($Smday < 10) {$Smday = "0$Smday";} + $PAST_date[4] = "$Syear-$Smon-$Smday"; + $PAST_day[4] = 'Thursday '; + + $PAST_Fridaytarget = ($STARTtarget - (86400 * 2)); + ($Ssec,$Smin,$Shour,$Smday,$Smon,$Syear,$Swday,$Syday,$Sisdst) = localtime($PAST_Fridaytarget); + $Syear = ($Syear + 1900); $Smon++; + if ($Smon < 10) {$Smon = "0$Smon";} + if ($Smday < 10) {$Smday = "0$Smday";} + $PAST_date[5] = "$Syear-$Smon-$Smday"; + $PAST_day[5] = 'Friday '; + +print "\n\n\n\n\n\n\n\n\n\n\n\n-- AST_agent_week.pl --\n\n"; +print "This program is designed to print stats to a file for agents' activity for the previous week. \n\n"; + +$TLoutfile = ''; +$TLoutfile .= "TODAY: $shipdate\n"; +$TLoutfile .= "THIS WEEK: week $START_week $STARTtarget_date - $ENDtarget_date\n"; +$TLoutfile .= "LAST WEEK: week $PAST_START_week $PAST_STARTtarget_date - $PAST_ENDtarget_date\n\n"; + +#$h=0; +#foreach(@PAST_date) +#{ +#$TLoutfile .= "$PAST_day[$h] $PAST_date[$h]\n"; +#$h++; +#} + +#print "$TLoutfile"; + + +$outfile = "AGENT_HOURS_$PAST_STARTtarget_date$US$PAST_ENDtarget_date$txt"; + +#$dir = '/usr/local/apache2/htdocs'; +$dir = '/home/www/htdocs'; + +### open the X out file for writing ### +open(out, ">$dir/vicidial/agent_reports/$outfile") + || die "Can't open $outfile: $!\n"; + +### Make sure this file is in a libs path or put the absolute path to it +require("/home/cron/AST_SERVER_conf.pl"); # local configuration file + +if (!$DB_port) {$DB_port='3306';} + +use DBI; + +$dbhA = DBI->connect("DBI:mysql:$DB_database:$DB_server:$DB_port", "$DB_user", "$DB_pass") + or die "Couldn't connect to database: " . DBI->errstr; + +$dbhB = DBI->connect("DBI:mysql:$DB_database:$DB_server:$DB_port", "$DB_user", "$DB_pass") + or die "Couldn't connect to database: " . DBI->errstr; + +#$vicidial_agent_log = 'vicidial_agent_log_archive'; +$vicidial_agent_log = 'vicidial_agent_log'; + +########################################################################### +########### PAST WEEK STAT GATHERING LOOP ################################# +########################################################################### +$h=0; +foreach(@PAST_date) +{ + print out "\n$PAST_day[$h] $PAST_date[$h]\n\n"; + print out "AGENT USER CALLS TALK PAUSE WAIT DISPO ACTIVE LOGTIME FIRST LAST \n"; + print "\n$PAST_day[$h] $PAST_date[$h]\n\n"; + print "AGENT USER CALLS TALK PAUSE WAIT DISPO ACTIVE LOGTIME FIRST LAST \n"; + + $stmtA = "select count(*) as calls, full_name,vicidial_users.user,sum(talk_sec),sum(pause_sec),sum(wait_sec),sum(dispo_sec) from vicidial_users,$vicidial_agent_log where event_time <= '$PAST_date[$h] 23:59:59' and event_time >= '$PAST_date[$h] 00:00:00' and vicidial_users.user=$vicidial_agent_log.user and pause_sec<48800 and wait_sec<48800 and talk_sec<48800 and dispo_sec<48800 group by vicidial_users.user order by full_name limit 10000;"; + $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) + { + @aryA = $sthA->fetchrow_array; + + $calls = sprintf("%7s", $aryA[0]); + $name = sprintf("%-20s", $aryA[1]); while(length($name)>20) {chop($name);} + $user = sprintf("%-8s", $aryA[2]); + + ### TOTAL ACTIVE TIME + $active = ($aryA[3] + $aryA[4] + $aryA[5] + $aryA[6]); + $TIME_S = $active; + $TIME_H = int($TIME_S / 3600); + $TIME_S = ($TIME_S - ($TIME_H * 3600)); + $TIME_M = int($TIME_S / 60); + $TIME_S = ($TIME_S - ($TIME_M * 60)); + if ($TIME_S < 10) {$TIME_S = "0$TIME_S";} + if ($TIME_M < 10) {$TIME_M = "0$TIME_M";} + $TIME_HMS = "$TIME_H:$TIME_M:$TIME_S"; + $active = sprintf("%9s", $TIME_HMS); + + ### TOTAL TALK TIME + $TIME_S = $aryA[3]; + $TIME_H = int($TIME_S / 3600); + $TIME_S = ($TIME_S - ($TIME_H * 3600)); + $TIME_M = int($TIME_S / 60); + $TIME_S = ($TIME_S - ($TIME_M * 60)); + if ($TIME_S < 10) {$TIME_S = "0$TIME_S";} + if ($TIME_M < 10) {$TIME_M = "0$TIME_M";} + $TIME_HMS = "$TIME_H:$TIME_M:$TIME_S"; + $talk = sprintf("%9s", $TIME_HMS); + + ### TOTAL PAUSE TIME + $TIME_S = $aryA[4]; + $TIME_H = int($TIME_S / 3600); + $TIME_S = ($TIME_S - ($TIME_H * 3600)); + $TIME_M = int($TIME_S / 60); + $TIME_S = ($TIME_S - ($TIME_M * 60)); + if ($TIME_S < 10) {$TIME_S = "0$TIME_S";} + if ($TIME_M < 10) {$TIME_M = "0$TIME_M";} + $TIME_HMS = "$TIME_H:$TIME_M:$TIME_S"; + $pause = sprintf("%9s", $TIME_HMS); + + ### TOTAL WAIT TIME + $TIME_S = $aryA[5]; + $TIME_H = int($TIME_S / 3600); + $TIME_S = ($TIME_S - ($TIME_H * 3600)); + $TIME_M = int($TIME_S / 60); + $TIME_S = ($TIME_S - ($TIME_M * 60)); + if ($TIME_S < 10) {$TIME_S = "0$TIME_S";} + if ($TIME_M < 10) {$TIME_M = "0$TIME_M";} + $TIME_HMS = "$TIME_H:$TIME_M:$TIME_S"; + $wait = sprintf("%9s", $TIME_HMS); + + ### TOTAL DISPO TIME + $TIME_S = $aryA[6]; + $TIME_H = int($TIME_S / 3600); + $TIME_S = ($TIME_S - ($TIME_H * 3600)); + $TIME_M = int($TIME_S / 60); + $TIME_S = ($TIME_S - ($TIME_M * 60)); + if ($TIME_S < 10) {$TIME_S = "0$TIME_S";} + if ($TIME_M < 10) {$TIME_M = "0$TIME_M";} + $TIME_HMS = "$TIME_H:$TIME_M:$TIME_S"; + $dispo = sprintf("%9s", $TIME_HMS); + + $stmtB = "select event_time,UNIX_TIMESTAMP(event_time) from $vicidial_agent_log where event_time <= '$PAST_date[$h] 23:59:59' and event_time >= '$PAST_date[$h] 00:00:00' and user='$aryA[2]' order by event_time limit 1;"; + $sthB = $dbhB->prepare($stmtB) or die "preparing: ",$dbhB->errstr; + $sthB->execute or die "executing: $stmtA ", $dbhB->errstr; + @aryB = $sthB->fetchrow_array; + $first_time = sprintf("%21s", $aryB[0]); + $first_log = $aryB[1]; + + $stmtB = "select event_time,UNIX_TIMESTAMP(event_time) from $vicidial_agent_log where event_time <= '$PAST_date[$h] 23:59:59' and event_time >= '$PAST_date[$h] 00:00:00' and user='$aryA[2]' order by event_time desc limit 1;"; + $sthB = $dbhB->prepare($stmtB) or die "preparing: ",$dbhB->errstr; + $sthB->execute or die "executing: $stmtA ", $dbhB->errstr; + @aryB = $sthB->fetchrow_array; + $last_time = sprintf("%21s", $aryB[0]); + $last_log = $aryB[1]; + + $TIME_S = ($last_log - $first_log); + $TIME_H = int($TIME_S / 3600); + $TIME_S = ($TIME_S - ($TIME_H * 3600)); + $TIME_M = int($TIME_S / 60); + $TIME_S = ($TIME_S - ($TIME_M * 60)); + if ($TIME_S < 10) {$TIME_S = "0$TIME_S";} + if ($TIME_M < 10) {$TIME_M = "0$TIME_M";} + $TIME_HMS = "$TIME_H:$TIME_M:$TIME_S"; + $login_time = sprintf("%9s", $TIME_HMS); + + + + print out "$name$user$calls$talk$pause$wait$dispo$active$login_time$first_time$last_time\n"; + print "$name$user$calls$talk$pause$wait$dispo$active$login_time$first_time$last_time\n"; + + + $rec_count++; + } + $sthA->finish(); + + + + + + + + + + +#if ($h=='1') +# { +# exit; +# } + +$h++; +} + + + +close(out); + +### calculate time to run script ### +$secY = time(); +$secZ = ($secY - $secX); +$secZm = ($secZ /60); + +print "script execution time in seconds: $secZ minutes: $secZm\n"; + +exit; + + + + + diff --git a/DBI-scripts/AST_VDhopper.pl b/DBI-scripts/AST_VDhopper.pl new file mode 100644 index 0000000..cbf894d --- /dev/null +++ b/DBI-scripts/AST_VDhopper.pl @@ -0,0 +1,1047 @@ +#!/usr/bin/perl +# +# AST_VDhopper.pl version 0.10 +# *** DBI version *** +# +# DESCRIPTION: +# uses DBD::MySQL to update the VICIDIAL leads hopper for the streamlined +# approach of allocating leads to client machines. +# +# SUMMARY: +# This program was designed for people using the Asterisk PBX with VICIDIAL +# +# For the client to use VICIDIAL, this program must be in the cron running +# every minute +# +# For this program to work you need to have the "asterisk" MySQL database +# created and create the tables listed in the CONF_MySQL.txt file, also make sure +# that the machine running this program has read/write/update/delete access +# to that database +# +# It is recommended that you run this program on the local Asterisk machine +# +# If this script is run ever minute and you are getting close to no leads after +# a minute, you may want to play with the variables below to streamline for +# your usage +# +# Copyright (C) 2006 Matt Florell LICENSE: GPLv2 +# +# 50810-1613 - Added database server variable definitions lookup +# 60215-1106 - Added Scheduled Callback release functionality +# 60228-1623 - Change Callback activation to set the called_since_last_reset=N +# 60228-1735 - Added hopper gmt validation to remove gmt outside of time range +# 60320-0932 - Added inactive lead list hopper deletion (Thanks Vic Jolin) +# 60322-1030 - Added super debug output +# 60418-0947 - Added lead filter per campaign +# 60509-1416 - Rewrite of local_call_time functions +# 60511-1150 - Added inserts into vicidial_campaign_stats table +# + +# constants +$DB=0; # Debug flag, set to 0 for no debug messages, On an active system this will generate lots of lines of output per minute +$US='__'; +$MT[0]=''; +#$vicidial_hopper='TEST_vicidial_hopper'; # for testing +$vicidial_hopper='vicidial_hopper'; + +# options +$insert_auto_CB_to_hopper = 1; # set to 1 to automatically insert ANYONE callbacks into the hopper + + +($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); +$year = ($year + 1900); +$mon++; +if ($mon < 10) {$mon = "0$mon";} +if ($mday < 10) {$mday = "0$mday";} +if ($hour < 10) {$Fhour = "0$hour";} +if ($min < 10) {$min = "0$min";} +if ($sec < 10) {$sec = "0$sec";} +$now_date = "$year-$mon-$mday $hour:$min:$sec"; +$VDL_date = "$year-$mon-$mday 00:00:01"; + +if (!$VDHLOGfile) {$VDHLOGfile = "/home/cron/hopper.$year-$mon-$mday";} + +### 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(must stay in this order):\n [--debug] = debug\n [--debugX] = super debug\n [--dbgmt] = show GMT offset of records as they are inserted into hopper\n [-t] = test\n [--level=XXX] = force a hopper_level of XXX\n [--campaign=XXX] = run for campaign XXX only\n\n"; + } + else + { + if ($args =~ /--campaign=/i) + { + # print "\n|$ARGS|\n\n"; + @data_in = split(/--campaign=/,$args); + $CLIcampaign = $data_in[1]; + } + else + {$CLIcampaign = '';} + if ($args =~ /--level=/i) + { + @data_in = split(/--level=/,$args); + $CLIlevel = $data_in[1]; + $CLIlevel =~ s/ .*$//gi; + $CLIlevel =~ s/\D//gi; + print "\n-----HOPPER LEVEL OVERRIDE: $CLIlevel -----\n\n"; + } + else + {$CLIlevel = '';} + if ($args =~ /--debug/i) + { + $DB=1; + print "\n----- DEBUG -----\n\n"; + } + if ($args =~ /--debugX/i) + { + $DBX=1; + print "\n----- SUPER DEBUG -----\n\n"; + } + if ($args =~ /--dbgmt/i) + { + $DB_show_offset=1; + print "\n-----DEBUG GMT -----\n\n"; + } + if ($args =~ /-t/i) + { + $T=1; $TEST=1; + print "\n-----TESTING -----\n\n"; + } + if ($args =~ /--wipe-hopper-clean/i) + { + $wipe_hopper_clean=1; + } + } +} +else +{ +print "no command line options set\n"; +} + +### Make sure this file is in a libs path or put the absolute path to it +require("/home/cron/AST_SERVER_conf.pl"); # local configuration file + +if (!$DB_port) {$DB_port='3306';} + +use DBI; + +$dbhA = DBI->connect("DBI:mysql:$DB_database:$DB_server:$DB_port", "$DB_user", "$DB_pass") + or die "Couldn't connect to database: " . DBI->errstr; + + +### Grab Server values from the database +$stmtA = "SELECT local_gmt FROM servers where server_ip = '$server_ip';"; +$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; +$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; +@aryA = $sthA->fetchrow_array; +$DBSERVER_GMT = $aryA[0]; +if (length($DBSERVER_GMT)>0) {$SERVER_GMT = $DBSERVER_GMT;} +$sthA->finish(); + +$secX = time(); + ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($secX); + $LOCAL_GMT_OFF = $SERVER_GMT; + $LOCAL_GMT_OFF_STD = $SERVER_GMT; + if ($isdst) {$LOCAL_GMT_OFF++;} + +$GMT_now = ($secX - ($LOCAL_GMT_OFF * 3600)); + ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($GMT_now); + $mon++; + $year = ($year + 1900); + 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";} + + if ($DB) {print "TIME DEBUG: $LOCAL_GMT_OFF_STD|$LOCAL_GMT_OFF|$isdst| GMT: $hour:$min\n";} + +if ($wipe_hopper_clean) + { + $stmtA = "DELETE from $vicidial_hopper;"; + $affected_rows = $dbhA->do($stmtA); + if ($DB) {print "Hopper Wiped Clean: $affected_rows\n";} + $event_string = "|HOPPER WIPE CLEAN|"; + &event_logger; + + exit; + } +### Delete leads from inactive lists if there are any +$stmtA = "SELECT * FROM vicidial_lists where active='N';"; +if ($DB) {print $stmtA;} +$inactive_lists=''; +$inactive_lists_count=0; +$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; +$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; +$sthArows=$sthA->rows; +while ($sthArows > $inactive_lists_count) + { + @aryA = $sthA->fetchrow_array; + $inactive_list = $aryA[0]; + $inactive_lists .= "'$inactive_list',"; + $inactive_lists_count++; + } +$sthA->finish(); +if ($DB) {print "Inactive Lists: $inactive_lists_count\n";} + +if ($inactive_lists_count > 0) + { + chop($inactive_lists); + $stmtA = "DELETE from $vicidial_hopper where list_id IN($inactive_lists);"; + $affected_rows = $dbhA->do($stmtA); + if ($DB) {print "Inactive List Leads Deleted: $affected_rows |$stmtA|\n";} + $event_string = "|INACTIVE LIST DEL|$affected_rows|"; + &event_logger; + } + +### BEGIN Change CBHOLD status leads to CALLBK if their vicidial_callbacks time has passed +$stmtA = "SELECT count(*) FROM vicidial_callbacks where callback_time <= '$now_date' and status='ACTIVE';"; +$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; +$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; +@aryA = $sthA->fetchrow_array; +$CBHOLD_count = $aryA[0]; + if ($DB) {print "CALLBACK HOLD: $CBHOLD_count|$stmtA|\n";} +$sthA->finish(); + +if ($CBHOLD_count > 0) + { + $update_leads=''; + $cbc=0; + $cba=0; + $stmtA = "SELECT vicidial_callbacks.lead_id,recipient,campaign_id,vicidial_callbacks.list_id,gmt_offset_now FROM vicidial_callbacks,vicidial_list where callback_time <= '$now_date' and vicidial_callbacks.status='ACTIVE' and vicidial_callbacks.lead_id=vicidial_list.lead_id;"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + while ($sthArows > $cbc) + { + @aryA = $sthA->fetchrow_array; + $lead_ids[$cbc] = $aryA[0]; + $recipient = $aryA[1]; + $update_leads .= "'$lead_ids[$cbc]',"; + if ($recipient == 'ANYONE') + { + $CA_lead_id[$cba] = $aryA[0]; + $CA_campaign_id[$cba] = $aryA[2]; + $CA_list_id[$cba] = $aryA[3]; + $CA_gmt_offset_now[$cba] = $aryA[4]; + $cba++; + } + $cbc++; + } + $sthA->finish(); + if ($cbc > 0) + { + chop($update_leads); + + $stmtA = "UPDATE vicidial_list set status='CALLBK', called_since_last_reset='N' where lead_id IN($update_leads);"; + $affected_rows = $dbhA->do($stmtA); + if ($DB) {print "Scheduled Callbacks Activated: $affected_rows\n";} + $event_string = "|CALLBACKS LISTACT|$affected_rows|"; + &event_logger; + + $stmtA = "UPDATE vicidial_callbacks set status='LIVE' where lead_id IN($update_leads);"; + $affected_rows = $dbhA->do($stmtA); + if ($DB) {print "Scheduled Callbacks Activated: $affected_rows\n";} + $event_string = "|CALLBACKS CB ACT |$affected_rows|"; + &event_logger; + + } + ### INSERT ANYONE CALLBACKS INTO HOPPER DIRECTLY ### + if ( ($cba > 0) && ($insert_auto_CB_to_hopper) ) + { + if ($DB) {print "ANYONE Scheduled Callbacks to Insert into hopper: $cba\n";} + $event_string = "|ANYONE CB HOPPER |$cba|"; + &event_logger; + $CAu=0; + foreach(@CA_lead_id) + { + $stmtA = "INSERT INTO $vicidial_hopper SET lead_id='$CA_lead_id[$CAu]',campaign_id='$CA_campaign_id[$CAu]',list_id='$CA_list_id[$CAu]',gmt_offset_now='$CA_gmt_offset_now[$CAu]';"; + $affected_rows = $dbhA->do($stmtA); + if ($DB) {print "ANYONE Scheduled Callback Inserted into hopper: $affected_rows|$CA_lead_id[$CAu]\n";} + $CAu++; + } + } + } +### END Change CBHOLD status leads to CALLBK if their vicidial_callbacks time has passed + + +@campaign_id=@MT; + +if ($CLIcampaign) + { + $stmtA = "SELECT * from vicidial_campaigns where campaign_id='$CLIcampaign'"; + } +else + { + $stmtA = "SELECT * from vicidial_campaigns where active='Y'"; + } +$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) + { + @aryA = $sthA->fetchrow_array; + $campaign_id[$rec_count] = "$aryA[0]"; + $dial_status_a[$rec_count] = "$aryA[3]"; + $dial_status_b[$rec_count] = "$aryA[4]"; + $dial_status_c[$rec_count] = "$aryA[5]"; + $dial_status_d[$rec_count] = "$aryA[6]"; + $dial_status_e[$rec_count] = "$aryA[7]"; + $lead_order[$rec_count] = "$aryA[8]"; + if (!$CLIlevel) + {$hopper_level[$rec_count] = "$aryA[13]";} + else + {$hopper_level[$rec_count] = "$CLIlevel";} + $local_call_time[$rec_count] = "$aryA[16]"; + $lead_filter_id[$rec_count] = "$aryA[35]"; + $rec_count++; + } +$sthA->finish(); +if ($DB) {print "CAMPAIGNS TO PROCESSES HOPPER FOR: $rec_count|$#campaign_id\n";} + + +##### LOOP THROUGH EACH CAMPAIGN AND PROCESS THE HOPPER ##### +$i=0; +foreach(@campaign_id) + { + $VCSdialable_leads=0; + $VCScalls_today=0; + $VCSdrops_today=0; + $VCSdrops_today_pct=0; + $vicidial_log = 'vicidial_log'; + + $stmtA = "SELECT dialable_leads from vicidial_campaign_stats where campaign_id='$campaign_id[$i]';"; + $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) + { + @aryA = $sthA->fetchrow_array; + $VCSdialable_leads = "$aryA[0]"; + $rec_count++; + } + $sthA->finish(); + + $stmtA = "SELECT count(*) from $vicidial_log where campaign_id='$campaign_id[$i]' and call_date > '$VDL_date';"; + $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) + { + @aryA = $sthA->fetchrow_array; + $VCScalls_today = "$aryA[0]"; + $rec_count++; + } + $sthA->finish(); + if ($VCScalls_today > 0) + { + $stmtA = "SELECT count(*) from $vicidial_log where campaign_id='$campaign_id[$i]' and call_date > '$VDL_date' and status IN('DROP','XDROP');"; + $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) + { + @aryA = $sthA->fetchrow_array; + $VCSdrops_today = "$aryA[0]"; + if ($VCSdrops_today > 0) + { + $VCSdrops_today_pct = ( ($VCSdrops_today / $VCScalls_today) * 100 ); + $VCSdrops_today_pct = sprintf("%.2f", $VCSdrops_today_pct); + } + $rec_count++; + } + $sthA->finish(); + } + + + + $stmtA = "UPDATE vicidial_campaign_stats SET calls_today='$VCScalls_today',drops_today='$VCSdrops_today',drops_today_pct='$VCSdrops_today_pct' where campaign_id='$campaign_id[$i]';"; + $affected_rows = $dbhA->do($stmtA); + if ($DBX) {print "campaign stats updated: $affected_rows|$VCScalls_today|$VCSdrops_today|$VCSdrops_today_pct|$campaign_id[$i]|\n";} + + ##### BEGIN calculate what gmt_offset_now values are within the allowed local_call_time setting ### + $g=0; + $p='13'; + $GMT_gmt[0] = ''; + $GMT_hour[0] = ''; + $GMT_day[0] = ''; + if ($DBX) {print "\n |GMT-DAY-HOUR| ";} + while ($p > -13) + { + $pzone = ($GMT_now + ($p * 3600)); + ($psec,$pmin,$phour,$pmday,$pmon,$pyear,$pday,$pyday,$pisdst) = localtime($pzone); + $phour=($phour * 100); + $tz = sprintf("%.2f", $p); + $GMT_gmt[$g] = "$tz"; + $GMT_day[$g] = "$pday"; + $GMT_hour[$g] = ($phour + $pmin); + $p = ($p - 0.25); + if ($DBX) {print "|$GMT_gmt[$g]-$GMT_day[$g]-$GMT_hour[$g]|";} + $g++; + } + if ($DBX) {print "\n";} + + $stmtA = "SELECT * FROM vicidial_call_times where call_time_id='$local_call_time[$i]';"; + if ($DBX) {print " |$stmtA|\n";} + $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) + { + @aryA = $sthA->fetchrow_array; + $Gct_default_start = "$aryA[3]"; + $Gct_default_stop = "$aryA[4]"; + $Gct_sunday_start = "$aryA[5]"; + $Gct_sunday_stop = "$aryA[6]"; + $Gct_monday_start = "$aryA[7]"; + $Gct_monday_stop = "$aryA[8]"; + $Gct_tuesday_start = "$aryA[9]"; + $Gct_tuesday_stop = "$aryA[10]"; + $Gct_wednesday_start = "$aryA[11]"; + $Gct_wednesday_stop = "$aryA[12]"; + $Gct_thursday_start = "$aryA[13]"; + $Gct_thursday_stop = "$aryA[14]"; + $Gct_friday_start = "$aryA[15]"; + $Gct_friday_stop = "$aryA[16]"; + $Gct_saturday_start = "$aryA[17]"; + $Gct_saturday_stop = "$aryA[18]"; + $Gct_state_call_times = "$aryA[19]"; + $rec_count++; + } + $sthA->finish(); + + $ct_states = ''; + $ct_state_gmt_SQL = ''; + $del_state_gmt_SQL = ''; + $ct_srs=0; + $b=0; + if (length($Gct_state_call_times)>2) + { + @state_rules = split(/\|/,$Gct_state_call_times); + $ct_srs = ($#state_rules - 2); + } + while($ct_srs >= $b) + { + if (length($state_rules[$b])>1) + { + $stmtA = "SELECT * from vicidial_state_call_times where state_call_time_id='$state_rules[$b]';"; + if ($DBX) {print " |$stmtA|\n";} + $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) + { + @aryA = $sthA->fetchrow_array; + $Gstate_call_time_id = "$aryA[0]"; + $Gstate_call_time_state = "$aryA[1]"; + $Gsct_default_start = "$aryA[4]"; + $Gsct_default_stop = "$aryA[5]"; + $Gsct_sunday_start = "$aryA[6]"; + $Gsct_sunday_stop = "$aryA[7]"; + $Gsct_monday_start = "$aryA[8]"; + $Gsct_monday_stop = "$aryA[9]"; + $Gsct_tuesday_start = "$aryA[10]"; + $Gsct_tuesday_stop = "$aryA[11]"; + $Gsct_wednesday_start = "$aryA[12]"; + $Gsct_wednesday_stop = "$aryA[13]"; + $Gsct_thursday_start = "$aryA[14]"; + $Gsct_thursday_stop = "$aryA[15]"; + $Gsct_friday_start = "$aryA[16]"; + $Gsct_friday_stop = "$aryA[17]"; + $Gsct_saturday_start = "$aryA[18]"; + $Gsct_saturday_stop = "$aryA[19]"; + $ct_states .="'$Gstate_call_time_state',"; + $rec_count++; + } + $sthA->finish(); + + $r=0; + $state_gmt=''; + $del_state_gmt=''; + while($r < $g) + { + if ($GMT_day[$r]==0) #### Sunday local time + { + if (($Gsct_sunday_start==0) and ($Gsct_sunday_stop==0)) + { + if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) + {$state_gmt.="'$GMT_gmt[$r]',";} + else + {$del_state_gmt.="'$GMT_gmt[$r]',";} + } + else + { + if ( ($GMT_hour[$r]>=$Gsct_sunday_start) and ($GMT_hour[$r]<$Gsct_sunday_stop) ) + {$state_gmt.="'$GMT_gmt[$r]',";} + else + {$del_state_gmt.="'$GMT_gmt[$r]',";} + } + } + if ($GMT_day[$r]==1) #### Monday local time + { + if (($Gsct_monday_start==0) and ($Gsct_monday_stop==0)) + { + if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) + {$state_gmt.="'$GMT_gmt[$r]',";} + else + {$del_state_gmt.="'$GMT_gmt[$r]',";} + } + else + { + if ( ($GMT_hour[$r]>=$Gsct_monday_start) and ($GMT_hour[$r]<$Gsct_monday_stop) ) + {$state_gmt.="'$GMT_gmt[$r]',";} + else + {$del_state_gmt.="'$GMT_gmt[$r]',";} + } + } + if ($GMT_day[$r]==2) #### Tuesday local time + { + if (($Gsct_tuesday_start==0) and ($Gsct_tuesday_stop==0)) + { + if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) + {$state_gmt.="'$GMT_gmt[$r]',";} + else + {$del_state_gmt.="'$GMT_gmt[$r]',";} + } + else + { + if ( ($GMT_hour[$r]>=$Gsct_tuesday_start) and ($GMT_hour[$r]<$Gsct_tuesday_stop) ) + {$state_gmt.="'$GMT_gmt[$r]',";} + else + {$del_state_gmt.="'$GMT_gmt[$r]',";} + } + } + if ($GMT_day[$r]==3) #### Wednesday local time + { + if (($Gsct_wednesday_start==0) and ($Gsct_wednesday_stop==0)) + { + if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) + {$state_gmt.="'$GMT_gmt[$r]',";} + else + {$del_state_gmt.="'$GMT_gmt[$r]',";} + } + else + { + if ( ($GMT_hour[$r]>=$Gsct_wednesday_start) and ($GMT_hour[$r]<$Gsct_wednesday_stop) ) + {$state_gmt.="'$GMT_gmt[$r]',";} + else + {$del_state_gmt.="'$GMT_gmt[$r]',";} + } + } + if ($GMT_day[$r]==4) #### Thursday local time + { + if (($Gsct_thursday_start==0) and ($Gsct_thursday_stop==0)) + { + if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) + {$state_gmt.="'$GMT_gmt[$r]',";} + else + {$del_state_gmt.="'$GMT_gmt[$r]',";} + } + else + { + if ( ($GMT_hour[$r]>=$Gsct_thursday_start) and ($GMT_hour[$r]<$Gsct_thursday_stop) ) + {$state_gmt.="'$GMT_gmt[$r]',";} + else + {$del_state_gmt.="'$GMT_gmt[$r]',";} + } + } + if ($GMT_day[$r]==5) #### Friday local time + { + if (($Gsct_friday_start==0) and ($Gsct_friday_stop==0)) + { + if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) + {$state_gmt.="'$GMT_gmt[$r]',";} + else + {$del_state_gmt.="'$GMT_gmt[$r]',";} + } + else + { + if ( ($GMT_hour[$r]>=$Gsct_friday_start) and ($GMT_hour[$r]<$Gsct_friday_stop) ) + {$state_gmt.="'$GMT_gmt[$r]',";} + else + {$del_state_gmt.="'$GMT_gmt[$r]',";} + } + } + if ($GMT_day[$r]==6) #### Saturday local time + { + if (($Gsct_saturday_start==0) and ($Gsct_saturday_stop==0)) + { + if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) + {$state_gmt.="'$GMT_gmt[$r]',";} + else + {$del_state_gmt.="'$GMT_gmt[$r]',";} + } + else + { + if ( ($GMT_hour[$r]>=$Gsct_saturday_start) and ($GMT_hour[$r]<$Gsct_saturday_stop) ) + {$state_gmt.="'$GMT_gmt[$r]',";} + else + {$del_state_gmt.="'$GMT_gmt[$r]',";} + } + } + $r++; + } + $state_gmt = "$state_gmt'99'"; + $del_state_gmt = "$del_state_gmt'99'"; + $ct_state_gmt_SQL .= "or (state='$Gstate_call_time_state' and gmt_offset_now IN($state_gmt)) "; + $del_state_gmt_SQL .= "or (state='$Gstate_call_time_state' and gmt_offset_now IN($del_state_gmt)) "; + } + + $b++; + } + if (length($ct_states)>2) + { + $ct_states =~ s/,$//gi; + $ct_statesSQL = "and state NOT IN($ct_states)"; + } + else + { + $ct_statesSQL = ""; + } + + $r=0; + $default_gmt=''; + $del_default_gmt=''; + while($r < $g) + { + if ($GMT_day[$r]==0) #### Sunday local time + { + if (($Gct_sunday_start==0) and ($Gct_sunday_stop==0)) + { + if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) + {$default_gmt.="'$GMT_gmt[$r]',";} + else + {$del_default_gmt.="'$GMT_gmt[$r]',";} + } + else + { + if ( ($GMT_hour[$r]>=$Gct_sunday_start) and ($GMT_hour[$r]<$Gct_sunday_stop) ) + {$default_gmt.="'$GMT_gmt[$r]',";} + else + {$del_default_gmt.="'$GMT_gmt[$r]',";} + } + } + if ($GMT_day[$r]==1) #### Monday local time + { + if (($Gct_monday_start==0) and ($Gct_monday_stop==0)) + { + if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) + {$default_gmt.="'$GMT_gmt[$r]',";} + else + {$del_default_gmt.="'$GMT_gmt[$r]',";} + } + else + { + if ( ($GMT_hour[$r]>=$Gct_monday_start) and ($GMT_hour[$r]<$Gct_monday_stop) ) + {$default_gmt.="'$GMT_gmt[$r]',";} + else + {$del_default_gmt.="'$GMT_gmt[$r]',";} + } + } + if ($GMT_day[$r]==2) #### Tuesday local time + { + if (($Gct_tuesday_start==0) and ($Gct_tuesday_stop==0)) + { + if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) + {$default_gmt.="'$GMT_gmt[$r]',";} + else + {$del_default_gmt.="'$GMT_gmt[$r]',";} + } + else + { + if ( ($GMT_hour[$r]>=$Gct_tuesday_start) and ($GMT_hour[$r]<$Gct_tuesday_stop) ) + {$default_gmt.="'$GMT_gmt[$r]',";} + else + {$del_default_gmt.="'$GMT_gmt[$r]',";} + } + } + if ($GMT_day[$r]==3) #### Wednesday local time + { + if (($Gct_wednesday_start==0) and ($Gct_wednesday_stop==0)) + { + if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) + {$default_gmt.="'$GMT_gmt[$r]',";} + else + {$del_default_gmt.="'$GMT_gmt[$r]',";} + } + else + { + if ( ($GMT_hour[$r]>=$Gct_wednesday_start) and ($GMT_hour[$r]<$Gct_wednesday_stop) ) + {$default_gmt.="'$GMT_gmt[$r]',";} + else + {$del_default_gmt.="'$GMT_gmt[$r]',";} + } + } + if ($GMT_day[$r]==4) #### Thursday local time + { + if (($Gct_thursday_start==0) and ($Gct_thursday_stop==0)) + { + if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) + {$default_gmt.="'$GMT_gmt[$r]',";} + else + {$del_default_gmt.="'$GMT_gmt[$r]',";} + } + else + { + if ( ($GMT_hour[$r]>=$Gct_thursday_start) and ($GMT_hour[$r]<$Gct_thursday_stop) ) + {$default_gmt.="'$GMT_gmt[$r]',";} + else + {$del_default_gmt.="'$GMT_gmt[$r]',";} + } + } + if ($GMT_day[$r]==5) #### Friday local time + { + if (($Gct_friday_start==0) and ($Gct_friday_stop==0)) + { + if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) + {$default_gmt.="'$GMT_gmt[$r]',";} + else + {$del_default_gmt.="'$GMT_gmt[$r]',";} + } + else + { + if ( ($GMT_hour[$r]>=$Gct_friday_start) and ($GMT_hour[$r]<$Gct_friday_stop) ) + {$default_gmt.="'$GMT_gmt[$r]',";} + else + {$del_default_gmt.="'$GMT_gmt[$r]',";} + } + } + if ($GMT_day[$r]==6) #### Saturday local time + { + if (($Gct_saturday_start==0) and ($Gct_saturday_stop==0)) + { + if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) + {$default_gmt.="'$GMT_gmt[$r]',";} + else + {$del_default_gmt.="'$GMT_gmt[$r]',";} + } + else + { + if ( ($GMT_hour[$r]>=$Gct_saturday_start) and ($GMT_hour[$r]<$Gct_saturday_stop) ) + {$default_gmt.="'$GMT_gmt[$r]',";} + else + {$del_default_gmt.="'$GMT_gmt[$r]',";} + } + } + $r++; + } + + $default_gmt = "$default_gmt'99'"; + $del_default_gmt = "$del_default_gmt'99'"; + $all_gmtSQL = "(gmt_offset_now IN($default_gmt) $ct_statesSQL) $ct_state_gmt_SQL"; + $del_gmtSQL = "(gmt_offset_now IN($del_default_gmt) $ct_statesSQL) $del_state_gmt_SQL"; + + ##### END calculate what gmt_offset_now values are within the allowed local_call_time setting ### + + + + if ($DB) {print "Starting hopper run for $campaign_id[$i] campaign- GMT: $local_call_time[$i] HOPPER: $hopper_level[$i] \n";} + + ### Delete the DONE leads if there are any + $stmtA = "DELETE from $vicidial_hopper where campaign_id='$campaign_id[$i]' and status IN('DONE');"; + $affected_rows = $dbhA->do($stmtA); + if ($DB) {print " hopper DONE cleared: $affected_rows\n";} + if ($DBX) {print " |$stmtA|\n";} + + ### Delete the leads that are out of GMT time range if there are any + $stmtA = "DELETE from $vicidial_hopper where campaign_id='$campaign_id[$i]' and ($del_gmtSQL);"; + $affected_rows = $dbhA->do($stmtA); + if ($DB) {print " hopper GMT BAD cleared: $affected_rows\n";} + if ($DBX) {print " |$stmtA|\n";} + + ### Find out how many leads are in the hopper from a specific campaign + $hopper_ready_count=0; + $stmtA = "SELECT count(*) from $vicidial_hopper where campaign_id='$campaign_id[$i]' and status='READY';"; + $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) + { + @aryA = $sthA->fetchrow_array; + $hopper_ready_count = $aryA[0]; + if ($DB) {print " hopper READY count: $hopper_ready_count\n";} + if ($DBX) {print " |$stmtA|\n";} + $rec_count++; + } + $sthA->finish(); + $event_string = "|$campaign_id[$i]|$hopper_level[$i]|$hopper_ready_count|$local_call_time[$i]||"; + &event_logger; + + ##### IF hopper level is below set minimum, then try to add more leads ##### + if ($hopper_ready_count < $hopper_level[$i]) + { + if ($DB) {print " hopper too low ($hopper_ready_count|$hopper_level[$i]) starting hopper dump\n";} + + ### Get list of the lists in the campaign ### + $stmtA = "SELECT list_id FROM vicidial_lists where campaign_id='$campaign_id[$i]' and active='Y';"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $rec_countLISTS=0; + $camp_lists = ''; + while ($sthArows > $rec_countLISTS) + { + @aryA = $sthA->fetchrow_array; + $camp_lists .= "'$aryA[0]',"; + $rec_countLISTS++; + } + $sthA->finish(); + if (length($camp_lists)<3) {$camp_lists="''";} + else {chop($camp_lists);} + + if ($DB) {print " campaign lists count: $rec_countLISTS | $camp_lists\n";} + if ($DBX) {print " |$stmtA|\n";} + + if ( ($lead_filter_id[$i] !~ /NONE/) && (length($lead_filter_id[$i])>0) ) + { + ### Get SQL of lead filter for the campaign ### + $stmtA = "SELECT lead_filter_sql FROM vicidial_lead_filters where lead_filter_id='$lead_filter_id[$i]';"; + $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) + { + @aryA = $sthA->fetchrow_array; + $lead_filter_sql[$i] = "$aryA[0]"; + $rec_count++; + } + $sthA->finish(); + $lead_filter_sql[$i] =~ s/^and|and$|^or|or$|^ and|and $|^ or|or $//gi; + $lead_filter_sql[$i] = "and $lead_filter_sql[$i]"; + if ($DB) {print " campaign lists count: $rec_countLISTS | $camp_lists\n";} + if ($DB) {print " lead filter $lead_filter_id[$i] defined for $campaign_id[$i]\n";} + if ($DBX) {print " |$lead_filter_sql[$i]|\n";} + } + else + { + $lead_filter_sql[$i] = ''; + if ($DB) {print " no lead filter defined for campaign: $campaign_id[$i]\n";} + if ($DBX) {print " |$lead_filter_id[$i]|\n";} + } + + $stmtA = "SELECT count(*) FROM vicidial_list where called_since_last_reset='N' and status IN('$dial_status_a[$i]','$dial_status_b[$i]','$dial_status_c[$i]','$dial_status_d[$i]','$dial_status_e[$i]') and list_id IN($camp_lists) and ($all_gmtSQL) $lead_filter_sql[$i];"; + if ($DBX) {print " |$stmtA|\n";} + $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) + { + @aryA = $sthA->fetchrow_array; + $campaign_leads_to_call = "$aryA[0]"; + if ($DB) {print " leads to call count: $campaign_leads_to_call\n";} + if ($DBX) {print " |$stmtA|\n";} + $rec_count++; + } + $sthA->finish(); + + if ($lead_order[$i] =~ /DOWN COUNT 2nd NEW|DOWN COUNT 3rd NEW|DOWN COUNT 4th NEW/) + { + $stmtA = "SELECT count(*) FROM vicidial_list where called_since_last_reset='N' and status IN('NEW') and list_id IN($camp_lists) and ($all_gmtSQL) $lead_filter_sql[$i];"; + $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) + { + @aryA = $sthA->fetchrow_array; + $NEW_campaign_leads_to_call = "$aryA[0]"; + if ($DB) {print " NEW leads to call count: $NEW_campaign_leads_to_call\n";} + if ($DBX) {print " |$stmtA|\n";} + $rec_count++; + } + $sthA->finish(); + } + + ##### IF no NEW leads to be called, error out of this campaign ##### + if ( ($lead_order[$i] =~ /DOWN COUNT 2nd NEW|DOWN COUNT 3rd NEW|DOWN COUNT 4th NEW/) && ($NEW_campaign_leads_to_call > 0) ) {$GOOD=1;} + else + { + if ($DB) {print " ERROR CANNOT ADD ANY NEW LEADS TO HOPPER\n";} + } + + ##### IF no leads to be called, error out of this campaign ##### + if ($campaign_leads_to_call < 1) + { + if ($DB) {print " ERROR CANNOT ADD ANY LEADS TO HOPPER\n";} + if ($VCSdialable_leads > 0) + { + $stmtA = "UPDATE vicidial_campaign_stats SET dialable_leads='0' where campaign_id='$campaign_id[$i]';"; + $affected_rows = $dbhA->do($stmtA); + if ($DBX) {print "CAMPAIGN STATS: $affected_rows|$stmtA|\n";} + } + } + else + { + if ($VCSdialable_leads != $campaign_leads_to_call) + { + $stmtA = "UPDATE vicidial_campaign_stats SET dialable_leads='$campaign_leads_to_call' where campaign_id='$campaign_id[$i]';"; + $affected_rows = $dbhA->do($stmtA); + if ($DBX) {print "CAMPAIGN STATS: $affected_rows|$stmtA|\n";} + } + if ($DB) {print " Getting Leads to add to hopper\n";} + ### grab leads already in hopper so we don't duplicate + $stmtA = "SELECT lead_id FROM $vicidial_hopper where campaign_id='$campaign_id[$i]';"; + if ($DBX) {print " |$stmtA|\n";} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $lead_id_lists = ''; + $rec_countLISTS=0; + while ($sthArows > $rec_countLISTS) + { + @aryA = $sthA->fetchrow_array; + $lead_id_lists .= "'$aryA[0]',"; + $rec_countLISTS++; + } + $sthA->finish(); + $lead_id_lists .= "'0'"; + $order_stmt=''; + $NEW_count = 0; + $NEW_level = 0; + $OTHER_level = $hopper_level[$i]; + if ($lead_order[$i] eq "DOWN") {$order_stmt = 'order by lead_id asc';} + if ($lead_order[$i] eq "UP") {$order_stmt = 'order by lead_id desc';} + if ($lead_order[$i] eq "UP LAST NAME") {$order_stmt = 'order by last_name desc, lead_id asc';} + if ($lead_order[$i] eq "DOWN LAST NAME") {$order_stmt = 'order by last_name, lead_id asc';} + if ($lead_order[$i] eq "UP PHONE") {$order_stmt = 'order by phone_number desc, lead_id asc';} + if ($lead_order[$i] eq "DOWN PHONE") {$order_stmt = 'order by phone_number, lead_id asc';} + if ($lead_order[$i] eq "UP COUNT") {$order_stmt = 'order by called_count desc, lead_id asc';} + if ($lead_order[$i] eq "DOWN COUNT") {$order_stmt = 'order by called_count, lead_id asc';} + if ($lead_order[$i] eq "DOWN COUNT 2nd NEW") {$NEW_count = 2;} + if ($lead_order[$i] eq "DOWN COUNT 3rd NEW") {$NEW_count = 3;} + if ($lead_order[$i] eq "DOWN COUNT 4th NEW") {$NEW_count = 4;} + + if ($NEW_count > 0) + { + $NEW_level = int($hopper_level[$i] / $NEW_count); + $OTHER_level = ($hopper_level[$i] - $NEW_level); + $order_stmt = 'order by called_count, lead_id asc'; + if ($DB) {print " looking for $NEW_level NEW leads mixed in with $OTHER_level other leads\n";} + + $stmtA = "SELECT lead_id,list_id,gmt_offset_now,phone_number,state FROM vicidial_list where called_since_last_reset='N' and status IN('NEW') and list_id IN($camp_lists) and lead_id NOT IN($lead_id_lists) and ($all_gmtSQL) $lead_filter_sql[$i] $order_stmt limit $NEW_level;"; + if ($DBX) {print " |$stmtA|\n";} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $NEW_rec_countLEADS=0; + @NEW_leads_to_hopper=@MT; + @NEW_lists_to_hopper=@MT; + @NEW_phone_to_hopper=@MT; + while ($sthArows > $NEW_rec_countLEADS) + { + @aryA = $sthA->fetchrow_array; + $NEW_leads_to_hopper[$NEW_rec_countLEADS] = "$aryA[0]"; + $NEW_lists_to_hopper[$NEW_rec_countLEADS] = "$aryA[1]"; + $NEW_gmt_to_hopper[$NEW_rec_countLEADS] = "$aryA[2]"; + $NEW_phone_to_hopper[$NEW_rec_countLEADS] = "$aryA[3]"; + $NEW_state_to_hopper[$NEW_rec_countLEADS] = "$aryA[4]"; + if ($DB_show_offset) {print "LEAD_ADD: $aryA[2] $aryA[3] $aryA[4]\n";} + $NEW_rec_countLEADS++; + } + $sthA->finish(); + } + + if ($DB) {print " lead call order: $order_stmt\n";} + $stmtA = "SELECT lead_id,list_id,gmt_offset_now,phone_number,state FROM vicidial_list where called_since_last_reset='N' and status IN('$dial_status_a[$i]','$dial_status_b[$i]','$dial_status_c[$i]','$dial_status_d[$i]','$dial_status_e[$i]') and list_id IN($camp_lists) and lead_id NOT IN($lead_id_lists) and ($all_gmtSQL) $lead_filter_sql[$i] $order_stmt limit $OTHER_level;"; + if ($DBX) {print " |$stmtA|\n";} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $rec_countLEADS=0; $NEW_dec=99; $NEW_in=0; + @leads_to_hopper=@MT; + @lists_to_hopper=@MT; + $rec_count=0; + while ($sthArows > $rec_count) + { + @aryA = $sthA->fetchrow_array; + if ( ($NEW_count > 0) && ($NEW_rec_countLEADS > $NEW_in) ) + { + if ($DB_show_offset) {print "NEW_COUNT: $NEW_count|$NEW_dec|$NEW_in|$NEW_rec_countLEADS\n";} + if ($NEW_count > $NEW_dec) + { + $NEW_dec++; + } + else + { + $leads_to_hopper[$rec_countLEADS] = "$NEW_leads_to_hopper[$NEW_in]"; + $lists_to_hopper[$rec_countLEADS] = "$NEW_lists_to_hopper[$NEW_in]"; + $gmt_to_hopper[$rec_countLEADS] = "$NEW_gmt_to_hopper[$NEW_in]"; + $state_to_hopper[$rec_countLEADS] = "$NEW_state_to_hopper[$NEW_in]"; + if ($DB_show_offset) {print "LEAD_ADD: $NEW_leads_to_hopper[$NEW_in] $NEW_phone_to_hopper[$NEW_in]\n";} + $rec_countLEADS++; + $NEW_in++; + $NEW_dec=2; + } + } + $leads_to_hopper[$rec_countLEADS] = "$aryA[0]"; + $lists_to_hopper[$rec_countLEADS] = "$aryA[1]"; + $gmt_to_hopper[$rec_countLEADS] = "$aryA[2]"; + $state_to_hopper[$rec_countLEADS] = "$aryA[4]"; + if ($DB_show_offset) {print "LEAD_ADD: $aryA[2] $aryA[3] $aryA[4]\n";} + $rec_countLEADS++; + $rec_count++; + } + $sthA->finish(); + if ($DB) {print " Adding to hopper: $rec_countLEADS\n";} + $event_string = "|$campaign_id[$i]|Added to hopper $rec_countLEADS|"; + &event_logger; + + $h=0; + foreach(@leads_to_hopper) + { + if ($leads_to_hopper[$h] != '0') + { + $stmtA = "INSERT INTO $vicidial_hopper (lead_id,campaign_id,status,user,list_id,gmt_offset_now,state) values('$leads_to_hopper[$h]','$campaign_id[$i]','READY','','$lists_to_hopper[$h]','$gmt_to_hopper[$h]','$state_to_hopper[$h]');"; + $affected_rows = $dbhA->do($stmtA); + if ($DBX) {print "LEAD INSERTED: $affected_rows|$leads_to_hopper[$h]|\n";} + } + $h++; + } + if ($DB) {print " DONE with this campaign\n";} + + } + } + + + $i++; + } + + +$dbhA->disconnect(); + +if($DB){print "DONE... Exiting... Goodbye... See you later... Really, I mean it :)\n";} + +exit; + + + +sub event_logger { + ### open the log file for writing ### + open(Lout, ">>$VDHLOGfile") + || die "Can't open $VDHLOGfile: $!\n"; + + print Lout "$now_date|$event_string|\n"; + + close(Lout); + +$event_string=''; +} + + diff --git a/DTMF_sounds/0.gsm b/DTMF_sounds/0.gsm new file mode 100644 index 0000000..8c57c41 Binary files /dev/null and b/DTMF_sounds/0.gsm differ diff --git a/DTMF_sounds/0.wav b/DTMF_sounds/0.wav index db262db..fe3fc12 100644 Binary files a/DTMF_sounds/0.wav and b/DTMF_sounds/0.wav differ diff --git a/DTMF_sounds/1.gsm b/DTMF_sounds/1.gsm new file mode 100644 index 0000000..7f6c842 --- /dev/null +++ b/DTMF_sounds/1.gsm @@ -0,0 +1 @@ +8z*PScOȪP,r)" +E<7j2h#8誙B,65Cb (Ra.4WFR2) 8z.hK]%Mq]ͷM] %ty\ ,Yc:Sd<,iUK:B.eZ%Vn*䡝QE!t+DC5сWETbok]bcCzՔ.46_M]]Dbv])`]kʜ_uY]UU2Fr.]MtZld]C]6]Y[.jR=_a 뭺_ܭ1Z]r2բ)6A]](,Q]\gS4a&Q2c>v\udI$P`u \ No newline at end of file diff --git a/DTMF_sounds/1.wav b/DTMF_sounds/1.wav index 94ec03e..e5f5359 100644 Binary files a/DTMF_sounds/1.wav and b/DTMF_sounds/1.wav differ diff --git a/DTMF_sounds/2.gsm b/DTMF_sounds/2.gsm new file mode 100644 index 0000000..82d6e75 --- /dev/null +++ b/DTMF_sounds/2.gsm @@ -0,0 +1,3 @@ +xZP4e5cU\ #n7#HVc ͌xC=A`a肹 B+3+x;4QӇx7 T_ xJB<]%]и +]t1]"0s wb2"hϣ& 0_C%,#dAxZ=a#^TIXVաs6IsBtIrx%~—b!a8sa8cF )8xZvEX]#yM02":#8txZv"%|_,äϢ)YxJA}me+6j_-gF|xK>a- +wCY 藡J,FsͮZx<>_"q- ) *Ƭs Psv_cgβrG$R 埗Y \ No newline at end of file diff --git a/DTMF_sounds/2.wav b/DTMF_sounds/2.wav index abdf9b2..c3e9edd 100644 Binary files a/DTMF_sounds/2.wav and b/DTMF_sounds/2.wav differ diff --git a/DTMF_sounds/3.gsm b/DTMF_sounds/3.gsm new file mode 100644 index 0000000..a41d667 --- /dev/null +++ b/DTMF_sounds/3.gsm @@ -0,0 +1,2 @@ +;=PW1W#X [r)d[K%7 +$c#2+)UBV4F¬SC{4[Hnpޥꕷbªσ`gC?=W n(*En,{Q6qR=!Ʈ\b#V) h~R=ѓ \%.kn\R=pzr>ܙ=$u R=ρfGϠȵj&ayC<·+61㍂aϣpK;WClRLJ$=Rf%>##xwb LM}bj&V:3k+[? kS%vAbÝ97qݑ \ No newline at end of file diff --git a/DTMF_sounds/3.wav b/DTMF_sounds/3.wav index e94977c..bc37ff5 100644 Binary files a/DTMF_sounds/3.wav and b/DTMF_sounds/3.wav differ diff --git a/DTMF_sounds/4.gsm b/DTMF_sounds/4.gsm new file mode 100644 index 0000000..d2bae3f --- /dev/null +++ b/DTMF_sounds/4.gsm @@ -0,0 +1,2 @@ +8PRW\-elG'XVb,b*V rK"bTJ5~aȋf9ZTȁ`IZ^8nYZ2!Qhzk*"xS8nƸ*"fsSzCdփHΡQTmqZsb=iB +Vbc #meTQJeS;4UQ\H'k JX+ 82U" #9k:'Q "I.Sc"7оRr%ڜD~V΢e Vqr!EKi}9EiUELyXz9#3ȭrQ Ysq[HܘaM2 \ No newline at end of file diff --git a/DTMF_sounds/4.wav b/DTMF_sounds/4.wav index b20dcba..05f1adf 100644 Binary files a/DTMF_sounds/4.wav and b/DTMF_sounds/4.wav differ diff --git a/DTMF_sounds/5.gsm b/DTMF_sounds/5.gsm new file mode 100644 index 0000000..239c7ac --- /dev/null +++ b/DTMF_sounds/5.gsm @@ -0,0 +1 @@ +xj=P3cWcT qFܚ$DVD%CHxS&TxD?4A9E'ڸU2r [SyqxbWXWlK%a.Ռ̩ح4+Mv_dȗ˱.#IZAY \ No newline at end of file diff --git a/DTMF_sounds/6.wav b/DTMF_sounds/6.wav index b67755a..7c32ca3 100644 Binary files a/DTMF_sounds/6.wav and b/DTMF_sounds/6.wav differ diff --git a/DTMF_sounds/7.gsm b/DTMF_sounds/7.gsm new file mode 100644 index 0000000..0260531 --- /dev/null +++ b/DTMF_sounds/7.gsm @@ -0,0 +1,2 @@ +8PR=:^ +r(۞fM[E88vG(QE!f݅ Q[O*֩r<HWSwt8Dx"IGDL4:RīUXj]H䋨L~rA fa֮2_(9FܗL]ëRQh_7#uGB.Vi]McjE2[vADyac]loHtRFz􇁗Hy!Aq8!QȤc=6 B)SdޭU9"<55c=ۉmbSc_ܩHUD{7=_!1֥!S왩n:5P!ku \ No newline at end of file diff --git a/DTMF_sounds/7.wav b/DTMF_sounds/7.wav index 0cc3acd..6cdce5c 100644 Binary files a/DTMF_sounds/7.wav and b/DTMF_sounds/7.wav differ diff --git a/DTMF_sounds/8.gsm b/DTMF_sounds/8.gsm new file mode 100644 index 0000000..e931896 Binary files /dev/null and b/DTMF_sounds/8.gsm differ diff --git a/DTMF_sounds/8.wav b/DTMF_sounds/8.wav index c83eab7..3ed04b3 100644 Binary files a/DTMF_sounds/8.wav and b/DTMF_sounds/8.wav differ diff --git a/DTMF_sounds/9.gsm b/DTMF_sounds/9.gsm new file mode 100644 index 0000000..4a99470 Binary files /dev/null and b/DTMF_sounds/9.gsm differ diff --git a/DTMF_sounds/9.wav b/DTMF_sounds/9.wav index b991053..1439a59 100644 Binary files a/DTMF_sounds/9.wav and b/DTMF_sounds/9.wav differ diff --git a/DTMF_sounds/enter.gsm b/DTMF_sounds/enter.gsm new file mode 100644 index 0000000..aa4dafb Binary files /dev/null and b/DTMF_sounds/enter.gsm differ diff --git a/DTMF_sounds/hash.gsm b/DTMF_sounds/hash.gsm new file mode 100644 index 0000000..0d0a8ec --- /dev/null +++ b/DTMF_sounds/hash.gsm @@ -0,0 +1,2 @@ +\}PcȣP tۆD#E)#i(*E3yBF:W2wWԢ6TyuWI+sdWysuk2yct9,,Wk|UTWu#.1c}yQ( dº\2! Q\?;waWnfy.7FW){?YW!Q nSB*qUUy>XWQDm! \ No newline at end of file diff --git a/DTMF_sounds/hash.wav b/DTMF_sounds/hash.wav index e5ea708..a079f44 100644 Binary files a/DTMF_sounds/hash.wav and b/DTMF_sounds/hash.wav differ diff --git a/DTMF_sounds/leave.gsm b/DTMF_sounds/leave.gsm new file mode 100644 index 0000000..7b3bef0 Binary files /dev/null and b/DTMF_sounds/leave.gsm differ diff --git a/DTMF_sounds/star.gsm b/DTMF_sounds/star.gsm new file mode 100644 index 0000000..5ec8908 --- /dev/null +++ b/DTMF_sounds/star.gsm @@ -0,0 +1,2 @@ +:nPSat֪j*PR6۞D IDCtb This option allows the user to be able to delete vicidia Modify Call Times - This option allows the user to view and modify the call times and state call times records. A user doesn't need this option enabled if they only need to change the call times option on the campaigns screen Wrapup Seconds - The number of seconds to force an agent to wait before allowing them to receive or dial another call. The timer begins as soon as an agent hangs up on their customer - or in the case of alternate number dialing when the agent finishes the lead - Default is 0 seconds. If the timer runs out before the agent has dispositioned the call, the agent still will NOT move on to the next call until they select a disposition Wrapup Message - This is a campaign-specific message to be displayed on the wrapup screen if wrapup seconds is set +Allowable Inbound Groups - Here is where you select the inbound groups you want agents in this CLOSER campaign to be able to take calls from. It is important for BLENDED inbound/outbound campaigns only to select the inbound groups that are used for agents in this campaign You are not authorized to view this page. Please go back Day and time options will appear once you have created the Call Time Definition State Call Time ID, name and state must be at least 2 characters in length @@ -120,5 +121,7 @@ Added option to search for a manual-dial lead before inserting it in the system Added Call Wrapup option and screen with override link to skip out early -############################################################ +############################################################ MANAGER MANUAL + +Added Allowable Inbound Groups to CLOSER Campaign Detail screen diff --git a/VD_app_conference_0.5.zip b/VD_app_conference_0.5.zip new file mode 100644 index 0000000..31ff6f0 Binary files /dev/null and b/VD_app_conference_0.5.zip differ diff --git a/VICIDIAL_web/AST_CLOSERstats.php b/VICIDIAL_web/AST_CLOSERstats.php index 44b7d1c..143fc6e 100644 --- a/VICIDIAL_web/AST_CLOSERstats.php +++ b/VICIDIAL_web/AST_CLOSERstats.php @@ -63,6 +63,7 @@ echo "\n"; echo "\n"; +echo "           MODIFY \n"; echo "\n\n"; echo "
\n\n";
diff --git a/VICIDIAL_web/AST_VDADstats.php b/VICIDIAL_web/AST_VDADstats.php
index 2b1b8de..6854fd5 100644
--- a/VICIDIAL_web/AST_VDADstats.php
+++ b/VICIDIAL_web/AST_VDADstats.php
@@ -65,6 +65,7 @@ echo "\n";
 echo "\n";
+echo "           MODIFY \n";
 echo "\n\n";
 
 echo "
\n\n";
diff --git a/VICIDIAL_web/AST_VICIDIAL_hopperlist.php b/VICIDIAL_web/AST_VICIDIAL_hopperlist.php
index fd94c35..98a10d5 100644
--- a/VICIDIAL_web/AST_VICIDIAL_hopperlist.php
+++ b/VICIDIAL_web/AST_VICIDIAL_hopperlist.php
@@ -64,6 +64,7 @@ echo "\n";
 echo "\n";
+echo "           MODIFY \n";
 echo "\n\n";
 
 echo "
\n\n";
diff --git a/VICIDIAL_web/AST_agent_performance.php b/VICIDIAL_web/AST_agent_performance.php
index 1e62642..641571b 100644
--- a/VICIDIAL_web/AST_agent_performance.php
+++ b/VICIDIAL_web/AST_agent_performance.php
@@ -69,6 +69,7 @@ echo "\n";
 echo "\n";
 echo "\n";
 echo "\n";
+echo "           MODIFY \n";
 echo "\n\n";
 
 echo "
\n";
diff --git a/VICIDIAL_web/AST_agent_performance_detail.php b/VICIDIAL_web/AST_agent_performance_detail.php
index 8df69ad..a81f9d1 100644
--- a/VICIDIAL_web/AST_agent_performance_detail.php
+++ b/VICIDIAL_web/AST_agent_performance_detail.php
@@ -69,6 +69,7 @@ echo "\n";
 echo "\n";
 echo "\n";
 echo "\n";
+echo "           MODIFY \n";
 echo "\n\n";
 
 echo "
\n";
diff --git a/VICIDIAL_web/AST_agent_time_sheet_archive.php b/VICIDIAL_web/AST_agent_time_sheet_archive.php
new file mode 100644
index 0000000..a7fad2d
--- /dev/null
+++ b/VICIDIAL_web/AST_agent_time_sheet_archive.php
@@ -0,0 +1,259 @@
+    LICENSE: GPLv2
+###
+
+require("dbconnect.php");
+
+$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
+$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
+$PHP_SELF=$_SERVER['PHP_SELF'];
+if (isset($_GET["agent"]))				{$agent=$_GET["agent"];}
+	elseif (isset($_POST["agent"]))		{$agent=$_POST["agent"];}
+if (isset($_GET["query_date"]))				{$query_date=$_GET["query_date"];}
+	elseif (isset($_POST["query_date"]))		{$query_date=$_POST["query_date"];}
+if (isset($_GET["calls_summary"]))				{$calls_summary=$_GET["calls_summary"];}
+	elseif (isset($_POST["calls_summary"]))		{$calls_summary=$_POST["calls_summary"];}
+if (isset($_GET["submit"]))				{$submit=$_GET["submit"];}
+	elseif (isset($_POST["submit"]))		{$submit=$_POST["submit"];}
+if (isset($_GET["SUBMIT"]))				{$SUBMIT=$_GET["SUBMIT"];}
+	elseif (isset($_POST["SUBMIT"]))		{$SUBMIT=$_POST["SUBMIT"];}
+
+$NOW_DATE = date("Y-m-d");
+$NOW_TIME = date("Y-m-d H:i:s");
+$STARTtime = date("U");
+if (!isset($query_date)) {$query_date = $NOW_DATE;}
+
+?>
+
+
+
+
+
+\n";
+echo "VICIDIAL: Agent Time Sheet\n";
+echo "
\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "
\n\n"; + +echo "
\n";
+
+
+if (!$agent)
+{
+echo "\n";
+echo "PLEASE SELECT AN AGENT ID AND DATE-TIME ABOVE AND CLICK SUBMIT\n";
+echo " NOTE: stats taken from available agent log data\n";
+}
+
+else
+{
+$query_date_BEGIN = "$query_date 00:00:00";   
+$query_date_END = "$query_date 23:59:59";
+$time_BEGIN = "00:00:00";   
+$time_END = "23:59:59";
+
+$stmt="select full_name from vicidial_users where user='$agent';";
+$rslt=mysql_query($stmt, $link);
+if ($DB) {echo "$stmt\n";}
+$row=mysql_fetch_row($rslt);
+$full_name = $row[0];
+
+echo "VICIDIAL: Agent Time Sheet                             $NOW_TIME\n";
+
+echo "Time range: $query_date_BEGIN to $query_date_END\n\n";
+echo "---------- AGENT TIME SHEET: $agent - $full_name -------------\n\n";
+
+if ($calls_summary)
+	{
+	$stmt="select count(*) as calls,sum(talk_sec) as talk,avg(talk_sec),sum(pause_sec),avg(pause_sec),sum(wait_sec),avg(wait_sec),sum(dispo_sec),avg(dispo_sec) from vicidial_agent_log_archive where event_time <= '$query_date_END' and event_time >= '$query_date_BEGIN' and user='$agent' and pause_sec<48800 and wait_sec<48800 and talk_sec<48800 and dispo_sec<48800 limit 1;";
+	$rslt=mysql_query($stmt, $link);
+	if ($DB) {echo "$stmt\n";}
+	$row=mysql_fetch_row($rslt);
+
+	$TOTAL_TIME = ($row[1] + $row[3] + $row[5] + $row[7]);
+
+		$TOTAL_TIME_H = ($TOTAL_TIME / 3600);
+		$TOTAL_TIME_H = round($TOTAL_TIME_H, 2);
+		$TOTAL_TIME_H_int = intval("$TOTAL_TIME_H");
+		$TOTAL_TIME_M = ($TOTAL_TIME_H - $TOTAL_TIME_H_int);
+		$TOTAL_TIME_M = ($TOTAL_TIME_M * 60);
+		$TOTAL_TIME_M = round($TOTAL_TIME_M, 2);
+		$TOTAL_TIME_M_int = intval("$TOTAL_TIME_M");
+		$TOTAL_TIME_S = ($TOTAL_TIME_M - $TOTAL_TIME_M_int);
+		$TOTAL_TIME_S = ($TOTAL_TIME_S * 60);
+		$TOTAL_TIME_S = round($TOTAL_TIME_S, 0);
+		if ($TOTAL_TIME_S < 10) {$TOTAL_TIME_S = "0$TOTAL_TIME_S";}
+		if ($TOTAL_TIME_M_int < 10) {$TOTAL_TIME_M_int = "0$TOTAL_TIME_M_int";}
+		$TOTAL_TIME_HMS = "$TOTAL_TIME_H_int:$TOTAL_TIME_M_int:$TOTAL_TIME_S";
+		$pfTOTAL_TIME_HMS =		sprintf("%8s", $TOTAL_TIME_HMS);
+
+		$TALK_TIME_H = ($row[1] / 3600);
+		$TALK_TIME_H = round($TALK_TIME_H, 2);
+		$TALK_TIME_H_int = intval("$TALK_TIME_H");
+		$TALK_TIME_M = ($TALK_TIME_H - $TALK_TIME_H_int);
+		$TALK_TIME_M = ($TALK_TIME_M * 60);
+		$TALK_TIME_M = round($TALK_TIME_M, 2);
+		$TALK_TIME_M_int = intval("$TALK_TIME_M");
+		$TALK_TIME_S = ($TALK_TIME_M - $TALK_TIME_M_int);
+		$TALK_TIME_S = ($TALK_TIME_S * 60);
+		$TALK_TIME_S = round($TALK_TIME_S, 0);
+		if ($TALK_TIME_S < 10) {$TALK_TIME_S = "0$TALK_TIME_S";}
+		if ($TALK_TIME_M_int < 10) {$TALK_TIME_M_int = "0$TALK_TIME_M_int";}
+		$TALK_TIME_HMS = "$TALK_TIME_H_int:$TALK_TIME_M_int:$TALK_TIME_S";
+		$pfTALK_TIME_HMS =		sprintf("%8s", $TALK_TIME_HMS);
+
+		$PAUSE_TIME_H = ($row[3] / 3600);
+		$PAUSE_TIME_H = round($PAUSE_TIME_H, 2);
+		$PAUSE_TIME_H_int = intval("$PAUSE_TIME_H");
+		$PAUSE_TIME_M = ($PAUSE_TIME_H - $PAUSE_TIME_H_int);
+		$PAUSE_TIME_M = ($PAUSE_TIME_M * 60);
+		$PAUSE_TIME_M = round($PAUSE_TIME_M, 2);
+		$PAUSE_TIME_M_int = intval("$PAUSE_TIME_M");
+		$PAUSE_TIME_S = ($PAUSE_TIME_M - $PAUSE_TIME_M_int);
+		$PAUSE_TIME_S = ($PAUSE_TIME_S * 60);
+		$PAUSE_TIME_S = round($PAUSE_TIME_S, 0);
+		if ($PAUSE_TIME_S < 10) {$PAUSE_TIME_S = "0$PAUSE_TIME_S";}
+		if ($PAUSE_TIME_M_int < 10) {$PAUSE_TIME_M_int = "0$PAUSE_TIME_M_int";}
+		$PAUSE_TIME_HMS = "$PAUSE_TIME_H_int:$PAUSE_TIME_M_int:$PAUSE_TIME_S";
+		$pfPAUSE_TIME_HMS =		sprintf("%8s", $PAUSE_TIME_HMS);
+
+		$WAIT_TIME_H = ($row[5] / 3600);
+		$WAIT_TIME_H = round($WAIT_TIME_H, 2);
+		$WAIT_TIME_H_int = intval("$WAIT_TIME_H");
+		$WAIT_TIME_M = ($WAIT_TIME_H - $WAIT_TIME_H_int);
+		$WAIT_TIME_M = ($WAIT_TIME_M * 60);
+		$WAIT_TIME_M = round($WAIT_TIME_M, 2);
+		$WAIT_TIME_M_int = intval("$WAIT_TIME_M");
+		$WAIT_TIME_S = ($WAIT_TIME_M - $WAIT_TIME_M_int);
+		$WAIT_TIME_S = ($WAIT_TIME_S * 60);
+		$WAIT_TIME_S = round($WAIT_TIME_S, 0);
+		if ($WAIT_TIME_S < 10) {$WAIT_TIME_S = "0$WAIT_TIME_S";}
+		if ($WAIT_TIME_M_int < 10) {$WAIT_TIME_M_int = "0$WAIT_TIME_M_int";}
+		$WAIT_TIME_HMS = "$WAIT_TIME_H_int:$WAIT_TIME_M_int:$WAIT_TIME_S";
+		$pfWAIT_TIME_HMS =		sprintf("%8s", $WAIT_TIME_HMS);
+
+		$WRAPUP_TIME_H = ($row[7] / 3600);
+		$WRAPUP_TIME_H = round($WRAPUP_TIME_H, 2);
+		$WRAPUP_TIME_H_int = intval("$WRAPUP_TIME_H");
+		$WRAPUP_TIME_M = ($WRAPUP_TIME_H - $WRAPUP_TIME_H_int);
+		$WRAPUP_TIME_M = ($WRAPUP_TIME_M * 60);
+		$WRAPUP_TIME_M = round($WRAPUP_TIME_M, 2);
+		$WRAPUP_TIME_M_int = intval("$WRAPUP_TIME_M");
+		$WRAPUP_TIME_S = ($WRAPUP_TIME_M - $WRAPUP_TIME_M_int);
+		$WRAPUP_TIME_S = ($WRAPUP_TIME_S * 60);
+		$WRAPUP_TIME_S = round($WRAPUP_TIME_S, 0);
+		if ($WRAPUP_TIME_S < 10) {$WRAPUP_TIME_S = "0$WRAPUP_TIME_S";}
+		if ($WRAPUP_TIME_M_int < 10) {$WRAPUP_TIME_M_int = "0$WRAPUP_TIME_M_int";}
+		$WRAPUP_TIME_HMS = "$WRAPUP_TIME_H_int:$WRAPUP_TIME_M_int:$WRAPUP_TIME_S";
+		$pfWRAPUP_TIME_HMS =		sprintf("%8s", $WRAPUP_TIME_HMS);
+
+		$TALK_AVG_M = ($row[2] / 60);
+		$TALK_AVG_M = round($TALK_AVG_M, 2);
+		$TALK_AVG_M_int = intval("$TALK_AVG_M");
+		$TALK_AVG_S = ($TALK_AVG_M - $TALK_AVG_M_int);
+		$TALK_AVG_S = ($TALK_AVG_S * 60);
+		$TALK_AVG_S = round($TALK_AVG_S, 0);
+		if ($TALK_AVG_S < 10) {$TALK_AVG_S = "0$TALK_AVG_S";}
+		$TALK_AVG_MS = "$TALK_AVG_M_int:$TALK_AVG_S";
+		$pfTALK_AVG_MS =		sprintf("%6s", $TALK_AVG_MS);
+
+		$PAUSE_AVG_M = ($row[4] / 60);
+		$PAUSE_AVG_M = round($PAUSE_AVG_M, 2);
+		$PAUSE_AVG_M_int = intval("$PAUSE_AVG_M");
+		$PAUSE_AVG_S = ($PAUSE_AVG_M - $PAUSE_AVG_M_int);
+		$PAUSE_AVG_S = ($PAUSE_AVG_S * 60);
+		$PAUSE_AVG_S = round($PAUSE_AVG_S, 0);
+		if ($PAUSE_AVG_S < 10) {$PAUSE_AVG_S = "0$PAUSE_AVG_S";}
+		$PAUSE_AVG_MS = "$PAUSE_AVG_M_int:$PAUSE_AVG_S";
+		$pfPAUSE_AVG_MS =		sprintf("%6s", $PAUSE_AVG_MS);
+
+		$WAIT_AVG_M = ($row[6] / 60);
+		$WAIT_AVG_M = round($WAIT_AVG_M, 2);
+		$WAIT_AVG_M_int = intval("$WAIT_AVG_M");
+		$WAIT_AVG_S = ($WAIT_AVG_M - $WAIT_AVG_M_int);
+		$WAIT_AVG_S = ($WAIT_AVG_S * 60);
+		$WAIT_AVG_S = round($WAIT_AVG_S, 0);
+		if ($WAIT_AVG_S < 10) {$WAIT_AVG_S = "0$WAIT_AVG_S";}
+		$WAIT_AVG_MS = "$WAIT_AVG_M_int:$WAIT_AVG_S";
+		$pfWAIT_AVG_MS =		sprintf("%6s", $WAIT_AVG_MS);
+
+		$WRAPUP_AVG_M = ($row[8] / 60);
+		$WRAPUP_AVG_M = round($WRAPUP_AVG_M, 2);
+		$WRAPUP_AVG_M_int = intval("$WRAPUP_AVG_M");
+		$WRAPUP_AVG_S = ($WRAPUP_AVG_M - $WRAPUP_AVG_M_int);
+		$WRAPUP_AVG_S = ($WRAPUP_AVG_S * 60);
+		$WRAPUP_AVG_S = round($WRAPUP_AVG_S, 0);
+		if ($WRAPUP_AVG_S < 10) {$WRAPUP_AVG_S = "0$WRAPUP_AVG_S";}
+		$WRAPUP_AVG_MS = "$WRAPUP_AVG_M_int:$WRAPUP_AVG_S";
+		$pfWRAPUP_AVG_MS =		sprintf("%6s", $WRAPUP_AVG_MS);
+
+	echo "TOTAL CALLS TAKEN: $row[0]\n";
+	echo "TALK TIME:               $pfTALK_TIME_HMS     AVERAGE: $pfTALK_AVG_MS\n";
+	echo "PAUSE TIME:              $pfPAUSE_TIME_HMS     AVERAGE: $pfPAUSE_AVG_MS\n";
+	echo "WAIT TIME:               $pfWAIT_TIME_HMS     AVERAGE: $pfWAIT_AVG_MS\n";
+	echo "WRAPUP TIME:             $pfWRAPUP_TIME_HMS     AVERAGE: $pfWRAPUP_AVG_MS\n";
+	echo "----------------------------------------------------------------\n";
+	echo "TOTAL ACTIVE AGENT TIME: $pfTOTAL_TIME_HMS\n";
+
+	echo "\n";
+	}
+else
+	{
+	echo "Call Activity Summary\n\n";
+
+	}
+
+$stmt="select event_time,UNIX_TIMESTAMP(event_time) from vicidial_agent_log_archive where event_time <= '$query_date_END' and event_time >= '$query_date_BEGIN' and user='$agent' order by event_time limit 1;";
+$rslt=mysql_query($stmt, $link);
+if ($DB) {echo "$stmt\n";}
+$row=mysql_fetch_row($rslt);
+
+echo "FIRST LOGIN:          $row[0]\n";
+$start = $row[1];
+
+$stmt="select event_time,UNIX_TIMESTAMP(event_time) from vicidial_agent_log_archive where event_time <= '$query_date_END' and event_time >= '$query_date_BEGIN' and user='$agent' order by event_time desc limit 1;";
+$rslt=mysql_query($stmt, $link);
+if ($DB) {echo "$stmt\n";}
+$row=mysql_fetch_row($rslt);
+
+echo "LAST LOG ACTIVITY:    $row[0]\n";
+$end = $row[1];
+
+$login_time = ($end - $start);
+	$LOGIN_TIME_H = ($login_time / 3600);
+	$LOGIN_TIME_H = round($LOGIN_TIME_H, 2);
+	$LOGIN_TIME_H_int = intval("$LOGIN_TIME_H");
+	$LOGIN_TIME_M = ($LOGIN_TIME_H - $LOGIN_TIME_H_int);
+	$LOGIN_TIME_M = ($LOGIN_TIME_M * 60);
+	$LOGIN_TIME_M = round($LOGIN_TIME_M, 2);
+	$LOGIN_TIME_M_int = intval("$LOGIN_TIME_M");
+	$LOGIN_TIME_S = ($LOGIN_TIME_M - $LOGIN_TIME_M_int);
+	$LOGIN_TIME_S = ($LOGIN_TIME_S * 60);
+	$LOGIN_TIME_S = round($LOGIN_TIME_S, 0);
+	if ($LOGIN_TIME_S < 10) {$LOGIN_TIME_S = "0$LOGIN_TIME_S";}
+	if ($LOGIN_TIME_M_int < 10) {$LOGIN_TIME_M_int = "0$LOGIN_TIME_M_int";}
+	$LOGIN_TIME_HMS = "$LOGIN_TIME_H_int:$LOGIN_TIME_M_int:$LOGIN_TIME_S";
+	$pfLOGIN_TIME_HMS =		sprintf("%8s", $LOGIN_TIME_HMS);
+
+echo "-----------------------------------------\n";
+echo "TOTAL LOGGED-IN TIME:    $pfLOGIN_TIME_HMS\n";
+
+}
+
+
+
+?>
+
+
\ No newline at end of file
diff --git a/VICIDIAL_web/AST_parkstats.php b/VICIDIAL_web/AST_parkstats.php
index 8e0f653..d6a284b 100644
--- a/VICIDIAL_web/AST_parkstats.php
+++ b/VICIDIAL_web/AST_parkstats.php
@@ -63,6 +63,7 @@ echo "\n";
 echo "\n";
+echo "           MODIFY \n";
 echo "\n\n";
 
 echo "
\n\n";
diff --git a/VICIDIAL_web/AST_timeonVDADall.php b/VICIDIAL_web/AST_timeonVDADall.php
index 76b20c8..1aa8347 100644
--- a/VICIDIAL_web/AST_timeonVDADall.php
+++ b/VICIDIAL_web/AST_timeonVDADall.php
@@ -10,6 +10,7 @@
 # 51130-1218 - Modified layout and info to show all servers in a vicidial system
 # 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES
 # 60511-1343 - Added leads and drop info at the top of the screen
+# 60608-1539 - Fixed CLOSER tallies for active calls
 #
 
 header ("Content-type: text/html; charset=utf-8");
@@ -164,7 +165,16 @@ echo "\n\n";
 ###### OUTBOUND CALLS
 ###################################################################################
 if (eregi("CLOSER",$group))
-	{$stmt="select status from vicidial_auto_calls where status NOT IN('XFER') and (campaign_id='$group' or campaign_id LIKE \"CL_%\");";}
+	{
+	$stmt="select closer_campaigns from vicidial_campaigns where campaign_id='$group';";
+	$rslt=mysql_query($stmt, $link);
+	$row=mysql_fetch_row($rslt);
+	$closer_campaigns = preg_replace("/^ | -$/","",$row[0]);
+	$closer_campaigns = preg_replace("/ /","','",$closer_campaigns);
+	$closer_campaigns = "'$closer_campaigns'";
+
+	$stmt="select status from vicidial_auto_calls where status NOT IN('XFER') and ( (call_type='IN' and campaign_id IN($closer_campaigns)) or (campaign_id='$group' and call_type='OUT') );";
+	}
 else
 	{$stmt="select status from vicidial_auto_calls where status NOT IN('XFER') and campaign_id='$group';";}
 $rslt=mysql_query($stmt, $link);
diff --git a/VICIDIAL_web/AST_timeonVDADall_SIPmonitor.php b/VICIDIAL_web/AST_timeonVDADall_SIPmonitor.php
index 32353f4..1e0d83c 100644
--- a/VICIDIAL_web/AST_timeonVDADall_SIPmonitor.php
+++ b/VICIDIAL_web/AST_timeonVDADall_SIPmonitor.php
@@ -98,6 +98,7 @@ echo "\n";
 echo "                   \n";
 echo "STOP | GO \n";
+echo "           MODIFY \n";
 echo "\n\n";
 
 if (!$group) {echo "

please select a campaign from the pulldown above\n"; exit;} diff --git a/VICIDIAL_web/admin.php b/VICIDIAL_web/admin.php index 3c1d5da..2edfbdb 100644 --- a/VICIDIAL_web/admin.php +++ b/VICIDIAL_web/admin.php @@ -327,12 +327,13 @@ if (isset($_GET["wrapup_message"])) {$wrapup_message=$_GET["wrapup_message"] # - Added dialable leads count popup to campaign screen if auto-calc is disabled # - Added test dialable leads count popup to filter screen # 60510-1050 - Added Wrapup seconds and Wrapup message to campaigns screen +# 60608-1401 - Added allowable inbound_groups checkboxes to CLOSER campaign detail screen # # make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time -$version = '1.1.11-8'; -$build = '60510-1050'; +$version = '1.1.11-9'; +$build = '60608-1401'; $STARTtime = date("U"); @@ -555,7 +556,7 @@ if ( ($ADD>9) && ($ADD < 99998) ) } } -if ( ( (strlen($ADD)>4) && ($ADD < 99998) ) or ($ADD==3) or ($ADD=="4A") or ($ADD=="4B") ) +if ( ( (strlen($ADD)>4) && ($ADD < 99998) ) or ($ADD==3) or ($ADD==31) or ($ADD==41) or ($ADD=="4A") or ($ADD=="4B") ) { ##### get server listing for dynamic pulldown $stmt="SELECT server_ip,server_description from servers order by server_ip"; @@ -586,6 +587,16 @@ if ( ( (strlen($ADD)>4) && ($ADD < 99998) ) or ($ADD==3) or ($ADD=="4A") or ($A } ##### get inbound groups listing for checkboxes + if ($ADD==31) + { + $stmt="SELECT closer_campaigns from vicidial_campaigns where campaign_id='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $closer_campaigns = $row[0]; + $closer_campaigns = preg_replace("/ -$/","",$closer_campaigns); + $groups = explode(" ", $closer_campaigns); + } + if ( (($ADD==31111) or ($ADD==31111)) and (count($groups)<1) ) { $stmt="SELECT closer_campaigns from vicidial_remote_agents where remote_agent_id='$remote_agent_id';"; @@ -1014,6 +1025,11 @@ echo "
Wrapup Message - This is a campaign-specific message to be displayed on the wrapup screen if wrapup seconds is set. +
+ +
+Allowable Inbound Groups - Here is where you select the inbound groups you want agents in this CLOSER campaign to be able to take calls from. It is important for BLENDED inbound/outbound campaigns only to select the inbound groups that are used for agents in this campaign. + @@ -2518,7 +2534,7 @@ if ($ADD==41) { echo "
CAMPAIGN MODIFIED: $campaign_id\n"; - $stmtA="UPDATE vicidial_campaigns set campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',allow_closers='$allow_closers',hopper_level='$hopper_level', auto_dial_level='$auto_dial_level', next_agent_call='$next_agent_call', local_call_time='$local_call_time', voicemail_ext='$voicemail_ext', dial_timeout='$dial_timeout', dial_prefix='$dial_prefix', campaign_cid='$campaign_cid', campaign_vdad_exten='$campaign_vdad_exten', web_form_address='$web_form_address', park_ext='$park_ext', park_file_name='$park_file_name', campaign_rec_exten='$campaign_rec_exten', campaign_recording='$campaign_recording', campaign_rec_filename='$campaign_rec_filename', campaign_script='$script_id', get_call_launch='$get_call_launch', am_message_exten='$am_message_exten', amd_send_to_vmx='$amd_send_to_vmx', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number', xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',lead_filter_id='$lead_filter_id',alt_number_dialing='$alt_number_dialing',scheduled_callbacks='$scheduled_callbacks',safe_harbor_message='$safe_harbor_message',drop_call_seconds='$drop_call_seconds',safe_harbor_exten='$safe_harbor_exten',wrapup_seconds='$wrapup_seconds',wrapup_message='$wrapup_message' where campaign_id='$campaign_id';"; + $stmtA="UPDATE vicidial_campaigns set campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',allow_closers='$allow_closers',hopper_level='$hopper_level', auto_dial_level='$auto_dial_level', next_agent_call='$next_agent_call', local_call_time='$local_call_time', voicemail_ext='$voicemail_ext', dial_timeout='$dial_timeout', dial_prefix='$dial_prefix', campaign_cid='$campaign_cid', campaign_vdad_exten='$campaign_vdad_exten', web_form_address='$web_form_address', park_ext='$park_ext', park_file_name='$park_file_name', campaign_rec_exten='$campaign_rec_exten', campaign_recording='$campaign_recording', campaign_rec_filename='$campaign_rec_filename', campaign_script='$script_id', get_call_launch='$get_call_launch', am_message_exten='$am_message_exten', amd_send_to_vmx='$amd_send_to_vmx', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number', xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',lead_filter_id='$lead_filter_id',alt_number_dialing='$alt_number_dialing',scheduled_callbacks='$scheduled_callbacks',safe_harbor_message='$safe_harbor_message',drop_call_seconds='$drop_call_seconds',safe_harbor_exten='$safe_harbor_exten',wrapup_seconds='$wrapup_seconds',wrapup_message='$wrapup_message', closer_campaigns='$groups_value' where campaign_id='$campaign_id';"; $rslt=mysql_query($stmtA, $link); if ($reset_hopper == 'Y') @@ -3848,6 +3864,7 @@ echo "\n"; + +if (eregi("CLOSER", $campaign_id)) + { + echo "\n"; + } + + + echo "\n"; echo "
\n"; $display_dialable_count = $row[39]; $wrapup_seconds = $row[40]; $wrapup_message = $row[41]; +# $closer_campaigns = $row[42]; echo "
MODIFY A CAMPAIGNS RECORD: $row[0] - Basic View"; echo " | Detail View | "; @@ -3981,6 +3998,17 @@ echo "
Wrapup Seconds: Wrapup Message: $NWB#vicidial_campaigns-wrapup_message$NWE
Allowed Inbound Groups:
"; + echo " $NWB#vicidial_campaigns-closer_campaigns$NWE
\n"; + echo "$groups_list"; + echo "
\n"; diff --git a/agc/images/agc_check_voicemail_BLINK_e.gif b/agc/images/agc_check_voicemail_BLINK_e.gif new file mode 100644 index 0000000..600cef8 Binary files /dev/null and b/agc/images/agc_check_voicemail_BLINK_e.gif differ diff --git a/agc/images/agc_check_voicemail_BLINK_ptbr.gif b/agc/images/agc_check_voicemail_BLINK_ptbr.gif new file mode 100644 index 0000000..3670af2 Binary files /dev/null and b/agc/images/agc_check_voicemail_BLINK_ptbr.gif differ diff --git a/agc/images/agc_check_voicemail_OFF_ptbr.gif b/agc/images/agc_check_voicemail_OFF_ptbr.gif new file mode 100644 index 0000000..3b1c464 Binary files /dev/null and b/agc/images/agc_check_voicemail_OFF_ptbr.gif differ diff --git a/agc/images/agc_check_voicemail_ON_ptbr.gif b/agc/images/agc_check_voicemail_ON_ptbr.gif new file mode 100644 index 0000000..ae53a39 Binary files /dev/null and b/agc/images/agc_check_voicemail_ON_ptbr.gif differ diff --git a/agc/images/agc_live_call_OFF_ptbr.gif b/agc/images/agc_live_call_OFF_ptbr.gif new file mode 100644 index 0000000..86a7172 Binary files /dev/null and b/agc/images/agc_live_call_OFF_ptbr.gif differ diff --git a/agc/images/agc_live_call_ON_ptbr.gif b/agc/images/agc_live_call_ON_ptbr.gif new file mode 100644 index 0000000..c060166 Binary files /dev/null and b/agc/images/agc_live_call_ON_ptbr.gif differ diff --git a/agc/images/agc_tab_active_lines_el.gif b/agc/images/agc_tab_active_lines_el.gif new file mode 100644 index 0000000..1bea40d Binary files /dev/null and b/agc/images/agc_tab_active_lines_el.gif differ diff --git a/agc/images/agc_tab_active_lines_ptbr.gif b/agc/images/agc_tab_active_lines_ptbr.gif new file mode 100644 index 0000000..1465ea6 Binary files /dev/null and b/agc/images/agc_tab_active_lines_ptbr.gif differ diff --git a/agc/images/agc_tab_astguiclient_ptbr.gif b/agc/images/agc_tab_astguiclient_ptbr.gif new file mode 100644 index 0000000..3037357 Binary files /dev/null and b/agc/images/agc_tab_astguiclient_ptbr.gif differ diff --git a/agc/images/agc_tab_conferences_el.gif b/agc/images/agc_tab_conferences_el.gif new file mode 100644 index 0000000..91282b4 Binary files /dev/null and b/agc/images/agc_tab_conferences_el.gif differ diff --git a/agc/images/agc_tab_conferences_ptbr.gif b/agc/images/agc_tab_conferences_ptbr.gif new file mode 100644 index 0000000..14ab717 Binary files /dev/null and b/agc/images/agc_tab_conferences_ptbr.gif differ diff --git a/agc/images/agc_tab_main_el.gif b/agc/images/agc_tab_main_el.gif new file mode 100644 index 0000000..4eaf0aa Binary files /dev/null and b/agc/images/agc_tab_main_el.gif differ diff --git a/agc/images/agc_tab_main_ptbr.gif b/agc/images/agc_tab_main_ptbr.gif new file mode 100644 index 0000000..b5fc2a5 Binary files /dev/null and b/agc/images/agc_tab_main_ptbr.gif differ diff --git a/agc/images/br.gif b/agc/images/br.gif new file mode 100644 index 0000000..423b8a0 Binary files /dev/null and b/agc/images/br.gif differ diff --git a/agc/images/vdc_LB_dialnextnumber_OFF_ptbr.gif b/agc/images/vdc_LB_dialnextnumber_OFF_ptbr.gif new file mode 100644 index 0000000..0d29782 Binary files /dev/null and b/agc/images/vdc_LB_dialnextnumber_OFF_ptbr.gif differ diff --git a/agc/images/vdc_LB_dialnextnumber_ptbr.gif b/agc/images/vdc_LB_dialnextnumber_ptbr.gif new file mode 100644 index 0000000..8625b1c Binary files /dev/null and b/agc/images/vdc_LB_dialnextnumber_ptbr.gif differ diff --git a/agc/images/vdc_LB_grabparkedcall_OFF_ptbr.gif b/agc/images/vdc_LB_grabparkedcall_OFF_ptbr.gif new file mode 100644 index 0000000..19932ad Binary files /dev/null and b/agc/images/vdc_LB_grabparkedcall_OFF_ptbr.gif differ diff --git a/agc/images/vdc_LB_grabparkedcall_ptbr.gif b/agc/images/vdc_LB_grabparkedcall_ptbr.gif new file mode 100644 index 0000000..e37d0fb Binary files /dev/null and b/agc/images/vdc_LB_grabparkedcall_ptbr.gif differ diff --git a/agc/images/vdc_LB_hangupcustomer_OFF_ptbr.gif b/agc/images/vdc_LB_hangupcustomer_OFF_ptbr.gif new file mode 100644 index 0000000..5791826 Binary files /dev/null and b/agc/images/vdc_LB_hangupcustomer_OFF_ptbr.gif differ diff --git a/agc/images/vdc_LB_hangupcustomer_ptbr.gif b/agc/images/vdc_LB_hangupcustomer_ptbr.gif new file mode 100644 index 0000000..5841050 Binary files /dev/null and b/agc/images/vdc_LB_hangupcustomer_ptbr.gif differ diff --git a/agc/images/vdc_LB_parkcall_OFF_ptbr.gif b/agc/images/vdc_LB_parkcall_OFF_ptbr.gif new file mode 100644 index 0000000..25a6a2f Binary files /dev/null and b/agc/images/vdc_LB_parkcall_OFF_ptbr.gif differ diff --git a/agc/images/vdc_LB_parkcall_ptbr.gif b/agc/images/vdc_LB_parkcall_ptbr.gif new file mode 100644 index 0000000..b37d835 Binary files /dev/null and b/agc/images/vdc_LB_parkcall_ptbr.gif differ diff --git a/agc/images/vdc_LB_pause_OFF_ptbr.gif b/agc/images/vdc_LB_pause_OFF_ptbr.gif new file mode 100644 index 0000000..3d8c875 Binary files /dev/null and b/agc/images/vdc_LB_pause_OFF_ptbr.gif differ diff --git a/agc/images/vdc_LB_pause_ptbr.gif b/agc/images/vdc_LB_pause_ptbr.gif new file mode 100644 index 0000000..bea56d6 Binary files /dev/null and b/agc/images/vdc_LB_pause_ptbr.gif differ diff --git a/agc/images/vdc_LB_resume_OFF_ptbr.gif b/agc/images/vdc_LB_resume_OFF_ptbr.gif new file mode 100644 index 0000000..43bb923 Binary files /dev/null and b/agc/images/vdc_LB_resume_OFF_ptbr.gif differ diff --git a/agc/images/vdc_LB_resume_ptbr.gif b/agc/images/vdc_LB_resume_ptbr.gif new file mode 100644 index 0000000..415b22d Binary files /dev/null and b/agc/images/vdc_LB_resume_ptbr.gif differ diff --git a/agc/images/vdc_LB_senddtmf_OFF_ptbr.gif b/agc/images/vdc_LB_senddtmf_OFF_ptbr.gif new file mode 100644 index 0000000..2d32c5e Binary files /dev/null and b/agc/images/vdc_LB_senddtmf_OFF_ptbr.gif differ diff --git a/agc/images/vdc_LB_senddtmf_ptbr.gif b/agc/images/vdc_LB_senddtmf_ptbr.gif new file mode 100644 index 0000000..43964df Binary files /dev/null and b/agc/images/vdc_LB_senddtmf_ptbr.gif differ diff --git a/agc/images/vdc_LB_startrecording_OFF_ptbr.gif b/agc/images/vdc_LB_startrecording_OFF_ptbr.gif new file mode 100644 index 0000000..2210577 Binary files /dev/null and b/agc/images/vdc_LB_startrecording_OFF_ptbr.gif differ diff --git a/agc/images/vdc_LB_startrecording_ptbr.gif b/agc/images/vdc_LB_startrecording_ptbr.gif new file mode 100644 index 0000000..15b2599 Binary files /dev/null and b/agc/images/vdc_LB_startrecording_ptbr.gif differ diff --git a/agc/images/vdc_LB_stoprecording_OFF_ptbr.gif b/agc/images/vdc_LB_stoprecording_OFF_ptbr.gif new file mode 100644 index 0000000..c025941 Binary files /dev/null and b/agc/images/vdc_LB_stoprecording_OFF_ptbr.gif differ diff --git a/agc/images/vdc_LB_stoprecording_ptbr.gif b/agc/images/vdc_LB_stoprecording_ptbr.gif new file mode 100644 index 0000000..8a76e86 Binary files /dev/null and b/agc/images/vdc_LB_stoprecording_ptbr.gif differ diff --git a/agc/images/vdc_LB_transferconf_OFF_ptbr.gif b/agc/images/vdc_LB_transferconf_OFF_ptbr.gif new file mode 100644 index 0000000..ebb6934 Binary files /dev/null and b/agc/images/vdc_LB_transferconf_OFF_ptbr.gif differ diff --git a/agc/images/vdc_LB_transferconf_ptbr.gif b/agc/images/vdc_LB_transferconf_ptbr.gif new file mode 100644 index 0000000..f008e92 Binary files /dev/null and b/agc/images/vdc_LB_transferconf_ptbr.gif differ diff --git a/agc/images/vdc_LB_webform_OFF_ptbr.gif b/agc/images/vdc_LB_webform_OFF_ptbr.gif new file mode 100644 index 0000000..75a5619 Binary files /dev/null and b/agc/images/vdc_LB_webform_OFF_ptbr.gif differ diff --git a/agc/images/vdc_LB_webform_ptbr.gif b/agc/images/vdc_LB_webform_ptbr.gif new file mode 100644 index 0000000..d7590d6 Binary files /dev/null and b/agc/images/vdc_LB_webform_ptbr.gif differ diff --git a/agc/images/vdc_XB_blindtransfer_OFF_ptbr.gif b/agc/images/vdc_XB_blindtransfer_OFF_ptbr.gif new file mode 100644 index 0000000..3a069c2 Binary files /dev/null and b/agc/images/vdc_XB_blindtransfer_OFF_ptbr.gif differ diff --git a/agc/images/vdc_XB_blindtransfer_ptbr.gif b/agc/images/vdc_XB_blindtransfer_ptbr.gif new file mode 100644 index 0000000..c31c87f Binary files /dev/null and b/agc/images/vdc_XB_blindtransfer_ptbr.gif differ diff --git a/agc/images/vdc_XB_channel_ptbr.gif b/agc/images/vdc_XB_channel_ptbr.gif new file mode 100644 index 0000000..a4fbf1f Binary files /dev/null and b/agc/images/vdc_XB_channel_ptbr.gif differ diff --git a/agc/images/vdc_XB_dialwithcustomer_OFF_ptbr.gif b/agc/images/vdc_XB_dialwithcustomer_OFF_ptbr.gif new file mode 100644 index 0000000..1ac7dbb Binary files /dev/null and b/agc/images/vdc_XB_dialwithcustomer_OFF_ptbr.gif differ diff --git a/agc/images/vdc_XB_dialwithcustomer_ptbr.gif b/agc/images/vdc_XB_dialwithcustomer_ptbr.gif new file mode 100644 index 0000000..90ec03f Binary files /dev/null and b/agc/images/vdc_XB_dialwithcustomer_ptbr.gif differ diff --git a/agc/images/vdc_XB_hangupbothlines_OFF_ptbr.gif b/agc/images/vdc_XB_hangupbothlines_OFF_ptbr.gif new file mode 100644 index 0000000..47b8722 Binary files /dev/null and b/agc/images/vdc_XB_hangupbothlines_OFF_ptbr.gif differ diff --git a/agc/images/vdc_XB_hangupbothlines_ptbr.gif b/agc/images/vdc_XB_hangupbothlines_ptbr.gif new file mode 100644 index 0000000..fa0cf2f Binary files /dev/null and b/agc/images/vdc_XB_hangupbothlines_ptbr.gif differ diff --git a/agc/images/vdc_XB_hangupxferline_OFF_ptbr.gif b/agc/images/vdc_XB_hangupxferline_OFF_ptbr.gif new file mode 100644 index 0000000..f6d9080 Binary files /dev/null and b/agc/images/vdc_XB_hangupxferline_OFF_ptbr.gif differ diff --git a/agc/images/vdc_XB_hangupxferline_ptbr.gif b/agc/images/vdc_XB_hangupxferline_ptbr.gif new file mode 100644 index 0000000..c7d2641 Binary files /dev/null and b/agc/images/vdc_XB_hangupxferline_ptbr.gif differ diff --git a/agc/images/vdc_XB_header_ptbr.gif b/agc/images/vdc_XB_header_ptbr.gif new file mode 100644 index 0000000..a92c2df Binary files /dev/null and b/agc/images/vdc_XB_header_ptbr.gif differ diff --git a/agc/images/vdc_XB_hotkeysactive_OFF_ptbr.gif b/agc/images/vdc_XB_hotkeysactive_OFF_ptbr.gif new file mode 100644 index 0000000..335e635 Binary files /dev/null and b/agc/images/vdc_XB_hotkeysactive_OFF_ptbr.gif differ diff --git a/agc/images/vdc_XB_hotkeysactive_ptbr.gif b/agc/images/vdc_XB_hotkeysactive_ptbr.gif new file mode 100644 index 0000000..a34409c Binary files /dev/null and b/agc/images/vdc_XB_hotkeysactive_ptbr.gif differ diff --git a/agc/images/vdc_XB_internalcloser_OFF_ptbr.gif b/agc/images/vdc_XB_internalcloser_OFF_ptbr.gif new file mode 100644 index 0000000..45bc429 Binary files /dev/null and b/agc/images/vdc_XB_internalcloser_OFF_ptbr.gif differ diff --git a/agc/images/vdc_XB_internalcloser_ptbr.gif b/agc/images/vdc_XB_internalcloser_ptbr.gif new file mode 100644 index 0000000..d5c0565 Binary files /dev/null and b/agc/images/vdc_XB_internalcloser_ptbr.gif differ diff --git a/agc/images/vdc_XB_leave3waycall_OFF_ptbr.gif b/agc/images/vdc_XB_leave3waycall_OFF_ptbr.gif new file mode 100644 index 0000000..63594d6 Binary files /dev/null and b/agc/images/vdc_XB_leave3waycall_OFF_ptbr.gif differ diff --git a/agc/images/vdc_XB_leave3waycall_ptbr.gif b/agc/images/vdc_XB_leave3waycall_ptbr.gif new file mode 100644 index 0000000..7bca06f Binary files /dev/null and b/agc/images/vdc_XB_leave3waycall_ptbr.gif differ diff --git a/agc/images/vdc_XB_localcloser_OFF_ptbr.gif b/agc/images/vdc_XB_localcloser_OFF_ptbr.gif new file mode 100644 index 0000000..fbad052 Binary files /dev/null and b/agc/images/vdc_XB_localcloser_OFF_ptbr.gif differ diff --git a/agc/images/vdc_XB_localcloser_ptbr.gif b/agc/images/vdc_XB_localcloser_ptbr.gif new file mode 100644 index 0000000..d36e194 Binary files /dev/null and b/agc/images/vdc_XB_localcloser_ptbr.gif differ diff --git a/agc/images/vdc_XB_number_ptbr.gif b/agc/images/vdc_XB_number_ptbr.gif new file mode 100644 index 0000000..22e82a5 Binary files /dev/null and b/agc/images/vdc_XB_number_ptbr.gif differ diff --git a/agc/images/vdc_XB_parkcustomerdial_OFF_ptbr.gif b/agc/images/vdc_XB_parkcustomerdial_OFF_ptbr.gif new file mode 100644 index 0000000..72dee5c Binary files /dev/null and b/agc/images/vdc_XB_parkcustomerdial_OFF_ptbr.gif differ diff --git a/agc/images/vdc_XB_parkcustomerdial_ptbr.gif b/agc/images/vdc_XB_parkcustomerdial_ptbr.gif new file mode 100644 index 0000000..0101ea9 Binary files /dev/null and b/agc/images/vdc_XB_parkcustomerdial_ptbr.gif differ diff --git a/agc/images/vdc_XB_seconds_ptbr.gif b/agc/images/vdc_XB_seconds_ptbr.gif new file mode 100644 index 0000000..f4fe2b2 Binary files /dev/null and b/agc/images/vdc_XB_seconds_ptbr.gif differ diff --git a/agc/images/vdc_tab_script_ptbr.gif b/agc/images/vdc_tab_script_ptbr.gif new file mode 100644 index 0000000..69e43b7 Binary files /dev/null and b/agc/images/vdc_tab_script_ptbr.gif differ diff --git a/agc/images/vdc_tab_vicidial_ptbr.gif b/agc/images/vdc_tab_vicidial_ptbr.gif new file mode 100644 index 0000000..1e86258 Binary files /dev/null and b/agc/images/vdc_tab_vicidial_ptbr.gif differ diff --git a/agc/vicidial.php b/agc/vicidial.php index 7356584..dfb6f02 100644 --- a/agc/vicidial.php +++ b/agc/vicidial.php @@ -108,6 +108,7 @@ # 60504-1032 - Fixed manual dial display bug and transfer dispo alert bug # - Fixed recording filename display to not overrun 25 characters # 60510-1051 - Added Wrapup timer and wrapup message on wrapup screen after dispo +# 60608-1453 - Added CLOSER campaign allowable in-groups limitations # require("dbconnect.php"); @@ -144,8 +145,8 @@ if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];} $forever_stop=0; -$version = '1.1.82'; -$build = '60510-1051'; +$version = '1.1.83'; +$build = '60608-1453'; if ($force_logout) { @@ -499,28 +500,8 @@ $VDloginDISPLAY=0; $HKstatuses = substr("$HKstatuses", 0, -1); $HKstatusnames = substr("$HKstatusnames", 0, -1); - ##### grab the inbound groups to choose from if campaign contains CLOSER - $VARingroups="''"; - if (eregi("CLOSER", $VD_campaign)) - { - $VARingroups=''; - $stmt="select group_id from vicidial_inbound_groups where active = 'Y' order by group_id limit 20;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $closer_ct = mysql_num_rows($rslt); - $INgrpCT=0; - while ($INgrpCT < $closer_ct) - { - $row=mysql_fetch_row($rslt); - $closer_groups[$INgrpCT] =$row[0]; - $VARingroups = "$VARingroups'$closer_groups[$INgrpCT]',"; - $INgrpCT++; - } - $VARingroups = substr("$VARingroups", 0, -1); - } - ##### grab the statuses to be dialed for your campaign as well as other campaign settings - $stmt="SELECT dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message FROM vicidial_campaigns where campaign_id = '$VD_campaign';"; + $stmt="SELECT dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns FROM vicidial_campaigns where campaign_id = '$VD_campaign';"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); @@ -552,6 +533,7 @@ $VDloginDISPLAY=0; $VC_scheduled_callbacks=$row[25]; $wrapup_seconds=$row[26]; $wrapup_message=$row[27]; + $closer_campaigns=$row[28]; if ( ($VC_scheduled_callbacks=='Y') and ($VU_scheduled_callbacks=='1') ) {$scheduled_callbacks='1';} @@ -561,6 +543,29 @@ $VDloginDISPLAY=0; {$alt_phone_dialing='1';} else {$alt_phone_dialing='0';} + $closer_campaigns = preg_replace("/^ | -$/","",$closer_campaigns); + $closer_campaigns = preg_replace("/ /","','",$closer_campaigns); + $closer_campaigns = "'$closer_campaigns'"; + + ##### grab the inbound groups to choose from if campaign contains CLOSER + $VARingroups="''"; + if (eregi("CLOSER", $VD_campaign)) + { + $VARingroups=''; + $stmt="select group_id from vicidial_inbound_groups where active = 'Y' and group_id IN($closer_campaigns) order by group_id limit 20;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $closer_ct = mysql_num_rows($rslt); + $INgrpCT=0; + while ($INgrpCT < $closer_ct) + { + $row=mysql_fetch_row($rslt); + $closer_groups[$INgrpCT] =$row[0]; + $VARingroups = "$VARingroups'$closer_groups[$INgrpCT]',"; + $INgrpCT++; + } + $VARingroups = substr("$VARingroups", 0, -1); + } ##### grab the number of leads in the hopper for this campaign $stmt="SELECT count(*) FROM vicidial_hopper where campaign_id = '$VD_campaign' and status='READY';"; diff --git a/agi-VDAD_LB_closer.agi b/agi-VDAD_LB_closer.agi index da54357..957ef95 100644 --- a/agi-VDAD_LB_closer.agi +++ b/agi-VDAD_LB_closer.agi @@ -254,7 +254,7 @@ if ($dbhA->has_selected_record) ### insert a LIVE record to the vicidial_auto_calls table -$stmtA = "INSERT INTO vicidial_auto_calls values('','$server_ip','$channel_group','LIVE','$CIDlead_id','$uniqueid','$callerid','$channel','$VDADphone_code','$VDADphone','$SQLdate')"; +$stmtA = "INSERT INTO vicidial_auto_calls values('','$server_ip','$channel_group','LIVE','$CIDlead_id','$uniqueid','$callerid','$channel','$VDADphone_code','$VDADphone','$SQLdate','IN')"; $dbhA->query($stmtA); # $stmtA = "INSERT INTO vicidial_log (uniqueid,lead_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,processed) values('$uniqueid','$CIDlead_id','$VDADcampaign','$SQLdate','$now_date_epoch','QUEUE','$VDADphone_code','$VDADphone','VDCL','N')"; diff --git a/agi-VDAD_LB_closer_inbound.agi b/agi-VDAD_LB_closer_inbound.agi index d3bec89..fa8a340 100644 --- a/agi-VDAD_LB_closer_inbound.agi +++ b/agi-VDAD_LB_closer_inbound.agi @@ -157,7 +157,7 @@ while() { {$callerid = $calleridname;} - if ($channel =~ /^SIP/) {$channel =~ s/-.*//gi;} +# if ($channel =~ /^SIP/) {$channel =~ s/-.*//gi;} # if ($channel =~ /^Zap\//) {$channel =~ s/-\d$//gi;} if (length($callerid)<10) {$callerid = $parked_by;} if (length($pin)>0) {$callerid = $pin;} @@ -294,7 +294,7 @@ if ($dbhA->has_selected_record) ### insert a LIVE record to the vicidial_auto_calls table -$stmtA = "INSERT INTO vicidial_auto_calls values('','$server_ip','$channel_group','LIVE','$new_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate')"; +$stmtA = "INSERT INTO vicidial_auto_calls values('','$server_ip','$channel_group','LIVE','$new_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate','IN')"; $dbhA->query($stmtA); if($M){print STDERR "\n|$stmtA|\n";} diff --git a/agi-VDAD_LO_closer.agi b/agi-VDAD_LO_closer.agi index 664ca70..f6d9398 100644 --- a/agi-VDAD_LO_closer.agi +++ b/agi-VDAD_LO_closer.agi @@ -255,7 +255,7 @@ if ($dbhA->has_selected_record) ### insert a LIVE record to the vicidial_auto_calls table -$stmtA = "INSERT INTO vicidial_auto_calls values('','$server_ip','$channel_group','LIVE','$CIDlead_id','$uniqueid','$callerid','$channel','$VDADphone_code','$VDADphone','$SQLdate')"; +$stmtA = "INSERT INTO vicidial_auto_calls values('','$server_ip','$channel_group','LIVE','$CIDlead_id','$uniqueid','$callerid','$channel','$VDADphone_code','$VDADphone','$SQLdate','IN')"; $dbhA->query($stmtA); # $stmtA = "INSERT INTO vicidial_log (uniqueid,lead_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,processed) values('$uniqueid','$CIDlead_id','$VDADcampaign','$SQLdate','$now_date_epoch','QUEUE','$VDADphone_code','$VDADphone','VDCL','N')"; diff --git a/agi-VDAD_LO_closer_inbound.agi b/agi-VDAD_LO_closer_inbound.agi index 2943559..a471b0c 100644 --- a/agi-VDAD_LO_closer_inbound.agi +++ b/agi-VDAD_LO_closer_inbound.agi @@ -158,7 +158,7 @@ while() { {$callerid = $calleridname;} - if ($channel =~ /^SIP/) {$channel =~ s/-.*//gi;} +# if ($channel =~ /^SIP/) {$channel =~ s/-.*//gi;} # if ($channel =~ /^Zap\//) {$channel =~ s/-\d$//gi;} if (length($callerid)<10) {$callerid = $parked_by;} if (length($pin)>0) {$callerid = $pin;} @@ -295,7 +295,7 @@ if ($dbhA->has_selected_record) ### insert a LIVE record to the vicidial_auto_calls table -$stmtA = "INSERT INTO vicidial_auto_calls values('','$server_ip','$channel_group','LIVE','$new_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate')"; +$stmtA = "INSERT INTO vicidial_auto_calls values('','$server_ip','$channel_group','LIVE','$new_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate','IN')"; $dbhA->query($stmtA); if($M){print STDERR "\n|$stmtA|\n";} diff --git a/agi-VDADcloser.agi b/agi-VDADcloser.agi index 47ed79a..4cdeb63 100644 --- a/agi-VDADcloser.agi +++ b/agi-VDADcloser.agi @@ -252,7 +252,7 @@ if ($dbhA->has_selected_record) ### insert a LIVE record to the vicidial_auto_calls table -$stmtA = "INSERT INTO vicidial_auto_calls values('','$server_ip','$channel_group','LIVE','$CIDlead_id','$uniqueid','$callerid','$channel','$VDADphone_code','$VDADphone','$SQLdate')"; +$stmtA = "INSERT INTO vicidial_auto_calls values('','$server_ip','$channel_group','LIVE','$CIDlead_id','$uniqueid','$callerid','$channel','$VDADphone_code','$VDADphone','$SQLdate','IN')"; $dbhA->query($stmtA); # $stmtA = "INSERT INTO vicidial_log (uniqueid,lead_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,processed) values('$uniqueid','$CIDlead_id','$VDADcampaign','$SQLdate','$now_date_epoch','QUEUE','$VDADphone_code','$VDADphone','VDCL','N')"; diff --git a/agi-VDADcloser_PHONE.agi b/agi-VDADcloser_PHONE.agi index 75790a9..e4838e7 100644 --- a/agi-VDADcloser_PHONE.agi +++ b/agi-VDADcloser_PHONE.agi @@ -286,7 +286,7 @@ if ($dbhA->has_selected_record) ### insert a LIVE record to the vicidial_auto_calls table -$stmtA = "INSERT INTO vicidial_auto_calls values('','$server_ip','$channel_group','LIVE','$CIDlead_id','$uniqueid','$callerid','$channel','$VDADphone_code','$VDADphone','$SQLdate')"; +$stmtA = "INSERT INTO vicidial_auto_calls values('','$server_ip','$channel_group','LIVE','$CIDlead_id','$uniqueid','$callerid','$channel','$VDADphone_code','$VDADphone','$SQLdate','IN')"; $dbhA->query($stmtA); # $stmtA = "INSERT INTO vicidial_log (uniqueid,lead_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,processed) values('$uniqueid','$CIDlead_id','$VDADcampaign','$SQLdate','$now_date_epoch','QUEUE','$VDADphone_code','$VDADphone','VDCL','N')"; diff --git a/agi-VDADcloser_inbound.agi b/agi-VDADcloser_inbound.agi index 89cc6c1..493a2f7 100644 --- a/agi-VDADcloser_inbound.agi +++ b/agi-VDADcloser_inbound.agi @@ -156,7 +156,7 @@ while() { {$callerid = $calleridname;} - if ($channel =~ /^SIP/) {$channel =~ s/-.*//gi;} +# if ($channel =~ /^SIP/) {$channel =~ s/-.*//gi;} # if ($channel =~ /^Zap\//) {$channel =~ s/-\d$//gi;} if (length($callerid)<10) {$callerid = $parked_by;} if (length($pin)>0) {$callerid = $pin;} @@ -293,7 +293,7 @@ if ($dbhA->has_selected_record) ### insert a LIVE record to the vicidial_auto_calls table -$stmtA = "INSERT INTO vicidial_auto_calls values('','$server_ip','$channel_group','LIVE','$new_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate')"; +$stmtA = "INSERT INTO vicidial_auto_calls values('','$server_ip','$channel_group','LIVE','$new_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate','IN')"; $dbhA->query($stmtA); if($M){print STDERR "\n|$stmtA|\n";} diff --git a/agi-VDADcloser_inboundANI.agi b/agi-VDADcloser_inboundANI.agi index cfc0d3a..c5d4b46 100644 --- a/agi-VDADcloser_inboundANI.agi +++ b/agi-VDADcloser_inboundANI.agi @@ -169,7 +169,7 @@ while() { if (length($calleridname)>0) {$VLcomments = $calleridname;} else {$VLcomments = '';} - if ($channel =~ /^SIP/) {$channel =~ s/-.*//gi;} +# if ($channel =~ /^SIP/) {$channel =~ s/-.*//gi;} # if ($channel =~ /^Zap\//) {$channel =~ s/-\d$//gi;} if (length($callerid)<10) {$callerid = $parked_by;} if (length($pin)>0) {$callerid = $pin;} @@ -293,7 +293,7 @@ if ($dbhA->has_selected_record) ### insert a LIVE record to the vicidial_auto_calls table -$stmtA = "INSERT INTO vicidial_auto_calls values('','$server_ip','$channel_group','LIVE','$new_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate')"; +$stmtA = "INSERT INTO vicidial_auto_calls values('','$server_ip','$channel_group','LIVE','$new_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate','IN')"; $dbhA->query($stmtA); if($M){print STDERR "\n|$stmtA|\n";} diff --git a/agi-VDADcloser_inboundCID-debug.agi b/agi-VDADcloser_inboundCID-debug.agi new file mode 100644 index 0000000..188c8f8 --- /dev/null +++ b/agi-VDADcloser_inboundCID-debug.agi @@ -0,0 +1,665 @@ +#!/usr/bin/perl +# +# agi-VDADcloser_inboundCID.agi version 0.3 +# +# runs when a call comes in from an inbound call. This script will +# send the calls out to the closers that are logged in. +# *** This version detects inbound callerID over PRI *** +# +# if there are no available agents, then it will check every second until an agent becomes available, +# if at the end of 360 seconds(default) it has not found an agent it will hangup the call and mark it as dropped +# +# You need to put lines similar to those below in your extensions.conf file: +# +# ; 1. the full name of the IN GROUP to be used in vicidial for the inbound call +# ; 2. the phone number that was called, for the log entry +# ; 3. the callerID or lead_id of the person that called(usually overridden) +# ; 4. the park extension audio file name if used +# ; 5. the status of the call initially(usually not used) +# ; 6. the list_id to insert the new lead under if it is new (and callerID available) +# ; 7. the phone dialing code to insert with the new lead if new (and callerID available) +# +# ;inbound VICIDIAL calls: +#exten => 1234,1,Ringing ; call ringing +#exten => 1234,2,Wait(1) ; Wait 1 second for CID delivery from PRI +#exten => 1234,3,Answer ; Answer the line +#exten => 1234,4,AGI(agi-VDADcloser_inboundCID.agi,CL_GALLERIA-----7275555134-----Closer-----park----------999-----1) +#exten => 1234,5,Hangup +# +# Copyright (C) 2006 Matt Florell LICENSE: GPLv2 +# +# changes: +# 60504-1241 - Added drop second/message/exten options from inbound_group +# + +### open the error out file for writing ### +open(out, ">/home/cron/AGI_test-output.txt") + || die "Can't open /home/cron/AGI_test-output.txt: $!\n"; + +$V = 1; # set to 1 for verbose mode +$M = 1; # set to 1 for 2 line messages mode + +$DROP_TIME = 360; ### number of seconds to wait until you drop a waiting call + +### Make sure this file is in a path or put the absolute path to it +require("/home/cron/AST_SERVER_conf.pl"); # local configuration file + +use Net::MySQL; +use Time::HiRes ('gettimeofday','usleep','sleep'); # necessary to have perl sleep command of less than one second +use Asterisk::AGI; +$AGI = new Asterisk::AGI; + + + +($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); +$year = ($year + 1900); +$mon++; +if ($mon < 10) {$mon = "0$mon";} +if ($mday < 10) {$mday = "0$mday";} +if ($hour < 10) {$Fhour = "0$hour";} +if ($min < 10) {$min = "0$min";} +if ($sec < 10) {$sec = "0$sec";} + +$now_date_epoch = time(); +$now_date = "$year-$mon-$mday $hour:$min:$sec"; +$start_time=$now_date; + $CIDdate = "$mon$mday$hour$min$sec"; + $tsSQLdate = "$year$mon$mday$hour$min$sec"; + $SQLdate = "$year-$mon-$mday $hour:$min:$sec"; + $SQLdateBEGIN = $SQLdate; + +$BDtarget = ($secX - 5); +($Bsec,$Bmin,$Bhour,$Bmday,$Bmon,$Byear,$Bwday,$Byday,$Bisdst) = localtime($BDtarget); +$Byear = ($Byear + 1900); +$Bmon++; +if ($Bmon < 10) {$Bmon = "0$Bmon";} +if ($Bmday < 10) {$Bmday = "0$Bmday";} +if ($Bhour < 10) {$Bhour = "0$Bhour";} +if ($Bmin < 10) {$Bmin = "0$Bmin";} +if ($Bsec < 10) {$Bsec = "0$Bsec";} + $BDtsSQLdate = "$Byear$Bmon$Bmday$Bhour$Bmin$Bsec"; + + + +### begin parsing run-time options ### +if (length($ARGV[0])>1) +{ +if ($V) {print out "Perl Environment Dump:\n";} + $i=0; + while ($#ARGV >= $i) + { + $args = "$args $ARGV[$i]"; + if ($V) {print out "$i|$ARGV[$i]|\n";} + $i++; + } + + ### list of command-line array arguments: + @ARGV_vars = split(/-----/, $ARGV[0]); + + $channel_group = $ARGV_vars[0]; + $inbound_number = $ARGV_vars[1]; + $parked_by = $ARGV_vars[2]; + $park_extension = $ARGV_vars[3]; + $status = $ARGV_vars[4]; + $list_id = $ARGV_vars[5]; + $phone_code = $ARGV_vars[6]; + + if ($args =~ /--help/i) + { + print "allowed run time options:\n [-q] = quiet\n [-t] = test\n [-debug] = verbose debug messages\n\n"; + } + else + { + if ($args =~ /-V/i) + { + $V=1; + } + if ($args =~ /-debug/i) + { + $DG=1; + } + if ($args =~ /-dbAVS/i) + { + $DGA=1; + } + if ($args =~ /-q/i) + { + $q=1; + $Q=1; + } + if ($args =~ /-t/i) + { + $TEST=1; + $T=1; + } + } +} +else +{ +if ($V) {print "no command line options set\n";} +} + +$|=1; +while() { + chomp; + last unless length($_); + if ($V) + { + if (/^agi_(\w+)\:\s+(.*)$/) + { + $AGI{$1} = $2; + } + } + + if (/^agi_uniqueid\:\s+(.*)$/) {$unique_id = $1; $uniqueid = $unique_id;} + 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 ( ($callerid =~ /\".*\"/) && ( (!$calleridname) or ($calleridname =~ /unknown/) ) ) + { + $calleridname = $callerid; + $calleridname =~ s/\<\d\d\d\d\d\d\d\d\d\d\>//gi; + $calleridname =~ s/\"|\" //gi; + } + + $callerid =~ s/\D//gi; + $calleridname =~ s/unknown//gi; + if ( (!$callerid) or ($callerid =~ /unknown/) ) + {$callerid = $calleridname;} + + if (length($callerid)>0) {$phone_number = $callerid;} + else {$phone_number = '';} + if (length($calleridname)>0) {$VLcomments = $calleridname;} + else {$VLcomments = '';} + +# if ($channel =~ /^SIP/) {$channel =~ s/-.*//gi;} +# if ($channel =~ /^Zap\//) {$channel =~ s/-\d$//gi;} + if (length($callerid)<10) {$callerid = $parked_by;} + if (length($pin)>0) {$callerid = $pin;} + + + ### allow for external callerid to be collected +# if ($extension =~ /\*\d\d\d\d\d\d\d\d\d\d\*/) +# { +# @EXT_vars = split(/\*/, $extension); +# +# $referring_extension = $EXT_vars[0]; # initial extension sent +# $channel_group = $EXT_vars[1]; # name of the parked group +# $inbound_number = $EXT_vars[2]; # extension to send call to after parsing +# $parked_by = $EXT_vars[3]; # leadID +# $park_extension = $EXT_vars[4]; # filename of the on-hold music file +# $comment_d = $EXT_vars[5]; # N/A +# $comment_e = $EXT_vars[6]; # N/A +# +# $PADlead_id = sprintf("%09s", $parked_by); while (length($PADlead_id) > 9) {chop($PADlead_id);} +# # JmmddhhmmssLLLLLLLLL +# $JqueryCID = "J$CIDdate$PADlead_id"; +# $callerid = $JqueryCID; +# ### set the callerid to the filename of the audio for on-hold +# print "SET CALLERID $JqueryCID\n"; +# checkresult($result); +# print out "callerID changed: $JqueryCID\n"; +# } +} + + if ($V) + { + + if ($V) {print out "AGI Environment Dump:\n";} + foreach $i (sort keys %AGI) { + if ($V) {print out " -- $i = $AGI{$i}\n";} + } + } + + +$AGI->stream_file('beep'); + + if ($V) {print out "\nINBOUND CALL VDCL STARTED\n";} + +#&enter_pin_number; + +$pin = $inbound_number; + +$fronter = $pin; + +if ($M) {print out "+++++ INBOUND CALL VDCL STARTED : |$unique_id|$channel_group|$channel|$extension|$type|$callerid-$pin|$now_date\n";} + +$VDADphone=''; +$VDADphone_code=''; + +if ($V) {print out "AGI Environment Dump: |$unique_id|$channel|$extension|$type|$callerid|\n";} + + +if ($V) {print out "\nINBOUND CALL RECEIVED IN FROM VDCL: $callerid $channel\n";} +if ($M) {print out "+++++ INBOUND VDCL START : |$unique_id|$channel|$extension|$type|$now_date\n";} + +if ($channel =~ /Local/i) +{ +if ($M) {print out "+++++ VDCL START LOCAL CHANNEL: EXITING\n";} +close(out); +exit; +} + + +if (!$DB_port) {$DB_port='3306';} + + my $dbhA = Net::MySQL->new(hostname=>"$DB_server", database=>"$DB_database", user=>"$DB_user", password=>"$DB_pass", port => "$DB_port") or die "Couldn't connect to database: $DB_server - $DB_database\n"; + +### Grab Server values from the database +$stmtA = "SELECT voicemail_dump_exten,ext_context,answer_transfer_agent,local_gmt,asterisk_version,max_vicidial_trunks FROM servers where server_ip = '$server_ip';"; +$dbhA->query("$stmtA"); +if ($dbhA->has_selected_record) + { + $iter=$dbhA->create_record_iterator; + while ( $record = $iter->each) + { + $DBvoicemail_dump_exten = "$record->[0]"; + $DBext_context = "$record->[1]"; + $DBanswer_transfer_agent = "$record->[2]"; + $DBSERVER_GMT = "$record->[3]"; + $DBasterisk_version = "$record->[4]"; + $DBmax_vicidial_trunks = "$record->[5]"; + if ($DBvoicemail_dump_exten) {$voicemail_dump_exten = $DBvoicemail_dump_exten;} + if ($DBext_context) {$ext_context = $DBext_context;} + if ($DBanswer_transfer_agent) {$answer_transfer_agent = $DBanswer_transfer_agent;} + if ($DBSERVER_GMT) {$SERVER_GMT = $DBSERVER_GMT;} + if ($DBasterisk_version) {$AST_ver = $DBasterisk_version;} + if ($DBmax_vicidial_trunks) {$max_vicidial_trunks = $DBmax_vicidial_trunks;} + } + } + + +### insert a record into the vicidial_list table +$stmtA = "INSERT INTO vicidial_list (entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,called_since_last_reset,phone_code,phone_number,security_phrase,called_count,gmt_offset_now,comments) values('$SQLdate','$tsSQLdate','INBND','$fronter','$channel_group','VDCL','$list_id','Y','$phone_code','$phone_number','$channel_group','1','-5.00','$VLcomments');"; +$dbhA->query($stmtA); + $dbhA->query("select LAST_INSERT_ID() LIMIT 1;"); + if ($dbhA->has_selected_record) + { + $iterA=$dbhA->create_record_iterator; + while ($recordA = $iterA->each) + {$insert_lead_id = "$recordA->[0]";} + } +$new_lead_id = $insert_lead_id; +if($M){print out "\n|$stmtA|$new_lead_id|\n";} + + $PADlead_id = sprintf("%09s", $new_lead_id); while (length($PADlead_id) > 9) {chop($PADlead_id);} + # YmmddhhmmssLLLLLLLLL + $YqueryCID = "Y$CIDdate$PADlead_id"; + $callerid = $YqueryCID; + ### set the callerid + print "SET CALLERID $YqueryCID\n"; + checkresult($result); + print out "callerID changed: $YqueryCID\n"; + +### Grab inbound_group values from the database +$stmtA = "SELECT drop_call_seconds,drop_message,drop_exten FROM vicidial_inbound_groups where group_id = '$channel_group';"; +$dbhA->query("$stmtA"); +if ($dbhA->has_selected_record) + { + $iter=$dbhA->create_record_iterator; + while ( $record = $iter->each) + { + $DBdrop_call_seconds = "$record->[0]"; + $DBdrop_message = "$record->[1]"; + $DBdrop_exten = "$record->[2]"; + if ($DBdrop_call_seconds) {$DROP_TIME = $DBdrop_call_seconds;} + if ($DBdrop_message) {$drop_message = $DBdrop_message;} + if ($DBdrop_exten) {$drop_exten = $DBdrop_exten;} + } + } + + + +### insert a LIVE record to the vicidial_auto_calls table +$stmtA = "INSERT INTO vicidial_auto_calls values('','$server_ip','$channel_group','LIVE','$new_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate','IN')"; +$dbhA->query($stmtA); +if($M){print out "\n|$stmtA|\n";} + +# $stmtA = "INSERT INTO vicidial_log (uniqueid,lead_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,processed) values('$uniqueid','$new_lead_id','$channel_group','$SQLdate','$now_date_epoch','QUEUE','$phone_code','$phone_number','VDCL','N')"; +# if($M){print out "\n|$stmtA|\n";} +# $dbhA->query($stmtA); +# if ($M) {print out "-- VDAD : |$VDADlead_id|$new_lead_id|insert to vicidial_log: $uniqueid\n";} + +$stmtA = "INSERT INTO vicidial_closer_log (lead_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,processed) values('$new_lead_id','$channel_group','$SQLdate','$now_date_epoch','QUEUE','$phone_code','$phone_number','VDCL','N')"; + if($M){print out "\n|$stmtA|\n";} +$dbhA->query($stmtA); +if ($M) {print out "-- VDCL : |$new_lead_id|insert to vicidial_closer_log\n";} + +$VDADlead_id = $new_lead_id; + +$drop_timer=0; +$drop_seconds=0; +$hold_message_counter=25; +$hold_tone_counter=0; + +while ($drop_timer <= $DROP_TIME) +{ +$channel_status = $AGI->channel_status("$channel"); +if ($channel_status < 1) + { + print out "CHANNEL $channel DOWN $channel_status $DROP_TIME|$drop_timer CHECKING AGAIN...\n"; + ### sleep for 99 hundredths of a second + usleep(1*990*1000); + + $channel_status_DC = $AGI->channel_status("$channel"); + + if ($channel_status_DC < 1) + { + print out "CHANNEL $channel DOWN $channel_status $DROP_TIME|$drop_timer\n"; + if ($drop_timer < 360) {$drop_seconds = $drop_timer;} + $drop_timer = ($drop_timer + 360); + } + } + $stmtA = "SELECT next_agent_call FROM vicidial_inbound_groups where group_id='$channel_group';"; + $dbhA->query("$stmtA"); + if ($dbhA->has_selected_record) + { + $iter=$dbhA->create_record_iterator; + $rec_countCUSTDATA=0; + while ( $record = $iter->each) + { + $CAMP_callorder = "$record->[0]"; + } + } + + $agent_call_order='order by last_call_finish'; + if ($CAMP_callorder =~ /overall_user_level/i) {$agent_call_order = 'order by user_level desc,last_call_finish';} + if ($CAMP_callorder =~ /oldest_call_start/i) {$agent_call_order = 'order by last_call_time';} + if ($CAMP_callorder =~ /oldest_call_finish/i) {$agent_call_order = 'order by last_call_finish';} + if ($CAMP_callorder =~ /random/i) {$agent_call_order = 'order by random_id';} + + $rec_countWAIT=0; + $stmtA = "SELECT count(*) FROM vicidial_auto_calls where status = 'LIVE' and server_ip='$server_ip' and campaign_id = '$channel_group' and call_time < \"$SQLdateBEGIN\" and lead_id != '$VDADlead_id';"; + if($M){print out "\n\n|$stmtA|\n";} + $dbhA->query("$stmtA"); + if ($dbhA->has_selected_record) + { + $iter=$dbhA->create_record_iterator; + while ( $record = $iter->each) + { + $rec_countWAIT = "$record->[0]"; + } + } + if ($rec_countWAIT < 1) + { + $stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$new_lead_id',uniqueid='$unique_id', channel='$channel', callerid='$callerid' where status IN('CLOSER','READY') and server_ip='$server_ip' and campaign_id LIKE \"%CLOSER%\" and closer_campaigns LIKE \"% $channel_group %\" and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;"; + $dbhA->query("$stmtA"); + my $affected_rows = $dbhA->get_affected_rows_length; + if ($M) {print out "-- VDAD get agent: |$DROP_TIME|$drop_timer|$affected_rows|update of vla table: $channel_group|$server_ip\n|$stmtA|\n";} + if ($affected_rows > 0) + { + $stmtA = "SELECT conf_exten,user,extension FROM vicidial_live_agents where status = 'QUEUE' and server_ip='$server_ip' and campaign_id LIKE \"%CLOSER%\" and callerid='$callerid' and channel='$channel' order by last_call_time limit 1;"; + if($M){print out "\n\n|$stmtA|\n";} + $dbhA->query("$stmtA"); + if ($dbhA->has_selected_record) + { + $iter=$dbhA->create_record_iterator; + $rec_countCUSTDATA=0; + while ( $record = $iter->each) + { + $VDADconf_exten = "$record->[0]"; + $VDADuser = "$record->[1]"; + $VDADextension = "$record->[2]"; + } + } + + $stmtA = "UPDATE vicidial_auto_calls set status='CLOSER' where callerid='$callerid';"; + $dbhA->query("$stmtA"); + my $affected_rows = $dbhA->get_affected_rows_length; + if ($M) {print out "-- VDCL XFER : |$affected_rows|update of vac table: $callerid\n|$stmtA|\n";} + + $stmtA = "UPDATE vicidial_closer_log set user='$VDADuser' where lead_id='$new_lead_id' order by call_date desc limit 1;"; + $dbhA->query("$stmtA"); + my $affected_rows = $dbhA->get_affected_rows_length; + if ($M) {print out "-- closer log : |$affected_rows|update of vcl table: $new_lead_id\n|$stmtA|\n";} + + $dbhA->close; + + print out "\nexiting the VDAD app, transferring call to $VDADconf_exten\n"; + print "SET CONTEXT $ext_context\n"; + checkresult($result); + print "SET EXTENSION $VDADconf_exten\n"; + checkresult($result); + print "SET PRIORITY 1\n"; + checkresult($result); + + ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); + $year = ($year + 1900); + $mon++; + if ($mon < 10) {$mon = "0$mon";} + if ($mday < 10) {$mday = "0$mday";} + if ($hour < 10) {$Fhour = "0$hour";} + if ($min < 10) {$min = "0$min";} + if ($sec < 10) {$sec = "0$sec";} + + $now_date_epoch = time(); + $now_date = "$year-$mon-$mday $hour:$min:$sec"; + print out "\nXXXXXXXXXX VDAD transferred: start|stop $start_time|$now_date\n"; + + close(out); + exit; + } + } + else + { + print out "WWWWWWWW VDAD XFER WAIT: |$rec_countWAIT|$channel_group|$channel|$callerid|$uniqueid|\n"; + } + + ### sleep for 99 hundredths of a second + usleep(1*990*1000); + +if ($hold_message_counter > 30) + { + $AGI->stream_file('generic_hold'); + $hold_message_counter = 0; + } + else {$hold_message_counter++;} +if ($hold_tone_counter > 3) + { + $AGI->stream_file('hold_tone'); + $hold_tone_counter = 0; + } + else {$hold_tone_counter++;} + +$drop_timer++; +} + + +if ($drop_timer >= $DROP_TIME) +{ +($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); +$year = ($year + 1900); +$mon++; +if ($mon < 10) {$mon = "0$mon";} +if ($mday < 10) {$mday = "0$mday";} +if ($hour < 10) {$Fhour = "0$hour";} +if ($min < 10) {$min = "0$min";} +if ($sec < 10) {$sec = "0$sec";} + +$now_date_epoch = time(); +$now_date = "$year-$mon-$mday $hour:$min:$sec"; + $CIDdate = "$mon$mday$hour$min$sec"; + $tsSQLdate = "$year$mon$mday$hour$min$sec"; + $SQLdate = "$year-$mon-$mday $hour:$min:$sec"; + $VDADvoicemail_ext = ''; + +$DROPexten = ''; +if ($drop_seconds < 1) + { + $drop_seconds = $DROP_TIME; + + if ($drop_message=='Y') + { + $DROPexten = "$drop_exten"; + } + else + { + $stmtA = "SELECT voicemail_ext FROM vicidial_inbound_groups where group_id = '$channel_group' limit 1;"; + if($M){print out "\n\n|$stmtA|\n";} + $dbhA->query("$stmtA"); + if ($dbhA->has_selected_record) + { + $iter=$dbhA->create_record_iterator; + $rec_countCUSTDATA=0; + while ( $record = $iter->each) + { + $VDADvoicemail_ext = "$record->[0]"; + $VDADvoicemail_ext =~ s/\D//gi; + $DROPexten = "$voicemail_dump_exten$VDADvoicemail_ext"; + } + } + } + } + + + ### use STDOUT to send call to proper DROP location + $VHqueryCID = "VH$CIDdate$VDADconf_exten"; + + if (length($DROPexten)>0) + { ### if DROP extension is defined then send the dropped call there instead of hangup + print out "\nexiting the VDAD app, transferring call to $DROPexten\n"; + print "SET CONTEXT $ext_context\n"; + checkresult($result); + print "SET EXTENSION $DROPexten\n"; + checkresult($result); + print "SET PRIORITY 1\n"; + checkresult($result); + } + else + { + ### insert a NEW record to the vicidial_manager table to be processed + $stmtA = "INSERT INTO vicidial_manager values('','','$SQLdate','NEW','N','$server_ip','','Hangup','$VHqueryCID','Channel: $channel','','','','','','','','','')"; + $dbhA->query($stmtA) or die "Couldn't execute query:\n"; + if ($M) {print out "-- VDCL call_hungup timout: |$VHqueryCID|$VDADconf_exten|$channel|insert to vicidial_manager\n";} + } + + $stmtA = "DELETE FROM vicidial_auto_calls where callerid='$callerid' and server_ip='$server_ip' order by call_time desc limit 1;"; + $dbhA->query("$stmtA"); + my $affected_rows = $dbhA->get_affected_rows_length; + if ($M) {print out "-- VDCL vac record deleted: |$affected_rows| $channel_group|$server_ip\n";} + +# $stmtA = "UPDATE vicidial_log set status='DROP',end_epoch='$now_date_epoch',length_in_sec='$drop_seconds' where uniqueid = '$uniqueid';"; +# if($M){print out "\n\n|$stmtA|\n";} +# $dbhA->query("$stmtA"); +# my $affected_rows = $dbhA->get_affected_rows_length; +# if ($M) {print out "-- VDCL vicidial_log update: |$affected_rows|$uniqueid\n";} + + $stmtA = "UPDATE vicidial_closer_log set status='DROP',end_epoch='$now_date_epoch',length_in_sec='$drop_seconds' where lead_id = '$new_lead_id' order by start_epoch desc limit 1;"; + if($M){print out "\n\n|$stmtA|\n";} + $dbhA->query("$stmtA"); + my $affected_rows = $dbhA->get_affected_rows_length; + if ($M) {print out "-- VDCL vicidial_closer_log update: |$affected_rows|$new_lead_id\n";} + + $stmtA = "UPDATE vicidial_list set status='XDROP' where lead_id = '$new_lead_id';"; + if($M){print out "\n\n|$stmtA|\n";} + $dbhA->query("$stmtA"); + my $affected_rows = $dbhA->get_affected_rows_length; + if ($M) {print out "-- VDCL vicidial_list update: |$affected_rows|$new_lead_id\n";} + +} + + + + $dbhA->close; + + +close(out); + +exit; + +sub enter_pin_number +{ +# please enter the pin number followed by the pound key + +$interrupt_digit=''; +undef $interrupt_digit; + +$interrupt_digit = $AGI->stream_file('four_digit_id','123456789'); + + print out "interrupt_digit |$interrupt_digit|\n"; + +$digits_being_entered=1; +$totalDTMF=''; +if ($interrupt_digit > 1) + { + if ($interrupt_digit == 48) {$interrupt_digit=0;} + if ($interrupt_digit == 49) {$interrupt_digit=1;} + if ($interrupt_digit == 50) {$interrupt_digit=2;} + if ($interrupt_digit == 51) {$interrupt_digit=3;} + if ($interrupt_digit == 52) {$interrupt_digit=4;} + if ($interrupt_digit == 53) {$interrupt_digit=5;} + if ($interrupt_digit == 54) {$interrupt_digit=6;} + if ($interrupt_digit == 55) {$interrupt_digit=7;} + if ($interrupt_digit == 56) {$interrupt_digit=8;} + if ($interrupt_digit == 57) {$interrupt_digit=9;} + + $totalDTMF=$interrupt_digit; + } + +$digit_loop_counter=0; +#while ( ($digits_being_entered) && ($digit_loop_counter < 20) ) +# { +# $digit = chr($AGI->wait_for_digit('30000')); # wait 30 seconds for input or until the pound key is pressed +# if ($digit =~ /\d/) +# { +# $totalDTMF = "$totalDTMF$digit"; +# print out "digit |$digit| TotalDTMF |$totalDTMF|\n"; +# $AGI->say_digits("$digit"); +# undef $digit; +# } +# else +# { +# $digits_being_entered=0; +# } +# +# $digit_loop_counter++; +# } + +while ( ($digit_loop_counter < 4) ) + { + $digit = chr($AGI->wait_for_digit('10000')); # wait 10 seconds for input or until the pound key is pressed + if ($digit =~ /\d/) + { + $totalDTMF = "$totalDTMF$digit"; + print out "digit |$digit| TotalDTMF |$totalDTMF|\n"; +# $AGI->say_digits("$digit"); + undef $digit; + } + else + { + $digit_loop_counter=4; + } + + $digit_loop_counter++; + } + +$totalDTMF =~ s/\D//gi; +$pin = $totalDTMF; +if ($totalDTMF) {print out "digit |$digit| TotalDTMF |$totalDTMF|\n";} +} + + + + +sub checkresult { + my ($res) = @_; + my $retval; + $tests++; + chomp $res; + if ($res =~ /^200/) { + $res =~ /result=(-?\d+)/; + if (!length($1)) { + # print out "FAIL ($res)\n"; + $fail++; + } else { + # print out "PASS ($1)\n"; + $pass++; + } + } else { + print out "FAIL (unexpected result '$res')\n"; + $fail++; + } +} diff --git a/agi-VDADcloser_inboundCID.agi b/agi-VDADcloser_inboundCID.agi index c526c83..779d711 100644 --- a/agi-VDADcloser_inboundCID.agi +++ b/agi-VDADcloser_inboundCID.agi @@ -171,7 +171,7 @@ while() { if (length($calleridname)>0) {$VLcomments = $calleridname;} else {$VLcomments = '';} - if ($channel =~ /^SIP/) {$channel =~ s/-.*//gi;} +# if ($channel =~ /^SIP/) {$channel =~ s/-.*//gi;} # if ($channel =~ /^Zap\//) {$channel =~ s/-\d$//gi;} if (length($callerid)<10) {$callerid = $parked_by;} if (length($pin)>0) {$callerid = $pin;} @@ -309,7 +309,7 @@ if ($dbhA->has_selected_record) ### insert a LIVE record to the vicidial_auto_calls table -$stmtA = "INSERT INTO vicidial_auto_calls values('','$server_ip','$channel_group','LIVE','$new_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate')"; +$stmtA = "INSERT INTO vicidial_auto_calls values('','$server_ip','$channel_group','LIVE','$new_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate','IN')"; $dbhA->query($stmtA); if($M){print STDERR "\n|$stmtA|\n";} diff --git a/agi-VDADcloser_inboundCIDlookup.agi b/agi-VDADcloser_inboundCIDlookup.agi index c57ddc5..bb426c5 100644 --- a/agi-VDADcloser_inboundCIDlookup.agi +++ b/agi-VDADcloser_inboundCIDlookup.agi @@ -171,7 +171,7 @@ while() { if (length($calleridname)>0) {$VLcomments = $calleridname;} else {$VLcomments = '';} - if ($channel =~ /^SIP/) {$channel =~ s/-.*//gi;} +# if ($channel =~ /^SIP/) {$channel =~ s/-.*//gi;} # if ($channel =~ /^Zap\//) {$channel =~ s/-\d$//gi;} if (length($callerid)<10) {$callerid = $parked_by;} if (length($pin)>0) {$callerid = $pin;} @@ -322,7 +322,7 @@ if ($dbhA->has_selected_record) ### insert a LIVE record to the vicidial_auto_calls table -$stmtA = "INSERT INTO vicidial_auto_calls values('','$server_ip','$channel_group','LIVE','$new_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate')"; +$stmtA = "INSERT INTO vicidial_auto_calls values('','$server_ip','$channel_group','LIVE','$new_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate','IN')"; $dbhA->query($stmtA); if($M){print STDERR "\n|$stmtA|\n";} diff --git a/agi-VDADcloser_inbound_5ID.agi b/agi-VDADcloser_inbound_5ID.agi index 302165d..d98eea4 100644 --- a/agi-VDADcloser_inbound_5ID.agi +++ b/agi-VDADcloser_inbound_5ID.agi @@ -156,7 +156,7 @@ while() { {$callerid = $calleridname;} - if ($channel =~ /^SIP/) {$channel =~ s/-.*//gi;} +# if ($channel =~ /^SIP/) {$channel =~ s/-.*//gi;} # if ($channel =~ /^Zap\//) {$channel =~ s/-\d$//gi;} if (length($callerid)<10) {$callerid = $parked_by;} if (length($pin)>0) {$callerid = $pin;} @@ -293,7 +293,7 @@ if ($dbhA->has_selected_record) ### insert a LIVE record to the vicidial_auto_calls table -$stmtA = "INSERT INTO vicidial_auto_calls values('','$server_ip','$channel_group','LIVE','$new_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate')"; +$stmtA = "INSERT INTO vicidial_auto_calls values('','$server_ip','$channel_group','LIVE','$new_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate','IN')"; $dbhA->query($stmtA); if($M){print STDERR "\n|$stmtA|\n";} diff --git a/agi-VDADcloser_inbound_NOCID.agi b/agi-VDADcloser_inbound_NOCID.agi index ec423bf..0cba80e 100644 --- a/agi-VDADcloser_inbound_NOCID.agi +++ b/agi-VDADcloser_inbound_NOCID.agi @@ -156,7 +156,7 @@ while() { {$callerid = $calleridname;} - if ($channel =~ /^SIP/) {$channel =~ s/-.*//gi;} +# if ($channel =~ /^SIP/) {$channel =~ s/-.*//gi;} # if ($channel =~ /^Zap\//) {$channel =~ s/-\d$//gi;} if (length($callerid)<10) {$callerid = $parked_by;} if (length($pin)>0) {$callerid = $pin;} @@ -294,7 +294,7 @@ if ($dbhA->has_selected_record) ### insert a LIVE record to the vicidial_auto_calls table -$stmtA = "INSERT INTO vicidial_auto_calls values('','$server_ip','$channel_group','LIVE','$new_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate')"; +$stmtA = "INSERT INTO vicidial_auto_calls values('','$server_ip','$channel_group','LIVE','$new_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate','IN')"; $dbhA->query($stmtA); if($M){print STDERR "\n|$stmtA|\n";} diff --git a/astguiclient_web/AST_inboundEXTstats.php b/astguiclient_web/AST_inboundEXTstats.php index 2be2203..516ea71 100644 --- a/astguiclient_web/AST_inboundEXTstats.php +++ b/astguiclient_web/AST_inboundEXTstats.php @@ -90,7 +90,10 @@ echo "ASTERISK: Inbound Calls Stats $NOW_TIME\n"; echo "\n"; echo "---------- TOTALS\n"; -$stmt="select count(*),sum(length_in_sec) from call_log where start_time >= '$query_date 00:00:01' and start_time <= '$query_date 23:59:59' and server_ip='$server_ip' and extension='$group';"; +$extenSQL = "and extension='$group'"; +if (eregi("\*",$group)) + {$extenSQL = "and extension LIKE \"%$group\"";} +$stmt="select count(*),sum(length_in_sec) from call_log where start_time >= '$query_date 00:00:01' and start_time <= '$query_date 23:59:59' and server_ip='$server_ip' $extenSQL ;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); @@ -106,7 +109,7 @@ echo "Average Call Length(seconds) for all Calls: $average_hold_seconds\n"; echo "\n"; echo "---------- DROPS\n"; -$stmt="select count(*),sum(length_in_sec) from call_log where start_time >= '$query_date 00:00:01' and start_time <= '$query_date 23:59:59' and server_ip='$server_ip' and extension='$group' and (length_in_sec <= 10 or length_in_sec is null);"; +$stmt="select count(*),sum(length_in_sec) from call_log where start_time >= '$query_date 00:00:01' and start_time <= '$query_date 23:59:59' and server_ip='$server_ip' $extenSQL and (length_in_sec <= 10 or length_in_sec is null);"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); @@ -131,11 +134,11 @@ echo "Average Call Length(seconds) for DROP Calls: $average_hold_seconds\n"; echo "\n"; echo "---------- CALL LISTINGS\n"; -echo "+------------+-----------------+--------+---------------------+\n"; -echo "| CALLERID | CALLERIDNAME | LENGTH | DATE TIME |\n"; -echo "+------------+-----------------+--------+---------------------+\n"; +echo "+----------------------+----------------------+--------+---------------------+\n"; +echo "| CALLERID | CALLERIDNAME | LENGTH | DATE TIME |\n"; +echo "+----------------------+----------------------+--------+---------------------+\n"; -$stmt="select number_dialed,caller_code,length_in_sec,start_time from call_log where start_time >= '$query_date 00:00:01' and start_time <= '$query_date 23:59:59' and server_ip='$server_ip' and extension='$group';"; +$stmt="select number_dialed,caller_code,length_in_sec,start_time from call_log where start_time >= '$query_date 00:00:01' and start_time <= '$query_date 23:59:59' and server_ip='$server_ip' $extenSQL ;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $users_to_print = mysql_num_rows($rslt); @@ -144,8 +147,8 @@ while ($i < $users_to_print) { $row=mysql_fetch_row($rslt); - $CID = sprintf("%-10s", $row[0]); - $CIDname = sprintf("%-15s", $row[1]); while(strlen($full_name)>15) {$full_name = substr("$full_name", 0, -1);} + $CID = sprintf("%-20s", $row[0]); + $CIDname = sprintf("%-20s", $row[1]); while(strlen($full_name)>15) {$full_name = substr("$full_name", 0, -1);} $datetime = sprintf("%-19s", $row[3]); $USERavgTALK = $row[2]; @@ -164,7 +167,7 @@ while ($i < $users_to_print) $i++; } -echo "+------------+-----------------+--------+---------------------+\n"; +echo "+----------------------+----------------------+--------+---------------------+\n"; ############################## ######### TIME STATS @@ -183,14 +186,14 @@ if ($output == 'FULL') $h=0; while ($i <= 96) { - $stmt="select count(*) from call_log where start_time >= '$query_date $h:00:00' and start_time <= '$query_date $h:14:59' and server_ip='$server_ip' and extension='$group';"; + $stmt="select count(*) from call_log where start_time >= '$query_date $h:00:00' and start_time <= '$query_date $h:14:59' and server_ip='$server_ip' $extenSQL ;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); $hour_count[$i] = $row[0]; if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];} if ($hour_count[$i] > 0) {$last_full_record = $i;} - $stmt="select count(*) from call_log where start_time >= '$query_date $h:00:00' and start_time <= '$query_date $h:14:59' and server_ip='$server_ip' and extension='$group' and (length_in_sec <= 10 or length_in_sec is null);"; + $stmt="select count(*) from call_log where start_time >= '$query_date $h:00:00' and start_time <= '$query_date $h:14:59' and server_ip='$server_ip' $extenSQL and (length_in_sec <= 10 or length_in_sec is null);"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); @@ -198,42 +201,42 @@ if ($output == 'FULL') $i++; - $stmt="select count(*) from call_log where start_time >= '$query_date $h:15:00' and start_time <= '$query_date $h:29:59' and server_ip='$server_ip' and extension='$group';"; + $stmt="select count(*) from call_log where start_time >= '$query_date $h:15:00' and start_time <= '$query_date $h:29:59' and server_ip='$server_ip' $extenSQL ;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); $hour_count[$i] = $row[0]; if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];} if ($hour_count[$i] > 0) {$last_full_record = $i;} - $stmt="select count(*) from call_log where start_time >= '$query_date $h:15:00' and start_time <= '$query_date $h:29:59' and server_ip='$server_ip' and extension='$group' and (length_in_sec <= 10 or length_in_sec is null);"; + $stmt="select count(*) from call_log where start_time >= '$query_date $h:15:00' and start_time <= '$query_date $h:29:59' and server_ip='$server_ip' $extenSQL and (length_in_sec <= 10 or length_in_sec is null);"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); $drop_count[$i] = $row[0]; $i++; - $stmt="select count(*) from call_log where start_time >= '$query_date $h:30:00' and start_time <= '$query_date $h:44:59' and server_ip='$server_ip' and extension='$group';"; + $stmt="select count(*) from call_log where start_time >= '$query_date $h:30:00' and start_time <= '$query_date $h:44:59' and server_ip='$server_ip' $extenSQL ;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); $hour_count[$i] = $row[0]; if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];} if ($hour_count[$i] > 0) {$last_full_record = $i;} - $stmt="select count(*) from call_log where start_time >= '$query_date $h:30:00' and start_time <= '$query_date $h:44:59' and server_ip='$server_ip' and extension='$group' and (length_in_sec <= 10 or length_in_sec is null);"; + $stmt="select count(*) from call_log where start_time >= '$query_date $h:30:00' and start_time <= '$query_date $h:44:59' and server_ip='$server_ip' $extenSQL and (length_in_sec <= 10 or length_in_sec is null);"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); $drop_count[$i] = $row[0]; $i++; - $stmt="select count(*) from call_log where start_time >= '$query_date $h:45:00' and start_time <= '$query_date $h:59:59' and server_ip='$server_ip' and extension='$group';"; + $stmt="select count(*) from call_log where start_time >= '$query_date $h:45:00' and start_time <= '$query_date $h:59:59' and server_ip='$server_ip' $extenSQL ;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); $hour_count[$i] = $row[0]; if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];} if ($hour_count[$i] > 0) {$last_full_record = $i;} - $stmt="select count(*) from call_log where start_time >= '$query_date $h:45:00' and start_time <= '$query_date $h:59:59' and server_ip='$server_ip' and extension='$group' and (length_in_sec <= 10 or length_in_sec is null);"; + $stmt="select count(*) from call_log where start_time >= '$query_date $h:45:00' and start_time <= '$query_date $h:59:59' and server_ip='$server_ip' $extenSQL and (length_in_sec <= 10 or length_in_sec is null);"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); diff --git a/docs/APP_CONFERENCE.txt b/docs/APP_CONFERENCE.txt new file mode 100644 index 0000000..2dfea23 --- /dev/null +++ b/docs/APP_CONFERENCE.txt @@ -0,0 +1,69 @@ +VICIDIAL and app_conference +(1.2 tree) EXPERIMENTAL!!! + +app_conference offers the plusses of being able to do conferencing +without any zaptel hardware or timers as well as doing native codec +streaming, meaning no manditory downsampling to slin like meetme. +These two features alone mean a rather significant performance boost +to companies who only use VOIP for agents and trunks as well as not +requiring the cost of zaptel hardware or the nightmare of getting +ztdummy to work on some systems. + +As of right now, I have a test system fully up and running using +app_conference with VICIDIAL on Asterisk 1.2.8. I have made several +modifications to the app_conference code to make it more of a drop-in +replacement for meetme so that it does not require any changes to the +VICIDIAL codebase. I have added entry and exit sounds(slightly +different from meetme's) as well as "only one in this conference" +message in addition to changing the default member type to speaker(S). +So far I have tested with IAX and SIP channels only and everything +works just like on meetme but I have not done any capacity testing or +tested it in production yet. + +If you want to use app_conference instead of meetme for VICIDIAL then follow these instructions: + +cd /usr/src/asterisk +wget http://www.eflo.net/files/VD_app_conference_0.5.zip +unzip VD_app_conference_0.5.zip +cd app_conference +make clean +make +make install + + +In your extensions.conf file you would replace these lines: +exten => 8600051,1,Meetme,8600051 +exten => 8600052,1,Meetme,8600052 +... +exten => 78600051,1,Meetme,8600051|q +exten => 78600052,1,Meetme,8600052|q +... +exten => 68600051,1,Meetme,8600051|mq +exten => 68600052,1,Meetme,8600052|mq +... + + +with these lines: +exten => 8600051,1,Conference(8600051) +exten => 8600052,1,Conference(8600052) +... +exten => 78600051,1,Conference(8600051|q) +exten => 78600052,1,Conference(8600052|q) +... +exten => 68600051,1,Conference(8600051|Lq) +exten => 68600052,1,Conference(8600052|Lq) + + +NOTES: +Here are the possible feature flags for this version of app_conference: + o M: Moderator (presently same as speaker) [default] + o S: Speaker + o L: Listener + o T: "Telephone caller" (just for stats?). + o V: Do VAD on this caller + o D: Use Denoise filter on this caller. + o d: Send manager events when DTMF is received. + o q: Do not play enter or exit sounds. + o i: use inband dtmf broadcast. + o t: use rfc dtmf signal broadcast. + diff --git a/docs/SCRATCH_INSTALL.txt b/docs/SCRATCH_INSTALL.txt index 2456957..c5010c6 100644 --- a/docs/SCRATCH_INSTALL.txt +++ b/docs/SCRATCH_INSTALL.txt @@ -381,7 +381,7 @@ the time is the same on our client computers and our servers. 5. Go to http://www.ntp.org/ and download the ntpd package - to install this directly on the command line type: - cd /usr/local - - wget http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/snapshots/ntp-stable/2006/02/ntp-stable-4.2.0a-20060224.tar.gz + - wget http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-stable-4.2.0a-20060224.tar.gz If you get compilation errors here try 4.1.2: - wget http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.1.2.tar.gz - gunzip ntp-stable-4.2.0a-20060224.tar.gz @@ -653,10 +653,10 @@ PHASE 4: INSTALLING ASTERISK OK, all the prep work is done, now it's time to start having fun with Asterisk. There are four basic ways to install Asterisk, an official release(at the time of -this writing the official releases are 1.2.6 and 1.0.10), the CVS_v1-0 branch(1.0 +this writing the official release is 1.2.8), the CVS_v1-0 branch(1.0 with bug fixes not yet packaged and released) and the SVN_DEV version(development branch). Because there are bugs that affect astGUIclient in releases 1.0.8 and -1.0.9, we recommend using Asterisk 1.2.6 or 1.0.10. These instructions are how we +1.0.9, we recommend using Asterisk 1.2.8 or 1.0.10. These instructions are how we get our Asterisk system with it's T1 line installed with our 2 SIP VOIP devices and one IAX2 softphone. @@ -671,15 +671,15 @@ with the following patch: - mkdir /usr/src/asterisk - cd /usr/src/asterisk A. if you want 1.2 release (reliable with new features): - - wget http://ftp.digium.com/pub/asterisk/old-releases/asterisk-1.2.6.tar.gz - - wget http://ftp.digium.com/pub/zaptel/releases/zaptel-1.2.5.tar.gz - - wget http://ftp.digium.com/pub/libpri/releases/libpri-1.2.2.tar.gz - - gunzip asterisk-1.2.6.tar.gz - - tar xvf asterisk-1.2.6.tar - - gunzip zaptel-1.2.5.tar.gz - - tar xvf zaptel-1.2.5.tar - - gunzip libpri-1.2.2.tar.gz - - tar xvf libpri-1.2.2.tar + - wget http://ftp.digium.com/pub/asterisk/releases/asterisk-1.2.8.tar.gz + - wget http://ftp.digium.com/pub/zaptel/releases/zaptel-1.2.6.tar.gz + - wget http://ftp.digium.com/pub/libpri/releases/libpri-1.2.3.tar.gz + - gunzip asterisk-1.2.8.tar.gz + - tar xvf asterisk-1.2.8.tar + - gunzip zaptel-1.2.6.tar.gz + - tar xvf zaptel-1.2.6.tar + - gunzip libpri-1.2.3.tar.gz + - tar xvf libpri-1.2.3.tar B. If you want latest 1.0 tree stable release: - wget http://ftp.digium.com/pub/asterisk/old-releases/asterisk-1.0.10.tar.gz - wget http://ftp.digium.com/pub/zaptel/releases/zaptel-1.0.10.tar.gz @@ -712,39 +712,49 @@ with the following patch: edit this line at the top and just add a hash # in front of it as shown: #PBX_LIBS+=$(shell $(CROSS_COMPILE_BIN)gtk-config --cflags >/dev/null 2>/dev/null && echo "pbx_gtkconsole.so") - - cd ./zaptel-1.2.5 + - cd ./zaptel-1.2.6 - make clean - make - make install - - cd ../libpri-1.2.2 + - cd ../libpri-1.2.3 - make clean - make - make install - - cd ../asterisk-1.2.6 + - cd ../asterisk-1.2.8 - (1.2 tree) If you want to include Answering Machine Detection ability you will need to download app_amd.c and amd.conf and alter the apps/Makefile to compile it properly - cd apps - - wget http://www.freedomphones.net/files/app_amd2.c + - wget http://www.eflo.net/files/app_amd2.c - mv app_amd2.c app_amd.c - vi Makefile replace this line(line 32): app_mixmonitor.so app_stack.so with this line: app_mixmonitor.so app_stack.so app_amd.so - - wget http://www.freedomphones.net/files/amd2.conf + - wget http://www.eflo.net/files/amd2.conf - mkdir /etc/asterisk - mv amd2.conf /etc/asterisk/amd.conf - cd ../ -(1.2 tree) apply the cli delimiter patch - - wget http://www.freedomphones.net/files/cli_chan_concise_delimiter.patch + - wget http://www.eflo.net/files/cli_chan_concise_delimiter.patch - patch -p1 < ./cli_chan_concise_delimiter.patch - File to patch: cli.c - make clean - make - make install - make samples # this makes sample conf files + - (1.2 tree) EXPERIMENTAL!!! If you want to use app_conference + instead of meetme for VICIDIAL then follow these instructions + - cd /usr/src/asterisk + - wget http://www.eflo.net/files/VD_app_conference_0.5.zip + - unzip VD_app_conference_0.5.zip + - cd app_conference + - make clean + - make + - make install + - modprobe zaptel # this loads the zaptel module - install the module for the digium device that you are using, we are using the T100P single span T1 card so we use: @@ -1822,6 +1832,7 @@ exten => 8600029,1,Meetme,8600029|q 6. Add the conference entries for VICIDIAL conferences: - here is how our sample dialplan changes for adding VICIDIAL conference entries(this is a pure addition, nothing is being modified): +NOTE: see below these entries for app_conference instructions is used ######------ START extensions.conf changes for VD conf ------###### exten => 8600051,1,Meetme,8600051 exten => 8600052,1,Meetme,8600052 @@ -1977,6 +1988,33 @@ exten => 68600099,1,Meetme,8600099|mq exten => 68600100,1,Meetme,8600100|mq ######------ END extensions.conf changes for VD conf ------###### +NOTE: If you want to use app_conference instead of meetme and you already have +it installed, you will need to do the following: + +In your extensions.conf file you would replace these lines: +exten => 8600051,1,Meetme,8600051 +exten => 8600052,1,Meetme,8600052 +... +exten => 78600051,1,Meetme,8600051|q +exten => 78600052,1,Meetme,8600052|q +... +exten => 68600051,1,Meetme,8600051|mq +exten => 68600052,1,Meetme,8600052|mq +... + +with these lines: +exten => 8600051,1,Conference(8600051) +exten => 8600052,1,Conference(8600052) +... +exten => 78600051,1,Conference(8600051|q) +exten => 78600052,1,Conference(8600052|q) +... +exten => 68600051,1,Conference(8600051|Lq) +exten => 68600052,1,Conference(8600052|Lq) + +NOTE: If you want to do DTMF passthru with app_conference bee sure to add the +"i" and "t" flags to the 8600XX lines: Conference(8600051|it) + 7. Add the more entries for astGUIclient specific uses: - here are some more dialplan additions needed to use astGUIclient(this is a @@ -2274,6 +2312,9 @@ AST_CRON_mix_recordings_BASIC.pl file in it's place) ## adjust time on the server with ntp 30 * * * * /usr/local/bin/ntpdate -u 18.145.0.30 2>/dev/null 1>&2 +### VICIDIAL agent time log weekly summary report generation +2 0 * * 0 /home/cron/AST_agent_week.pl + - once your system starts up you can attach to the screen running asterisk by typing "screen -r " find which screen by typing "screen -r" and looking for the lowest screen number. Then to detach again from the screen diff --git a/docs/TODO.txt b/docs/TODO.txt index f73ac55..1f4d31c 100644 --- a/docs/TODO.txt +++ b/docs/TODO.txt @@ -62,7 +62,18 @@ - DONE Add number of leads in hopper, link to admin.php campaign modify screen(and link from admin to this screen) and hopper and leads stats as well as drops and drop percentage to the AST_timeonVDADall page. -- DONE Convert the AST_VDhopper.pl script to DBD::MySQL perl library in place of Net::MySQL. DBD::MySQL is faster because it uses the MySQL client libs on the machine. One problem is that you need the mysqlclientlibs installed on every Asterisk server and the default installation of only the MySQL client libs will result in having to do a force install of cpan DBD::MySQL(because it tries to test with the local DB). Not to mention all of the code changes that would need to be made. There are also MySQL client licensing issues for certain installation circumstances(Net::MySQL doesn't use mysql client libs so it doesn't have those issues) but I really don't want to get into that discussion. The reason for this change is that Net::MySQL is limiting in the capacity of the queries that you can use because of how it's connection to MySQL is used. DBI doesn't have those issues and is much better supported. This is the first script to be converted to DBI, you can find the Net version in the main directory and the DBI version in the new DBI-scripts directory. +- DONE Convert the AST_VDhopper.pl script to DBD::MySQL perl library in place of Net::MySQL. DBD::MySQL is faster because it uses the MySQL client libs on the machine. One problem is that you need the mysqlclientlibs installed on every Asterisk server and the default installation of only the MySQL client libs will result in having to do a force install of cpan DBD::MySQL(because it tries to test with the local DB). Not to mention all of the code changes that would need to be made. There are also MySQL client licensing issues for certain installation circumstances(Net::MySQL doesn't use mysql client libs so it doesn't have those issues) but I really don't want to get into that discussion. The reason for this change is that Net::MySQL is limiting in the capacity of the queries that you can use because of how it's connection to MySQL is used. DBI doesn't have those issues and is much better supported. This is the first script to be converted to DBI, you can find the Net::MySQL version in the main directory and the DBI(DBD::mysql) version in the new DBI-scripts directory. + +- DONE Test and package app_conference for beta usage with VICIDIAL as a meetme replacement. This has many performance benefits including not having to use a zaptel timer. Packaged and released on the project site. Tested in medium to low capacity VICIDIAL server, some random infrequent bugs. In contact with app_conference developers working on stabilizing code. Added instructions to SCRATCH_INSTALL on how to get app_conferenc working with VICIDIAL. + +- DONE Add a link from the campaign-based reports pages to go back to the campaign screen. + +- DONE Create a script to grab the login time stats from vicidial_agent_log and create a day-by-day timesheet log each week AST_agent_week.pl script. Add script to the cron instructions in SCRATCH_INSTALL doc. + +- DONE Fix issues with ast_VDauto_dial script when you have two CLOSER campaigns in Blended mode dialing at the same time. To fix this we need to change many things in how the CLOSER campaigns work. We need to add a new field to the vicidial_auto_calls table to denote whether the call is from inbound or outbound(call_type ENUM('IN','OUT') default 'OUT'). For each CLOSER campaign, a special field needs to be added to vicidial_campaigns for allowable inbound groups. This will change what in-groups an agent logging into the campaign can select from as well as changing how the auto_dial script calculates how many calls to place on CLOSER campaigns in blended mode. the vicidial.php script needs to be changed as well as several changes in the admin.php script. The AST_VDauto_dial.pl script needs to be changed as well as all of the agi-VDAD....closer.agi scripts. + +- DONE Fix active calls stats for multiple CLOSER campaigns in Realtime Campaign screen. + diff --git a/install_server_files.pl b/install_server_files.pl index 6dd5ca2..1a7b97b 100644 --- a/install_server_files.pl +++ b/install_server_files.pl @@ -162,6 +162,7 @@ print "Copying cron scripts...\n"; `cp -f ./ADMIN_keepalive_AST_VDautodial.pl $home/`; `cp -f ./ADMIN_keepalive_AST_VDremote_agents.pl $home/`; `cp -f ./ADMIN_restart_roll_logs.pl $home/`; +`cp -f ./AST_agent_week.pl $home/`; `cp -f ./AST_cleanup_agent_log.pl $home/`; `cp -f ./AST_conf_update.pl $home/`; `cp -f ./AST_CRON_mix_recordings.pl $home/`; @@ -233,6 +234,7 @@ print "Copying sounds...\n"; print "Creating vicidial web directory...\n"; `mkdir $webroot/vicidial/`; `mkdir $webroot/vicidial/ploticus/`; +`mkdir $webroot/vicidial/agent_reports/`; print "Copying VICIDIALweb php files...\n"; `cp -f ./VICIDIAL_web/* $webroot/vicidial/`; @@ -241,6 +243,7 @@ print "setting VICIDIALweb scripts to executable...\n"; `chmod -R 0755 $webroot/vicidial/`; `chmod 0777 $webroot/vicidial/`; `chmod 0777 $webroot/vicidial/ploticus/`; +`chmod 0777 $webroot/vicidial/agent_reports/`; print "Creating agc web directory...\n"; `mkdir $webroot/agc/`; diff --git a/translations/TO_BE_TRANSLATED_de.txt b/translations/TO_BE_TRANSLATED_de.txt new file mode 100644 index 0000000..44f6bea --- /dev/null +++ b/translations/TO_BE_TRANSLATED_de.txt @@ -0,0 +1,124 @@ +############################################################ ADMIN + +Drop Call Seconds - The number of seconds from the time the customer line is picked up until the call is considered a DROP, only applies to outbound calls|Sekunden zur Verbindung - Anzahl der Sekunden vom Abnehmen des Kunden bis zur Erkennung als Verbindung, betrifft nur abgehende Verbindungen +Safe Harbor Message - If set to Y will play a message to customer after the Drop Call Seconds timeout is reached without being transferred to an agent. This setting will override sending to a voicemail box if this is set to Y|Sicherheitsnachricht - Wenn auf Y gesetzt wird dem Kunden nach Ablauf der Sekunden zur Verbindung, ohne zu einem Agenten verbunden worden zu sein, eine Nachricht abgespielt. Diese Einstellung setzt die Option Senden zu einer Voicemail Box ausser Kraft, wenn diese auf Y steht +Safe Harbor Exten - This is the dialplan extension that the desired Safe Harbor audio file is located at on your server|Sicherheitsnebenstelle - Dies ist die Wählplan Nebenstelle, wo sich die gewünschte Sicherheits-Audiodatei auf Ihrem Server befindet +Drop Message - If set to Y will play a message to customer after the Drop Call Seconds timeout is reached without being transferred to an agent. This setting will override sending to a voicemail box if this is set to Y|Verbindungs-Nachricht- Wenn auf Y gesetzt wird dem Kunden nach Ablauf der Sekunden zur Verbindung, ohne zu einem Agenten verbunden worden zu sein, eine Nachricht abgespielt. Diese Einstellung setzt die Option Senden zu einer Voicemail Box ausser Kraft, wenn diese auf Y steht +Drop Exten - This is the dialplan extension that the desired Dropped call audio file is located at on your server|Verbindungs-Nebenstelle - Dies ist die Wählplan-Nebenstelle, wo sich die gewünschte Audiodatei für die aufgebaute Verbindung auf Ihrem Server befindet +Call Time ID - This is the short name of a Vicidial Call Time Definition. This needs to be a unique identifier. Do not use any spaces or punctuation for this field. max 10 characters, minimum of 2 characters|Anrufzeit ID - Dies ist der kurze Name von einer Vicidial Anrufzeit Definition. Es muss ein eindeutiger Bezeichner sein. Leerzeichen und Punkte sind in diesem Feld nicht erlaubt. Maximal 10 Zeichen, mindestens 2 +Call Time Name - This is a more descriptive name of the Call Time Definition. This is a short summary of the Call Time definition. max 30 characters, minimum of 2 characters|Anrufzeit Name - Dies ist ein besser beschreibender Name für die Anrufzeit Definition. Es ist eine kurze Zusammenfassung der Anrufzeit Definition. Maximal 30 Zeichen, mindestens 2 +Call Time Comments - This is where you can place comments for a Vicidial Call Time Definition such as -10am to 4pm with extra call state restrictions-. max 255 characters|Anrufzeit Kommentare - Hier können Sie Kommentare für eine Vicidial Anrufzeit Definition wie -10 bis 14 Uhr mit eigenen Beschränkungen für das angerufene Land- machen. Maximal 255 Zeichen +Default Start and Stop Times - This is the default time that calling will be allowed to be started or stopped within this call time definition if the day-of-the-week start time is not defined. 0 is midnight. To prevent calling completely set this field to 2400 and set the Default Stop time to 2400. To allow calling 24 hours a day set the start time to 0 and the stop time to 2400|Standard Start and Stop Zeiten - Dies ist die Standardzeit, zu der Anrufe innerhalb der Anrufzeitdefinition gestartet oder gestoppt werden dürfen, wenn die Wochentag Startzeit nicht definiert ist. 0 ist Mitternacht. Um Anrufe komplett zu verhindern den Wert auf 2400 und die Standard Stopzeit ebenfalls auf 2400 setzen. Um Anrufe für 24 Stunden am Tag zu erlauben die Startzeit auf 0 und die Stopzeit auf 2400 setzen +Weekday Start and Stop Times - These are the custom times per day that can be set for the call time definition. same rules apply as with the Default start and stop times|Wochentag Start and Stop Zeit - Dies sind die speziellen Zeiten pro Tag, welche für die Anrufzeit Definition gesetzt werden können. Es gelten die selben Regeln wie für Start und Stop Zeiten +State Call Time Definitions - This is the list of State specific call time definitions that are followed in this Call Time Definition|Land Anrufzeit Definition - Dies ist die Liste der landspezifischen Anrufzeit Definitionen, die von dieser Anrufzeit Definition beachtet werden +State Call Time State - This is the two letter code for the state that this calling time definition is for. For this to be in effect the local call time that is set in the campaign must have this state call time record in it as well as all of the leads having two letter state codes in them|Landesspezifische Anrufzeit Definition - Dies ist der zwei Buchstaben Code für das Land, für das die Anrufzeit Definition gilt. Damit diese ausgeführt wird muss die in der Kampagne gesetzte lokale Anrufzeit diese landesspezifische Anrufzeit Aufzeichnung enthalten, genauso wie alle anzurufenden Anschlüsse den landesspezifischen zwei Buchstaben Code enthalten müssen +Delete Call Times - This option allows the user to be able to delete vicidial call times records and vicidial state call times records from the system|Löschen Anrufzeiten - Diese Option erlaubt dem Nutzer die Vicidial Anrufzeiten Aufzeichnungen und Vicidial Status Anrufzeiten Aufzeichnungen vom System zu löschen +Modify Call Times - This option allows the user to view and modify the call times and state call times records. A user doesn't need this option enabled if they only need to change the call times option on the campaigns screen|Ändere Anrufzeiten - Diese Option erlaubt dem Nutzer das Ansehen und Ändern der Anrufzeiten und Status Anrufzeiten Aufzeichnungen. Ein Nutzer braucht diese Option nicht aktiviert, wenn er nur die Anrufzeit Option auf der Kampagnen-Sicht ändern können muss +Wrapup Seconds - The number of seconds to force an agent to wait before allowing them to receive or dial another call. The timer begins as soon as an agent hangs up on their customer - or in the case of alternate number dialing when the agent finishes the lead - Default is 0 seconds. If the timer runs out before the agent has dispositioned the call, the agent still will NOT move on to the next call until they select a disposition|Sekunden Nachbereitung - Anzahl der Sekunden, die ein Agent bis zum nächsten erhaltenen Anruf oder Wählen eines anderen Anrufs warten muss. Die Zeit beginnt, sobald ein Agent bei seinem Kunden aufgelegt hat - oder im Fall der alternativen Nummernwahl, wenn ein Agent das Telefonat beendet - Standard ist 0 Sekunden. Wenn die Zeit abgelaufen ist bevor der Agent den Anruf eingeordnet hat, wird der Agent dennoch nicht zum nächsten Anruf kommen, bevor er eine Einteilung gewählt hat +Wrapup Message - This is a campaign-specific message to be displayed on the wrapup screen if wrapup seconds is set|Nachbereitungsnachricht - Dies ist eine Kampagnen-spezifische Nachricht, die bei gesetzten Sekunden Nachbereitung auf dem Nachbereitungsbildschirm angezeigt wird +You are not authorized to view this page. Please go back|Sie haben nicht die Rechte, um diese Seite anzusehen. Bitte zurück gehen +Day and time options will appear once you have created the Call Time Definition|Datums und Zeitoptionen erscheinen, wenn die Anrufzeitdefinition angelegt wurde +State Call Time ID, name and state must be at least 2 characters in length|Landesspezifische Anrufzeit ID, Name und Land müssen mindestens 2 Zeichen Länge haben +Call Time ID and name must be at least 2 characters in length|Anrufzeit ID und Name müssen mindestens 2 Zeichen Länge haben +Active State Call Time Definitions for this Record|Aktive landesspezifische Anrufzeit Definitionen für diese Aufnahme +there is already a call time entry with this ID|Es existiert bereits ein Anrufzeiteintrag mit dieser ID +CALL TIMES USING THIS STATE CALL TIME|Anrufzeiten, die diese landesspezifische Anrufzeit benutzen +STATE CALL TIME DEFINITION NOT ADDED|Landesspezifische Anrufzeitdefinition nicht hinzugefügt +DELETE THIS STATE CALL TIME DEFINITION|Diese landesspezifische Anrufzeitdefinition löschen +Modify Call Time State Definitions List|Bearbeite Anrufzeit Landdefinitions-Liste +CALL TIME DEFINITION NOT ADDED|Anrufzeit Definition nicht hinzugefügt +DELETE THIS CALL TIME DEFINITION|Lösche diese Anrufzeit Definition +short description of the call time|Kurze Beschreibung der Anrufzeit +CAMPAIGNS USING THIS CALL TIME|Kampagnen, die diese Anrufzeit nutzen +STATE CALL TIME NOT MODIFIED|Landesspezifische Anrufzeit nicht geändert +CALL TIME NOT MODIFIED|Anrufzeit nicht geändert +STATE CALL TIME MODIFIED|Landesspezifische Anrufzeit geändert +CALL TIME MODIFIED|Anrufzeit geändert +Default Start:|Standard Start +Default Stop:|Standard Stop +Sunday Start:|Sonntag Start +Sunday Stop:|Sonntag Stop +Monday Start:|Montag Start +Monday Stop:|Montag Stop +Tuesday Start:|Dienstag Start +Tuesday Stop:|Dienstag Stop +Wednesday Start:|Mittwoch Start +Wednesday Stop:|Mittwoch Stop +Thursday Start:|Donnerstag Start +Thursday Stop:|Donnerstag Stop +Friday Start:|Freitag Start +Friday Stop:|Freitag Stop +Saturday Start:|Sonnabend Start +Saturday Stop:|Sonnabend Stop +State Rule Added|Landesrichtlinie hinzugefügt +State Rule Removed|Landesrichlinie gelöscht +STATE CALL TIME LISTINGS|Liste der landesspezifische Anrufzeiten +CALL TIME LISTINGS|Anrufzeiten Liste +STATE CALL TIME ADDED|landesspezifische Anrufzeiten hinzugefügt +CALL TIME ADDED|Anrufzeit hinzugefügt +Drop Call Seconds|Verbindungsaufbau Sekunden +Use Safe Harbor Message|Benutze Sicherheitsnachricht +Safe Harbor Exten|Sicherheitsnebenstelle +Use Drop Message|Benutze Verbindungsaufbaunachricht +Drop Exten|Verbindungsaufbaunebenstelle +SIP Listen Version|Höre auf SIP Version +Add New Call Time|Füge neue Anrufzeit hinzu +Add New State Call Time|Füge neue landesspezifische Anrufzeit hinzu +New Call Time Addition|Neue Anrufzeit hinzufügen +New State Call Time Addition|Neue landesspezifische Anrufzeit hinzufügen +Modify Call Time|Bearbeite Anrufzeit +MODIFY A CALL TIME|Bearbeite eine Anrufzeit +Modify State Call Time|Bearbeite landesspezifische Anrufzeit +MODIFY A STATE CALL TIME|Bearbeite eine landesspezifische Anrufzeit +Delete Call Time|Lösche Anrufzeit +Delete State Call Time|Lösche landesspezifische Anrufzeit +State Call Times|Landesspezische Anrufzeiten +State Call Time ID|Landesspezifische Anrufzeiten ID +State Call Time Name|Landesspezifischer Anrufzeiten Name +State Call Time Comments|Landesspezifischer Anrufzeiten Kommentar +STATE CALL TIME NOT DELETED|Landesspezifische Anrufzeit nicht gelöscht +CALL TIME DELETION COMPLETED|Löschen der Anrufzeiten beendet +STATE CALL TIME DELETION COMPLETED|Löschen der landesspezifischen Anrufzeit beendet +CALL TIME NOT DELETED|Anrufzeit nicht gelöscht +Call Time ID must be at least 2 characters in length|Anrufzeit ID muss mindestens 2 Zeichen lang sein +STATE CALL TIME DELETION CONFIRMATION|Löschen der landesspezifischen Anrufzeit bestätigen +CALL TIME DELETION CONFIRMATION|Löschen der Anrufzeit bestätigen +Call Times|Anrufzeiten +CALL TIMES|Anrufzeiten +SHOW CALL TIMES|Zeige Anrufzeiten +ADD NEW CALL TIME|Hinzufügen neuer Anrufzeiten +SHOW STATE CALL TIMES|Zeige landesspezifische Anrufzeiten +ADD NEW STATE CALL TIME|Hinzufügen neuer landesspezifischer Anrufzeiten +Call Time ID|Anrufzeit ID +Call Time Name|Anrufzeit Name +Call Time Comments|Anrufzeit Kommentare +short description of the call time|Kurze Beschreibung der Anrufzeiten +HIDE|Verberge +SHOW|Zeige +Show Dialable Leads Count|Zeige Anzahl anrufbarer Anschlüsse +Dialable Lead Count|Anzahl anrufbarer Anschlüsse +TEST ON CAMPAIGN|Testen der Kampagne +Wrapup Seconds:|Nachbereitung Sekunden +Wrapup Message:|Nachbereitung Nachricht +Alt Number Dialing|Alternative Nummer wählen +no active lists selected for this campaign|Keine aktiven Listen für diese Kampagne gewählt +Realtime Screen|Echtzeit Bildschirm + + +############################################################ CLIENT + +Search Existing Leads|Suche existierende Anschlüsse +This option if checked will attempt to find the phone number in the system before inserting it as a new lead|Wenn diese Option gesetzt ist wird versucht, die Telefonnummer im System zu finden, bevor sie als neuer Anschluss eingefügt wird +Finish Wrapup and Move On|Beende Nachbereitung und mache weiter +seconds remaining in wrapup|Verbleibende Sekunden der Nachbereitung +Call Wrapup:|Anruf Nachbereitung + + +############################################################ CLIENT MANUAL + +Added option to search for a manual-dial lead before inserting it in the system|Option hinzugefügt, um einen manuell gewählten Anschluss zu suchen, bevor er ins System eingefügt wird +Added Call Wrapup option and screen with override link to skip out early|Option für Anruf Nachbereitung und Bildschirm mit Überspringen-Link zum vorzeitigen Weitermachen hinzugefügt + + +############################################################ + diff --git a/translations/br_language.txt b/translations/br_language.txt new file mode 100644 index 0000000..04fcebe --- /dev/null +++ b/translations/br_language.txt @@ -0,0 +1,396 @@ +# br_language.txt - this file is for the internationalization of the astGUIclient +# client web pages. The associated install.pl file will take the language as an +# argument and alter the php scripts to the language typed in the command line: +# example: ./install.pl --language=es +# current languages in the file: +# - English - (en) no alterations +# - Brazillian Portuguese - (br) second column +***LANGUAGES*** +en-English|br-Brazil| +***FILES*** +agc|astguiclient.php|0 +agc|vicidial.php|0 +agc|vdc_db_query.php|0 +agc|manager_send.php|0 +agc|conf_exten_check.php|0 +agc|inbound_popup.php|0 +agc|active_list_refresh.php|0 +agc|park_calls_display.php|0 +agc|live_exten_check.php|0 +agc|call_log_display.php|0 +agc|voicemail_check.php|0 +agc|dbconnect.php|1 +agc|htglobalize.php|1 +***TRANSLATIONS*** +### special translations that should stay at the top of the file ### +"JAN"|"JAN"| +"FEB"|"FEV"| +"MAR"|"MAR"| +"APR"|"ABR"| +"MAY"|"MAI"| +"JUN"|"JUN"| +"JLY"|"JLY"| +"AUG"|"AGO"| +"SEP"|"SET"| +"OCT"|"OUT"| +"NOV"|"NOV"| +"DEC"|"DEZ"| +\./images/|../agc/images/| +BORDER|Border| +VALUE=SUBMIT|VALUE=SUBMIT| +TYPE=SUBMIT|TYPE=Submit| +MAXLENGTH|maxlength| +### BEGIN translation phrases through 1.1.11 release ### +English|Inglês| +Spanish|Espanhol| +French|Francês| +German|Alemão| +Italian|Italiano| +agc_check_voicemail_BLINK.gif|agc_check_voicemail_BLINK_ptbr.gif| +agc_check_voicemail_OFF.gif|agc_check_voicemail_OFF_ptbr.gif| +agc_check_voicemail_ON.gif|agc_check_voicemail_ON_ptbr.gif| +agc_live_call_OFF.gif|agc_live_call_OFF_ptbr.gif| +agc_live_call_ON.gif|agc_live_call_ON_ptbr.gif| +agc_tab_active_lines.gif|agc_tab_active_lines_ptbr.gif| +agc_tab_conferences.gif|agc_tab_conferences_ptbr.gif| +agc_tab_main.gif|agc_tab_main_ptbr.gif| +vdc_LB_dialnextnumber.gif|vdc_LB_dialnextnumber_ptbr.gif| +vdc_LB_dialnextnumber_OFF.gif|vdc_LB_dialnextnumber_OFF_ptbr.gif| +vdc_LB_grabparkedcall.gif|vdc_LB_grabparkedcall_ptbr.gif| +vdc_LB_hangupcustomer.gif|vdc_LB_hangupcustomer_ptbr.gif| +vdc_LB_hangupcustomer_OFF.gif|vdc_LB_hangupcustomer_OFF_ptbr.gif| +vdc_LB_parkcall.gif|vdc_LB_parkcall_ptbr.gif| +vdc_LB_parkcall_OFF.gif|vdc_LB_parkcall_OFF_ptbr.gif| +vdc_LB_pause.gif|vdc_LB_pause_ptbr.gif| +vdc_LB_pause_OFF.gif|vdc_LB_pause_OFF_ptbr.gif| +vdc_LB_resume.gif|vdc_LB_resume_ptbr.gif| +vdc_LB_resume_OFF.gif|vdc_LB_resume_OFF_ptbr.gif| +vdc_LB_startrecording.gif|vdc_LB_startrecording_ptbr.gif| +vdc_LB_stoprecording.gif|vdc_LB_stoprecording_ptbr.gif| +vdc_LB_transferconf.gif|vdc_LB_transferconf_ptbr.gif| +vdc_LB_transferconf_OFF.gif|vdc_LB_transferconf_OFF_ptbr.gif| +vdc_LB_webform.gif|vdc_LB_webform_ptbr.gif| +vdc_LB_webform_OFF.gif|vdc_LB_webform_OFF_ptbr.gif| +vdc_XB_blindtransfer.gif|vdc_XB_blindtransfer_ptbr.gif| +vdc_XB_blindtransfer_OFF.gif|vdc_XB_blindtransfer_OFF_ptbr.gif| +vdc_XB_dialwithcustomer.gif|vdc_XB_dialwithcustomer_ptbr.gif| +vdc_XB_dialwithcustomer_OFF.gif|vdc_XB_dialwithcustomer_OFF_ptbr.gif| +vdc_XB_hangupbothlines.gif|vdc_XB_hangupbothlines_ptbr.gif| +vdc_XB_hangupbothlines_OFF.gif|vdc_XB_hangupbothlines_OFF_ptbr.gif| +vdc_XB_hangupxferline.gif|vdc_XB_hangupxferline_ptbr.gif| +vdc_XB_hangupxferline_OFF.gif|vdc_XB_hangupxferline_OFF_ptbr.gif| +vdc_XB_internalcloser.gif|vdc_XB_internalcloser_ptbr.gif| +vdc_XB_internalcloser_OFF.gif|vdc_XB_internalcloser_OFF_ptbr.gif| +vdc_XB_leave3waycall.gif|vdc_XB_leave3waycall_ptbr.gif| +vdc_XB_leave3waycall_OFF.gif|vdc_XB_leave3waycall_OFF_ptbr.gif| +vdc_XB_localcloser.gif|vdc_XB_localcloser_ptbr.gif| +vdc_XB_localcloser_OFF.gif|vdc_XB_localcloser_OFF_ptbr.gif| +vdc_XB_parkcustomerdial.gif|vdc_XB_parkcustomerdial_ptbr.gif| +vdc_XB_parkcustomerdial_OFF.gif|vdc_XB_parkcustomerdial_OFF_ptbr.gif| +vdc_XB_hotkeysactive.gif|vdc_XB_hotkeysactive_ptbr.gif| +vdc_XB_hotkeysactive_OFF.gif|vdc_XB_hotkeysactive_OFF_ptbr.gif| +vdc_LB_senddtmf.gif|vdc_LB_senddtmf_ptbr.gif| +vdc_LB_senddtmf_OFF.gif|vdc_LB_senddtmf_OFF_ptbr.gif| +vdc_XB_header.gif|vdc_XB_header_ptbr.gif| +vdc_XB_number.gif|vdc_XB_number_ptbr.gif| +vdc_XB_channel.gif|vdc_XB_channel_ptbr.gif| +vdc_XB_seconds.gif|vdc_XB_seconds_ptbr.gif| +vdc_tab_script.gif|vdc_tab_script.gif| +You have now logged out. Thank you|Você fez o logoff. Obrigado| +astGUIclient web-client VERSION|Versão do cliente web do astGUIClient| +astGUIclient web client|astGUIclient web client| +VICIDIAL web client|VICIDIAL web client| +VICIDIAL web-client version|VICIDIAL web-client version| +You can only monitor Zap channels|Você so pode monitorar os canais ZAP| +Stop Record|Pare a Gravação| +you are logged into this phone|Você está logado no telefone | +Back to Main Window|Voltar a página principal| +LIVE CALLS ON THIS PHONE|CHAMADAS ATIVAS NESTE TELEFONE| +LIVE CALLS IN THIS CONFERENCE|CHAMADAS ATIVAS NESTA CONFERÊNCIA| +LIVE CALL TRANSFER|TRANSFERIR CHAMADAS ATIVAS| +CLIENT CHANNEL|CANAL DO CLIENTE| +REMOTE CHANNEL|CANAL REMOTO| +CLICK HERE TO LOG IN AGAIN|CLIQUE AQUI PARA FAZER O LOGIN NOVAMENTE| +ACTIVE DISPLAY PAUSED|DISPLAY ATIVO PAUSADO| +Main Panel|Painel Principal| +Active Lines Panel|Linhas Ativas no Painel| +Conferences Panel|Painel de Conferências| +Check Voicemail|Verificar Caixa Postal| +Live Call|Chamadas Ativas| +Hangup Trunk|Desligar o Canal| +Hijack Trunk|Capturar o Canal| +Listen Trunk|Ouvir o Canal| +Active Local Menu|Menu Local Ativo| +Hangup Local|Desligar Local| +Hijack Local|Capturar Local| +Listen Local|Ouvir Local| +Channel to be transferred|Canal a ser transferido| +Extensions Menu|Extensões do Menu| +Send to selected extension|Enviar para a extensão selecionada| +Send to selected vmail box|Enviar para a caixa postal selecionada| +Send to this number|Envie para este número| +click on a number below to send to a conference|Clique no número abaixo para enviar a conferência| +Send my channel too|Enviar meu canal para| +Conferences Menu|Menu das conferências| +LOCAL Extensions Dial|Discar a extensão local| +Phone calling from|Telefone ligando de| +Call selected extension|Ligar para a extensão selecionada| +Call selected vmail box|Ligar para a caixa postal selecionada| +LOCAL DIAL EXTENSIONS|DISCAR A EXTENSÃO LOCAL| +OUTBOUND CALLS|CHAMADAS SAINTES| +INBOUND CALLS|CHAMADAS ENTRANTES| +Refresh rate|Atualizar a taxa| +MANUAL DIAL|DISCAGEM MANUAL| +CALL DATE/TIME|DATA/HORA DA CHAMADA| +LOCAL HANGUP|DESLIGAR LOCAL| +PARKED CALLS|CHAMADAS EM ESPERA| +PARKED BY|EM ESPERA POR| +PARKED TIME|TEMPO EM ESPERA| +Registered to|Registrado para| +Enter Conference|Entrar na conferência|Dial From Conf +Active Extensions|Extensões Ativas| +Outside Lines|Linhas externas| +Local Extensions|Extensões Locais| +Data Goes Here|Data vai aqui| +Trunk Action|Atividade do Tronco| +Local Action|Atividade Local| +Conferences List|Lista das conferências| +Click on a conference room number on the left for info on that conference|Clique no número da conferência, a esquerda, para entrar na conferência| +List Display|Mostrar Lista| +Live Extensions|Extensões Ativas| +Busy Extensions|Extensões Ocupadas| +Outside Lines|Linhas Externas| +script runtime|tempo de execução do script| +Call Log Display|Registro de Ligações| +is not valid|não é válido| +or protocol|ou protocolo| +Conf Extension Check|Verificação da Extensão de Conferência| +has been registered to|já foi registrado para| +LIVE INBOUND CALL|CHAMADA ENTRANDO| +Number Dialed|Número Discado| +SEND TO MY VOICEMAIL|ENVIAR PARA MINHA CAIXA POSTAL| +Live Extension Check|Verificação de extensões ativas| +Manager Send|Gerente Envia| +command not inserted|comando não inserido| +command sent for|comando enviado para| +One of these variables|Uma dessas variáveis| +must be greater than 2 characters|Deve ser maior que 2 caracteres| +must be greater than 14 characters|Deve ser maior que 14 caracateres| +must be set|Deve ser definido| +not sent|não enviado| +Cannot find empty conference|Não foi possível achar uma conferência vazia| +is not live|não está ativo| +RECORDING WILL LAST UP TO 60 MINUTES|AS GRAVAÇÕES VÃO DURAR 60 MINUTOS| +Parked Calls Display|Mostra as ligações em espera| +Database Query Script|Script de consulta ao banco de dados| +Group Choice|Escolha do Grupo| +has been registered to user|foi registrado para o usuário| +HOPPER EMPTY|LISTA DE DISCAGEM VAZIA| +LOG NOT ENTERED|REGISTRO NÃO DEFINIDO| +has been changed to|foi modificado para| +information has been updated|a informação foi atualizada| +is now in status|está agora com o status| +Voicemail Check|Verificar caixa postal| +voicemail box|Caixa Postal| +Re-Login|Re-Login| +User Password|Senha do Usuário| +User Login|Login do Usuário| +Phone Login|Login do Telefone| +Phone Password|Senha do Telefone| +Campaign not active, please try again|A campanha não está ativa, por favor tente novamente| +Login incorrect, please try again|Usuário incorreto, por favor tente novamente| +Campaign Login|Login da Campanha| +Sorry, your phone login and password are not active in this system, please try again|Desculpe seu login de telefone e senha não estão ativos nesta campanha, por favor tente novamente| +leads left to call in hopper|Contatos restantes na lista de discagem| +CAMPAIGN CUSTOM PARKING|ESPERA CUSTOMIZADA| +CAMPAIGN DEFAULT PARKING|ESPERA PADRÃO| +CAMPAIGN CUSTOM WEB FORM|WEB FORM CUSTOMIZADO| +CAMPAIGN DEFAULT WEB FORM|WEB FORM PADRAO| +CAMPAIGN ALLOWS CLOSERS|A CAMPANHA PERMITE CLOSERS| +CAMPAIGN ALLOWS NO CLOSERS|A CAMPANHA NAO PERMITE CLOSERS| +USING PREVIOUS MEETME ROOM|USAR SALA DE CONFERÊNCIA ANTERIOR| +USING NEW MEETME ROOM|USAR NOVA SALA DE CONFERÊNCIA| +old QUEUE and INCALL reverted list|FILA inversa ANTIGA e ATIVA| +old QUEUE and INCALL reverted hopper|Fila inversa ANTIGA e ATIVA da lista de discagem| +old vicidial_live_agents records cleared|gravações antigas dos agentes do Vicidial excluídas| +campaign is set to auto_dial_level|A campanha está habilitada com discagem automática| +new vicidial_live_agents record inserted|nova gravação de agente do vicidial inserida| +campaign is set to manual dial|A campanha está definida com discagem manual| +Sorry, there are no leads in the hopper for this campaign|Desculpe, não existem registros na fila de discagem| +Dial Next Number|Discar proximo número| +LIVE CALLS IN YOUR SESSION|LIGAÇÕES ATIVAS NA SUA SESSÃO| +Stop Recording|Parar Gravação| +Start Recording|Inicia Gravação| +Transfer number must have more than 1 digit|O número a ser transferido deve ter mais de 1 digito| +Grab Parked Call|Pegar ligãções em espera| +Park Call|Colocar em espera| +Waiting for Ring|Aguardando Atender| +Called 3rd party|Ligou para o terceiro| +LEAVE 3-WAY CALL|ABANDONAR CHAMADA A TRES| +Dial With Customer|Discar com o cliente| +Park Customer Dial|Colocar chamada do cliente em espera| +Hangup Xfer Line|Desligar linha Xfer| +Hangup Both Lines|Desligar ambas as linhas| +Hangup Customer|Desligar Cliente| +Transfer - Conference|Transferir a conferência| +LOCAL CLOSER|CLOSER LOCAL| +INTERNAL CLOSER|CLOSER INTERNO| +Dial Blind Transfer|Transferência sem acompanhamento| +Dial timed out, contact your system administrator|Tempo de discagem excedido, favor contactar o administrador| +No more leads in the hopper for campaign|Não existem mais registros na fila de discagem dessa campanha| +Web Form|Web Form| +You Must Select a Disposition|Você deve selecionar um status| +GROUPS NOT SELECTED|GRUPOS NÃO SELECIONADOS| +SELECTED GROUPS|GRUPOS SELECIONADOS| +You cannot log out during a Dial attempt|Você não pode sair durante uma chamada| +Wait 50 seconds for the dial to fail out if it is not answered|Aguarda 50 segundos para desligar se for telefone não atendido| +STILL A LIVE CALL! Hang it up then you can log out|VOCÊ ESTÁ EM UMA CHAMADA ATIVA! Desligue a chamada e você poderá sair do sistema| +Hide conference call channel information|Ocultar informações de discagem do canal| +Show conference call channel information|Mostrar informações de discagem do canal| +Logged in as User|Loggado como usuario| +Noone is in your session|Não existe ninguem na sua sessão| +Customer has hung up|O cliente desligou| +End-of-call Disposition Selection|Fim da seleção de status| +CLOSER INBOUND GROUP SELECTION|SELECAO DO GRUPO DE ENTRADA DO CLOSER| +Closer Inbound Group Selection|Seleção do grupo de entrada do closer| +BLENDED CALLING|LIGACAO MISTURADA| +outbound activated|ligações externas ativadas| +Preview the Lead then|Mostrar o contato, então| +Lead was not reverted, there was an error|O contato não pode ser revertido. Houve um erro.| +call was not placed, there was an error|A ligação não foi efetuada. Houve um erro.| +Number to call|Número a ser discado| +Customer Information|Informações do cliente| +Lead Dispositioned As|Status da ligação definida como| +Any changes made to the customer information below at this time will not be comitted, You must change customer information before you Hangup the call|Qualquer alteração feita nesta página não será salva. Você deve mudar as informações do cliente antes de desligar a ligação| +When active, simply press the keyboard key for the desired disposition for this call. The call will then be hungup and dispositioned automatically|Quanto ativo apenas pressione a tecla do teclado referente ao status desejado. A ligação será desligada e salva com o status definido automaticamemente| +Disposition Hot Keys|Atalhos para os status| +Cust Time|Tempo de cliente| +RECORD ID|ID da gravação| +RECORDING FILE|GRAVANDO ARQUIVO| +HOT KEYS ACTIVE|ATALHOS DE STATUS ATIVOS| +HOT KEYS INACTIVE|ATALHOS DE STATUS INATIVOS| +DIAL OVERRIDE|DISCAGEM SOBREPOSTA| +SKIP LEAD|IGNORAR CONTATO| +DIAL LEAD|DISCAR CONTATO| +LEAD PREVIEW|VISUALIZAR CONTATO| +PAUSE AGENT DIALING|PAUSAR DISCAGEM DO AGENTE| +DISPOSITION CALL|SELEÇÃO DE STATUS| + session ID|ID da sessão| + to campaign|para a campanha| +Select a CallBack Date|Selecione uma data para o retorno| +maximize|maximizar| +minimize|minimizar| +You must choose a date|Você deve selecionar uma data| +Select a Date Below|Selecione uma data abaixo| +Click on a callback below to call the customer back now. If you click on a record below to call it, it will be removed from the list|Clique em um dos contatos abaixo para ligar. Se você clicar em um contatos abaixo o mesmo será removido da lista de Agendamentos| +If you want to dial a number and have it NOT be added as a new lead, enter in the exact dialstring that you want to call in the Dial Override field below. To hangup this call you will have to open the CALLS IN THIS SESSION link at the bottom of the screen and hang it up by clicking on its channel link there|Se você deseja ligar para um número que não está na lista de contatos, digite o número que voc6e deseja discar no campo Discagem Sobreposta abaixo. Para desligar essa ligação você deve abrir o link Ligações em sua sessão link no rodapé da página e desligar clicando no link do canal| +YOU CANNOT SKIP A CALLBACK OR MANUAL DIAL, YOU MUST DIAL THE LEAD|VOCÊ NÃO PODE PULAR UM AGENDAMENTO OU DISCAGEM MANUAL, VOCÊ DEVE DISCAR O NÚMERO| +YOU MUST BE PAUSED TO MANUAL DIAL A NEW LEAD IN AUTO-DIAL MODE|VOCÊ DEVE ESTAR PAUSADO PARA DISCAR COM DISCAGEM MANUAL.| +Enter information below for the new lead you wish to call|Digite abaixo a informação do novo contato que você deseja ligar| +YOU MUST BE PAUSED TO CHECK CALLBACKS IN AUTO-DIAL MODE|VOCÊ DEVE ESTAR PAUSADO PARA VERIFICAR OS AGENDAMENTOS| +Note: all new manual dial leads will go into list 999|Nota: todos os novos contatos da discagem manual serão inseridos na lista 999| +YOU DO NOT HAVE PERMISSIONS TO TRANSFER CALLS|VOCE NÃO TEM PERMISSÕES PARA TRANSFERIR AS CHAMADAS| +will be added to the beginning of this number|será inserido no inicio deste número| +This is usually a 1 in the USA-Canada|Normalmente é 1 nos EUA-Canada| +NEW MANUAL DIAL LEAD FOR|NOVA DISCAGEM MANUAL PARA| +Finish and Disposition Call|Finalize e coloque o status da ligação| +10 digits max - digits only|Maximo de 10 digitos - apenas número| +Note: a dial prefix of|Nota: prefixo de discagem de| +Hangup Again|Desligue novamente| +Go Back|Voltar| +Call Agent Again|Ligar novamente para o agente| +MY CALLBACK ONLY|ESTE AGENDAMENTO SO APARECE PARA MIM| +ACTIVE CALLBACKS|AGENDAMENTOS ATIVOS| +CALLBACKS FOR AGENT|AGENDAMENTOS POR AGENTE| +Dial Code:|Codigo de Área:| +Dial Override|Discagem Sobreposta| +digits only please|digitos apenas por favor| +Dial Now|Discar Agora| +CB Comments|Comentarios do CB| +Title|Título| +STATUS|STATUS| +RESET|REINICIAR| +CLEAR FORM|LIMPAR FORMULARIO| +SUBMIT|ENVIAR| +Incoming|Entrante| +Calling|Ligando| +Called|Ligado| +Campaign|Campanha| +Status|Status| +Inserted|Inserido| +seconds|segundos| +HELP|AJUDA| +Login|Login| +User|Usuário| +Password|Senha| +VERSION|VERSÃO| +BUILD|CONFIGURAÇÃO| +Server|Servidor| +RECORD|REGISTRO| +HANGUP|DESLIGAR| +XFER|TRANFERENCIA| +PARK|ESPERA| +IN-NUMBER|NUMERO ENTRANTE| +NUMBER|NUMERO| +LENGTH|COMPRIMENTO| +CALLERID|CALLERID| +CallerID|CallerID| +CALL|CHAMADA| +PICKUP|CAPTURAR| +CONFERENCE|CONFERENCIA| +Refresh|Atualizar| +Send DTMF|Enviar DTMF| +BORDER|BORDA| +ORDER|ORDEM| + on |ligado| +LOGOUT|SAIR| +Channel|Canal| +Extensions|Extensões| +Conferences|Conferencias| +Conference|Conferencia| +Recording|Gravando| +Record|Gravar| +Welcome|Bem vindo| +VOICEMAIL|CAIXA POSTAL| +NEW|NOVO| +OLD|VELHO| +PAUSE|PAUSAR| +START|INICIAR| +Pause|Pausa| +Resume|Início| +Faster|Mais rápido| +Slower|Mais devagar| +Initializing|Inicializando| +Invalid|Inválido| +Username|Usuário| +CUSTOM|CUSTOMIZADO| +Notes|Notas| +First|Primeiro| +MI: |MI:| +Last|Ultimo| +Address|Endereço| +City|Cidade| +State|Estado| +PostCode|CEP| +Province|Bairro| +Vendor ID|ID do Vendedor| +DialCode|Codigo de Area| +Alt. Phone|Telefone Alternativo| +Show|Mostrar| +Email|Email| +Comments|Comentários| +REFRESH|ATUALIZAR| +ALT PHONE DIAL|DISCAR TELEFONE ALTERNATIVO| +MAIN PHONE|TELEFONE PRINCIPAL| +ALT PHONE|TELEFONE ALTERNATIVO| +ADDRESS3|ENDERECO3| +FINISH LEAD|FINALIZAR CONTATO| +Dial Alt Phone Number|Discar telefone alternativo| +Phone|Telefone| +DIAL|DISCAR| +SUBMIT FAVORITES CHANGES - requires logout|PARA ENVIAR MODIFICACOES FAVORITAS E NECESSARIO FAZER O LOGOUT| +BACK TO MAIN WINDOW - ignore changes made|VOLTAR A TELA PRINCIPAL - as alterações serão ignoradas| +AVAILABLE EXTENSIONS|EXTENSOES DISPONIVEIS| + edit|editar| + FAVORITES|FAVORITOS| +### END translation phrases through 1.1.11 release ### diff --git a/translations/de_language.txt b/translations/de_language.txt index 03de996..3851f10 100644 --- a/translations/de_language.txt +++ b/translations/de_language.txt @@ -396,7 +396,8 @@ AVAILABLE EXTENSIONS|VORHANDENE VERLÄNGERUNGEN| edit| redigieren sie| FAVORITES| LIEBLINGE| ### END translation phrases through 1.1.11 release ### -Search Existing Leads|Suchbestehende Leitungen| -This option if checked will attempt to find the phone number in the system before inserting it as a new lead|Diese Wahl, wenn sie ΓΌberprΓΌft wird, versucht, die Telefonnummer im| -seconds remaining in wrapup|Sekunden restlich im wrapup| -Call Wrapup:|Anruf Wrapup:| +Search Existing Leads|Suche existierende Anschlüsse| +This option if checked will attempt to find the phone number in the system before inserting it as a new lead|Wenn diese Option gesetzt ist wird versucht, die Telefonnummer im System zu finden, bevor sie als neuer Anschluss eingefügt wird| +Finish Wrapup and Move On|Beende Nachbereitung und mache weiter| +seconds remaining in wrapup|Verbleibende Sekunden der Nachbereitung| +Call Wrapup:|Anruf Nachbereitung| diff --git a/translations/el_language.txt b/translations/el_language.txt index f53d8ab..388200d 100644 --- a/translations/el_language.txt +++ b/translations/el_language.txt @@ -394,8 +394,8 @@ AVAILABLE EXTENSIONS|ΔΙΑΘΕΣΙΜΕΣ ΕΠΕΚΤΑΣΕΙΣ| edit| διορθώστε| FAVORITES| ΑΓΑΠΗΜΕΝΑ| ### END translation phrases through 1.1.11 release ### -Search Existing Leads|Υπάρχοντες μόλυβδοι αναζήτησης| -This option if checked will attempt to find the phone number in the system before inserting it as a new lead|ΑυτΞ� Ξ· ΡπιλογΞ� Ράν ΡλέγχΡται ΞΈΞ± προσπαθΞ�σΡι Ξ½Ξ± βρΡί τον| -Finish Wrapup and Move On|Τελειώστε Wrapup και προχωρήστε| -seconds remaining in wrapup|δευτερόλεπτα που παραμένουν στο wrapup| -Call Wrapup:|Κλήση Wrapup:| +Search Existing Leads|Αναζήτηση Οδηγών| +This option if checked will attempt to find the phone number in the system before inserting it as a new lead|Η επιλογή αυτή επιτρέπει να βρει τον αριθμό στο σύστημα προτού γίνει εισαγωγή ως νέος οδηγός| +Finish Wrapup and Move On|Τελείωμα Τυλίγματος και προχωράει| +seconds remaining in wrapup|απομύνοντα δευτερόλεπτα σε τύλιγμα| +Call Wrapup:|Τύλιγμα Κλήσης:| diff --git a/translations/el_language_admin.txt b/translations/el_language_admin.txt index d9bde5f..70a0100 100644 --- a/translations/el_language_admin.txt +++ b/translations/el_language_admin.txt @@ -931,13 +931,104 @@ AGENT |ΧΕΙΡΙΣΤΗΣ| SERVER |ΔΙΑΚΟΜΙΣΤΗΣ | ### END translation phrases through 1.1.11 release ### ### BEGIN translation 1.1.12 release ### -Drop Call Seconds -<\/B> The number of seconds from the time the customer line is picked up until the call is considered a DROP, only applies to outbound calls| Δευτερόλεπτα Κλήσης Εγκατάλειψης - Ο χρόνος σε δευτερόλεπτα, από την στιγμή που απάντησε ο πελάτης μέχρι την εγκατάλειψη της κλήσης. Εφαρμόζεται μόνο για εξερχόμενες κλήσης -Safe Harbor Message -<\/B> If set to Y will play a message to customer after the Drop Call Seconds timeout is reached without being transferred to an agent. This setting will override sending to a voicemail box if this is set to Y|Μήνυμα Ασφαλούς Εσωτ.Σύνδ. Φιλοξενίας - Εάν το θέσετε σε Υ, ο πελάτης θα ακούει ένα μήνυμα χωρίς να μεταφερθεί στο χειριστή. Αυτή η επιλογή υπερισχύει αυτής για μετάβαση στη θυρίδα ηχητικών μηνυμάτων -Safe Harbor Exten -<\/B> This is the dialplan extension that the desired Safe Harbor audio file is located at on your server|Ασφαλής Εσωτ.Σύνδ. Φιλοξενίας - Αυτή είναι η εσωτ.σύνδ. στο πλάνο κλήσεων, όπου το επιθυμητό αρχείο μουσικής βρίσκεται στον διακομιστή -Drop Message -<\/B> If set to Y will play a message to customer after the Drop Call Seconds timeout is reached without being transferred to an agent. This setting will override sending to a voicemail box if this is set to Y|Μήνυμα Εγκατάλειψης - Εάν το θέσετε σε Υ, ο πελάτης θα ακούει ένα μήνυμα χωρίς να μεταφερθεί στο χειριστή. Αυτή η επιλογή υπερισχύει αυτής για μετάβαση στη θυρίδα ηχητικών μηνυμάτων -Drop Exten -<\/B> This is the dialplan extension that the desired Dropped call audio file is located at on your server|Εσωτ.Σύνδ. Εγκατάλειψης - Αυτή είναι η εσωτ.σύνδεση στο πλάνο κλήσεων, όπου το επιθυμητό αρχείο μουσικής για την εγκατελημένη κλήση βρίσκεται στον διακομιστή -Drop Call Seconds|Δευτερόλεπτα Κλήσης Εγκατάλειψης -Use Safe Harbor Message|Χρήση Ασφαλούς Μηνύματος Φιλοξενίας -Safe Harbor Exten|Ασφαλής Εσωτ.Σύνδ. Φιλοξενίας -Use Drop Message|Χρήση μηνύματος σε Εγκατάλειψη -Drop Exten|Εσωτ.Γραμμή Εγκατάλειψης +Drop Call Seconds - The number of seconds from the time the customer line is picked up until the call is considered a DROP, only applies to outbound calls|Δευτερ. Εγκαταλ. Κλήσης - Ο αριθμός των δευτερολέπτων από την στιγμή που ο πελάτης σηκώνει το τηλ μέχρι η κλήση να θεωρηθεί εγκαταλειμένη. Μόνο για εξερχόμενες κλήσεις | +Safe Harbor Message - If set to Y will play a message to customer after the Drop Call Seconds timeout is reached without being transferred to an agent. This setting will override sending to a voicemail box if this is set to Y|Μήνυμα Ασφαλούς Φύλαξης - Εάν είναι Υ θα παίξει ένα μήνυμα στον πελάτη μετά το πέρας των δευτερολέπτων ασφαλούς εγκατάλειψης, χωρίς να μεταφερθεί σε έναν χειριστή. Αυτή η επιλογή υπερβαίνει την αποστολή σε θυρίδα ηχητικού μηνύματος εάν είναι Υ| +Safe Harbor Exten - This is the dialplan extension that the desired Safe Harbor audio file is located at on your server|Εσωτ.σύνδεση Ασφαλούς Φύλαξης - Αυτή είναι η εσωτ.σύνδεση του πλάνου κλήσεων, όπου βρίσκεται το ηχητικό αρχείο της Ασφαλής Φύλαξης στον διακομιστή| +Drop Message - If set to Y will play a message to customer after the Drop Call Seconds timeout is reached without being transferred to an agent. This setting will override sending to a voicemail box if this is set to Y|Μήνυμα Εγκατάλειψης - Εάν είναι Υ θα παίξει ένα μήνυμα στον πελάτη μετά το πέρας των δευτερολέπτων Εγκατάλειψης, χωρίς να μεταφερθεί σε έναν χειριστή. Αυτή η επιλογή υπερβαίνει την αποστολή σε θυρίδα ηχητικού μηνύματος εάν είναι Υ| +Drop Exten - This is the dialplan extension that the desired Dropped call audio file is located at on your server|Εσωτ.Σύνδεση Εγκατάλειψης - Αυτή είναι η εσωτ.σύνδεση του πλάνου κλήσεων, όπου βρίσκεται το ηχητικό αρχείο της Εγκατάλειψης στον διακομιστή| +Call Time ID - This is the short name of a Vicidial Call Time Definition. This needs to be a unique identifier. Do not use any spaces or punctuation for this field. max 10 characters, minimum of 2 characters|ID Χρόνου Κλήσης - Αυτό είναι το σύντομο όνομα του Ορισμού Χρόνου Κλήσης. Πρέπει να είναι ένα μοναδικό στοιχείο. Μην χρησιμοποιηθούν διαστήματα ή στίξεις. 2-10 χαρακτήρες| +Call Time Name - This is a more descriptive name of the Call Time Definition. This is a short summary of the Call Time definition. max 30 characters, minimum of 2 characters|Ονομα Χρόνου Κλήσης - Αυτό είναι ένα πιο περιγραφικό όνομα του Ορισμού Χρόνου Κλήσης. Είναι μία σύντομη περιγραφή. 2-30 χαρακτήρεςCall Time Comments - This is where you can place comments for a Vicidial Call Time Definition such as -10am to 4pm with extra call state restrictions-. max 255 characters|Σχόλια Χρόνου Κλήσης - Μέχρι 255 χαρακτήρες| +Default Start and Stop Times - This is the default time that calling will be allowed to be started or stopped within this call time definition if the day-of-the-week start time is not defined. 0 is midnight. To prevent calling completely set this field to 2400 and set the Default Stop time to 2400. To allow calling 24 hours a day set the start time to 0 and the stop time to 2400|Προκαθορισμένοι Χρόνοι Εκκίνησης και Παύσης - Αυτός είναι ο προκαθορισμένος χρόνος όπου θα επιτρέπετε οι κλήσεις εάν δεν έχει οριστεί ο χρόνος εκκίνησης της ημέρας-της-εβδομάδας. 0 είναι μεσάνυχτα. Εάν δεν θέλετε καμία κλήση θέστε αυτό το πεδίο σε 2400 και το προκαθορισμένο χρόνο Παύσης σε 2400. Για να επιτρέψετε την 24ωρη κλήση την ημέρα θέστε σε 0 τον χρόνο εκκίνησης και σε 2400 τον χρόνο παύσηςWeekday Start and Stop Times - These are the custom times per day that can be set for the call time definition. same rules apply as with the Default start and stop times|Εβδομαδιαίοι Χρόνοι Εκκίνησης και Παύσης - Αυτοί είναι προσαρμόσιμοι χρόνοι ανά ημέρα για τον ορισμό χρόνων κλήσεων| +State Call Time Definitions - This is the list of State specific call time definitions that are followed in this Call Time Definition|Ορισμοί Χρόνων Κλήσεων Καταστάσεων - Είναι η λίστα συγκεκριμένων Ορισμών Χρόνων Κλήσεων Καταστάσεων| +State Call Time State - This is the two letter code for the state that this calling time definition is for. For this to be in effect the local call time that is set in the campaign must have this state call time record in it as well as all of the leads having two letter state codes in them|Κατάσταση Χρόνου Κλήσης Κατάστασης - Αυτό είναι ο δύο γραμμάτων κωδικός για την κατάσταση όπου ο ορισμός χρόνου κλήσης είναι για. Θα πρέπει και οι Οδηγοί της εκστρατείας να έχουν δύο γράμματα κωδικούς κατάστασης για τον χρόνο κλήσης κατάστασης| +Delete Call Times - This option allows the user to be able to delete vicidial call times records and vicidial state call times records from the system|Διαγραφή Χρόνων Κλήσεων - Αυτή η επιλογή επιτρέπει στον χρήστη να διαγράφει εγγραφές χρόνων κλήσεων και καταστάσεων από το σύστημα| +Modify Call Times - This option allows the user to view and modify the call times and state call times records. A user doesn't need this option enabled if they only need to change the call times option on the campaigns screen|Τροποποίηση Χρόνων Κλήσεων - Αυτή η επιλογή επιτρέπει στον χρήστη εμφανίσει και να τροποποιήσει τους χρόνους κλήσεων και τις εγγραφές χρόνων κλήσεων κατάστασης. Δεν χρειάζεται να είναι ενεργή αυτή η επιλογή εάν μόνο χρειάζεται η αλλαγή της επιλογής των χρόνων κλήσεων στην οθόνη των εκστρατειών| +Wrapup Seconds - The number of seconds to force an agent to wait before allowing them to receive or dial another call. The timer begins as soon as an agent hangs up on their customer - or in the case of alternate number dialing when the agent finishes the lead - Default is 0 seconds. If the timer runs out before the agent has dispositioned the call, the agent still will NOT move on to the next call until they select a disposition|Δευτερ. Τυλίγματος - Ο αριθμός των δευτερολέπτων που αναγκάζει έναν χειριστή να περιμένει πριν του επιτραπεί να λάβει ή να κάνει άλλη κλήση. Ο χρόνος ξεκινάει μόλις τερματίσει μία κλήση. Προκαθορισμένα είναι 0 δευτερ. Αν ο χρόνος περάσει πριν ο χειριστής τερματίσει την κλήση, δεν θα μετακινηθεί στην άλλη κλήση πριν συμβεί αυτό| +Wrapup Message - This is a campaign-specific message to be displayed on the wrapup screen if wrapup seconds is set|Μήνυμα Τυλίγματος - Αυτό είναι ένα συγκεκριμένο μήνυμα εκστρατείας που εμφανίζεται στην οθόνη τυλίγματος όταν έχει οριστεί ο χρόνος τυλίγματος| +You are not authorized to view this page. Please go back|Δεν έχετε το δικαίωμα για να δείτε την σελίδα. Παρακαλώ επιστρέψτε| +Day and time options will appear once you have created the Call Time Definition|Οι επιλογές Ημέρας και ώρας θα εμφανιστούν όταν θα δημιουργήσετε τον Ορισμό Χρόνου Κλήσης| +State Call Time ID, name and state must be at least 2 characters in length|Το ID Χρόνου Κλήσης Κατάστασης, το όνομα και η κατάσταση πρέπει να είναι τουλάχιστον 2 χαρακτήρες | +Call Time ID and name must be at least 2 characters in length|Το ID Χρόνου Κλήσης και το όνομα πρέπει να είναι τουλάχιστον 2 χαρακτήρες| +Active State Call Time Definitions for this Record|Ενεργοί Ορισμοί Χρόνου Κλήσης Κατάστασης για αυτή την Εγγραφή| +there is already a call time entry with this ID|υπάρχει ήδη μία εγγραφή χρόνου κλήσης με αυτό το ID| +CALL TIMES USING THIS STATE CALL TIME|ΧΡΟΝΟΙ ΚΛΗΣΕΩΝ ΠΟΥ ΧΡΗΣΙΜΟΠΟΙΟΥΝ ΑΥΤΟ ΤΟΝ ΧΡΟΝΟ ΚΛΗΣΗΣ ΚΑΤΑΣΤΑΣΗΣ| +STATE CALL TIME DEFINITION NOT ADDED|Ο ΟΡΙΣΜΟΣ ΧΡΟΝΟΥ ΚΛΗΣΗΣ ΚΑΤΑΣΤΑΣΗΣ ΔΕΝ ΠΡΟΣΤΕΘΗΚΕ| +DELETE THIS STATE CALL TIME DEFINITION|ΔΙΑΓΡΑΦΗ ΟΡΙΣΜΟΥ ΧΡΟΝΟΥ ΚΛΗΣΗΣ ΚΑΤΑΣΤΑΣΗΣ| +Modify Call Time State Definitions List|Τροποποίηση Λίστας Ορισμών Χρόνου Κλήσης Κατάστασης | +CALL TIME DEFINITION NOT ADDED|Ο ΟΡΙΣΜΟΣ ΧΡΟΝΟΥ ΚΛΗΣΗ ΔΕΝ ΔΙΑΓΡΑΦΗΚΕ| +DELETE THIS CALL TIME DEFINITION|ΔΙΑΓΡΑΦΗ ΟΡΙΣΜΟΥ ΧΡΟΝΟΥ ΚΛΗΣΗΣ| +short description of the call time|σύντομη περιγραφή του χρόνου κλήσης| +CAMPAIGNS USING THIS CALL TIME|ΕΚΣΤΑΤΕΙΕΣ ΠΟΥ ΧΡΗΣΙΜΟΠΟΙΟΥΝ ΑΥΤΟ ΤΟΝ ΧΡΟΝΟ ΚΛΗΣΗΣ| +STATE CALL TIME NOT MODIFIED|ΧΡΟΝΟΣ ΚΛΗΣΗΣ ΚΑΤΑΣΤΑΣΗΣ ΔΕΝ ΤΡΟΠΟΠΟΙΗΘΗΚΕ| +CALL TIME NOT MODIFIED|ΧΟΝΟΣ ΚΛΗΣΗΣ ΔΕΝ ΤΡΟΠΟΠΟΙΗΘΗΚΕ| +STATE CALL TIME MODIFIED|ΤΡΟΠΟΠΟΙΗΘΗΚΕ ΧΡΟΝΟΣ ΚΛΗΣΗΣ ΚΑΤΑΣΤΑΣΗΣ| +CALL TIME MODIFIED|ΤΡΟΠΟΠΟΙΗΘΗΚΕ ΧΡΟΝΟΣ ΚΛΗΣΗΣ| +Default Start:|Προκαθορσμένη Εκκίνηση| +Default Stop:|Προκαθορσμένη Παύση:| +Sunday Start:|Κυριακή Εκκίνηση:| +Sunday Stop:|Κυριακή Παύση:| +Monday Start:|Δευτέρα Εκκίνηση:| +Monday Stop:|Δευτέρα Παύση:| +Tuesday Start:|Τρίτη Εκκίνηση:| +Tuesday Stop:|Τρίτη Παύση:| +Wednesday Start:Τετάρτη Εκκίνηση:| +Wednesday Stop:|Τετάρτη Παύση:| +Thursday Start:|Πέμπτη Εκκίνηση:| +Thursday Stop:|Πέμπτη Παύση:| +Friday Start:|Παρασκευή Εκκίνηση:| +Friday Stop:|Παρασκευή Παύση:| +Saturday Start:|Σάββατο Εκκίνηση:| +Saturday Stop:|Σάββατο Παύση:| +State Rule Added|Προσθήκη Κανόνα Κατάστασης| +State Rule Removed|Απομάκρυνση Κανόνα Κατάστασης| +STATE CALL TIME LISTINGS|ΛΙΣΤΕΣ ΧΡΟΝΟΥ ΚΛΗΣΗΣ ΚΑΤΑΣΤΑΣΗΣ| +CALL TIME LISTINGS|ΛΙΣΤΕΣ ΧΡΟΝΟΥ ΚΛΗΣΗΣ| +STATE CALL TIME ADDED|ΠΡΟΣΘΗΚΗ ΧΡΟΝΟΥ ΚΛΗΣΗΣ ΚΑΤΑΣΤΑΣΗΣ| +CALL TIME ADDED|ΠΡΟΣΘΗΚΗ ΧΡΟΝΟΥ ΚΛΗΣΗΣ| +Drop Call Seconds|Δευτερ. Εγκαταλ. Κλήσης| +Use Safe Harbor Message|Χρήση μηνύματος Ασφαλούς Φιλοξενίας| +Safe Harbor Exten|Εσωτ.Σύνδεση Ασφαλούς Φιλοξενίας| +Use Drop Message|Χρήση μηνύματος Εγκατάλειψης| +Drop Exten|Εσωτ. Σύνδεση Εγκατάλειψης| +SIP Listen Version|SIP Εκδοση Παρακολούθησης| +Add New Call Time|Πρόσθεσε Νέο Χρόνο Κλήσης| +Add New State Call Time|Πρόσθεσε Νέο Χρόνο Κλήσης Κατάστασης| +New Call Time Addition|Προσθήκη Νέου Χρόνου Κλήσης| +New State Call Time Addition|Προσθήκη Νέου Χρόνου Κλήσης Κατάστασης| +Modify Call Time|Τροποποίηση Χρόνου Κλήσης| +MODIFY A CALL TIME|ΤΡΟΠΟΠΟΙΗΣΗ ΧΡΟΝΟΥ ΚΛΗΣΗΣ| +Modify State Call Time|Τροποπίηση Χρόνου Κλήσης Κατάστασης| +MODIFY A STATE CALL TIME|ΤΡΟΠΟΠΟΙΗΣΗ ΧΡΟΝΟΥ ΚΛΗΣΗΣ ΚΑΤΑΣΤΑΣΗΣ| +Delete Call Time|Διαγραφή Χρόνου Κλήσης| +Delete State Call Time|Διαγραφή Χρόνου Κλήσης Κατάστασης| +State Call Times||Χρόνοι Κλήσεων Κατάστασης| +State Call Time ID|ID Χρόνου Κλήσης Κατάστασης| +State Call Time Name|Ονομα Χρόνου Κλήσης Κατάτασης| +State Call Time Comments|Σχόλια Χρόνου Κλήσης Κατάστασης| +STATE CALL TIME NOT DELETED|Ο ΧΡΟΝΟΣ ΚΛΗΣΗΣ ΚΑΤΑΣΤΑΣΗΣΔΕΝ ΔΙΑΓΡΑΦΗΚΕ| +CALL TIME DELETION COMPLETED|ΟΛΟΚΛΗΡΩΣΗ ΔΙΑΓΡΑΦΗΣ ΧΡΟΝΟΥ ΚΛΗΣΗΣ| +STATE CALL TIME DELETION COMPLETED|ΟΛΟΚΛΗΡΩΣΗ ΔΙΑΓΡΑΦΗΣ ΧΡΟΝΟΥ ΚΛΗΣΗΣ ΚΑΤΑΣΤΑΣΗΣ| +CALL TIME NOT DELETED|Ο ΧΡΟΝΟΣ ΚΛΗΣΗΣ ΔΕΝ ΔΙΑΓΡΑΦΗΚΕ| +Call Time ID must be at least 2 characters in length|Το ID χρόνου κλήσης πρέπει να είναι τουλάχιστον 2 χαρακτήρες| +STATE CALL TIME DELETION CONFIRMATION|ΕΠΙΒΕΒΑΙΩΣΗ ΔΙΑΓΡΑΦΗΣ ΧΡΟΝΟΥ ΚΛΗΣΗΣ ΚΑΤΑΣΤΑΣΗΣ| +CALL TIME DELETION CONFIRMATION|ΕΠΙΒΕΒΑΙΩΣΗ ΔΙΑΓΡΑΦΗΣ ΧΡΟΝΟΥ ΚΛΗΣΗΣ| +Call Times|Χρόνοι Κλήσεων| +CALL TIMES|ΧΡΟΝΟΙ ΚΛΗΣΕΩΝ| +SHOW CALL TIMES|ΕΜΦΑΝΙΣΗ ΧΡΟΝΩΝ ΚΛΗΣΕΩΝ| +ADD NEW CALL TIME|ΠΡΟΣΘΗΚΗ ΝΕΟΥ ΧΡΟΝΟΥ ΚΛΗΣΗΣ| +SHOW STATE CALL TIMES|ΕΜΦΑΝΙΣΗ ΧΡΟΝΩΝ ΚΛΗΣΕΩΝ ΚΑΤΑΣΤΑΣΕΩΝ| +ADD NEW STATE CALL TIME|ΠΡΟΣΘΗΚΗ ΝΕΟΥ ΧΡΟΝΟΥ ΚΛΗΣΗΣ ΚΑΤΑΣΤΑΣΗΣ| +Call Time ID|ID Χρόνου Κλήσης| +Call Time Name|Ονομα Χρόνου Κλήσης| +Call Time Comments|Σχόλια Χρόνου Κλήσης| +short description of the call time|σύντομη περιγραφή του χρόνου κλήσης| +HIDE|ΑΠΟΚΡΥΨΗ| +SHOW|ΕΜΦΑΝΙΣΗ| +Show Dialable Leads Count|Εμφάνιση Μετρητή Κληθέντων Οδηγών| +Dialable Lead Count|Μετρητής Κληθέντων Οδηγών| +TEST ON CAMPAIGN|ΕΛΕΓΧΟΣ ΣΤΗΝ ΕΚΣΤΡΑΤΕΙΑ| +Wrapup Seconds:|Δευτερ Τυλίγματος:| +Wrapup Message:|Μήνυμα Τυλίγματος:| +Alt Number Dialing|Κλήση Εναλ Αριθμού| +no active lists selected for this campaign|δεν έχουν επιλεχθεί ενεργές λίστες για την εκστρατεία| +Realtime Screen|Πραγματικού Χρόνου Οθόνη| diff --git a/upgrade_1.1.12.sql b/upgrade_1.1.12.sql index 6a92d63..b1aa1cf 100644 --- a/upgrade_1.1.12.sql +++ b/upgrade_1.1.12.sql @@ -110,3 +110,12 @@ drops_onemin_pct VARCHAR(6) default '0' ); ALTER TABLE vicidial_campaigns MODIFY hopper_level INT(8) UNSIGNED default '1'; + +ALTER TABLE vicidial_auto_calls ADD call_type ENUM('IN','OUT') default 'OUT'; + +ALTER TABLE vicidial_campaigns ADD closer_campaigns TEXT default ''; + + + + +