Requires that the caller enter a password before proceeding to the next priority.
Authenticate(password[,options[,maxDigits]])
Requires that the caller enters the specified password correctly before proceeding to the next priority. Allows three the caller three chances to enter the password correctly before hanging up.
If password begins with "/"
(forward-slash), Asterisk will assume it is a filename to a file
containing a list of valid passwords (exactly one per line). Passwords may
also be stored in the Asterisk database (AstDB); see option d
below.
The following options are allowed (also in combination):
a
accountcode field
and the channel variable ACCOUNTCODE to the entered
password.d
r
d).j
|
|
|
When using option |
If maxDigits is set, input is ended as soon as the
user has entered enough digits; this saves having to enter
"#". (Default: 0; no limits on input).
Returns 0 if the user enters the correct password within three attempts, otherwise hangs up the channel and returns -1.
; Passwort 1234 verlangen:
exten => 123,1,Answer()
exten => 123,2,Authenticate(1234,j,4) ; an exceptional use of
priority jumping because we want to tell the caller
; that she has entered t
he wrong password
exten => 123,3,Playback(pin-nummer-akzeptiert)
exten => 123,103,Playback(pin-nummer-falsch)
|
|
|
Internal help for this application in Asterisk 1.4: -= Info about application 'Authenticate' =-
[Synopsis]
Authenticate a user
[Description]
Authenticate(password[|options[|maxdigits]]): This application asks th
e caller
to enter a given password in order to continue dialplan execution. If th
e password
begins with the '/' character, it is interpreted as a file which contain
s a list of
valid passwords, listed 1 password per line in the file.
When using a database key, the value associated with the key can be an
ything.
Users have three attempts to authenticate before the channel is hung up.
If the
passsword is invalid, the 'j' option is specified, and priority n+101 ex
ists,
dialplan execution will continnue at this location.
Options:
a - Set the channels' account code to the password that is entered
d - Interpret the given path as database key, not a literal file
j - Support jumping to n+101 if authentication fails
m - Interpret the given path as a file which contains a list of acc
ount
codes and password hashes delimited with ':', listed one per li
ne in
the file. When one of the passwords is matched, the channel wil
l have
its account code set to the corresponding account code in the f
ile.
r - Remove the database key upon successful entry (valid with 'd' o
nly)
maxdigits - maximum acceptable number of digits. Stops reading aft
er
maxdigits have been entered (without requiring the user to
press the '#' key).
Defaults to 0 - no limit - wait for the user press the '#' key.
diff output to internal help in Asterisk 1.2: 8,10c8,10 < Authenticate(password[|options[|maxdigits]]): This application asks the caller < to enter a given password in order to continue dialplan execution. If the password < begins with the '/' character, it is interpreted as a file which conta ins a list of --- > Authenticate(password[|options]): This application asks the caller t o enter a > given password in order to continue dialplan execution. If the passwor d begins > with the '/' character, it is interpreted as a file which contains a l ist of 25,28d24 < maxdigits - maximum acceptable number of digits. Stops reading a fter < maxdigits have been entered (without requiring the user to < press the '#' key). < Defaults to 0 - no limit - wait for the user press the '#' ke y. |
See also.
the section called “VMAuthenticate()”