Added: en/reference/general/functions/authenticate.xml
URL: http://svncommunity.digium.com/view/asterisk-docs/en/reference/general/functions/authenticate.xml?rev=2&view=auto
==============================================================================
--- en/reference/general/functions/authenticate.xml (added)
+++ en/reference/general/functions/authenticate.xml Tue May 2 10:34:17 2006
@@ -1,0 +1,142 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- $Revision: 1.20 $ -->
+ <refentry id="function.authenticate">
+ <refnamediv>
+ <refname>Authenticate</refname>
+ <refpurpose>
+ Authenticate a user
+ </refpurpose>
+ </refnamediv>
+ <refsect1>
+ <title>Description</title>
+ <methodsynopsis>
+ <methodname>Authenticate</methodname>
+ <methodparam><type>string</type><parameter>password</parameter></methodparam>
+ <methodparam choice="opt"><type>string</type><parameter>options</parameter></methodparam>
+ <methodparam choice="opt"><type>int</type><parameter>maxdigits</parameter></methodparam>
+ </methodsynopsis>
+ <para>
+ 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.
+ </para>
+
+ <para>
+ 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.
+ </para>
+
+ <para>
+ <parameter>maxdigits</parameter> is the maximum number of digits for the
+ password. Authenticate will attempt to match the password immediately as
+ soon as <parameter>maxdigits</parameter> is matched, without requiring
+ the user to press the # key. Defaults to 0, or no limit, and waits for
+ the # key to be pressed.
+ <note>
+ <simpara>
+ <parameter>maxdigits</parameter> was added in Asterisk 1.3.
+ </simpara>
+ </note>
+ </para>
+
+ <para>
+ When the <parameter>password</parameter> is a file path, and the
+ <parameter>options</parameter> contains 'm' the file is expected to have
+ a list of account codes and password hashes delimited with a colon (:).
+ A matching password will set the account code for the call to the account
+ code corresponding with the matched password.
+ <example>
+ <title>Using <parameter>password</parameter></title>
+ <programlisting role="astdialplan">
+<![CDATA[
+; Authenticate the password
+exten => s,1,Authenticate(5321)
+
+; Authenticate the password against a password file, one password per line
+exten => s,1,Authenticate(/path/to/passwd/file)
+
+; Authenticate from the db, using /db-keyfamily/<password>, i.e. /FEATURE/1234
+exten => s,1,Authenticate(/db-keyfamily, d)
+
+]]>
+ </programlisting>
+ </example>
+ </para>
+
+ <para>
+ <parameter>options</parameter> can be one or more of the following:
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ <literal>a</literal> - Set the channels' account code to the password
+ that is entered
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <literal>d</literal> - Interpret the given path as database key, not a
+ literal file
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <literal>j</literal> - Support jumping to n+101 if authentication
+ fails
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <literal>m</literal> - 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.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <literal>r</literal> - Remove the database key upon successful entry
+ (valid with 'd' only)
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <note>
+ <simpara>
+ Option <parameter>r</parameter> can only be used in conjunction with
+ option <parameter>d</parameter>. The
+ </simpara>
+ </note>
+ </para>
+
+ <para>
+ Returns 0 if the user enteres a valid password within 3 tries, or -1
+ otherwise (or on hangup).
+ </para>
+
+ </refsect1>
+ </refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:1
+sgml-indent-data:t
+indent-tabs-mode:nil
+sgml-parent-document:nil
+sgml-default-dtd-file:"../../../../manual.ced"
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+vim600: syn=xml fen fdm=syntax fdl=2 si
+vim: et tw=78 syn=sgml
+vi: ts=1 sw=1
+-->
Added: en/reference/general/reference.xml
URL: http://svncommunity.digium.com/view/asterisk-docs/en/reference/general/reference.xml?rev=2&view=auto
==============================================================================
--- en/reference/general/reference.xml (added)
+++ en/reference/general/reference.xml Tue May 2 10:34:17 2006
@@ -1,0 +1,44 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- $Revision: 1.16 $ -->
+<!-- Purpose: basic.text -->
+<!-- Membership: bundled -->
+
+<reference id="ref.general">
+ <title>General</title>
+ <titleabbrev>General</titleabbrev>
+
+ <partintro>
+ <section id="general.intro">
+ &reftitle.intro;
+ <para>
+ Applications of general interest. This section should probably be rewritten and recategorized and removed.
+ </para>
+ </section>
+
+ </partintro>
+
+&reference.general.functions;
+
+</reference>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:1
+sgml-indent-data:t
+indent-tabs-mode:nil
+sgml-parent-document:nil
+sgml-default-dtd-file:"../../../manual.ced"
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+vim600: syn=xml fen fdm=syntax fdl=2 si
+vim: et tw=78 syn=sgml
+vi: ts=1 sw=1
+-->
+
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum