[Home]

Summary:ASTERISK-01957: app_voicemail does not tell user password bad with VoicemailMain(mailbox@context) format
Reporter:Rob Gagnon (rgagnon)Labels:
Date Opened:2004-07-06 15:44:48Date Closed:2008-01-15 15:02:42.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_voicemail
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) patch.tar.gz
( 1) vm-incorrect-only.gsm
( 2) vm-mailbox.gsm
( 3) voicemail.patch.txt
Description:When calling VoiceMailMaio() with a complete mailbox@context format, and keying in the password wrong, user will not hear "login incorrect"

Analysis is in Additional Information.  This cannot be fixed without a new "vm-incorrect" prompt AND some code.

If someone can do the prompt fiddling, I can fix the code.

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

This issue could be by design, but be a slightly flawed design.  Here's how:

First,  the contents of the prompts in question:

"vm-password"   : "Password:"
"vm-incorrect"  :  "Login incorrect.  Mailbox? "

To really see what is happening, you can place 'ast_waitstream(chan, " ");' into app_voicemail.c two lines below where you find the text "vm-incorrect".

Here is the code snippet after modification for testing:
===================================
     if (!valid) {
        if (useadsi)
           adsi_login(chan);
        if (ast_streamfile(chan, "vm-incorrect", chan->language))
           break;
        ast_waitstream(chan," ");   ////////////  This line added for
testing
     }
     logretries++;
===================================
To replicate:

- Dial in VoicemailMain(@context) or VoicemailMain()
- You hear the prompt for the mailbox and password.
- Enter a valid mailbox, but bad password
- You will hear the "vm-incorrect" prompt, and it sounds normal because ast_readstring() is now waiting to input the mailbox again

Now, the other way, to show the issue:
- Dial in VoicemailMain(mailbox@context)
- You hear the prompt for the password only
- Enter an invalid password
- If you used the insertion of "ast_waitstream" above, you will hear the "vm-incorrect" prompt, but it is logically wrong since it asks you to enter the mailbox at the end of the prompt, but it will not wait for that input.  It skips on to the "vm-password" prompt.
- If you use the code as-is in CVS, you see "vm-incorrect" noted as being played at the CLI but you only hear the "vm-password" prompt because both files were ast_streamfile()'d but the "vm-incorrect" file was not waited for.  Sequential ast_streamfile()s without an ast_waitstream will only let
you hear the last file streamed

The solution is going to have to be two-fold:
1) The "vm-incorrect" prompt needs to be broken into two prompts:  One that simply states "Login Incorrect", and another that states "Mailbox?"
2) Some logic will need to be placed around the playing of the "vm-incorrect" prompt so that the optional new "Mailbox:" prompt is not played if the mailbox was supplied in the mailbox@context format
Comments:By: Olle Johansson (oej) 2004-07-16 13:47:31

Any updates? Still a problem?

/Housekeeping

By: Rob Gagnon (rgagnon) 2004-07-16 14:50:31

Behavior still exists.  Waiting for a prompt volunteer.

By: Olle Johansson (oej) 2004-07-16 15:22:48

Test these files...

By: Rob Gagnon (rgagnon) 2004-07-16 16:30:55

OK, heres the fix.

IMPORTANT NOTES:

The patch.tar.gz file contains the following:
- voicemail.patch.txt (same as 1,644 byte file uploaded)
 This patches apps/app_voicemail.c and sounds.txt

- vm-incorrect-mailbox.gsm
 This is the exact same as the old vm-incorrect file, but with a more explanatory filename.  Contents:  "Login incorrect.  Mailbox?"

- vm-incorrect.gsm
 New file supplied by oej.  Contents:  "Login incorrect."

So, vm-incorrect-mailbox.gsm replaces the existing vm-incorrect.gsm file.  And the contained vm-incorrect.gsm file is new.  Of course CVS will see things as a new version of vm-incorrect.gsm, with a new file vm-incorrect-mailbox.gsm.

Minor change to flow of voicemail login when password is bad:
- If you use (mailbox@context) format, you will hear only "Login incorrect." for each of the allowed 3 attempts. (default=3).
 Example:
   Password?
   Login incorrect.
   Password?
   Login incorrect.
   Password?
   Login incorrect.
   Goodbye.

- If you use (@context) format, you will hear "Login incorrect.  Mailbox?" for all, but the last allowed attempt.  On the last bad attempt, you hear only "Login incorrect."
 Example:
   Comedian Mail.  Mailbox?    
   Password?
   Login incorrect.  Mailbox?
   Password?
   Login incorrect.  Mailbox?
   Password?
   Login incorrect.
   Goodbye.

edited on: 07-16-04 16:16

By: Rob Gagnon (rgagnon) 2004-07-16 16:35:44

Reminder sent to oej

Patch uploaded forr ASTERISK-1957

By: Mark Spencer (markster) 2004-07-16 21:48:29

Fixed in CVS, thanks guys!

By: Digium Subversion (svnbot) 2008-01-15 15:02:42.000-0600

Repository: asterisk
Revision: 3453

U   trunk/apps/app_voicemail.c
A   trunk/sounds/vm-incorrect-mailbox.gsm
U   trunk/sounds/vm-incorrect.gsm
U   trunk/sounds.txt

------------------------------------------------------------------------
r3453 | markster | 2008-01-15 15:02:42 -0600 (Tue, 15 Jan 2008) | 2 lines

Voicemail fixes (bug ASTERISK-1957)

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

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