[Home]

Summary:ASTERISK-14458: [patch] Voicemail.conf gets overwritten when using Realtime for voicemail
Reporter:Frank DiGennaro (cbbs70a)Labels:
Date Opened:2009-07-13 11:55:19Date Closed:2009-09-15 17:48:31
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Addons/res_config_mysql
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 20090713__issue15492.diff.txt
Description:Using Asterisk 1.4.23.1 and realtime for voicemail, if the user tries to change their password and enters the same password, the voicemail.conf file gets overwritten.

The overwritten file looks like this:
;!
;! Automatically generated configuration file
;! Filename: voicemail.conf (/etc/asterisk/voicemail.conf)
;! Generator: AppVoicemail
;! Creation Date: Mon Jul 13 12:47:30 2009
;!

****** ADDITIONAL INFORMATION ******

The debug trace looks like this:
[Jul 13 12:10:03] DEBUG[27453]: res_config_mysql.c:653 mysql_reconnect: MySQL RealTime: Everything is fine.
[Jul 13 12:10:03] DEBUG[27453]: res_config_mysql.c:356 update_mysql: MySQL RealTime: Update SQL: UPDATE voicemail SET password = '200' WHERE uniqueid = '2'
[Jul 13 12:10:03] DEBUG[27453]: res_config_mysql.c:370 update_mysql: MySQL RealTime: Updated 0 rows on table: voicemail
[Jul 13 12:10:03] DEBUG[27453]: res_config_mysql.c:404 config_mysql: MySQL RealTime: Static SQL: SELECT category, var_name, var_val, cat_metric FROM voicemail WHERE filename='voicemail.conf' and commented=0 ORDER BY filename, cat_metric desc, var_metric asc, category, var_name, var_val, id
[Jul 13 12:10:03] DEBUG[27453]: res_config_mysql.c:653 mysql_reconnect: MySQL RealTime: Everything is fine.
[Jul 13 12:10:03] DEBUG[27453]: res_config_mysql.c:423 config_mysql: MySQL RealTime: Found 0 rows.
 == Saving '/etc/asterisk/voicemail.conf':   == Parsing '/etc/asterisk/users.conf': [Jul 13 12:10:03] DEBUG[27453]: config.c:893 config_text_file_load: Parsing /etc/asterisk/users.conf
Foundlane*CLI>
 == Saving '/etc/asterisk/users.conf': [Jul 13 12:10:03] DEBUG[27453]: app_voicemail.c:6900 vm_options: User 200 set password to 200 of length 3
Comments:By: Leif Madsen (lmadsen) 2009-07-15 10:21:05

Just making a note for the reporter that this is ready for testing. I will also try to test if I get a chance.

By: Frank DiGennaro (cbbs70a) 2009-07-15 10:53:58

I have additional information that might help. Seeing the following in the debug:

[Jul 13 12:10:03] DEBUG[27453]: res_config_mysql.c:404 config_mysql: MySQL RealTime: Static SQL: SELECT category, var_name, var_val, cat_metric FROM voicemail WHERE filename='voicemail.conf' and commented=0 ORDER BY filename, cat_metric desc, var_metric asc, category, var_name, var_val, id


I added the above columns into the voicemail dbtable. Thats when the voicemail.conf file was overwritten. When I deleted those columns, the file was not overwritten. This was very reproducible. What are those columns for???

By: Tilghman Lesher (tilghman) 2009-07-15 11:59:33

You apparently have two different realtime options uncommented in extconfig.conf.  You should only be using one.  The entry for voicemail.conf is known as static realtime and is the complete voicemail.conf file, stored in the database.  This is probably not what you want.

The other is the "voicemail" entry and is known as dynamic realtime.  The two tables are distinct and are not meant to be combined.

By: Digium Subversion (svnbot) 2009-09-15 17:29:20

Repository: asterisk
Revision: 218730

U   branches/1.4/apps/app_voicemail.c

------------------------------------------------------------------------
r218730 | tilghman | 2009-09-15 17:29:19 -0500 (Tue, 15 Sep 2009) | 6 lines

If the user enters the same password as before, don't signal an error when the change does nothing.
(closes issue ASTERISK-14458)
Reported by: cbbs70a
Patches:
      20090713__issue15492.diff.txt uploaded by tilghman (license 14)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=218730

By: Digium Subversion (svnbot) 2009-09-15 17:34:48

Repository: asterisk
Revision: 218731

_U  trunk/
U   trunk/apps/app_voicemail.c

------------------------------------------------------------------------
r218731 | tilghman | 2009-09-15 17:34:48 -0500 (Tue, 15 Sep 2009) | 13 lines

Merged revisions 218730 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
 r218730 | tilghman | 2009-09-15 17:27:41 -0500 (Tue, 15 Sep 2009) | 6 lines
 
 If the user enters the same password as before, don't signal an error when the change does nothing.
 (closes issue ASTERISK-14458)
  Reported by: cbbs70a
  Patches:
        20090713__issue15492.diff.txt uploaded by tilghman (license 14)
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=218731

By: Digium Subversion (svnbot) 2009-09-15 17:41:07

Repository: asterisk
Revision: 218732

_U  branches/1.6.0/
U   branches/1.6.0/apps/app_voicemail.c

------------------------------------------------------------------------
r218732 | tilghman | 2009-09-15 17:41:06 -0500 (Tue, 15 Sep 2009) | 20 lines

Merged revisions 218731 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r218731 | tilghman | 2009-09-15 17:33:10 -0500 (Tue, 15 Sep 2009) | 13 lines
 
 Merged revisions 218730 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r218730 | tilghman | 2009-09-15 17:27:41 -0500 (Tue, 15 Sep 2009) | 6 lines
   
   If the user enters the same password as before, don't signal an error when the change does nothing.
   (closes issue ASTERISK-14458)
    Reported by: cbbs70a
    Patches:
          20090713__issue15492.diff.txt uploaded by tilghman (license 14)
 ........
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=218732

By: Digium Subversion (svnbot) 2009-09-15 17:48:20

Repository: asterisk
Revision: 218733

_U  branches/1.6.2/
U   branches/1.6.2/apps/app_voicemail.c

------------------------------------------------------------------------
r218733 | tilghman | 2009-09-15 17:48:20 -0500 (Tue, 15 Sep 2009) | 20 lines

Merged revisions 218731 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r218731 | tilghman | 2009-09-15 17:33:10 -0500 (Tue, 15 Sep 2009) | 13 lines
 
 Merged revisions 218730 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r218730 | tilghman | 2009-09-15 17:27:41 -0500 (Tue, 15 Sep 2009) | 6 lines
   
   If the user enters the same password as before, don't signal an error when the change does nothing.
   (closes issue ASTERISK-14458)
    Reported by: cbbs70a
    Patches:
          20090713__issue15492.diff.txt uploaded by tilghman (license 14)
 ........
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=218733

By: Digium Subversion (svnbot) 2009-09-15 17:48:30

Repository: asterisk
Revision: 218734

_U  branches/1.6.1/
U   branches/1.6.1/apps/app_voicemail.c

------------------------------------------------------------------------
r218734 | tilghman | 2009-09-15 17:48:30 -0500 (Tue, 15 Sep 2009) | 20 lines

Merged revisions 218731 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r218731 | tilghman | 2009-09-15 17:33:10 -0500 (Tue, 15 Sep 2009) | 13 lines
 
 Merged revisions 218730 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r218730 | tilghman | 2009-09-15 17:27:41 -0500 (Tue, 15 Sep 2009) | 6 lines
   
   If the user enters the same password as before, don't signal an error when the change does nothing.
   (closes issue ASTERISK-14458)
    Reported by: cbbs70a
    Patches:
          20090713__issue15492.diff.txt uploaded by tilghman (license 14)
 ........
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=218734