[asterisk-bugs] [Asterisk 0019032]: [patch] Voicemail messages (ODBC), incorrect sequence, msgnum=0 missing! Messages Over written

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Mar 29 05:41:24 CDT 2011


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=19032 
====================================================================== 
Reported By:                alecdavis
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   19032
Category:                   Applications/app_voicemail/ODBC
Reproducibility:            random
Severity:                   major
Priority:                   high
Status:                     new
Asterisk Version:           SVN 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2011-03-28 18:53 CDT
Last Modified:              2011-03-29 05:41 CDT
====================================================================== 
Summary:                    [patch] Voicemail messages (ODBC), incorrect
sequence, msgnum=0 missing! Messages Over written
Description: 
Repeatble: Asterisk 1.8.2.3 and Trunk

Users are unable to receive any further messages, until I have updated the
database, so that the msgnum is 0.

Users are unable to clear mailbox, Voicemail reports 1 new message, but
they are unable to clear it.

When trying to clear it, we get console message
2011-03-29 09:57:19.780] WARNING[22841]: app_voicemail.c:7570
play_message: No origtime?!

This seems exacltly like https://issues.asterisk.org/view.php?id=18740 but the
fix there only covers file based
storage.
======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0018582 Problem reading a message which was pre...
====================================================================== 

---------------------------------------------------------------------- 
 (0133159) alecdavis (manager) - 2011-03-29 05:41
 https://issues.asterisk.org/view.php?id=19032#c133159 
---------------------------------------------------------------------- 
uploaded bug19032.diff.txt

Prevent holes being created in message sequence if messages arrive while
mailbox is being cleared by user.

Solution: When close_mailbox is executed, re-evaluate the total number of
messages, don't assume that none have arrived.<pre>mysql> select
id,dir,msgnum,mailboxuser,origtime from voicemessages where mailboxuser =
'8612' order by msgnum;
+----+--------------------------------------------------+--------+-------------+------------+
| id | dir                                              | msgnum |
mailboxuser | origtime   |
+----+--------------------------------------------------+--------+-------------+------------+
| 21 | /var/spool/asterisk/voicemail/default/8612/INBOX |      0 | 8612   
    | 1301392781 |
| 23 | /var/spool/asterisk/voicemail/default/8612/INBOX |      1 | 8612   
    | 1301392965 |
| 24 | /var/spool/asterisk/voicemail/default/8612/INBOX |      2 | 8612   
    | 1301393587 |
| 25 | /var/spool/asterisk/voicemail/default/8612/INBOX |      3 | 8612   
    | 1301393687 |
+----+--------------------------------------------------+--------+-------------+------------+
4 rows in set (0.00 sec)

mysql> select id,dir,msgnum,mailboxuser,origtime from voicemessages where
mailboxuser = '8612' order by msgnum;
+----+--------------------------------------------------+--------+-------------+------------+
| id | dir                                              | msgnum |
mailboxuser | origtime   |
+----+--------------------------------------------------+--------+-------------+------------+
| 25 | /var/spool/asterisk/voicemail/default/8612/INBOX |      0 | 8612   
    | 1301393687 |
+----+--------------------------------------------------+--------+-------------+------------+
1 row in set (0.00 sec)</pre>

The above, was deleteing the 3 messages that were available when I opened
the mailbox, and while I was clearing, left an additional message.

Without patch, the last remaining message would have been
https://issues.asterisk.org/view.php?id=3, now it's
correct as '0'

Note: This patch doesn't fix up damaged sequences. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-03-29 05:41 alecdavis      Note Added: 0133159                          
======================================================================




More information about the asterisk-bugs mailing list