[Asterisk-Dev] missing .gsm in VoiceMailMain(2)

Rob Gagnon rob at networkip.net
Tue Jul 6 13:30:53 MST 2004


Moved to bugs.digium.com

See:  http://bugs.digium.com/bug_view_page.php?bug_id=0001982

----- Original Message ----- 
From: "Rob Gagnon" <rob at networkip.net>
To: <asterisk-dev at lists.digium.com>
Sent: Tuesday, July 06, 2004 3:22 PM
Subject: Re: [Asterisk-Dev] missing .gsm in VoiceMailMain(2)


> Upon more investigation, the 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: "
>
> Now...  ast_streamfile() is working OK.  I think it is being abused here
to
> protect users from hearing a prompt when they should not.
>
> If you place "ast_waitstream(chan, " "); into app_voicemail.c two lines
> below where you find the text "vm-incorrect" you will see what happens.
>
> 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 because ast_readstring is now
> waiting to input the mailbox again
>
> Now, the other way, to show the issue:
> - Dial in VoicemailMain(mailbox at 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 at context format
>
> Rob
>
>
> ----- Original Message ----- 
> From: "Rob Gagnon" <rob at networkip.net>
> To: <asterisk-dev at lists.digium.com>
> Sent: Tuesday, July 06, 2004 2:27 PM
> Subject: Re: [Asterisk-Dev] missing .gsm in VoiceMailMain(2)
>
>
> > So far, it seems a problem with ast_streamfile( ) streaming two files
> right
> > behind eachother.
> >
> > With a few log writes placed in ast_readaudio_callback( ), I can see
that
> > only 1 call to ast_write( ) is happening in ast_readaudio_callback( )
when
> > "vm-incorrect" is followed by "vm-password" under this situation.
> >
> >
> > ----- Original Message ----- 
> > From: "Rob Gagnon" <rob at networkip.net>
> > To: <asterisk-dev at lists.digium.com>
> > Sent: Tuesday, July 06, 2004 1:57 PM
> > Subject: Re: [Asterisk-Dev] missing .gsm in VoiceMailMain(2)
> >
> >
> > > Tilghman,
> > >
> > > I tested this, and it is a bug apparently.
> > >
> > > What happens is this:
> > > exten =>766,1,VoiceMailMain(704 at pbx)
> > >
> > > When dialling 766, app_voicemail plays "Password" (the vm-password.gsm
> > file)
> > > If you enter the password wrong, it should play "Login incorrect", and
> ask
> > > for password again.
> > > The CLI is showing the "vm-incorrect" message, but not actually
playing
> > it.
> > >
> > > I am about to look into the code.
> > >
> > > ----- Original Message ----- 
> > > From: "Tilghman Lesher" <tilghman at mail.jeffandtilghman.com>
> > > To: <asterisk-dev at lists.digium.com>
> > > Sent: Tuesday, July 06, 2004 1:26 PM
> > > Subject: Re: [Asterisk-Dev] missing .gsm in VoiceMailMain(2)
> > >
> > >
> > > > On Tuesday 06 July 2004 12:14, Thomas Niesel wrote:
> > > > > I try the following within context:
> > > >
> > > > As this is a usage question, not a development question, please
> redirect
> > > > your question to the -Users list.
> > > >
> > > > -- 
> > > > Tilghman
> > > > _______________________________________________
> > > > Asterisk-Dev mailing list
> > > > Asterisk-Dev at lists.digium.com
> > > > http://lists.digium.com/mailman/listinfo/asterisk-dev
> > > > To UNSUBSCRIBE or update options visit:
> > > >    http://lists.digium.com/mailman/listinfo/asterisk-dev
> > >
> > > _______________________________________________
> > > Asterisk-Dev mailing list
> > > Asterisk-Dev at lists.digium.com
> > > http://lists.digium.com/mailman/listinfo/asterisk-dev
> > > To UNSUBSCRIBE or update options visit:
> > >    http://lists.digium.com/mailman/listinfo/asterisk-dev
> >
> > _______________________________________________
> > Asterisk-Dev mailing list
> > Asterisk-Dev at lists.digium.com
> > http://lists.digium.com/mailman/listinfo/asterisk-dev
> > To UNSUBSCRIBE or update options visit:
> >    http://lists.digium.com/mailman/listinfo/asterisk-dev
>
> _______________________________________________
> Asterisk-Dev mailing list
> Asterisk-Dev at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-dev
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev




More information about the asterisk-dev mailing list