Ticket #3224 (closed Bugs: fixed)

Opened 2 years ago

Last modified 2 years ago

asteriskcdrdb is hard coded in scripts and configs

Reported by: pshempel Assigned to:
Priority: minor Milestone: 2.6
Component: Asterisk Configuration Version: 2.5-branch
Keywords: asteriskcdrdb Cc:
Confirmation: Confirmed SVN Revision (if applicable):
Backend Engine: All Backend Engine Version:

Description

In archive_recordings and ampbackup.pl both have hard coded database instead of pulling them from amportal.conf using CDRDBNAME as the other scripts do.

Change History

09/21/08 00:20:58 changed by p_lindheimer

  • priority changed from blocker to minor.
  • confirmation changed from Unreviewed to Confirmed.

if you want to attach patch we can probably get this addressed quickly.

09/22/08 16:09:16 changed by p_lindheimer

  • milestone changed from 2.5 to 3.0.

09/24/08 02:00:31 changed by mickecarlsson

Please test this patch for archive_recordings:

Index: archive_recordings
===================================================================
--- archive_recordings  (revision 6834)
+++ archive_recordings  (working copy)
@@ -47,6 +47,7 @@
                'USECATEGORIES' => true,
                'ASTETCDIR' => '/etc/asterisk',
                'ASTMANAGERPORT' => '5038',
+               'CDRDBNAME' => 'asteriskcdrdb',
                );
        // boolean values, will be converted to true/false
        // "yes", "true", 1 (case-insensitive) will be treated as true, everything else is false
@@ -437,7 +438,7 @@
 $db_pass = $amp_conf["AMPDBPASS"];
 $db_host = $amp_conf["AMPDBHOST"];
 $db_engine = $amp_conf["AMPDBENGINE"];
-$db_name = 'asteriskcdrdb';
+$db_name = amp_conf["CDRDBNAME"];

 $datasource = $db_engine.'://'.$db_user.':'.$db_pass.'@'.$db_host.'/'.$db_name;

09/24/08 02:47:12 changed by mickecarlsson

And test this for the ampbackup.pl

Index: ampbackup.pl
===================================================================
--- ampbackup.pl        (revision 6834)
+++ ampbackup.pl        (working copy)
@@ -62,6 +62,8 @@
 $User_Preferences{"AMPWEBROOT"} = "/var/www/html";
 $User_Preferences{"ASTETCDIR"} = "/etc/asterisk";

+$User_Preferences{"CDRDBNAME"} = "asteriskcdrdb";
+
 $User_Preferences{"AMPPROVROOT"} = "";
 $User_Preferences{"AMPPROVEXCLUDE"} = "";

@@ -113,6 +115,8 @@
 $hostname = $User_Preferences{"AMPDBHOST"};
 # the WEB ROOT directory
 $webroot = $User_Preferences{"AMPWEBROOT"};
+# CDR Database
+$cdrdatabase = $User_Preferences{"CDRDBNAME"};

 # Provisioning root(s) and exclude list, if phone configuratoins should be backed up
 #
@@ -205,7 +209,7 @@
        }
        if ( $Backup_CDR eq "yes" ){
                system ("/bin/tar -Pcz -f /tmp/ampbackups.$Stamp/cdr.tar.gz $webroot/admin/cdr");
-               system ("mysqldump --add-drop-table -h $hostname -u $username -p$password --database asteriskcdrdb > /tmp/ampbackups.$Stamp/asteriskcdr.sql");
+               system ("mysqldump --add-drop-table -h $hostname -u $username -p$password --database $cdrdatabase > /tmp/ampbackups.$Stamp/asteriskcdr.sql");
        }
        if ( $Backup_FOP eq "yes" ){
                system ("/bin/tar -Pcz -f /tmp/ampbackups.$Stamp/fop.tar.gz $webroot/panel");

NOTE!. The above patches are for 2.5 only!!

09/24/08 05:00:02 changed by mbrevda

mickecarlsson: these scripts need to be moved to php eventually (*hint**hont)

12/06/08 06:07:18 changed by mickecarlsson

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

(In [7310]) Closes #3224 removes hard coded database name

01/06/09 13:58:59 changed by p_lindheimer

(In [7342]) Merged revisions 7177,7179-7185,7191-7201,7204-7211,7213-7221,7223-7226,7228-7249,7252-7260,7262-7272,7279-7285,7289-7291,7294-7295,7297-7312,7317-7320,7322-7331,7333-7340 via svnmerge from http://svn.freepbx.org/modules/branches/2.6

........

r7177 | p_lindheimer | 2008-10-29 10:51:38 -0700 (Wed, 29 Oct 2008) | 1 line

Auto Check-in of any outstanding patches

........

r7196 | mickecarlsson | 2008-10-30 23:25:31 -0700 (Thu, 30 Oct 2008) | 1 line

Fixed type in code fro fw_fop

........

r7228 | mickecarlsson | 2008-11-05 09:14:56 -0800 (Wed, 05 Nov 2008) | 1 line

Changed some enclosed text string with proper enclosures so that localization with apostrophe will work

........

r7255 | mbrevda | 2008-11-12 07:57:37 -0800 (Wed, 12 Nov 2008) | 1 line

ref #3358

........

r7300 | mickecarlsson | 2008-11-23 01:15:27 -0800 (Sun, 23 Nov 2008) | 1 line

Fixes #3409, dashboard display wrong statistics and color when disk storage is above 1Tb

........

r7301 | mickecarlsson | 2008-11-23 06:11:19 -0800 (Sun, 23 Nov 2008) | 1 line

Enclosed text strings for translation. Updated .pot file and swedish language

........

r7302 | mickecarlsson | 2008-11-23 06:26:47 -0800 (Sun, 23 Nov 2008) | 1 line

Enclosed text string for translation in core

........

r7306 | mickecarlsson | 2008-12-01 08:45:04 -0800 (Mon, 01 Dec 2008) | 1 line

Closes #932 adds permit/deny to sip and iax devices

........

r7307 | mickecarlsson | 2008-12-01 09:00:09 -0800 (Mon, 01 Dec 2008) | 1 line

Adds default 0.0.0.0/0.0.0.0 in deny and permit for sip and iax devices

........

r7308 | mickecarlsson | 2008-12-03 22:20:02 -0800 (Wed, 03 Dec 2008) | 1 line

Fixes #3426, sets code to follow tool tip. Thank you ryand

........

r7310 | mickecarlsson | 2008-12-06 06:07:17 -0800 (Sat, 06 Dec 2008) | 1 line

Closes #3224 removes hard coded database name

........

r7317 | mickecarlsson | 2008-12-15 10:55:17 -0800 (Mon, 15 Dec 2008) | 1 line

Closes #3443 adding check for uppercase file extensions

........

r7320 | ethans | 2008-12-17 16:31:52 -0800 (Wed, 17 Dec 2008) | 3 lines

Adds hook support into IVR page

........

r7322 | mickecarlsson | 2008-12-17 22:08:41 -0800 (Wed, 17 Dec 2008) | 1 line

Closes 3448 adding check for server side DND in normal paging

........

r7340 | mickecarlsson | 2008-12-30 14:22:14 -0800 (Tue, 30 Dec 2008) | 1 line

Closes #3448 finally fixes the DND in paging. Thank you jjshoe

........