Authenticate()
Authenticate(Passwort
[,Optionen
[,maxZiffern]])
Authenticate()
gibt dem Anrufer drei Versuche, das Passwort
korrekt einzugeben. Andernfalls wird die Verbindung beendet.Passwort
mit dem /
-Zeichen beginnt,
wird es als Datei interpretiert, die eine Liste gültiger Passwörter (genau
eins pro Zeile) enthält. Passwörter können auch in der Asterisk-Datenbank
(AstDB) gespeichert sein (siehe dazu die Option d
weiter
unten).a
accountcode
und die Variable für den Channel,
ACCOUNTCODE
, auf das eingegebene Passwort.d
Passwort
als Schlüssel
der Asterisk-Datenbank. Wenn ein Datenbankschlüssel benutzt wird, kann
der mit dem Schlüssel assoziierte Wert beliebig sein.r
d
).j
d
, dass – was wenig
nachvollziehbar ist! – als Parameter
/passwoerter
/1234
verlangt wird, wobei passwoerter
die Familie ist und
1234
das Passwort. Der unter diesem Schlüssel gespeicherte
Wert ist irrelevant. Der gesunde Menschenverstand würde einen
Datenbank-Eintrag wie /passwoerter/art => 1234 erwarten.maxZiffern
wird die Eingabe automatisch
nach so vielen Ziffern beendet, ohne dass der User #
drücken
muss (Default: 0 für keine Begrenzung).; Passwort 1234 verlangen: exten => 123,1,Answer() exten => 123,2,Authenticate(1234,j,4) ; hier ausnahmsweise mit Priority-Jumping ; weil wir dem Anrufer noch sagen wollen, ; dass sein Passwort falsch ist exten => 123,3,Playback(pin-nummer-akzeptiert) exten => 123,103,Playback(pin-nummer-falsch)
————————| 1.2 |————————| 1.4 |————————| 1.6 |————————
-= Info about application 'Authenticate' =-
[Synopsis]
Authenticate a user
[Description]
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 contains 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 anything.
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 exists,
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 account
codes and password hashes delimited with ':', listed one per line in
the file. When one of the passwords is matched, the channel will have
its account code set to the corresponding account code in the file.
r - Remove the database key upon successful entry (valid with 'd' only)
maxdigits - maximum acceptable number of digits. Stops reading after
maxdigits have been entered (without requiring the user to
press the '#' key).
Defaults to 0 - no limit - wait for the user press the '#' key.
--- in Asterisk 1.2
+++ in Asterisk 1.4
@@ -4,9 +4,9 @@
Authenticate a user
[Description]
- Authenticate(password[|options]): 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 contains a list of
+ 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 contains 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 anything.
Users have three attempts to authenticate before the channel is hung up. If the
@@ -21,3 +21,7 @@
the file. When one of the passwords is matched, the channel will have
its account code set to the corresponding account code in the file.
r - Remove the database key upon successful entry (valid with 'd' only)
+ maxdigits - maximum acceptable number of digits. Stops reading after
+ maxdigits have been entered (without requiring the user to
+ press the '#' key).
+ Defaults to 0 - no limit - wait for the user press the '#' key.
--- in Asterisk 1.4
+++ in Asterisk 1.6
@@ -4,18 +4,15 @@
Authenticate a user
[Description]
- Authenticate(password[|options[|maxdigits]]): This application asks the caller
+ 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 contains 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 anything.
- 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 exists,
- dialplan execution will continnue at this location.
+ Users have three attempts to authenticate before the channel is hung up.
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 account
codes and password hashes delimited with ':', listed one per line in
the file. When one of the passwords is matched, the channel will have
VMAuthenticate()
“