Open Source Training Seminar FreePBX Paid Support

Ticket #1612 (closed Bugs: duplicate)

Opened 2 years ago

Last modified 1 year ago

Modules should store recording ID - not recording file list

Reported by: jcalvert Assigned to:
Priority: blocker Milestone: 2.3
Component: System Recordings Version: 2.3-branch
Keywords: Cc:
Confirmation: SVN Revision (if applicable):
Backend Engine: All Backend Engine Version:

Description (Last modified by naftali5)

Two problems

  • When selecting multiple recordings, the strings can get long, and some of the tables have a 150 character limit, which is easily exceeded. When this happens, the recording is not played back properly, and the next time you view the page, the dropdown list won't show any recording selected.
  • When you change a system recording, it is NOT updated in all the other modules that use that recording, until you go into the items that use them, reselect the recording, and press 'save' again.

This is a fairly serious design oversight, and will require updating every module in order to fix it.

Note: This is not an oversight in the recordings module. It offers the functionality, it just wasn't used by other modules.

function recordings_list() {//returns array which includes id and display (also includes filenames which may be the reason the mistake was made)
function recordings_get($id) {//returns the entire row for the specified id
function recordings_get_file($id) {//returns the filename blob for the specified id.. should ONLY be used in get_config() NEVER stored in DB

we just have to slowly change the other modules

The following are the modules that need to be updated:

1) queues

2) ivr

3) parking

4) findmefollow

5) conferences

6) ringgroups

7) announcement

Change History

12/28/06 13:52:03 changed by naftali5

not 26. the field which stores the announcements is

announcement  	varchar(255)

you have a limit of 255 chars. this probably includes a comma between each. make shorter names. :) as a workaround you can probably go into phpMyAdmin and change the field size to higher than 255.

12/28/06 14:31:18 changed by jcalvert

But I'm not using Announcements, I'm using System Recordings. And the field is a blob.

01/02/07 08:08:01 changed by jcalvert

The MySQL size limit on VARCHAR() is 255 characters.

01/02/07 09:24:37 changed by jcalvert

I've verified it is a 255 character limit. The filename field in the recordings table is a blob, but when it's value is being applied in an IVR, it is truncated to 255 characters. Changing the recording field in the announcement table to a blob does not correct the issue.

01/02/07 14:34:57 changed by gregmac

This is a deeper problem - all the modules should only be storing the recording id, not the recording filenames. (The big problem is that if you change a recording, it doesn't get changed in all the modules using it until you re-save it).

If this is fixed, the modules just have to store the id (int) so it doesn't matter if they use varchar vs blob - it only matters in the recordings module.

01/02/07 16:04:59 changed by RobThomas

  • version changed from 2.2rc1 to SVN-HEAD.
  • milestone set to 2.3.

This may be fixed in 2.2.1, but won't make it into 2.2. Definately will be fixed in 2.3.

01/08/07 11:46:49 changed by

  • milestone deleted.

Milestone 2.3 deleted

01/08/07 11:54:36 changed by vgster

  • milestone set to 2.3.

02/02/07 12:47:15 changed by gregmac

  • priority changed from minor to blocker.
  • summary changed from System Recordings only allows 26 files in a single recording to Modules should store recording ID - not recording file list.
  • description changed.
  • svn_rev changed.
  • engine_version changed.

#1734 marked as dupe

02/04/07 09:13:11 changed by naftali5

  • description changed.

this is a list of every time the recordings_list function is called

2.3/queues/page.queues.php:<?php if(function_exists('recordings_list')) { //only include if recordings is enabled?>
2.3/queues/page.queues.php:				$tresults = recordings_list();
2.3/queues/page.queues.php:if(function_exists('recordings_list')) { //only include if recordings is enabled ?>
2.3/queues/page.queues.php:				$tresults = recordings_list();
2.3/ivr/page.ivr.php:	if(function_exists('recordings_list')) { //only include if recordings is enabled ?>
2.3/ivr/page.ivr.php:                                $tresults = recordings_list();
2.3/parking/page.parking.php:<?php if(function_exists('recordings_list')) { //only include if recordings is enabled?>
2.3/parking/page.parking.php:				$tresults = recordings_list();
2.3/findmefollow/page.findmefollow.php:		<td> <?php if (!function_exists('recordings_list')) { echo _("System Recordings not installed. Option Disabled"); } else { ?>
2.3/findmefollow/page.findmefollow.php:<?php if(function_exists('recordings_list')) { //only include if recordings is enabled?>
2.3/findmefollow/page.findmefollow.php:				$tresults = recordings_list();
2.3/findmefollow/page.findmefollow.php:				$tresults = recordings_list();
2.3/findmefollow/page.findmefollow.php:<?php if(function_exists('recordings_list')) { //only include if recordings is enabled?>
2.3/findmefollow/page.findmefollow.php:				$tresults = recordings_list();
2.3/conferences/page.conferences.php:<?php if(function_exists('recordings_list')) { //only include if recordings is enabled?>
2.3/conferences/page.conferences.php:				$tresults = recordings_list();
2.3/ringgroups/page.ringgroups.php:<?php if(function_exists('recordings_list')) { //only include if recordings is enabled?>
2.3/ringgroups/page.ringgroups.php:				$tresults = recordings_list();
2.3/ringgroups/page.ringgroups.php:		<td> <?php if (!function_exists('recordings_list')) { echo _("System Recordings not installed. Option Disabled"); } else { ?>
2.3/ringgroups/page.ringgroups.php:<?php if(function_exists('recordings_list')) { //only include if recordings is enabled?>
2.3/ringgroups/page.ringgroups.php:				$tresults = recordings_list();
2.3/ringgroups/page.ringgroups.php:				$tresults = recordings_list();
2.3/announcement/page.announcement.php:<?php if(function_exists('recordings_list')) { //only include if recordings is enabled?>
2.3/announcement/page.announcement.php:				$tresults = recordings_list();

05/06/07 02:55:24 changed by lazytt

see also #1900

06/25/07 05:21:06 changed by p_lindheimer

  • version changed from SVN-HEAD to 2.3-branch.

06/26/07 16:44:47 changed by p_lindheimer

from quick scan, it looks like we should be fixing the modules to store the id and not the string? is that the case? If so - we should close this and file bugs against each module that needs to be changed, at least until we come up with a proper architecture in the future.

please comment.

07/05/07 12:32:16 changed by gregmac

Yes, every module should be storing the id, not the string.

From a database schema point of view, nothing NEEDS to be changed, though possibly we should be changing the field type in each table to an INT?

When this change is implemented, there has to be an upgrade script in each module that migrates everything over:

  • Check for an existing recording that matches the stored recording string
    • if there is one, simply change the value to be the id of that recording
    • If there is no match, create a new recording entry that uses that string, and then insert the newly-generated id into the value of the module's table. Probably should add " (auto generated)" to the end or something, to identify it was created.

This is important because as mentioned in the original report, if you change a recording now, it doesn't get changed in all the modules that use it, so it is very possible that everything is out of sync.

This should probably go in for 2.3. It can be done one module at a time.

07/05/07 12:43:14 changed by p_lindheimer

then this sounds like a per module bug, should we close this and open one against every ofending module?

07/09/07 15:34:01 changed by p_lindheimer

  • status changed from new to closed.
  • resolution set to duplicate.

reassigned to each module that requires changes:
r2063, r2064, r2065, r2066, r2067, r2068, r2069

07/09/07 15:35:17 changed by p_lindheimer

oops: those should be ticket numbers:
#2063, #2064, #2065, #2066, #2067, #2068, #2069

Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads