[Home]

Summary:ASTERISK-04237: [patch] Add t Option To VMAuthenticate to skipuser transparently using supplied mailbox
Reporter:Gregory Hinton Nietsky (irroot)Labels:
Date Opened:2005-05-19 17:49:59Date Closed:2011-06-07 14:05:08
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Applications/app_voicemail
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) app_voicemail_trans.patch
( 1) app_voicemail_trans.patch5
Description:you are still required to enter the mailbox when using the s option this option will transparently use the supplied mailbox and skip the mailbox prompt/read and prompt for password.

this more closely mimics Authenticate and for me was the expected behavior of VMAuthenticate when i switched from Authenticate
Comments:By: Kevin P. Fleming (kpfleming) 2005-05-19 23:22:16

I don't understand how your patch could work; if you don't fill in the 'mailbox' variable with the desired mailbox, when vm_authenticate is called it will use the channel's cid_num, rather than the specified mailbox.

By: Gregory Hinton Nietsky (irroot) 2005-05-20 03:37:10

ok im with you on this well spotted watson ...

the problem seems to be that the supplied username is not passed on to vm_authenticate when it should ?? in the original code i never spotted this thx it should be fixed with the latest patch upload ...

By: Gregory Hinton Nietsky (irroot) 2005-05-20 04:29:47

ok further refined to return AUTH_MAILBOX and AUTH_CONTEXT corectly now the context is passed as null if no context is given is this correct ??

By: Mark Monnin (wrmem) 2005-05-23 09:11:46

Do you need the "t" option, or would just checking for !ast_strlen_zero(user) instead of "skipuser" suffice?

Also, I think the sizeof(user) is wrong.  Wouldn't that return the length of the pointer and not the string length?

By: Gregory Hinton Nietsky (irroot) 2005-05-23 11:09:05

i agree the t option may be unneeded in that if the mailbox is set dont expext it to be passed ...

this is the behaviour i expected if it is done this way it may break current implementations ...

By: twisted (twisted) 2005-05-25 00:46:17

Why doesn't this just use the mailbox number and context supplied to it when called as voicemailmain() would?  What sense does it make to enter the box number if you're trying to supply it?

example:

I want to force authentication of a user based on a number called.

[incoming]
exten => _XXXX,1,SetVar(DID=${EXTEN})
exten => _XXXX,2,GotoIf($[${DISABLED${DID}} = 1]?disabled,s,1:enabled,s,1)

[enabled]

exten => s,1,VMAuthenticate(${DID})

Why in the world would I want the person to enter the mailbox to authenticate against in this situation?  That leads to confusion, especially since it says "Comedian Mail, Mailbox?".   When supplied with an argument, that arugment, IMHO, SHOULD BE PASSED to the authenticate routine and the user simply asked "Password?"

By reading the app description from the cli, thus is the behaviour that should be expected in the first place.

By: Michael Jerris (mikej) 2005-06-23 15:39:36

Closed due to lack of response.  Please re-open when you have a response and updated patch.  Thanks.