Merge changes from team/group/appdocsxml

This commit introduces the first phase of an effort to manage documentation of the
interfaces in Asterisk in an XML format.  Currently, a new format is available for
applications and dialplan functions.  A good number of conversions to the new format
are also included.

For more information, see the following message to asterisk-dev:

http://lists.digium.com/pipermail/asterisk-dev/2008-October/034968.html


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant
2008-11-01 21:10:07 +00:00
parent 1fef0f63bb
commit 5b168ee34b
111 changed files with 8063 additions and 2478 deletions

View File

@@ -54,31 +54,52 @@ AST_APP_OPTIONS(auth_app_options, {
static char *app = "Authenticate";
static char *synopsis = "Authenticate a user";
static char *descrip =
" Authenticate(password[,options[,maxdigits[,prompt]]]): This application asks the caller\n"
"to enter a given password in order to continue dialplan execution. If the password\n"
"begins with the '/' character, it is interpreted as a file which contains a list of\n"
"valid passwords, listed 1 password per line in the file.\n"
" When using a database key, the value associated with the key can be anything.\n"
"Users have three attempts to authenticate before the channel is hung up.\n"
" Options:\n"
" a - Set the channels' account code to the password that is entered\n"
" d - Interpret the given path as database key, not a literal file\n"
" m - Interpret the given path as a file which contains a list of account\n"
" codes and password hashes delimited with ':', listed one per line in\n"
" the file. When one of the passwords is matched, the channel will have\n"
" its account code set to the corresponding account code in the file.\n"
" r - Remove the database key upon successful entry (valid with 'd' only)\n"
" maxdigits - maximum acceptable number of digits. Stops reading after\n"
" maxdigits have been entered (without requiring the user to\n"
" press the '#' key).\n"
" Defaults to 0 - no limit - wait for the user press the '#' key.\n"
" prompt - Override the agent-pass prompt file.\n"
;
;
/*** DOCUMENTATION
<application name="Authenticate" language="en_US">
<synopsis>
Authenticate a user
</synopsis>
<syntax>
<parameter name="password" required="true">
<para>Password the user should know</para>
</parameter>
<parameter name="options" required="false">
<optionlist>
<option name="a">
<para>Set the channels' account code to the password that is entered</para>
</option>
<option name="d">
<para>Interpret the given path as database key, not a literal file</para>
</option>
<option name="m">
<para>Interpret the given path as a file which contains a list of account
codes and password hashes delimited with <literal>:</literal>, 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.</para>
</option>
<option name="r">
<para>Remove the database key upon successful entry (valid with <literal>d</literal> only)</para>
</option>
</optionlist>
</parameter>
<parameter name="maxdigits" required="false">
<para>maximum acceptable number of digits. Stops reading after
maxdigits have been entered (without requiring the user to press the <literal>#</literal> key).
Defaults to 0 - no limit - wait for the user press the <literal>#</literal> key.</para>
</parameter>
<parameter name="prompt" required="false">
<para>Override the agent-pass prompt file.</para>
</parameter>
</syntax>
<description>
<para>This application asks the caller to enter a given password in order to continue dialplan execution.</para>
<para>If the password begins with the <literal>/</literal> 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.</para>
<para>Users have three attempts to authenticate before the channel is hung up.</para>
</description>
</application>
***/
static int auth_exec(struct ast_channel *chan, void *data)
{
@@ -225,7 +246,7 @@ static int unload_module(void)
static int load_module(void)
{
if (ast_register_application(app, auth_exec, synopsis, descrip))
if (ast_register_application_xml(app, auth_exec))
return AST_MODULE_LOAD_FAILURE;
return AST_MODULE_LOAD_SUCCESS;
}