Author Topic: QM, FreePBX and Recordings stored by day  (Read 7947 times)

trymes

  • Jr. Member
  • **
  • Posts: 84
  • Karma: 0
    • View Profile
QM, FreePBX and Recordings stored by day
« on: November 29, 2012, 16:32:28 »
I thought I would post a summary of a major improvement that the FreePBX 2.10 upgrade has allowed, one that makes a major impact on QM users with many recordings.

Specifically, we have had our recordings all dumped into the /var/spool/monitor directory for years, and the number of recordings was causing a HUGE performance problem when retrieving the calls from the QM interface. Specifically, I wanted to implement the solution found at this link. Unfortunately, there was no good way to implement this with FreePBX 2.09 or earlier, so I was looking at crafting a script to run and place calls in folders after the fact.

Luckily, it turns out that the folks at FreePBX changed the call recording configuration for version 2.10, so now calls are automatically being placed in folders by year, month, and day. After moving all of our existing recordings into similar folders, I changed the settings in the configuration properties file, restarted QM, and was thrilled that the recordings now download almost instantaneously.

Please note, though, that the instructions in the link above will not work for FreePBX 2.10. First off, you do not need to make any changes to the dialplan, as the queue recordings are automatically stored by year, month, and day when running 2.10. Secondly, the chances to configuration.properties are slightly different.

Specifically, make these changes in configuration.properties:
Code: [Select]
audio.server=it.loway.app.queuemetrics.callListen.listeners.LocalFilesByDay
default.monitored_calls=/var/spool/asterisk/monitor/%YY/%MM/%DD/

I hope that information is helpful to someone out there.

Tom

PS: Now do I have to do anything to ensure that these settings are preserved when updating?

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: QM, FreePBX and Recordings stored by day
« Reply #1 on: November 30, 2012, 09:24:52 »
That's great news!
Thanks for sharing!  ;D


chesstrian

  • Newbie
  • *
  • Posts: 26
  • Karma: 0
    • View Profile
    • Email
Re: QM, FreePBX and Recordings stored by day
« Reply #2 on: April 29, 2013, 18:38:12 »
This is not working for me, are there any mandatory additional change?.  :-[

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: QM, FreePBX and Recordings stored by day
« Reply #3 on: April 30, 2013, 11:15:00 »
What is it that's not working - the storage (in this case you should ask on FreePBX forums) or QM reading them back?

chesstrian

  • Newbie
  • *
  • Posts: 26
  • Karma: 0
    • View Profile
    • Email
Re: QM, FreePBX and Recordings stored by day
« Reply #4 on: April 30, 2013, 15:42:50 »
Storage is working, but Queuemetrics doesn't recognize regex in the name of the directory.

Queuemetrics Logs:

Apr 30, 2013 8:41:28 AM it.loway.tpf.U listFiles
SEVERE: The directory '/var/spool/asterisk/monitor/%YY/%MM/%DD/' might not exist
Apr 30, 2013 8:41:28 AM it.loway.tpf.U listFiles
SEVERE: The directory '/var/spool/asterisk/monitor/%YY/%MM/%DD/' might not exist
Apr 30, 2013 8:41:28 AM it.loway.tpf.U listFiles
SEVERE: The directory '/var/spool/asterisk/monitor/%YY/%MM/%DD/' might not exist

but there are records in /var/spool/asterisk/monitor/2013/04/30/. :(

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: QM, FreePBX and Recordings stored by day
« Reply #5 on: April 30, 2013, 22:12:56 »
Looks like you did not set:

Code: [Select]
audio.server=it.loway.app.queuemetrics.callListen.listeners.LocalFilesByDay
Or maybe you did, but have a different version setting in the same config file :)

chesstrian

  • Newbie
  • *
  • Posts: 26
  • Karma: 0
    • View Profile
    • Email
Re: QM, FreePBX and Recordings stored by day
« Reply #6 on: April 30, 2013, 23:20:54 »
It doesn't work, thanks anyway.  :'(

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: QM, FreePBX and Recordings stored by day
« Reply #7 on: May 02, 2013, 11:25:33 »
What do you get on the logs? does it declare to be "LocalFilesByDay"?

chesstrian

  • Newbie
  • *
  • Posts: 26
  • Karma: 0
    • View Profile
    • Email
Re: QM, FreePBX and Recordings stored by day
« Reply #8 on: May 02, 2013, 15:42:58 »
Storage is working, but Queuemetrics doesn't recognize regex in the name of the directory.

Queuemetrics Logs:

Apr 30, 2013 8:41:28 AM it.loway.tpf.U listFiles
SEVERE: The directory '/var/spool/asterisk/monitor/%YY/%MM/%DD/' might not exist
Apr 30, 2013 8:41:28 AM it.loway.tpf.U listFiles
SEVERE: The directory '/var/spool/asterisk/monitor/%YY/%MM/%DD/' might not exist
Apr 30, 2013 8:41:28 AM it.loway.tpf.U listFiles
SEVERE: The directory '/var/spool/asterisk/monitor/%YY/%MM/%DD/' might not exist

but there are records in /var/spool/asterisk/monitor/2013/04/30/. :(

This is my log, i haven't logs about "LocalFilesByDay" is fully registered, how can i see it?

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: QM, FreePBX and Recordings stored by day
« Reply #9 on: May 03, 2013, 08:44:04 »
Check what you have under DBTEST - > View config

chesstrian

  • Newbie
  • *
  • Posts: 26
  • Karma: 0
    • View Profile
    • Email
Re: QM, FreePBX and Recordings stored by day
« Reply #10 on: May 03, 2013, 16:50:31 »
Now it works  ;D. Thank you very much!

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: QM, FreePBX and Recordings stored by day
« Reply #11 on: May 06, 2013, 11:10:35 »
What was the issue?

chesstrian

  • Newbie
  • *
  • Posts: 26
  • Karma: 0
    • View Profile
    • Email
Re: QM, FreePBX and Recordings stored by day
« Reply #12 on: May 14, 2013, 22:13:26 »
It was permissions, tomcat user needs to be in asterisk group.  :)

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: QM, FreePBX and Recordings stored by day
« Reply #13 on: May 16, 2013, 09:36:23 »
 :D