Summary: | ASTERISK-13028: mwi activates for more than one mailbox if they have the same mailbox name but different contexts. | ||
Reporter: | vicks1 (vicks1) | Labels: | |
Date Opened: | 2008-11-06 20:11:27.000-0600 | Date Closed: | 2009-03-05 17:28:34.000-0600 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Applications/app_voicemail/IMAP |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) 13853_v2.patch ( 1) 13853.patch | |
Description: | this is due to asterisk only checking the X-Asterisk-VM-Mailbox header and ignoring X-Asterisk-VM-Context when polling for mwis to activate. As such, two different mailboxes have the same name in different contexts, both will activate if a message is received in either which one of the mailboxes. i have created a patch which i will submit ASAP. | ||
Comments: | By: vicks1 (vicks1) 2008-11-06 20:14:01.000-0600 Here is the patch pasted, I am unable to submit it with the upload file dialog because the captcha does not work on the "Sign License" page. <Code Removed --putnopvut> By: vicks1 (vicks1) 2008-11-06 21:55:32.000-0600 I forgot to add a word in the original description. "As such, two different mailboxes..." => "As such, if two different mailboxes..." By: Mark Michelson (mmichelson) 2008-12-10 13:10:26.000-0600 Sorry, but I had to remove the code from your previous note since it has not been licensed for our use. The captcha has since been fixed, so if you don't mind, could you upload the patch as an attachment to the issue. Thanks! By: Leif Madsen (lmadsen) 2008-12-15 10:15:44.000-0600 Changing this to feedback as we're waiting for the original reporter to resubmit the code and sign the license since the captcha has been fixed. Thanks! By: Mark Michelson (mmichelson) 2009-01-15 17:38:48.000-0600 I've added a patch which I think would accomplish what is described in the bug description here. It would be nice if this got tested since it appears the original reporter is not going to upload his original patch. By: Leif Madsen (lmadsen) 2009-03-03 12:39:43.000-0600 OK finally reproduced this I believe. Going to test the patch now. By: Leif Madsen (lmadsen) 2009-03-03 13:03:55.000-0600 Seems the real issue here is something beyond even just the headers as I can't load more than a single user with the same name in the voicemail.conf, even if they are under different VM contexts. Here is the output I get with 3 different contexts and users: *CLI> voicemail show users Context Mbox User Zone NewMsg [Mar 3 14:00:32] WARNING[1681]: app_voicemail.c:1190 messagecount: IMAP user not set for mailbox general default general New User -1 default 1000 Leif Madsen Default 466474496 xyz 1001 Leif Madsen 466474496 abc 1002 Leif Madsen 466474496 But if I change the 1002 user in the [abc] context to 1001 (under the same context) I get: *CLI> voicemail show users Context Mbox User Zone NewMsg [Mar 3 14:01:22] WARNING[1722]: app_voicemail.c:1190 messagecount: IMAP user not set for mailbox general default general New User -1 default 1000 Leif Madsen Default 318031296 xyz 1001 Leif Madsen 318031296 My configuration follows: imapserver = localhost imapport = 143 imapflags = novalidate-cert format = wav searchcontexts = yes expungeonhangup = yes listen-control-forward-key = 3 listen-control-reverse-key = 1 listen-control-pause-key = 2 listen-control-restart-key = 0 listen-control-stop-key = 456789*# sendvoicemail = yes review = yes authuser = lmadsen authpassword = XXXXXXXX [default] 1000 => 1000,Leif Madsen Default,,,imapuser=lmadsen,imappassword=XXXXXX [xyz] 1001 => 1000,Leif Madsen,,,imapuser=lmadsen,imappassword=XXXXXX [abc] 1001 => 1000,Leif Madsen,,,imapuser=lmadsen,imappassword=XXXXXX By: Leif Madsen (lmadsen) 2009-03-03 13:04:15.000-0600 This issue is acknowledged. By: Mark Michelson (mmichelson) 2009-03-03 13:12:10.000-0600 lmadsen: Were there any error or warning messages that appeared at startup from app_voicemail? The code to show voicemail users simply loops through the list of users and prints them all out. If the 1001@abc user isn't in the list, there may have been some warning as to why printed to show why he wasn't added. By: Leif Madsen (lmadsen) 2009-03-03 13:41:20.000-0600 There was no warning, but I'm gonna try loading this same config up without the IMAP storage stuff and see if I get the same issue. By: Leif Madsen (lmadsen) 2009-03-03 17:36:19.000-0600 btw: the big note I filed above is actually an issue with the searchcontexts=yes option, and has nothing to do with this issue. See bug ASTERISK-13691. By: Leif Madsen (lmadsen) 2009-03-05 14:51:33.000-0600 OK, I've done some more testing here. It seems I've gotten this IMAP stuff to work reasonably well now. Without the patch, both mailboxes update to the same NewMsg count. With the patch, it appears to now be accurate, and the MWI stuff seems to work correctly. However I think it has confused VoicemailMain() now because when I login to either mailbox, it doesn't know about the new msgs, and tells me I have no msgs at all, even though I should have about 5 old msgs, and 1 or 2 new msgs (depending on which box I login to). By: Mark Michelson (mmichelson) 2009-03-05 14:52:21.000-0600 I've uploaded a new version of the patch which fixes a blatant problem when attempting to open a mailbox from voicemailmain. Give it a try. By: Leif Madsen (lmadsen) 2009-03-05 14:56:41.000-0600 New patch works way way better (it works!) Not getting any audio on my msg's, but need to determine if that is something locally wrong, or a bug. Will report back after more testing. By: Mark Michelson (mmichelson) 2009-03-05 17:18:02.000-0600 Yeah, no audio on messages is a separate issue from the one presented here. I'm going to get this work committed and close this issue. By: Digium Subversion (svnbot) 2009-03-05 17:26:13.000-0600 Repository: asterisk Revision: 180464 U branches/1.4/apps/app_voicemail.c ------------------------------------------------------------------------ r180464 | mmichelson | 2009-03-05 17:26:12 -0600 (Thu, 05 Mar 2009) | 16 lines [IMAP] Fix message retrieval issues when identical mailbox names were defined in separate contexts. There was a fix put in a while back so that an X-Asterisk-VM-Context message header was added to stored IMAP voicemails. This would allow for us to differentiate if the same mailbox name was used in multiple contexts. The problem still left was that not all places where messages were retrieved actually attempted to use this header for information when retrieving messages. This commit fixes that so that MWI and message retrieval from VoiceMailMain work as expected. (closes issue ASTERISK-13028) Reported by: vicks1 Patches: 13853_v2.patch uploaded by mmichelson (license 60) Tested by: lmadsen ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=180464 By: Digium Subversion (svnbot) 2009-03-05 17:26:59.000-0600 Repository: asterisk Revision: 180465 _U trunk/ U trunk/apps/app_voicemail.c ------------------------------------------------------------------------ r180465 | mmichelson | 2009-03-05 17:26:58 -0600 (Thu, 05 Mar 2009) | 22 lines Merged revisions 180464 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r180464 | mmichelson | 2009-03-05 17:26:11 -0600 (Thu, 05 Mar 2009) | 16 lines [IMAP] Fix message retrieval issues when identical mailbox names were defined in separate contexts. There was a fix put in a while back so that an X-Asterisk-VM-Context message header was added to stored IMAP voicemails. This would allow for us to differentiate if the same mailbox name was used in multiple contexts. The problem still left was that not all places where messages were retrieved actually attempted to use this header for information when retrieving messages. This commit fixes that so that MWI and message retrieval from VoiceMailMain work as expected. (closes issue ASTERISK-13028) Reported by: vicks1 Patches: 13853_v2.patch uploaded by mmichelson (license 60) Tested by: lmadsen ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=180465 By: Digium Subversion (svnbot) 2009-03-05 17:28:02.000-0600 Repository: asterisk Revision: 180466 _U branches/1.6.0/ U branches/1.6.0/apps/app_voicemail.c ------------------------------------------------------------------------ r180466 | mmichelson | 2009-03-05 17:28:02 -0600 (Thu, 05 Mar 2009) | 29 lines Merged revisions 180465 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r180465 | mmichelson | 2009-03-05 17:26:58 -0600 (Thu, 05 Mar 2009) | 22 lines Merged revisions 180464 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r180464 | mmichelson | 2009-03-05 17:26:11 -0600 (Thu, 05 Mar 2009) | 16 lines [IMAP] Fix message retrieval issues when identical mailbox names were defined in separate contexts. There was a fix put in a while back so that an X-Asterisk-VM-Context message header was added to stored IMAP voicemails. This would allow for us to differentiate if the same mailbox name was used in multiple contexts. The problem still left was that not all places where messages were retrieved actually attempted to use this header for information when retrieving messages. This commit fixes that so that MWI and message retrieval from VoiceMailMain work as expected. (closes issue ASTERISK-13028) Reported by: vicks1 Patches: 13853_v2.patch uploaded by mmichelson (license 60) Tested by: lmadsen ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=180466 By: Digium Subversion (svnbot) 2009-03-05 17:28:34.000-0600 Repository: asterisk Revision: 180467 _U branches/1.6.1/ U branches/1.6.1/apps/app_voicemail.c ------------------------------------------------------------------------ r180467 | mmichelson | 2009-03-05 17:28:33 -0600 (Thu, 05 Mar 2009) | 29 lines Merged revisions 180465 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r180465 | mmichelson | 2009-03-05 17:26:58 -0600 (Thu, 05 Mar 2009) | 22 lines Merged revisions 180464 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r180464 | mmichelson | 2009-03-05 17:26:11 -0600 (Thu, 05 Mar 2009) | 16 lines [IMAP] Fix message retrieval issues when identical mailbox names were defined in separate contexts. There was a fix put in a while back so that an X-Asterisk-VM-Context message header was added to stored IMAP voicemails. This would allow for us to differentiate if the same mailbox name was used in multiple contexts. The problem still left was that not all places where messages were retrieved actually attempted to use this header for information when retrieving messages. This commit fixes that so that MWI and message retrieval from VoiceMailMain work as expected. (closes issue ASTERISK-13028) Reported by: vicks1 Patches: 13853_v2.patch uploaded by mmichelson (license 60) Tested by: lmadsen ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=180467 |