[Home]

Summary:ASTERISK-12482: Voicemail left in wrong mailbox if multiple users have the same mailbox # but are in a diferent context
Reporter:Mike Oliveras (moliveras)Labels:
Date Opened:2008-07-29 21:33:56Date Closed:2008-08-29 10:51:59
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Applications/app_voicemail/IMAP
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 13194.patch
( 1) voicemail.conf
Description:I have two different customers set up on the same asterisk, each in a different context. (voicemail.conf file is attached)


; Voicemail for customer 'NJ_@cust1'
[cust1]
100 => 1234,Mike Oliveras,,,tz=pacific|imapuser=100@cust1
200 => 1234,Grand Stream,,,tz=pacific|imapuser=200@cust1
300 => 9999,Joe Blow,,,tz=pacific|imapuser=300@cust1
400 => ,sipp,,,tz=pacific|imapuser=400@cust1
800 => 1234,Michael Oliveras,,,tz=pacific|imapuser=800@cust1

; Voicemail for customer 'NJ_@cust2'
[cust2]
100 => 1234,Link Sys,,,tz=pacific|imapuser=100@cust2
600 => ,Joe Blow,,,tz=pacific|imapuser=600@cust2
700 => ,Fax Line,,,tz=pacific|imapuser=700@cust2

I am using dovecot as the imap server.

If extension 200 calls extension 100 (both belong to cust1), then the voicemail is left in the mailbox belonging to cust2. Also, vmwi is sent to both 100@cust2 and 100@cust1.  If user 100@cust1 checks voicemail, the response is that there are no messages waiting.  If 100@cust2 checks voicemail, it is successful and vmwi is removed from both phones.

I can send additional debug if needed, but I just wanted to check first if there is any known reason why this would not work.  I also tried removing the authuser and authpassword from voicemail.conf and provisioned an imappassword for each user and got exactly the same result.

Is there any reason why I can't use the same mailbox number?  This works fine when voicemail is stored locally.  It seems as if asterisk is not taking into acount the context when leaving or checking messages.

Best Regards,

Mike Oliveras


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

asterisk built from 1.4.21.2 tarball, with uw-imap-2007b
OS: rhel5.1

I will attach my voicemail.conf file to this report.
Comments:By: Mark Michelson (mmichelson) 2008-07-30 12:47:54

You're exactly right. When using IMAP storage, voicemail users are referenced by mailbox number without taking the context into account. There is no good reason why this is done, and this should be fixed.

By: Mark Michelson (mmichelson) 2008-08-26 11:34:47

I have uploaded a patch for testing. This patch adds context-checking as requested. In my test setup, things appeared to work fine, but I would like further verification.

The patch was created against the 1.4 subversion branch.

By: Mike Oliveras (moliveras) 2008-08-29 09:35:42

I applied this patch and it seems to be working for me as well.  I now see the message left in the correct mailbox and only the mailbox with the correct context is getting a vmwi indication.

By: Digium Subversion (svnbot) 2008-08-29 10:51:57

Repository: asterisk
Revision: 140421

U   branches/1.4/apps/app_voicemail.c

------------------------------------------------------------------------
r140421 | mmichelson | 2008-08-29 10:51:56 -0500 (Fri, 29 Aug 2008) | 12 lines

Add context checking when retrieving a vm_state.
This was causing a problem for people who had identically
named mailboxes in separate voicemail contexts.
This commit affects IMAP storage only.

(closes issue ASTERISK-12482)
Reported by: moliveras
Patches:
     13194.patch uploaded by putnopvut (license 60)
Tested by: putnopvut, moliveras


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

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