[Home]

Summary:ASTERISK-17344: Voicemail files out of sequence (voicemail message re-sequencing not always working correctly)
Reporter:godillon (godillon)Labels:
Date Opened:2011-02-03 09:02:02.000-0600Date Closed:2011-03-23 16:58:43
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_voicemail
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Sometime, the voicemail message re-sequencing is not working correctly.

If one message is in inbox directory, it should be msg0000.
Sometime it is not correct. it begin with  msg0001 or msg0002 or msg003.....
So the users can't listen his message.

I can reproduce this problem with this method :

-I left 3 new messages in mailbox XXXX.
-I logged into mailbox XXXX.
-listened to message msg0000 and pressed 7 to delete.
-pressed 6 to listen to message 0001 and pressed 7 to delete.
-pressed 6 to listen to message 0002 and pressed 9 to save and 0 to save to new folder.

I checked the mailbox directory and message 0002 was saved into new folder as msg0003.txt msg0003.WAV.
-hung up after saving message.
-logged into mailbox XXXX to listen to new messages (msg0003).
-pressed 1 to listen but playback failed because the saved message was filed as msg0003 instead of 0000.

I tried this patch.
http://svn.digium.com/view/asterisk?view=rev&revision=303679.

But this is not working.
My mailbox crashed with this patch. i got .lock file in my inbox directory.
i got this each time i left a message or tried to listen one.

So i reinstalled a clean 1.8.3-rc2 version.

any working patch for the version 1.8.3-rc2?

it's the same problem with the version 1.8.2.2.
Comments:By: godillon (godillon) 2011-02-03 09:10:28.000-0600

CLI messages>

[Feb  3 15:07:04] NOTICE[2418]: app_voicemail.c:7739 open_mailbox: Mailbox: /var/spool/asterisk/voicemail/default/2001/INBOX, expected 0 but found 1 message(s) in box with max threshold of 100.

[Feb  3 15:07:09] WARNING[2418]: app_voicemail.c:7500 play_message: No message attribute file?!! (/var/spool/asterisk/voicemail/default/2001/INBOX/msg0000.txt)

By: Leif Madsen (lmadsen) 2011-02-07 13:29:16.000-0600

I can confirm I've seen this as well on my home phone system.

By: Michael L. Young (elguero) 2011-02-07 19:35:59.000-0600

I think this would be related to issue ASTERISK-17292.

By: Michael L. Young (elguero) 2011-02-07 22:34:34.000-0600

Just a note:

The CLI message you posted in your note above suggests that you do not have the patch listed above applied.  Without that patch, there is no re-sequencing performed since the code is simply not there to do that and will always result in the issue you mention.

What I am curious about, is that you say with the patch applied, it wasn't working either (you say the mailbox crashed?).  Can you provide a debug log with the applied patch?  You mention revision 303679 but that is for trunk.  If you are running 1.8.3-rc2, you need revision 303678 since that is for the 1.8 branch.  http://svnview.digium.com/svn/asterisk?view=revision&revision=303678

Also, http://svnview.digium.com/svn/asterisk?view=revision&revision=304985, fixes an error in the syntax of that patch.  

I have been unable to reproduce this problem following the steps outlined in this bug report and in bug report ASTERISK-17292 with the patch applied that was supposed to have solved this issue.

With the patch applied, the CLI should read: "open_mailbox: Resequencing mailbox:...", when it detects the message count as being different from the last message index.

I hope this helps.

Thanks

By: godillon (godillon) 2011-02-08 09:24:28.000-0600

Ok i tried this patch http://svnview.digium.com/svn/asterisk?view=revision&revision=304985

I tried to leave a message but the result was the same. .lock file in my inbox directory and no new message in the mailbox.

i can't provide a debug log because each time i got "Disconnected from asterisk server"

i tried to leave another message (when the .lock file is in mailbox) and i got this warning :

WARNING[16694]: app.c:1290 ast_lock_path_lockfile: Failed to lock path '/var/spool/asterisk/voicemail/default/2001/INBOX': File exists
   -- <SIP/trunk_55-00000000> Playing 'beep.gsm' (language 'fr')
   -- Recording the message
   -- x=0, open writing:  /var/spool/asterisk/voicemail/default/2001/tmp/EaJQRc format: wav49, 0x8ce0f98
   -- x=1, open writing:  /var/spool/asterisk/voicemail/default/2001/tmp/EaJQRc format: gsm, 0x8d70ae0
   -- x=2, open writing:  /var/spool/asterisk/voicemail/default/2001/tmp/EaJQRc format: wav, 0x8d74ff0
   -- User hung up
   -- Recording was 0 seconds long but needs to be at least 1 - abandoning

By: godillon (godillon) 2011-02-08 09:37:25.000-0600

Ok i saw something new with the patch. http://svnview.digium.com/svn/asterisk?view=revision&revision=304985

If i have a empty inbox and i'm leaving a message. The first message is recorded correctly.

if i already have one message in my mailbox. (msg0000) and i'm trying to leave a message.
i got a .lock file in all my maibox. Not just the one i tried to leave a message.

By: David Brillert (aragon) 2011-02-08 09:46:50.000-0600

Godillon:  You see this in CLI "Disconnected from asterisk server"?
This leads me to believe your Asterisk segfaulted.
Do you have any core files in /tmp directory that you could run a gdb trace on?
I noticed some segfaults in my lab server logging into voicemail but during a time when my Asterisk version was installed optimized so my backtraces were useless.  Can you tell me how you reproduce the condition which = "Disconnected from asterisk server".  If I can reproduce any segfaults then I will open a bug report on that.

By: godillon (godillon) 2011-02-08 10:26:00.000-0600

aragon,

yes i got a core.localhost... file in my /tmp directory after the Disconnected from server.

the steps are :
1) In the file voicemail.c in asterisk-1.8.3-rc2/apps directory.
i changed the source code with this one : voicemail.c of the patch http://svnview.digium.com/svn/asterisk?view=revision&revision=304985  

2)i install the new version 1.8.3-rc2 patched
with
./configure
make
make install

3) i restart asterisk with the command : core restart now

4)i leave one message in a empty mailbox.
the message is recorded correctly.

5) i leave another message in the same mailbox.
I got a "Disconnected from server" and a new core file in /tmp directory.

By: godillon (godillon) 2011-02-08 10:47:48.000-0600

I also tried this patch  http://svnview.digium.com/svn/asterisk?view=revision&revision=303678

i got the same results like the patch : 304985.

if i'm trying to leave 2 messages in a empty mailbox.
the first message is left correctly.
the second message lock my mailbox with a .lock file and a Disconnected from Asterisk server message.

I hope you have enough information to fix this Resequencing problems.

Thank.

By: godillon (godillon) 2011-02-11 08:28:39.000-0600

do you found any solutions for this problems ?

By: David Brillert (aragon) 2011-02-11 08:35:05.000-0600

I closed out ASTERISK-17292 because I was no longer able to reproduce using 1.4 SVN checkout.
If I were you I would test fresh un-patched 1.8 SVN checkout and if you are still crashing then follow the Digium instructions to open a new bug report for your crash.

By: godillon (godillon) 2011-02-11 08:46:27.000-0600

i have 3 servers with version 1.8.3-rc2 (not patched) running right now.

Each days , some users call me to fix their mailbox, Because the resequencing is not working correctly.

i can reproduce the problem with the steps i wrote in the description of the issue.

Thank for your help.

By: David Brillert (aragon) 2011-02-11 08:59:21.000-0600

jpeeler's patch is not in 1.8.3-rc2

Try SVN checkout
http://www.asterisk.org/developers/get-source

Something like:
#cd /usr/src
#svn co  http://svn.digium.com/svn/asterisk/branches/1.8/
#cd 1.8
#./configure
#make menuselect
#make
#make install
#make config

During make menuselect be sure to choose compiler options for 'don't optimize' so your backtraces will include relevant debug info for your crash report.

By: godillon (godillon) 2011-02-11 22:02:56.000-0600

Ok , i will try the svn version.

I will give you some feedback.

By: godillon (godillon) 2011-02-15 11:23:36.000-0600

ok i tried the 1.8 svn version.

this version fixed the problem.

Thank you for your help.

By: Brett Bryant (bbryant) 2011-03-23 16:58:43

Since this issue has been fixed in newer versions of asterisk, I'm closing out this bug report.