Ticket #3678 (closed Bugs: fixed)

Opened 10 months ago

Last modified 2 months ago

2.5.1.5 Voicemai.conf Backwards Compatibility Issue

Reported by: acumensystems Assigned to:
Priority: crash Milestone: 2.6
Component: Voicemail Version: 2.5-branch
Keywords: Cc:
Confirmation: Confirmed SVN Revision (if applicable):
Backend Engine: All Backend Engine Version: 1.6.0.1

Description

When upgrading to Asterisk 1.6 and FreePBX 2.5.1.5 we noticed that as soon as changes were made to voicemail accounts the config files were trashed. Specifically, voicemail.conf no longer had any entries in [default], and all the user entries were duplicated into vm_general.inc and vm_email.inc!

It seems although the original voicemail.conf.template contains the statements:

#include vm_general.inc
#include vm_email.inc

Our versioned showed

#include "vm_general.inc"
#include "vm_email.inc"

This is valid config, and was clearly updated automatically by Asterisk or FreePBX as we have not had need to edit it.

These quotes led to the creation of those files WITH the quotes in their name, despite FreePBX 2.4 working fine with this configuration.

It would be good if we could look at allowing quotes around filenames within the syntax parser of FreePBX, as this was a horrible issue to track!

Thanks guys!

Change History

07/29/09 05:17:51 changed by acumensystems

Guys - any thoughts on this?

It would be good to clarify possible causes for this issue, to mitigate issues with any future such upgrades.

Cheers, Leo

07/29/09 07:11:00 changed by p_lindheimer

Can you clarify. Are you saying when the quotes were added in the #include statements, that it began to work properly? But when they were removed, your main voicemail.conf file was trashed? Or is it the opposite - when the quotes are there, FreePBX ends up trashing your file leaving [default] blank?

We saw an issue the other day that seemed to be related to this, also with 1.6, so trying to understand that so we can get to root cause (or why all the entries were missing).

07/29/09 07:27:01 changed by acumensystems

Phillipe

The version on this system *did* have quotes around the included file names. What this led to was these _included_ files being created on the system, but with two issues:

1. their contents were the intended contents of the voicemail.conf users table 2. their file names actually included the quotes on the filesystem

However, due to other corrupt lines in the file, it wasn't being parsed and so no voicemail accounts were usable.

If i could have done more testing at the time, I would have. Unfortunately it was a production system, and none of our development systems did this during upgrade.

Whatever is parsing voicemail.conf needs to be successful i think whether or not included files have quotes around them.

I restored voicemail configuration from backup, and removed these quotes, and things seemed fine. What this seems to have led to in the long run is numerous voicemail accounts not being symlinked, and so MWI not working across all users, ala:

http://www.freepbx.org/forum/freepbx/users/sip-notify-messages-not-working-because-no-symbolic-link-in-var-spool-asterisk-v

Good luck finding this, let me know if you need any more info. Leo

07/29/09 07:32:26 changed by p_lindheimer

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

OK I ran a test and modified my voicemail.conf by adding the quotes and saving an extension config so I answered my own question (just before your reply). Looks like the FreePBX parser needs some help to address this. (Since I'll take it the config is valid per your comment, not having checked myself). Will need to also look at the ARI to see if it has the same issues or not...

08/02/09 11:59:26 changed by pnlarsson

  • engine changed from Asterisk 1.6 to All.

A quick and dirty fix is to add:

$matches[3] = str_replace('"', '', $matches[3]);

after // include another file (around line 1800) in admin/functions.inc.php

but i have two function voicemailconf() :

lisa:/var/www/lisa/htdocs# grep "function write_voicemailconf" . -R
 ./admin/modules/framework/htdocs/admin/functions.inc.php:function write_voicemailconf($filename, &$vmconf, &$section, $iteration = 0) {
 ./admin/functions.inc.php:function write_voicemailconf($filename, &$vmconf, &$section, $iteration = 0) {

It's using the function in admin - it took a while to figure that out (xdebug - trace is a god thing). What the other is used for I don't know, but that is another issue

08/02/09 13:43:27 changed by pnlarsson

ok, that messed up vm_email.inc and vm_general.inc becouse they where not read in the parse_voicemailconf function.

Adding this to line 1712 (after: // include another file) solved that issue.

				$matches[1] = str_replace('"', '', $matches[1]);

BUT if your system has been hosed by the above bug - then you would have to manually restore the vm_general.inc and vm_email.inc to what they where before.

08/02/09 14:37:45 changed by p_lindheimer

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

(In [7907]) fixes #3678 - allowing single quotes around filename, and also another issue where where \! was breaking amportal.conf parsing in variables (like db password)

08/02/09 14:47:50 changed by p_lindheimer

(In [7908]) fixes #3678 forgot second line

08/02/09 14:54:50 changed by acumensystems

Niklas/Phillipe - that looks good to me, will report back if testing shows this to recur. Thanks again!

08/02/09 15:14:16 changed by p_lindheimer

(In [7909]) revert r7907, r7908 except amportal conf parsing fix, this appears to break parsing and needs further investigation, re #3678

08/02/09 15:14:41 changed by p_lindheimer

  • status changed from closed to reopened.
  • resolution deleted.

09/05/09 17:35:57 changed by p_lindheimer

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

(In [8280]) fixes #3678 parse voicemail includes even when they have single/double quotes

01/13/10 12:59:04 changed by p_lindheimer

(In [8599]) Merged revisions 7910,7912-8166,8168-8338,8340-8371,8373-8405,8407-8598 via svnmerge from http://svn.freepbx.org/freepbx/branches/2.6

........

r7910 | p_lindheimer | 2009-08-02 18:36:37 -0700 (Sun, 02 Aug 2009) | 1 line

branch trunk to 2.6

........

r7978 | p_lindheimer | 2009-08-07 15:40:44 -0700 (Fri, 07 Aug 2009) | 1 line

update packed js library

........

r7981 | p_lindheimer | 2009-08-07 15:52:01 -0700 (Fri, 07 Aug 2009) | 1 line

Creating release 2.6.0beta1

........

r7992 | p_lindheimer | 2009-08-07 18:58:23 -0700 (Fri, 07 Aug 2009) | 1 line

added trunk migration code to table.php, seems to be needed

........

r8006 | p_lindheimer | 2009-08-07 20:11:49 -0700 (Fri, 07 Aug 2009) | 1 line

add sql() function definition if not there

........

r8019 | p_lindheimer | 2009-08-09 17:10:47 -0700 (Sun, 09 Aug 2009) | 1 line

forgot to change moduleauthor to modulepublisher in css, need to roll the tarball one more time :(

........

r8022 | p_lindheimer | 2009-08-09 21:13:58 -0700 (Sun, 09 Aug 2009) | 1 line

2.6 highlights added to CHANGES

........

r8025 | p_lindheimer | 2009-08-09 21:23:46 -0700 (Sun, 09 Aug 2009) | 1 line

Creating release 2.6.0beta1

........

r8043 | p_lindheimer | 2009-08-14 18:05:20 -0700 (Fri, 14 Aug 2009) | 1 line

adds sort param used by new printextensions

........

r8046 | p_lindheimer | 2009-08-15 11:43:14 -0700 (Sat, 15 Aug 2009) | 1 line

Creating release 2.6.0beta1

........

r8083 | p_lindheimer | 2009-08-18 14:44:13 -0700 (Tue, 18 Aug 2009) | 1 line

fixes #3075 dead code removal

........

r8088 | p_lindheimer | 2009-08-22 17:27:44 -0700 (Sat, 22 Aug 2009) | 1 line

closes #3675 increase text input field size in components.class.php

........

r8099 | p_lindheimer | 2009-08-23 14:54:27 -0700 (Sun, 23 Aug 2009) | 1 line

undefined varialbes re #3780

........

r8102 | p_lindheimer | 2009-08-23 16:10:55 -0700 (Sun, 23 Aug 2009) | 1 line

fixes #3382 make links relative and add audio/basic type to make work in safari

........

r8104 | p_lindheimer | 2009-08-23 16:41:10 -0700 (Sun, 23 Aug 2009) | 1 line

fixes #3559 adds ASTMANAGERHOST

........

r8105 | p_lindheimer | 2009-08-23 16:58:54 -0700 (Sun, 23 Aug 2009) | 1 line

fixes #3606 improved logout view

........

r8106 | p_lindheimer | 2009-08-23 17:14:36 -0700 (Sun, 23 Aug 2009) | 1 line

use TXTCIDNAME() as TXTCIDname has been deprecated since 1.2 re #3599

........

r8109 | p_lindheimer | 2009-08-23 18:13:27 -0700 (Sun, 23 Aug 2009) | 1 line

fixes #3642 hardcoded paths

........

r8110 | p_lindheimer | 2009-08-23 18:51:20 -0700 (Sun, 23 Aug 2009) | 1 line

needs parse_amprotal because of change re #3642

........

r8113 | p_lindheimer | 2009-08-23 21:22:44 -0700 (Sun, 23 Aug 2009) | 1 line

closes #3608 use htmlspecialchars to remove some html errors

........

r8114 | p_lindheimer | 2009-08-23 21:54:04 -0700 (Sun, 23 Aug 2009) | 1 line

weakpassword validation re #3581 and re #3266

........

r8117 | p_lindheimer | 2009-08-24 12:01:39 -0700 (Mon, 24 Aug 2009) | 1 line

add USEQUEUESTATE flag to use 'HINT:' format re #3562 but related to the Asterisk patch: https://issues.asterisk.org/view.php?id=15168

........

r8118 | p_lindheimer | 2009-08-24 12:19:58 -0700 (Mon, 24 Aug 2009) | 1 line

add USEQUEUESTATE flag to amportal.confto use 'HINT:' format re #3562 but related to the Asterisk patch: https://issues.asterisk.org/view.php?id=15168

........

r8162 | p_lindheimer | 2009-08-25 12:38:39 -0700 (Tue, 25 Aug 2009) | 1 line

add include of main functions.inc.php removing several duplicated functions

........

r8169 | p_lindheimer | 2009-08-25 18:53:37 -0700 (Tue, 25 Aug 2009) | 1 line

fixes #3621 better matching of call recordings with users that occured at the same time

........

r8170 | p_lindheimer | 2009-08-25 19:03:54 -0700 (Tue, 25 Aug 2009) | 1 line

fixes #3639 allows pidof to be defined and removes hard coded /etc/asterisk path

........

r8171 | p_lindheimer | 2009-08-25 19:20:17 -0700 (Tue, 25 Aug 2009) | 1 line

closes #3305 adds reload command to freepbx_engine using kill -HUP to reload asterisk and fop

........

r8195 | p_lindheimer | 2009-08-26 10:35:26 -0700 (Wed, 26 Aug 2009) | 1 line

create 2.6.0beta2 dir in upgrades to reflect upcoming version

........

r8198 | p_lindheimer | 2009-08-26 10:50:14 -0700 (Wed, 26 Aug 2009) | 1 line

Creating release 2.6.0beta2

........

r8217 | p_lindheimer | 2009-08-27 13:50:33 -0700 (Thu, 27 Aug 2009) | 1 line

closes #2880 fix lower timeouts in phpagi-asmanager that gets called from agi scripts, does not effect the copy called by the GUI code

........

r8218 | p_lindheimer | 2009-08-27 14:05:49 -0700 (Thu, 27 Aug 2009) | 1 line

closes #3291 replace perl version with php version, leaving perl version code base for now though not called by retrieve_conf

........

r8222 | p_lindheimer | 2009-08-27 22:30:36 -0700 (Thu, 27 Aug 2009) | 1 line

fixes #3835 and re #3291 - we should redo how the trunks are searched now that we have the trunk table plus there is an option for a descriptive name that should be used if present

........

r8234 | mickecarlsson | 2009-08-28 13:12:11 -0700 (Fri, 28 Aug 2009) | 1 line

Localization updates for core

........

r8235 | mickecarlsson | 2009-08-28 13:17:48 -0700 (Fri, 28 Aug 2009) | 1 line

Small fix for Swedish language in core

........

r8236 | mickecarlsson | 2009-08-28 13:21:28 -0700 (Fri, 28 Aug 2009) | 1 line

Yet another small fix for Swedish language in core

........

r8242 | p_lindheimer | 2009-08-29 12:29:48 -0700 (Sat, 29 Aug 2009) | 1 line

fixes #3840 replace last with break left over from perl port

........

r8255 | p_lindheimer | 2009-08-31 11:12:45 -0700 (Mon, 31 Aug 2009) | 1 line

remove pass by reference indicator in parse_zapata it is already declared in the function and creates error on php 5.3+

........

r8270 | p_lindheimer | 2009-09-02 09:43:41 -0700 (Wed, 02 Sep 2009) | 1 line

fixes #3850 adds dahdi (though some real dahdi testing is necessary, tried to get labels right), also moves retrieve_op_conf_from_mysql.php to an include file no longer stand-alone executable re #3837

........

r8273 | p_lindheimer | 2009-09-04 17:44:43 -0700 (Fri, 04 Sep 2009) | 1 line

fixes #3858 reload deprecated starting 1.4 changed to module_reload

........

r8274 | p_lindheimer | 2009-09-05 08:25:52 -0700 (Sat, 05 Sep 2009) | 1 line

fixes #3861 previous patch had wrong path to default asterisk.conf

........

r8280 | p_lindheimer | 2009-09-05 17:35:56 -0700 (Sat, 05 Sep 2009) | 1 line

fixes #3678 parse voicemail includes even when they have single/double quotes

........

r8287 | p_lindheimer | 2009-09-05 18:25:06 -0700 (Sat, 05 Sep 2009) | 1 line

bump to RC1

........

r8289 | p_lindheimer | 2009-09-05 18:32:59 -0700 (Sat, 05 Sep 2009) | 1 line

Creating release 2.6.0RC1

........

r8303 | p_lindheimer | 2009-09-05 19:14:55 -0700 (Sat, 05 Sep 2009) | 1 line

update to 2.5.2

........

r8352 | p_lindheimer | 2009-09-09 14:00:11 -0700 (Wed, 09 Sep 2009) | 1 line

fix sort order of old trunk dialrules in conversion re #3854

........

r8356 | p_lindheimer | 2009-09-09 15:00:32 -0700 (Wed, 09 Sep 2009) | 1 line

make more generic email address example re #3877

........

r8371 | p_lindheimer | 2009-09-09 16:39:13 -0700 (Wed, 09 Sep 2009) | 1 line

closes #3870 add astdb information to FOP

........

r8376 | p_lindheimer | 2009-09-09 16:59:01 -0700 (Wed, 09 Sep 2009) | 1 line

Creating release 2.6.0RC2

........

r8388 | mickecarlsson | 2009-09-10 10:28:06 -0700 (Thu, 10 Sep 2009) | 1 line

Closes #3885 move macro-dumpvars out from extensions.conf to extensions_custom.conf.sample and update the deprecated variables

........

r8401 | lazytt | 2009-10-08 11:16:00 -0700 (Thu, 08 Oct 2009) | 1 line

bring the trash in to the 21st centry

........

r8405 | p_lindheimer | 2009-10-11 20:51:32 -0700 (Sun, 11 Oct 2009) | 1 line

fixes #3903 rename goto to goto_dest, scanned freepbx code, not used in any agi scripts so should be safe

........

r8407 | p_lindheimer | 2009-10-11 21:03:23 -0700 (Sun, 11 Oct 2009) | 1 line

regenerate js library

........

r8408 | p_lindheimer | 2009-10-11 21:06:02 -0700 (Sun, 11 Oct 2009) | 1 line

create 2.6.0 dir to force final release

........

r8410 | lazytt | 2009-10-13 00:57:39 -0700 (Tue, 13 Oct 2009) | 1 line

closes #3925, #3904; adds fax extensions in extensions.class.php, fixes splice funtion

........

r8416 | p_lindheimer | 2009-10-21 13:35:34 -0700 (Wed, 21 Oct 2009) | 1 line

file upload to stringent (e.g. doesn't like RC1 in version number because it was not allowing caps

........

r8421 | mickecarlsson | 2009-11-07 01:27:29 -0800 (Sat, 07 Nov 2009) | 1 line

Closes #3943 removed obsolete links in INSTALL file

........

r8428 | mickecarlsson | 2009-11-29 02:43:22 -0800 (Sun, 29 Nov 2009) | 1 line

Fixed some spelling errors in install_amp

........

r8430 | mickecarlsson | 2009-12-01 11:08:55 -0800 (Tue, 01 Dec 2009) | 1 line

Adds utf-8 support line (currently disabled) to vm_email.inc so that voicemail email can be localized

........

r8431 | mickecarlsson | 2009-12-01 11:51:07 -0800 (Tue, 01 Dec 2009) | 1 line

Closes #3963 adds preload of pbx_config and chan_local to modules.conf

........

r8432 | lazytt | 2009-12-10 04:25:01 -0800 (Thu, 10 Dec 2009) | 19 lines

Extended functionality of amportal sbin app with an 'admin' option, which allowes running of more admin/dev options. Also added fpbx application which can be called in place of amportal. Additional aoptions are as followes:

reload|r: does a full dialplan regeneration/reload (like clicking the orange bar) context|cxt: show's the specified context from the dialplan. This is extreamly usefull when

when developing dialplan on a system with many modules, where it is not fesable look thru the whole extensions_additional every time to see how a specific context was generate

  • when run with the 'list' or 'l' option, will list all avalible context's as they appear in extensions* files
  • when run with the 'contains' or 'con' options, will only print the dialplan WITHIN the context, eliminating the contexts header and trailing ;

modadmin|ma: runs the module_admin script with additional argument as passed

additioanly, the shortcut a can replace admin. For example:

'amportal admin reload' is the same as 'amportal a reload' 'amportal admin context list' is the same as 'amportal a ctx l' or 'fpbx a ctx l'

........

r8433 | lazytt | 2009-12-10 04:35:25 -0800 (Thu, 10 Dec 2009) | 1 line

allow /sbin/fpbx to be executable, re: r8432

........

r8434 | mickecarlsson | 2009-12-10 11:44:43 -0800 (Thu, 10 Dec 2009) | 1 line

Closes #3971, updated Russian language file for amp

........

r8436 | mickecarlsson | 2009-12-10 11:55:59 -0800 (Thu, 10 Dec 2009) | 1 line

Re #3971, added missing license text

........

r8439 | lazytt | 2009-12-13 06:08:31 -0800 (Sun, 13 Dec 2009) | 1 line

update amportal.conf to reflect r8438

........

r8442 | lazytt | 2009-12-14 09:08:53 -0800 (Mon, 14 Dec 2009) | 1 line

further amportal/fpbx admin features: externalip or extip returns the external ip address of the default gateway

........

r8444 | mickecarlsson | 2009-12-16 07:27:11 -0800 (Wed, 16 Dec 2009) | 1 line

Re #3977 fixes spelling error in code

........

r8459 | mickecarlsson | 2010-01-01 05:27:17 -0800 (Fri, 01 Jan 2010) | 1 line

Closes #3900 dbDel is deprecated, replaced with DB_DELETE

........

r8464 | mickecarlsson | 2010-01-02 14:19:06 -0800 (Sat, 02 Jan 2010) | 1 line

Closes #3987 fixes delimeter for Asterisk 1.6 and NVFax

........

r8466 | lazytt | 2010-01-04 14:21:06 -0800 (Mon, 04 Jan 2010) | 1 line

re: #3900; DB_DELETE is a function not an application, wrap it in a Noop to execute it

........

r8478 | p_lindheimer | 2010-01-04 16:12:02 -0800 (Mon, 04 Jan 2010) | 1 line

Creating release 2.6.0

........

r8578 | mickecarlsson | 2010-01-10 13:26:37 -0800 (Sun, 10 Jan 2010) | 1 line

Re #3805 initial checkin of new extension class Progress

........