[Home]

Summary:ASTERISK-17613: [patch] Voicemail messages (ODBC), incorrect sequence, msgnum=0 missing! Messages Over written
Reporter:Alec Davis (alecdavis)Labels:
Date Opened:2011-03-28 18:53:06Date Closed:2011-04-28 19:02:33
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Applications/app_voicemail/ODBC
Versions:1.8.2 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) bug19032.diff.txt
( 1) bug19032.diff2.txt
( 2) bug19032.part2.diff.txt
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 ASTERISK-17344 but the fix there only covers file based storage.

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

FWIW, the user reported, she was in clearing messages, while another arrived.<pre>
mysql> select id,dir,msgnum,mailboxuser,origtime from voicemessages where mailboxuser = '8531' order by msgnum;
+-------+--------------------------------------------------+--------+-------------+------------+
| id    | dir                                              | msgnum | mailboxuser | origtime   |
+-------+--------------------------------------------------+--------+-------------+------------+
|  3411 | /var/spool/asterisk/voicemail/default/8531/greet |     -1 | 8531        |            |
|  3401 | /var/spool/asterisk/voicemail/default/8531/Old   |      0 | 8531        | 1287715596 |
|  7551 | /var/spool/asterisk/voicemail/default/8531/Old   |      1 | 8531        | 1290558913 |
| 16481 | /var/spool/asterisk/voicemail/default/8531/Old   |      2 | 8531        | 1296012598 |
| 26251 |<b> /var/spool/asterisk/voicemail/default/8531/INBOX |      1 | 8531        | 1301336235 |</b>
+-------+--------------------------------------------------+--------+-------------+------------+</pre>

Where is the INBOXes msgnum=0 record?
Comments:By: Alec Davis (alecdavis) 2011-03-28 19:35:25

repeatable, just did it in trunk Asterisk SVN-trunk-r309300M

Lets cause the problem:
Phone A: Ring Voicemail, and listen to my 1 and only message, but stay on voicemail.
Phone B: ring myself from another phone leave another message.
Phone B: Finish leaving 2nd message and hangup.
Phone A: Pressed 5 to delete the original message I was listening to then hangup.<pre>

After leaving 2nd message from Phone B;
mysql> select id,dir,msgnum,mailboxuser,origtime from voicemessages where mailboxuser = '8612' order by msgnum;
+----+--------------------------------------------------+--------+-------------+------------+
| id | dir                                              | msgnum | mailboxuser | origtime   |
+----+--------------------------------------------------+--------+-------------+------------+
|  1 | /var/spool/asterisk/voicemail/default/8612/INBOX |      0 | 8612        | 1301357097 |
|  2 | /var/spool/asterisk/voicemail/default/8612/INBOX |      1 | 8612        | 1301357209 |
+----+--------------------------------------------------+--------+-------------+------------+
2 rows in set (0.00 sec)

After Deleting 1st message from phone A.
mysql> select id,dir,msgnum,mailboxuser,origtime from voicemessages where mailboxuser = '8612' order by msgnum;
+----+--------------------------------------------------+--------+-------------+------------+
| id | dir                                              | msgnum | mailboxuser | origtime   |
+----+--------------------------------------------------+--------+-------------+------------+
|  2 | /var/spool/asterisk/voicemail/default/8612/INBOX |      1 | 8612        | 1301357209 |
+----+--------------------------------------------------+--------+-------------+------------+

<u>After leaving another message from any phone, <b>notice id+=1</b></u>
mysql> select id,dir,msgnum,mailboxuser,origtime from voicemessages where mailboxuser = '8612' order by msgnum;
+----+--------------------------------------------------+--------+-------------+------------+
| id | dir                                              | msgnum | mailboxuser | origtime   |
+----+--------------------------------------------------+--------+-------------+------------+
|  3 | /var/spool/asterisk/voicemail/default/8612/INBOX |      1 | 8612        | 1301357470 |
+----+--------------------------------------------------+--------+-------------+------------+

<u>After leaving another message, <b>notice id+=1</b></u>
mysql> select id,dir,msgnum,mailboxuser,origtime from voicemessages where mailboxuser = '8612' order by msgnum;
+----+--------------------------------------------------+--------+-------------+------------+
| id | dir                                              | msgnum | mailboxuser | origtime   |
+----+--------------------------------------------------+--------+-------------+------------+
|  4 | /var/spool/asterisk/voicemail/default/8612/INBOX |      1 | 8612        | 1301357585 |
+----+--------------------------------------------------+--------+-------------+------------+
1 row in set (0.00 sec)</pre>

The only message that is being saved is the last message, and

When playing the supposed 1 message, Allison says 1st message, press 3 for advanced options, with out playing the message.



By: Alec Davis (alecdavis) 2011-03-28 19:40:58

how to fix the database:<pre>mysql> update voicemessages set msgnum='0' where mailboxuser = '8612' and origtime='1301357585';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

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

By: Alec Davis (alecdavis) 2011-03-29 04:48:16

This example is 3 messages pre existed.

Rang in to listen to messages and deleted 1 message, while on a another phone left another message.

Notice a gap between message #<b></b>1 and #<b></b>3.
 
<pre>mysql> select id,dir,msgnum,mailboxuser,origtime from voicemessages where mailboxuser = '8612' order by msgnum;
+----+--------------------------------------------------+--------+-------------+------------+
| id | dir                                              | msgnum | mailboxuser | origtime   |
+----+--------------------------------------------------+--------+-------------+------------+
| 17 | /var/spool/asterisk/voicemail/default/8612/INBOX |      0 | 8612        | 1301369768 |
| 18 | /var/spool/asterisk/voicemail/default/8612/INBOX |      1 | 8612        | 1301370616 |
| 19 | /var/spool/asterisk/voicemail/default/8612/INBOX |      2 | 8612        | 1301390537 |
| 20 | /var/spool/asterisk/voicemail/default/8612/INBOX |      3 | 8612        | 1301390749 |
+----+--------------------------------------------------+--------+-------------+------------+
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   |
+----+--------------------------------------------------+--------+-------------+------------+
| 18 | /var/spool/asterisk/voicemail/default/8612/INBOX |      0 | 8612        | 1301370616 |
| 19 | /var/spool/asterisk/voicemail/default/8612/INBOX |      1 | 8612        | 1301390537 |
| 20 | /var/spool/asterisk/voicemail/default/8612/INBOX |      3 | 8612        | 1301390749 |
+----+--------------------------------------------------+--------+-------------+------------+
3 rows in set (0.00 sec)
</pre>

The problem appears to be in close_mailbox
Where close_mailbox only uses the number of messages that existed when the mailbox was opened, but in the background another message was added by a caller.

debug output in close_mailbox, 'x' should have perhaps gone to 3.
[Mar 29 22:26:01] WARNING[16455]: app_voicemail.c:7816 close_mailbox: ALEC close_mailbox=/var/spool/asterisk/voicemail/default/8612/INBOX x=0.
[Mar 29 22:26:01] WARNING[16455]: app_voicemail.c:7816 close_mailbox: ALEC close_mailbox=/var/spool/asterisk/voicemail/default/8612/INBOX x=1.
[Mar 29 22:26:01] WARNING[16455]: app_voicemail.c:7816 close_mailbox: ALEC close_mailbox=/var/spool/asterisk/voicemail/default/8612/INBOX x=2.



By: Alec Davis (alecdavis) 2011-03-29 05:41:24

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 deleting the 3 messages that were available when I opened the mailbox, and while clearing existing messages I left an additional message.

Without patch, the last remaining message would have been #3, now it's correct as '0'

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



By: Alec Davis (alecdavis) 2011-03-29 05:55:47

uploaded bug19032.part2.diff.txt

Both bug19032.diff.txt and bug19032.part2.diff.txt can be applied.

If next msgnum already exists, then prevent loss, increment msgnum until one isn't found.

Ideally, the next msgnum should always be available. But let's not loose a message.<pre>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 |      1 | 8612        | 1301393687 |
+----+--------------------------------------------------+--------+-------------+------------+
1 row in set (0.01 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 |      1 | 8612        | 1301393687 |
| 26 | /var/spool/asterisk/voicemail/default/8612/INBOX |      2 | 8612        | 1301394951 |
+----+--------------------------------------------------+--------+-------------+------------+</pre>

Previously, any further message would not have been saved. They were over written.

This patch bug19032.part2.diff.txt however is not perfect, as it can insert messages out of order<pre>mysql> select id,dir,msgnum,mailboxuser,origtime from voicemessages where mailboxuser = '8612' order by msgnum;
+----+--------------------------------------------------+--------+-------------+------------+
| id | dir                                              | msgnum | mailboxuser | origtime   |
+----+--------------------------------------------------+--------+-------------+------------+
| 27 | /var/spool/asterisk/voicemail/default/8612/INBOX |      1 | 8612        | 1301395738 |
| 26 | /var/spool/asterisk/voicemail/default/8612/INBOX |      2 | 8612        | 1301394951 |
+----+--------------------------------------------------+--------+-------------+------------+
2 rows in set (0.00 sec)</pre>
Note: This patch also doesn't fix up damaged sequences.



By: Kevin Scott Adams (nivek) 2011-03-29 07:03:47

I believe you might want to look at https://issues.asterisk.org/view.php?id=18692 which has a patch that has been working.  It will only apply to 1.8.4 and above (currently 1.8.4-rc2) due to the vacancy of the resequencing function in previous versions and the #ifdef issues of ODBC and IMAP.

By: Alec Davis (alecdavis) 2011-04-01 01:18:15

bug19032.diff2.txt
Final complete diff for trunk.

By: Digium Subversion (svnbot) 2011-04-01 01:46:57

Repository: asterisk
Revision: 312070

U   branches/1.4/apps/app_voicemail.c

------------------------------------------------------------------------
r312070 | alecdavis | 2011-04-01 01:46:56 -0500 (Fri, 01 Apr 2011) | 16 lines

app_voicemail: close_mailbox needs to respect additional messages while mailbox is open.

close_mailbox leave gaps in message sequence if messages are deleted and new messages
arrive during this time, this is because the shuffle down to slot 0, only shuffles
the number of pre-existing messages when mailbox is opened, ignoring new arrivals.

Fix: in close_mailbox re-evaluate number of messages before the shuffle, this then includes new arrivals.

Happens on filebased or ODBC storage.

(issues ASTERISK-17613,ASTERISK-17207,ASTERISK-17299,ASTERISK-17580)
Reported by: alecdavis,tootai,afosorio

Review: https://reviewboard.asterisk.org/r/1153/


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

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

By: Digium Subversion (svnbot) 2011-04-01 02:25:55

Repository: asterisk
Revision: 312103

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

------------------------------------------------------------------------
r312103 | alecdavis | 2011-04-01 02:25:55 -0500 (Fri, 01 Apr 2011) | 22 lines

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

........
 r312070 | alecdavis | 2011-04-01 19:46:56 +1300 (Fri, 01 Apr 2011) | 16 lines
 
 app_voicemail: close_mailbox needs to respect additional messages while mailbox is open.
 
 close_mailbox leave gaps in message sequence if messages are deleted and new messages
 arrive during this time, this is because the shuffle down to slot 0, only shuffles
 the number of pre-existing messages when mailbox is opened, ignoring new arrivals.
 
 Fix: in close_mailbox re-evaluate number of messages before the shuffle, this then includes new arrivals.
 
 Happens on filebased or ODBC storage.
 
 (issues ASTERISK-17613,ASTERISK-17207,ASTERISK-17299,ASTERISK-17580)
 Reported by: alecdavis,tootai,afosorio
 
 Review: https://reviewboard.asterisk.org/r/1153/
........

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

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

By: Digium Subversion (svnbot) 2011-04-01 02:32:14

Repository: asterisk
Revision: 312117

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

------------------------------------------------------------------------
r312117 | alecdavis | 2011-04-01 02:32:13 -0500 (Fri, 01 Apr 2011) | 29 lines

Merged revisions 312103 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
 r312103 | alecdavis | 2011-04-01 20:25:54 +1300 (Fri, 01 Apr 2011) | 22 lines
 
 Merged revisions 312070 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r312070 | alecdavis | 2011-04-01 19:46:56 +1300 (Fri, 01 Apr 2011) | 16 lines
   
   app_voicemail: close_mailbox needs to respect additional messages while mailbox is open.
   
   close_mailbox leave gaps in message sequence if messages are deleted and new messages
   arrive during this time, this is because the shuffle down to slot 0, only shuffles
   the number of pre-existing messages when mailbox is opened, ignoring new arrivals.
   
   Fix: in close_mailbox re-evaluate number of messages before the shuffle, this then includes new arrivals.
   
   Happens on filebased or ODBC storage.
   
   (issues ASTERISK-17613,ASTERISK-17207,ASTERISK-17299,ASTERISK-17580)
   Reported by: alecdavis,tootai,afosorio
   
   Review: https://reviewboard.asterisk.org/r/1153/
 ........
................

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

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

By: Digium Subversion (svnbot) 2011-04-01 02:43:01

Repository: asterisk
Revision: 312118

_U  trunk/
U   trunk/apps/app_voicemail.c

------------------------------------------------------------------------
r312118 | alecdavis | 2011-04-01 02:43:00 -0500 (Fri, 01 Apr 2011) | 36 lines

Merged revisions 312117 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
 r312117 | alecdavis | 2011-04-01 20:32:12 +1300 (Fri, 01 Apr 2011) | 29 lines
 
 Merged revisions 312103 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.6.2
 
 ................
   r312103 | alecdavis | 2011-04-01 20:25:54 +1300 (Fri, 01 Apr 2011) | 22 lines
   
   Merged revisions 312070 via svnmerge from
   https://origsvn.digium.com/svn/asterisk/branches/1.4
   
   ........
     r312070 | alecdavis | 2011-04-01 19:46:56 +1300 (Fri, 01 Apr 2011) | 16 lines
     
     app_voicemail: close_mailbox needs to respect additional messages while mailbox is open.
     
     close_mailbox leave gaps in message sequence if messages are deleted and new messages
     arrive during this time, this is because the shuffle down to slot 0, only shuffles
     the number of pre-existing messages when mailbox is opened, ignoring new arrivals.
     
     Fix: in close_mailbox re-evaluate number of messages before the shuffle, this then includes new arrivals.
     
     Happens on filebased or ODBC storage.
     
     (issues ASTERISK-17613,ASTERISK-17207,ASTERISK-17299,ASTERISK-17580)
     Reported by: alecdavis,tootai,afosorio
     
     Review: https://reviewboard.asterisk.org/r/1153/
   ........
 ................
................

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

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

By: Digium Subversion (svnbot) 2011-04-01 03:29:51

Repository: asterisk
Revision: 312174

U   branches/1.4/apps/app_voicemail.c

------------------------------------------------------------------------
r312174 | alecdavis | 2011-04-01 03:29:49 -0500 (Fri, 01 Apr 2011) | 23 lines

voicemail: get real last_message_index and count_messages, ODBC resequence

change last_message_index to read the max msgnum stored in the database
change count_messages to actually count the number of messages.

last_message_index change:
 This fixed overwriting of the last message if msgnum=0 was missing.
 Previously every incoming message would overwrite msgnum=1.
count_messages change:
 allows us to detect when requencing is required in opneA_mailbox.
resequence enabled for ODBC storage:
 Assists with fixing up corrupt databases with gaps, but only when
 a user actively opens there mailboxes.

(closes issue ASTERISK-17299,ASTERISK-17207,ASTERISK-17613)
Reported by: elguero
Patches:
     based on odbc_resequence_mailbox2.1.diff uploaded by elguero (license 37)
Tested by: elguero, nivek, alecdavis

Review: https://reviewboard.asterisk.org/r/1153/


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

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

By: Digium Subversion (svnbot) 2011-04-01 03:47:31

Repository: asterisk
Revision: 312210

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

------------------------------------------------------------------------
r312210 | alecdavis | 2011-04-01 03:47:30 -0500 (Fri, 01 Apr 2011) | 29 lines

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

........
 r312174 | alecdavis | 2011-04-01 21:29:49 +1300 (Fri, 01 Apr 2011) | 23 lines
 
 voicemail: get real last_message_index and count_messages, ODBC resequence
 
 change last_message_index to read the max msgnum stored in the database
 change count_messages to actually count the number of messages.
 
 last_message_index change:
   This fixed overwriting of the last message if msgnum=0 was missing.
   Previously every incoming message would overwrite msgnum=1.
 count_messages change:
   allows us to detect when requencing is required in opneA_mailbox.
 resequence enabled for ODBC storage:
   Assists with fixing up corrupt databases with gaps, but only when
   a user actively opens there mailboxes.
 
 (closes issue ASTERISK-17299,ASTERISK-17207,ASTERISK-17613)
 Reported by: elguero
 Patches:
       based on odbc_resequence_mailbox2.1.diff uploaded by elguero (license 37)
 Tested by: elguero, nivek, alecdavis
 
 Review: https://reviewboard.asterisk.org/r/1153/
........

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

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

By: Digium Subversion (svnbot) 2011-04-01 04:03:13

Repository: asterisk
Revision: 312211

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

------------------------------------------------------------------------
r312211 | alecdavis | 2011-04-01 04:03:12 -0500 (Fri, 01 Apr 2011) | 36 lines

Merged revisions 312210 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
 r312210 | alecdavis | 2011-04-01 21:47:29 +1300 (Fri, 01 Apr 2011) | 29 lines
 
 Merged revisions 312174 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r312174 | alecdavis | 2011-04-01 21:29:49 +1300 (Fri, 01 Apr 2011) | 23 lines
   
   voicemail: get real last_message_index and count_messages, ODBC resequence
   
   change last_message_index to read the max msgnum stored in the database
   change count_messages to actually count the number of messages.
   
   last_message_index change:
     This fixed overwriting of the last message if msgnum=0 was missing.
     Previously every incoming message would overwrite msgnum=1.
   count_messages change:
     allows us to detect when requencing is required in opneA_mailbox.
   resequence enabled for ODBC storage:
     Assists with fixing up corrupt databases with gaps, but only when
     a user actively opens there mailboxes.
   
   (closes issue ASTERISK-17299,ASTERISK-17207,ASTERISK-17613)
   Reported by: elguero
   Patches:
         based on odbc_resequence_mailbox2.1.diff uploaded by elguero (license 37)
   Tested by: elguero, nivek, alecdavis
   
   Review: https://reviewboard.asterisk.org/r/1153/
 ........
................

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

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

By: Digium Subversion (svnbot) 2011-04-01 04:08:41

Repository: asterisk
Revision: 312212

_U  trunk/
U   trunk/apps/app_voicemail.c

------------------------------------------------------------------------
r312212 | alecdavis | 2011-04-01 04:08:39 -0500 (Fri, 01 Apr 2011) | 43 lines

Merged revisions 312211 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
 r312211 | alecdavis | 2011-04-01 22:03:11 +1300 (Fri, 01 Apr 2011) | 36 lines
 
 Merged revisions 312210 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.6.2
 
 ................
   r312210 | alecdavis | 2011-04-01 21:47:29 +1300 (Fri, 01 Apr 2011) | 29 lines
   
   Merged revisions 312174 via svnmerge from
   https://origsvn.digium.com/svn/asterisk/branches/1.4
   
   ........
     r312174 | alecdavis | 2011-04-01 21:29:49 +1300 (Fri, 01 Apr 2011) | 23 lines
     
     voicemail: get real last_message_index and count_messages, ODBC resequence
     
     change last_message_index to read the max msgnum stored in the database
     change count_messages to actually count the number of messages.
     
     last_message_index change:
       This fixed overwriting of the last message if msgnum=0 was missing.
       Previously every incoming message would overwrite msgnum=1.
     count_messages change:
       allows us to detect when requencing is required in opneA_mailbox.
     resequence enabled for ODBC storage:
       Assists with fixing up corrupt databases with gaps, but only when
       a user actively opens there mailboxes.
     
     (closes issue ASTERISK-17299,ASTERISK-17207,ASTERISK-17613)
     Reported by: elguero
     Patches:
           based on odbc_resequence_mailbox2.1.diff uploaded by elguero (license 37)
     Tested by: elguero, nivek, alecdavis
     
     Review: https://reviewboard.asterisk.org/r/1153/
   ........
 ................
................

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

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

By: Digium Subversion (svnbot) 2011-04-19 13:37:08

Repository: asterisk
Revision: 314300

U   branches/1.4/apps/app_voicemail.c

------------------------------------------------------------------------
r314300 | alecdavis | 2011-04-19 13:37:08 -0500 (Tue, 19 Apr 2011) | 11 lines

app_voicemail: Fix ODBC Storage compile

regression caused by me, from mantis bug ASTERISK-17613 / commit r312070

(closes issue ASTERISK-17714)
Reported by: vrban
Patches:
     app_voicemail_fix_for_312070.patch uploaded by vrban (license 756)
Tested by: vrban, alecdavis


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

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

By: Varun Vairavan (varun171086) 2011-10-27 18:49:46.847-0500

Hi

I am running asterisk 1.8.7.1 and have the same issue. Can someone point me towards the patch file please.

Thanks

By: Alec Davis (alecdavis) 2011-10-28 15:41:12.864-0500

1.8.7.1 already has all of the patches that this resolved.

Please open a new bug report, detailing the voicemail storage you are using, and examples.