Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - emilec

Pages: 1 [2] 3
16
I have found that if a call passes through more than one queue you will end up with multiple call recordings with the same Asterisk Call ID. For example:
q84-20120321-083849-1332311914.682792.WAV
q91-20120321-084120-1332311914.682792.WAV
When I then look at the call detail and click on the URL I get the following:
http://172.16.1.1/monitor/2012/03/21/q84-20120321-083849-1332311914.682792.WAV%20/var/www/html/monitor/2012/03/21/q91-20120321-084120-1332311914.682792.WAV

Is there a way to return 2 URLs instead? i.e.
http://172.16.1.1/monitor/2012/03/21/q84-20120321-083849-1332311914.682792.WAV
http://172.16.1.1/monitor/2012/03/21/q91-20120321-084120-1332311914.682792.WAV

17
Running QueueMetrics / Re: Retrieval of call recordings
« on: March 29, 2012, 12:29:27 »
Please post the code.

Sharing is caring! :D

18
Thanks!

19
I maintain that the QM admin only needs to be able to reset user passwords and not be able to view them. Users being lax about security is not an excuse to not enforce it.

If you must then give them an option to knowingly turn encryption off, but don't let the the people who care about security suffer at the hands of the those that are ignorant about it.

20
Running QueueMetrics / Re: tomcat memory
« on: March 13, 2012, 06:45:19 »
How big is the report your are drawing? Try reduce the date range.

21
You should test both actions: Agent disconnect / Caller disconnect and then see what is being logged in Asterisk logs as well as queue_log. Could be that some additional dial-plan code is needed for when agent disconnects.

22
Improving QueueMetrics / Passwords in arch_users stored in clear text
« on: February 24, 2012, 16:38:45 »
I did send this off to your support as well and am not really satisfied with the response that because LDAP is supported and some people like to see passwords in the clear for recovery it's ok to store passwords in clear text in the database. It's never a good idea to do this and I am sure most of your customers are not using LDAP. Many people use the same password across systems so exposing their QueueMetrics passwords exposes their passwords on other systems. Often it's not even for the sysadmin to know what's peoples passwords are. All they need to be able to do is reset someones password.

I ask you to consider applying a hash to the password to at least make it a bit more challenging to crack. Password recovery could be done by replacing the hash with a blank value from MySQL CLI to login with no password or insert a hash value of a known password.

23
Running QueueMetrics / Re: tomcat memory
« on: February 24, 2012, 16:28:55 »
Looks to me like you have 32-bit java. Here is what I have on my 64 bit system

# /usr/local/queuemetrics/java/bin/java -version
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03, mixed mode)

What is the output of:
# uname -a

24
Running QueueMetrics / Re: Setting up Tomcat logrotation on CentOS
« on: February 24, 2012, 16:26:27 »
Sure!  Just remember the karma  :P

25
Running QueueMetrics / Re: tomcat memory
« on: February 23, 2012, 14:25:45 »
what is the output of:
# cat /etc/issue
# free
# /usr/local/queuemetrics/java/bin/java -version

26
Running QueueMetrics / Setting up Tomcat logrotation on CentOS
« on: February 23, 2012, 14:20:37 »
This details my attempts at setting up logrotation on CentOS 5 for Tomcat when installed from the Loway repo. I believe this is an oversight in the Loway Tomcat deployment and I have created a feature request for this.

If you would like to setup Tomcat logrotation you can do the following:
# vi /etc/logrotate.d/qm-tomcat6
Code: [Select]
/usr/local/queuemetrics/tomcat/logs/*.log {
    notifempty
    copytruncate
    daily
    size=+1024k   
    rotate 10
    compress
    missingok
}

/usr/local/queuemetrics/tomcat/logs/catalina.out {
    notifempty
    copytruncate
    dateext
    daily
    size=+1024k   
    rotate 10
    compress
    missingok
}

If you want to get fancy you can make it take care of cleaning out temp files as well (or just do it from cron as you would normally)
Code: [Select]
/usr/local/queuemetrics/tomcat/logs/catalina.out {
    notifempty
    copytruncate
    dateext
    daily
    size=+1024k
    rotate 10
    compress
    missingok
postrotate
       /bin/nice /usr/bin/find /usr/local/queuemetrics/tomcat/temp -type f -mtime +10 -exec /bin/rm {} \; > /dev/null
    endscript
}

UPDATE: I have subsequently added size=+1024k to my suggestion as this seems to get past the logrotate.conf issues of only rotating logs weekly so you no longer have to follow the steps below (unless you want all your other system logs to rotate daily as well).

I also took some time to delve into the CentOS logrotation settings and would suggest some of the following changes depending on your needs. I found that even if I set the rotation to daily in qm-tomcat6 logrotate.conf overrides it to weekly.
# vi /etc/logrotate.conf
Set weekly to daily
Code: [Select]
# rotate log files daily
daily

Change the backlogs from 4 week to 14 days
Code: [Select]
# keep 14 days worth of backlogs
rotate 14

I like compressed logs
Code: [Select]
# uncomment this if you want your log files compressed
compress

By default logrotation runs at 4am. You can change this by editing /etc/crontab
Set it to 02:02
Code: [Select]
02 2 * * * root run-parts /etc/cron.daily
Additional reading:
http://articles.slicehost.com/2010/6/30/understanding-logrotate-on-centos-part-1
http://articles.slicehost.com/2010/6/30/understanding-logrotate-on-centos-part-2

Comments, suggestions and improvements welcome!  ;D

27
Improving QueueMetrics / Add logrotation file for Tomcat to Loway repo
« on: February 23, 2012, 13:51:26 »
If you install Tomcat from the CentOS repo it creates a logrotation file which will ensure that logs are rotated weekly. If you install Tomcat from the Loway repo no logrotation file is created. I would like to propose creating a /etc/logrotate.d/qm-tomcat6 file which is installed from the Loway Repo. The naming convention follows that of the tomcat init script Loway creates.

The default tomcat file looks as follows:
/etc/logrotate.d/tomcat5
Code: [Select]
/var/log/tomcat5/catalina.out {
    copytruncate
    weekly
    rotate 52
    compress
    missingok
}

I think the log rotation should be a bit more aggressive and can deal with *.log:
/etc/logrotate.d/qm-tomcat6
Code: [Select]
/usr/local/queuemetrics/tomcat/logs/*.log {
    notifempty
    copytruncate
    daily
    size=+1024k
    rotate 10
    compress
    missingok
}

/usr/local/queuemetrics/tomcat/logs/catalina.out {
    notifempty
    copytruncate
    dateext
    daily
    size=+1024k
    rotate 10
    compress
    missingok
}

I have gone through the manual steps to set this up in this thread: http://forum.queuemetrics.com/index.php?topic=1441.0

28
This problem looks very similar to this topic: http://forum.queuemetrics.com/index.php?topic=861.0

When the DB test starts I get the following, which I expect:
Quote
Checking current version of table: 'agenti_noti'   

Error   Java Error: Errore DB: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Unknown column 'aliases' in 'field list' The required database table 'agenti_noti' is missing some fields. Are you updating from a previous version of QM?   

You then get the warning to backup your database
click next
and then wait.
show processlist on mysql cli shows the schema updates taking place.
After about 10-15min the page fails with a java time-out error and offers you the session restart button which takes you back to the dbtest page which again shows

Quote
Checking current version of table: 'agenti_noti'   

Error   Java Error: Errore DB: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Unknown column 'aliases' in 'field list' The required database table 'agenti_noti' is missing some fields. Are you updating from a previous version of QM?   
but this time clicking next immediately returns
Quote
The database upgrade and repair process was terminated successfully.
Below you can find the performed check details:   
Test performed   Test result   
1.6.1S7   Updating QA forms with issue information   Err   

Looking at the mysql bin logs I have:
Quote
CREATE TEMPORARY TABLE temp_513824 ( myInt INT NOT NULL, myStr CHAR(30) NOT NULL )
INSERT INTO temp_513824 ( myInt, myStr ) VALUES ( '', 'x' )
DROP TEMPORARY TABLE `temp_513824` /* generated by server */
ALTER TABLE `queue_log` CHANGE `call_id` `call_id` VARCHAR( 200 ) NOT NULL
ALTER TABLE `queue_log` CHANGE `data2` `data2` VARCHAR( 200 ) NOT NULL
ALTER TABLE `queue_log` CHANGE `data3` `data3` VARCHAR( 200 ) NOT NULL
ALTER TABLE `queue_log` CHANGE `data4` `data4` VARCHAR( 200 ) NOT NULL
UPDATE dbversion SET version_id = 21
CREATE TABLE `export_calls` (`call_id` int(11) NOT NULL auto_increment,`job_id` int(11) default NULL,`call_status` enum('L','C','X','D') default NULL,`ast_uniqueid` varchar(100) default NULL,`sys_dt_creazione` datetime default NULL,`sys_user_creazione` int(11) default '0',`sys_dt_modifica` datetime default NULL,`sys_user_modifica` int(11) default '0',`sys_optilock` int(11) default '0',`ast_queue` varchar(100) default NULL,`ast_timestart` int(10) unsigned default NULL,`ast_waittime` int(10) unsigned default NULL,`ast_talktime` int(10) unsigned default NULL,`ast_agent` varchar(100) default NULL,`ast_caller` varchar(100) default NULL,`ast_callstatus` varchar(10) default NULL,`ast_queuepos` int(10) unsigned default NULL,`ast_disconnection` varchar(100) default NULL,`ast_attempts` int(10) unsigned default NULL,`ast_stints` int(10) unsigned default NULL,`ast_server` varchar(100) default NULL,`ast_ivr` varchar(100) default NULL,`ast_dnis` varchar(100) default NULL,`job_type_code` smallint(6) NOT NULL,`job_param1` varchar(128) NOT NULL,`job_param2` varchar(128) NOT NULL,`job_param3` varchar(128) NOT NULL,PRIMARY KEY  (`call_id`)) ENGINE=MyISAM
CREATE TABLE `export_jobs` (`job_id` int(11) NOT NULL auto_increment,`job_name` varchar(100) NOT NULL,`job_status` varchar(2) NOT NULL,`security_key` varchar(50) NOT NULL,`sys_dt_creazione` datetime NOT NULL,`sys_user_creazione` int(11) NOT NULL,`sys_dt_modifica` datetime NOT NULL,`sys_user_modifica` int(11) NOT NULL,`sys_optilock` int(11) NOT NULL,`job_folder` varchar(200) NOT NULL,`job_class` varchar(100) NOT NULL,`job_params` varchar(200) NOT NULL,PRIMARY KEY  (`job_id`)) ENGINE=MyISAM
UPDATE dbversion SET version_id = 22
ALTER TABLE broadcast_msg ADD  for_agentid   INT( 11 ) NOT NULL AFTER `for_everyone`
UPDATE dbversion SET version_id = 23
CREATE TABLE `qm_tasks` ( `task_id` int(11) NOT NULL auto_increment, `to_user` int(11) NOT NULL, `to_class` int(11) NOT NULL, `task_type` int(11) NOT NULL, `task_status` tinyint(4) NOT NULL, `related_to` int(11) NOT NULL, `refers_to` int(11) NOT NULL, `message` text NOT NULL, `data1` text, `data2` text, `data3` text, `valid_from` datetime NOT NULL, `expires_on` datetime NOT NULL, `processed_on` datetime NOT NULL, `sys_dt_creazione` datetime NOT NULL, `sys_user_creazione` int(11) NOT NULL, `sys_dt_modifica` datetime NOT NULL, `sys_user_modifica` int(11) NOT NULL, `sys_optilock` int(11) NOT NULL, PRIMARY KEY  (`task_id`), KEY `unread_tasks` (`to_user`,`task_status`), KEY `tasks_class` (`to_class`,`task_status`), KEY `ext_reference` (`refers_to`,`task_type`), KEY `my_own` (`sys_user_creazione`)) ENGINE=MyISAM
UPDATE dbversion SET version_id = 24
ALTER TABLE qa_comments ADD  enabled   BOOL NOT NULL DEFAULT '1' AFTER `comment_id`
UPDATE dbversion SET version_id = 25
CREATE TABLE `qa_forms_items_attr` (`attribute_id` INT( 11 ) NOT NULL AUTO_INCREMENT ,`form_id` INT( 11 ) NOT NULL ,`item_code` VARCHAR( 5 ) NOT NULL ,`attr_type` SET( 'rule', 'weight', 'shortcut' ) NOT NULL ,`attr_value` VARCHAR( 256 ) NOT NULL ,`sys_dt_creazione` DATETIME NOT NULL ,`sys_user_creazione` INT( 11 ) NOT NULL ,`sys_dt_modifica` DATETIME NOT NULL ,`sys_user_modifica` INT( 11 ) NOT NULL ,`sys_optilock` INT( 11 ) NOT NULL ,PRIMARY KEY ( `attribute_id` )) ENGINE = MYISAM
UPDATE dbversion SET version_id = 26
ALTER TABLE qm_tasks ADD  notes   TEXT NOT NULL AFTER `data3`
UPDATE dbversion SET version_id = 27
SET @@session.pseudo_thread_id=12/*!*/;
CREATE TEMPORARY TABLE temp_572536 ( myInt INT NOT NULL, myStr CHAR(30) NOT NULL )
INSERT INTO temp_572536 ( myInt, myStr ) VALUES ( '', 'x' )
DROP TEMPORARY TABLE `temp_572536` /* generated by server */
DELIMITER ;
ROLLBACK /* added by mysqlbinlog */;

And in the general log I have:
Quote
SELECT task_id, to_user, to_class, task_type, task_status, related_to, refers_to, message, data1, data2, data3, notes, valid_from, expires_on, processed_on, sys_dt_creazione, sys_user_creazione, sys_dt_modifica, sys_user_modifica, sys_optilock, pID, pFamily FROM qm_tasks WHERE task_type = 101;
ERROR 1054 (42S22): Unknown column 'pID' in 'field list'

I then manually ran
Quote
alter table qm_tasks add column pID varchar(255) DEFAULT NULL;
alter table qm_tasks add column pFamily varchar(255) DEFAULT NULL;
alter table qm_tasks add KEY `pFamily` (`pFamily`,`pID`);

I then restarted the db test and the upgrade continued and completed successfully
Quote
1.6.1S7 Updating QA forms with issue information Ok
1.6.1S7 Adding qa_forms.seckey_queues field Ok
1.6.1S7 Adding call_status.seckey_queues field Ok
1.6.1S8 Adding export_jobs.job_type_code field Ok
1.6.1S8 Removing job_class field in the export_job table Ok
1.6.1S9 Creating agent_history table Ok
1.6.1S9 Creating QA Performance tracker rules table Ok
1.6.1S9 Creating QA Performance tracker rules table Ok
1.6.1S9 Adding pause_codes.isPayable field Ok
1.6.1S9 Creating Payroll agents notes table Ok
1.6.1S10 Adding new events to agent history table Ok
1.6.1S10 Adding qa_perftrack_rules.averaged field Ok
1.6.1S10 Remove the score target in performance tracker rule table Ok
1.7.0MG Adding qa_data.grader_type field Ok
1.7.0MG Fix Payroll Notes table (step 1) Ok
1.7.0MG Fix Payroll Notes table (step 2) Ok
1.7.0 Adding queue_log.data5 field Ok
1.7.0 Creating table ivr Ok
1.7.0 Creating table dnis Ok
1.7.0 QA: Set sectionweights default to 0 Ok
1.7.2 Adding agenti_noti.aliases field Ok
1.7.2 Creating record_tags table Ok





29
MySQL storage and Qloaderd/Uniloader / Re: qloader 1.21?
« on: July 04, 2011, 10:02:37 »
Thanks for the karma ;)

30
MySQL storage and Qloaderd/Uniloader / Re: qloader 1.21?
« on: July 01, 2011, 14:41:48 »
Fantastic thanks!

Pages: 1 [2] 3