[Home]

Summary:ASTERISK-13689: greetings can not be retrieved from IMAP
Reporter:William Taylor (wtca)Labels:
Date Opened:2009-03-03 13:24:38.000-0600Date Closed:2009-08-20 16:51:26
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Applications/app_voicemail/IMAP
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 14597_v2.patch
( 1) 14597.patch
( 2) thread-apply-all-bt.txt
Description:greetings get stored in IMAP just fine. However when I try to retrieve one asterisk doesn't seem to attempt to make the imap connection. It logs error:
ERROR[27691] app_voicemail.c: Voicemail state not found!

Please let me know if you need any additional info.
Comments:By: Mark Michelson (mmichelson) 2009-03-03 13:31:04.000-0600

It looks like there was some bad logic used (using || instead of &&). See if the attached patch fixes the problem.

By: Mark Michelson (mmichelson) 2009-03-03 15:23:15.000-0600

Moving this back to "acknowledged" since wtca confirmed on IRC that this patch was not enough.

After looking at some debug output from him, the problem appeared to be that there were no vm_states in the list so naturally we cannot find one. The problem appears to be that if we can't find one, we never create a new one. It seems like potentially the fix here is that if we cannot find a vm_state when trying to play a greeting, then it is probably correct to create a vm_state structure and continue on.

By: Mark Michelson (mmichelson) 2009-03-04 13:30:28.000-0600

I've uploaded a new patch for testing. Please let me know how this works out for you.

By: Mark Michelson (mmichelson) 2009-03-11 12:34:08

Ping. Have you tried using the new patch I uploaded?

By: Leif Madsen (lmadsen) 2009-03-24 14:44:35

OK, tested this, and I think the original issue is solved. However I ran into another issue where if you call into Voicemail(3002), and there is no greeting, the call just hangs forever on the console (and it's really hard to 'soft hangup' the channel too).

By: Mark Michelson (mmichelson) 2009-03-26 14:49:45

lmadsen: Can you get a backtrace of all threads when the hang happens? I'm interested in seeing exactly where the "hang" is occurring. Looking at the code, I have a hunch about what could be going wrong, and it may be due to an infinite loop. For now, I'll just ask for the backtrace. Depending on where the hang is, I may have further instructions for you.

By: Leif Madsen (lmadsen) 2009-03-27 12:10:58

OK, let me know if this is the information you are looking for Mark. Thanks!

By: Mark Michelson (mmichelson) 2009-04-06 10:25:28

lmadsen: Sorry for taking a while to get back to this, but I had some other stuff I needed to work on. From the backtrace, it appears that there is a single thread stuck attempting to lock a mutex, which is odd, to say the least.

I tried reproducing by enabling imapgreetings and calling a user's voicemail. I couldn't make the hang occur. I'm wondering if my recent other fixes with regards to IMAP may have fixed this, too. Could you re-test?

By: Leif Madsen (lmadsen) 2009-05-05 15:05:47

I finally got back to testing this (after spending some time trying to get this all setup) and it works with your patch now! Seems that whatever else you fixed after the version I had been running originally fixed my looping issue.

I'd say go ahead and get this committed and closed!

By: Leif Madsen (lmadsen) 2009-05-05 15:18:09

Actually forget what I said. I just reproduced it again with latest 1.6.0 with your patch.

By: Jeff Peeler (jpeeler) 2009-08-19 12:28:03

Leif, how did you manage to get that thread stuck? Can you reproduce with some core show locks output?

By: Digium Subversion (svnbot) 2009-08-20 16:33:44

Repository: asterisk
Revision: 213404

U   trunk/apps/app_voicemail.c

------------------------------------------------------------------------
r213404 | jpeeler | 2009-08-20 16:33:43 -0500 (Thu, 20 Aug 2009) | 12 lines

Fix greeting retrieval from IMAP

Properly check for the current voicemail state and if it doesn't exist,
create it.

(closes issue ASTERISK-13689)
Reported by: wtca
Patches:
     14597_v2.patch uploaded by mmichelson (license 60)
Tested by: jpeeler


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

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

By: Digium Subversion (svnbot) 2009-08-20 16:38:01

Repository: asterisk
Revision: 213411

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

------------------------------------------------------------------------
r213411 | jpeeler | 2009-08-20 16:38:00 -0500 (Thu, 20 Aug 2009) | 18 lines

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

........
 r213404 | jpeeler | 2009-08-20 16:33:11 -0500 (Thu, 20 Aug 2009) | 12 lines
 
 Fix greeting retrieval from IMAP
 
 Properly check for the current voicemail state and if it doesn't exist,
 create it.
 
 (closes issue ASTERISK-13689)
 Reported by: wtca
 Patches:
       14597_v2.patch uploaded by mmichelson (license 60)
 Tested by: jpeeler
........

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

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

By: Digium Subversion (svnbot) 2009-08-20 16:44:24

Repository: asterisk
Revision: 213412

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

------------------------------------------------------------------------
r213412 | jpeeler | 2009-08-20 16:44:24 -0500 (Thu, 20 Aug 2009) | 18 lines

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

........
 r213404 | jpeeler | 2009-08-20 16:33:11 -0500 (Thu, 20 Aug 2009) | 12 lines
 
 Fix greeting retrieval from IMAP
 
 Properly check for the current voicemail state and if it doesn't exist,
 create it.
 
 (closes issue ASTERISK-13689)
 Reported by: wtca
 Patches:
       14597_v2.patch uploaded by mmichelson (license 60)
 Tested by: jpeeler
........

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

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

By: Digium Subversion (svnbot) 2009-08-20 16:51:25

Repository: asterisk
Revision: 213413

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

------------------------------------------------------------------------
r213413 | jpeeler | 2009-08-20 16:51:25 -0500 (Thu, 20 Aug 2009) | 18 lines

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

........
 r213404 | jpeeler | 2009-08-20 16:33:11 -0500 (Thu, 20 Aug 2009) | 12 lines
 
 Fix greeting retrieval from IMAP
 
 Properly check for the current voicemail state and if it doesn't exist,
 create it.
 
 (closes issue ASTERISK-13689)
 Reported by: wtca
 Patches:
       14597_v2.patch uploaded by mmichelson (license 60)
 Tested by: jpeeler
........

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

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