[asterisk-bugs] [Asterisk 0018582]: Problem reading a message which was previously saved as unread in INBOX.
Asterisk Bug Tracker
noreply at bugs.digium.com
Fri Apr 1 03:47:31 CDT 2011
A NOTE has been added to this issue.
======================================================================
https://issues.asterisk.org/view.php?id=18582
======================================================================
Reported By: afosorio
Assigned To:
======================================================================
Project: Asterisk
Issue ID: 18582
Category: Applications/app_voicemail/ODBC
Reproducibility: always
Severity: minor
Priority: normal
Status: acknowledged
Asterisk Version: SVN
JIRA: SWP-2902
Regression: No
Reviewboard Link: https://reviewboard.asterisk.org/r/1153/
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Request Review:
======================================================================
Date Submitted: 2011-01-05 15:31 CST
Last Modified: 2011-04-01 03:47 CDT
======================================================================
Summary: Problem reading a message which was previously saved
as unread in INBOX.
Description:
I am using odbc voicemail store but I am having a problem when trying to
listen a new message which was previously saved as unread in INBOX (option
9 and option 0). When a message is saved I see that database field msgnum
increments by one, this causes that when trying to read the message again,
asterisk show the next messages:
== Parsing
'/var/spool/asterisk/voicemail/default/8101/INBOX/msg0000.txt': == Found
-- <SIP/8101-00000007> Playing 'vm-message.gsm' (language 'es')
[Jan 5 16:20:24] WARNING[26037]: app_voicemail.c:7560 play_message: No
origtime?!
Below appears what is happening:
The database fields without reading the message:
mysql> select id, msgnum, dir, context, origtime, duration, mailboxuser,
mailboxcontext from voicemessages;
+----+--------+--------------------------------------------------+-------------+------------+----------+-------------+----------------+
| id | msgnum | dir | context
| origtime | duration | mailboxuser | mailboxcontext |
+----+--------+--------------------------------------------------+-------------+------------+----------+-------------+----------------+
| 1 | 0 | /var/spool/asterisk/voicemail/default/8101/INBOX |
macro-exten | 1294262263 | 5 | 8101 | default |
+----+--------+--------------------------------------------------+-------------+------------+----------+-------------+----------------+
The database fields after reading and saving the message as unread in
INBOX:
mysql> select id, msgnum, dir, context, origtime, duration, mailboxuser,
mailboxcontext from voicemessages;
+----+--------+--------------------------------------------------+-------------+------------+----------+-------------+----------------+
| id | msgnum | dir | context
| origtime | duration | mailboxuser | mailboxcontext |
+----+--------+--------------------------------------------------+-------------+------------+----------+-------------+----------------+
| 2 | 1 | /var/spool/asterisk/voicemail/default/8101/INBOX |
macro-exten | 1294262263 | 5 | 8101 | default |
+----+--------+--------------------------------------------------+-------------+------------+----------+-------------+----------------+
I am using asterisk version 1.8.1
Thanks in advance for your collaboration
======================================================================
Relationships ID Summary
----------------------------------------------------------------------
related to 0018692 [patch] Compile Error - odbc_storage en...
related to 0019032 [patch] Voicemail messages (ODBC), inco...
======================================================================
----------------------------------------------------------------------
(0133256) svnbot (reporter) - 2011-04-01 03:47
https://issues.asterisk.org/view.php?id=18582#c133256
----------------------------------------------------------------------
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
https://issues.asterisk.org/view.php?id=18692,https://issues.asterisk.org/view.php?id=18582,https://issues.asterisk.org/view.php?id=19032)
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
Issue History
Date Modified Username Field Change
======================================================================
2011-04-01 03:47 svnbot Checkin
2011-04-01 03:47 svnbot Note Added: 0133256
======================================================================
More information about the asterisk-bugs
mailing list