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

@@ -34,31 +34,68 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/app.h"
#include "asterisk/channel.h" /* autoservice */
/*** DOCUMENTATION
<application name="System" language="en_US">
<synopsis>
Execute a system command.
</synopsis>
<syntax>
<parameter name="command" required="true">
<para>Command to execute</para>
</parameter>
</syntax>
<description>
<para>Executes a command by using system(). If the command
fails, the console should report a fallthrough.</para>
<para>Result of execution is returned in the <variable>SYSTEMSTATUS</variable> channel variable:</para>
<variablelist>
<variable name="SYSTEMSTATUS">
<value name="FAILURE">
Could not execute the specified command.
</value>
<value name="SUCCESS">
Specified command successfully executed.
</value>
</variable>
</variablelist>
</description>
</application>
<application name="TrySystem" language="en_US">
<synopsis>
Try executing a system command.
</synopsis>
<syntax>
<parameter name="command" required="true">
<para>Command to execute</para>
</parameter>
</syntax>
<description>
<para>Executes a command by using system().</para>
<para>Result of execution is returned in the <variable>SYSTEMSTATUS</variable> channel variable:</para>
<variablelist>
<variable name="SYSTEMSTATUS">
<value name="FAILURE">
Could not execute the specified command.
</value>
<value name="SUCCESS">
Specified command successfully executed.
</value>
<value name="APPERROR">
Specified command successfully executed, but returned error code.
</value>
</variable>
</variablelist>
</description>
</application>
***/
static char *app = "System";
static char *app2 = "TrySystem";
static char *synopsis = "Execute a system command";
static char *synopsis2 = "Try executing a system command";
static char *chanvar = "SYSTEMSTATUS";
static char *descrip =
" System(command): Executes a command by using system(). If the command\n"
"fails, the console should report a fallthrough. \n"
"Result of execution is returned in the SYSTEMSTATUS channel variable:\n"
" FAILURE Could not execute the specified command\n"
" SUCCESS Specified command successfully executed\n";
static char *descrip2 =
" TrySystem(command): Executes a command by using system().\n"
"on any situation.\n"
"Result of execution is returned in the SYSTEMSTATUS channel variable:\n"
" FAILURE Could not execute the specified command\n"
" SUCCESS Specified command successfully executed\n"
" APPERROR Specified command successfully executed, but returned error code\n";
static int system_exec_helper(struct ast_channel *chan, void *data, int failmode)
{
int res = 0;
@@ -120,8 +157,8 @@ static int load_module(void)
{
int res;
res = ast_register_application(app2, trysystem_exec, synopsis2, descrip2);
res |= ast_register_application(app, system_exec, synopsis, descrip);
res = ast_register_application_xml(app2, trysystem_exec);
res |= ast_register_application_xml(app, system_exec);
return res;
}