From 2027f218ac9c0f085faf0b1f0f653483c90753b5 Mon Sep 17 00:00:00 2001 From: mattf Date: Fri, 30 Nov 2007 09:12:04 +0000 Subject: [PATCH] SQL bug fixed in AST_manager_listen.php callbacks count and list bug fixed in vicidial.php and vdc_db_query.php Documentation updates git-svn-id: svn://192.168.202.10@737 3d104415-ff17-0410-8863-d5cf3c621b8a --- agc_2-X/trunk/UPGRADE | 5 ++- agc_2-X/trunk/bin/AST_manager_listen.pl | 7 ++-- agc_2-X/trunk/docs/BASE_INSTALL.txt | 7 ++-- agc_2-X/trunk/docs/REQUIRED_APPS_INSTALL.txt | 41 ++++++++++--------- agc_2-X/trunk/docs/SCRATCH_INSTALL.txt | 10 ++--- agc_2-X/trunk/www/agc/vdc_db_query.php | 9 ++-- agc_2-X/trunk/www/agc/vicidial.php | 9 ++-- .../trunk/www/vicidial/AST_CLOSERstats.php | 4 +- 8 files changed, 50 insertions(+), 42 deletions(-) diff --git a/agc_2-X/trunk/UPGRADE b/agc_2-X/trunk/UPGRADE index 8c26bd3d..a15a1432 100644 --- a/agc_2-X/trunk/UPGRADE +++ b/agc_2-X/trunk/UPGRADE @@ -25,7 +25,7 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom chmod 0777 $PATHweb/vicidial/server_reports/ 4. A new set of changes have been made to the statuses sections in the admin.php - pages allowing for categorizing statues and modifyig them without delete. + pages allowing for categorizing statues and modifying them without delete. Also, the gathering of a tally of the statuses in these categories is now available on the timeonVDADall scripts. @@ -84,6 +84,9 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom are now allowed from a list of definable in-groups that you have to set in the campaign detail screen. +18. In the vicidial.php code, you can now modify the size of the elements on the + screen using the BROWSER_HEIGHT and BROWSER_WIDTH variables. + diff --git a/agc_2-X/trunk/bin/AST_manager_listen.pl b/agc_2-X/trunk/bin/AST_manager_listen.pl index a775c151..4a672d43 100644 --- a/agc_2-X/trunk/bin/AST_manager_listen.pl +++ b/agc_2-X/trunk/bin/AST_manager_listen.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl # -# AST_manager_listen.pl version 2.0.1 *DBI-version* +# AST_manager_listen.pl version 2.0.4 *DBI-version* # # Part of the Asterisk Central Queue System (ACQS) # @@ -39,6 +39,7 @@ # 60720-1142 - added keepalive to MySQL connection every 50 seconds # 60814-1733 - added option for no logging to file # 60906-1714 - added updating for special vicidial conference calls +# 71129-2004 - Fixed SQL error # # constants @@ -351,7 +352,7 @@ while($one_day_interval > 0) $channel =~ s/Channel: |\s*$//gi; $uniqueid = $command_line[4]; $uniqueid =~ s/Uniqueid: |\s*$//gi; - $stmtA = "UPDATE vicidial_manager set status='DEAD', channel='$channel' where server_ip = '$server_ip' and uniqueid = '$uniqueid' and callerid NOT LIKE \"DCagcW%"; + $stmtA = "UPDATE vicidial_manager set status='DEAD', channel='$channel' where server_ip = '$server_ip' and uniqueid = '$uniqueid' and callerid NOT LIKE \"DCagcW%\";"; print STDERR "|$stmtA|\n"; my $affected_rows = $dbhA->do($stmtA); @@ -363,7 +364,7 @@ while($one_day_interval > 0) $channel =~ s/Channel: |\s*$//gi; $uniqueid = $command_line[2]; $uniqueid =~ s/Uniqueid: |\s*$//gi; - $stmtA = "UPDATE vicidial_manager set status='DEAD', channel='$channel' where server_ip = '$server_ip' and uniqueid = '$uniqueid' and callerid NOT LIKE \"DCagcW%"; + $stmtA = "UPDATE vicidial_manager set status='DEAD', channel='$channel' where server_ip = '$server_ip' and uniqueid = '$uniqueid' and callerid NOT LIKE \"DCagcW%\";"; print STDERR "|$stmtA|\n"; my $affected_rows = $dbhA->do($stmtA); diff --git a/agc_2-X/trunk/docs/BASE_INSTALL.txt b/agc_2-X/trunk/docs/BASE_INSTALL.txt index c16424e9..c1c838c5 100644 --- a/agc_2-X/trunk/docs/BASE_INSTALL.txt +++ b/agc_2-X/trunk/docs/BASE_INSTALL.txt @@ -267,7 +267,7 @@ use asterisk; ##### make sure on these queries that you change the server_ip "10.10.10.15" ##### to the server IP that you are using -insert into servers (server_id,server_description,server_ip,active,asterisk_version)values('TESTasterisk','Test install of Asterisk server', '10.10.10.15','Y','1.2.18'); +insert into servers (server_id,server_description,server_ip,active,asterisk_version)values('TESTasterisk','Test install of Asterisk server', '10.10.10.15','Y','1.2.24'); insert into server_updater values('10.10.10.15',''); @@ -570,6 +570,7 @@ PERL5LIB="/usr/share/astguiclient/libs"; export PERL5LIB /usr/local/apache2/bin/apachectl start ### load digium zaptel 4xT1 drivers into system +# if using Sangoma card, put wanrouter start in place or modprobes modprobe zaptel modprobe wct4xxp /sbin/ztcfg -vvvvvvvvvvvv @@ -577,8 +578,8 @@ modprobe wct4xxp ### sybsys local login touch /var/lock/subsys/local -### sleep for 20 seconds before launching Asterisk -sleep 20 +### sleep for 10 seconds before launching Asterisk +sleep 10 ### start up asterisk /usr/share/astguiclient/start_asterisk_boot.pl diff --git a/agc_2-X/trunk/docs/REQUIRED_APPS_INSTALL.txt b/agc_2-X/trunk/docs/REQUIRED_APPS_INSTALL.txt index a2a8e4c3..a4ff5259 100644 --- a/agc_2-X/trunk/docs/REQUIRED_APPS_INSTALL.txt +++ b/agc_2-X/trunk/docs/REQUIRED_APPS_INSTALL.txt @@ -1,6 +1,7 @@ # Quick install of required apps v.2.0.4 2007-05-21 # This file is a supplement to the BASE_INSTALL document giving you simple copy/ # paste installation shell commands for required and helper apps for VICIDIAL +# might need: echo '/* Linuxthreads */' >> /usr/include/pthread.h cd /usr/local wget http://mirrors.kernel.org/gnu/make/make-3.81.tar.gz @@ -119,16 +120,6 @@ make make install -cd /usr/local -wget http://ploticus.sourceforge.net/download/pl232src.tar.gz -gunzip pl232src.tar.gz -tar xvf pl232src.tar -cd pl232src/src/ -make clean -make -make install - - cd /usr/local wget http://www.zlib.net/zlib-1.2.3.tar.gz gunzip zlib-1.2.3.tar.gz @@ -157,6 +148,26 @@ make make install +cd /usr/local +wget http://subversion.tigris.org/downloads/subversion-1.3.2.tar.gz +gunzip subversion-1.3.2.tar.gz +tar xvf subversion-1.3.2.tar +cd subversion-1.3.2 +./configure +make +make install + + +cd /usr/local +wget http://ploticus.sourceforge.net/download/pl232src.tar.gz +gunzip pl232src.tar.gz +tar xvf pl232src.tar +cd pl232src/src/ +make clean +make +make install + + cd /usr/local wget http://apache.secsup.org/dist/httpd/httpd-2.0.61.tar.gz gunzip httpd-2.0.61.tar.gz @@ -240,16 +251,6 @@ chmod 0777 /tmp/eaccelerator php -v -cd /usr/local -wget http://subversion.tigris.org/downloads/subversion-1.3.2.tar.gz -gunzip subversion-1.3.2.tar.gz -tar xvf subversion-1.3.2.tar -cd subversion-1.3.2 -./configure -make -make install - - cd /usr/local wget http://superb-east.dl.sourceforge.net/sourceforge/mtop/mtop-0.6.6.tar.gz gunzip mtop-0.6.6.tar.gz diff --git a/agc_2-X/trunk/docs/SCRATCH_INSTALL.txt b/agc_2-X/trunk/docs/SCRATCH_INSTALL.txt index 481e94c3..861071e6 100644 --- a/agc_2-X/trunk/docs/SCRATCH_INSTALL.txt +++ b/agc_2-X/trunk/docs/SCRATCH_INSTALL.txt @@ -73,8 +73,8 @@ itself to be a very uncluttered and stable platform for development. 1. Go to http://www.ultimatebootcd.com/ , download the latest bootcd and burn it to a CD. This will be needed to partition the hard drive prior to -installation of Slackware linux. The latest version as of this writing is 4.0 -(If you have problems with your hardware booting some of the utilities with 4.0 +installation of Slackware linux. The latest version as of this writing is 4.1 +(If you have problems with your hardware booting some of the utilities with 4.1 I suggest trying 1.7, that version has older utilities, but still gets the job done and works on every machine I've tried it on). @@ -88,9 +88,9 @@ partitions: - press F3 to exit and let it do it's thing, this will take an hour or so. 4. Go to http://www.slackware.com/getslack/ to download Slackware linux. -The most recent release as of this writing is 11.0. This release fits on 2 CDs. -Download both installation disks from any close server listed on the download -page and burn them both to CDs. +The most recent release as of this writing is 12.0. This release fits on 3 CDs +or 1 DVD. Download both installation disks from any close server listed on the +download page and burn them both to CDs. 5. Insert Disk 1 of the Slackware installation CD and boot your computer. If you have a simple computer with just an IDE drive just hit enter at the boot: diff --git a/agc_2-X/trunk/www/agc/vdc_db_query.php b/agc_2-X/trunk/www/agc/vdc_db_query.php index de3820c9..129af642 100644 --- a/agc_2-X/trunk/www/agc/vdc_db_query.php +++ b/agc_2-X/trunk/www/agc/vdc_db_query.php @@ -137,10 +137,11 @@ # 71116-1011 - added calls_today count updating of the vicidial_live_agents upon INCALL # 71120-1520 - added LogiNCamPaigns to show only allowed campaigns for agents upon login # 71125-1751 - Added inbound-group default inbound group sending to vicidial.php +# 71129-2025 - restricted callbacks count and list to campaign only # -$version = '2.0.4-64'; -$build = '71125-1751'; +$version = '2.0.4-65'; +$build = '71129-2025'; require("dbconnect.php"); @@ -2471,7 +2472,7 @@ echo "Pause Code has been updated to $status for $agent_log_id\n"; ################################################################################ if ($ACTION == 'CalLBacKLisT') { -$stmt = "select callback_id,lead_id,campaign_id,status,entry_time,callback_time,comments from vicidial_callbacks where recipient='USERONLY' and user='$user' and status NOT IN('INACTIVE','DEAD') order by callback_time;"; +$stmt = "select callback_id,lead_id,campaign_id,status,entry_time,callback_time,comments from vicidial_callbacks where recipient='USERONLY' and user='$user' and campaign_id='$campaign' and status NOT IN('INACTIVE','DEAD') order by callback_time;"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); if ($rslt) {$callbacks_count = mysql_num_rows($rslt);} @@ -2509,7 +2510,7 @@ $loop_count=0; ################################################################################ if ($ACTION == 'CalLBacKCounT') { -$stmt = "select count(*) from vicidial_callbacks where recipient='USERONLY' and user='$user' and status NOT IN('INACTIVE','DEAD');"; +$stmt = "select count(*) from vicidial_callbacks where recipient='USERONLY' and user='$user' and campaign_id='$campaign' and status NOT IN('INACTIVE','DEAD');"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); diff --git a/agc_2-X/trunk/www/agc/vicidial.php b/agc_2-X/trunk/www/agc/vicidial.php index 6a1facec..ccd81ed1 100644 --- a/agc_2-X/trunk/www/agc/vicidial.php +++ b/agc_2-X/trunk/www/agc/vicidial.php @@ -170,10 +170,11 @@ # 71122-0256 - Added auto-pause notification # 71125-1751 - Changed Transfer section to allow for selection of in-groups to send calls to # 71127-0408 - Added height and width settings for easier modification of screen size +# 71129-2025 - restricted callbacks count and list to campaign only # -$version = '2.0.4-141'; -$build = '71127-0408'; +$version = '2.0.4-142'; +$build = '71129-2025'; require("dbconnect.php"); @@ -2886,7 +2887,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - CBcount_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=CalLBacKCounT&format=text"; + CBcount_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=CalLBacKCounT&campaign=" + campaign + "&format=text"; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(CBcount_query); @@ -2940,7 +2941,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - var CBlist_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=CalLBacKLisT&format=text"; + var CBlist_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=CalLBacKLisT&campaign=" + campaign + "&format=text"; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(CBlist_query); diff --git a/agc_2-X/trunk/www/vicidial/AST_CLOSERstats.php b/agc_2-X/trunk/www/vicidial/AST_CLOSERstats.php index 8bf29efa..ec53f93f 100644 --- a/agc_2-X/trunk/www/vicidial/AST_CLOSERstats.php +++ b/agc_2-X/trunk/www/vicidial/AST_CLOSERstats.php @@ -350,7 +350,7 @@ while ($i < $users_to_print) $USERtotTALK_S = round($USERtotTALK_S, 0); if ($USERtotTALK_S < 10) {$USERtotTALK_S = "0$USERtotTALK_S";} $USERtotTALK_MS = "$USERtotTALK_M_int:$USERtotTALK_S"; - $USERtotTALK_MS = sprintf("%6s", $USERtotTALK_MS); + $USERtotTALK_MS = sprintf("%8s", $USERtotTALK_MS); $USERavgTALK_M = ($USERavgTALK / 60); $USERavgTALK_M = round($USERavgTALK_M, 2); @@ -362,7 +362,7 @@ while ($i < $users_to_print) $USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S"; $USERavgTALK_MS = sprintf("%6s", $USERavgTALK_MS); - echo "| $user - $full_name | $USERcalls | $USERtotTALK_MS | $USERavgTALK_MS |\n"; + echo "| $user - $full_name | $USERcalls | $USERtotTALK_MS | $USERavgTALK_MS |\n"; $i++; }