Well, thanks to the developers’ changes in 2.10 and help from Tony, I have finally been able to get my recordings sorted and stored by year, month, and day. This has been a longtime desire of mine, and the speed of recording retrievals has increased my multiple orders of magnitude. Thank you!!!
It figures that the one release of FreePBX I didn’t adopt early is the one that fixes a major problem of mine…
Anyhow, this brings me to another nice new feature, and a new question. Specifically, for call recordings made since the upgrade to 2.10, the CDR report contains a nice link directly to the recording (another long time request of mine). It is excellent, and looks like this (note the speaker icons in the ‘Recording’ column):
Another nice touch is that, the developers also included filename information in the CDR report for recordings made prior to the 2.10 upgrade. It looks like this (note the text in the “Userfield” column):
Digging into the CDR table in MySQL, it appears that the pre-2.10 recording information is stored in the ‘userfield’ column, and the post 2.10 recording information is stored in the ‘recordingfile’ column.
Since I have moved all of my old recordings into the same directory structure as the new recordings, my guess is that the recording links would show up and work for the old recordings if I were to populate the ‘recordingfile’ column with the filename (based on the ‘userfield’ data).
Before I start building something on my own, can anyone confirm that my assumptions are correct?
Has anyone built a tool to do this, or perhaps there is a built-in method?
You can not update the older information. Because it is missing things we have no way of getting that we only know about at the time of the call. Sorry
Can you provide details about what the CDR report uses to determine if it should include a recording link?
I understand that the automated update scripts cannot do what I am suggesting, but I am looking to do this on my own, in the background, in MySQL (or wherever).
It looks like this little snippet in /var/www/html/admin/modules/cdr/functions.inc.php is responsible for creating the link, but I am still scratching my head about why it does not create a link for a CDR record that I update to include the recordingfile information.
/var/www/html/admin/modules/cdr/page.cdr.php includes this little bit, which seems to me to indicate that, if the cdr table is properly updated and the file actually exists, it should create a link.
Perhaps a permissions inssue, then?
Tom
/* If CDR claims there is a call recording we make sure there is and the file is there, or we set it blank. In some cases
* a recording may have been planned but not done so this assures there are no dead links.
*/
if ($row['recordingfile']) {
$rec_parts = explode('-',$row['recordingfile']);
$fyear = substr($rec_parts[3],0,4);
$fmonth = substr($rec_parts[3],4,2);
$fday = substr($rec_parts[3],6,2);
$monitor_base = $amp_conf['MIXMON_DIR'] ? $amp_conf['MIXMON_DIR'] : $amp_conf['ASTSPOOLDIR'] . '/monitor';
$recordingfile = "$monitor_base/$fyear/$fmonth/$fday/" . $row['recordingfile'];
if (!file_exists($recordingfile)) {
$recordingfile = '';
}
} else {
$recordingfile = '';
}