mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-14 08:31:02 +00:00
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:
@@ -37,20 +37,37 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
#include "asterisk/module.h"
|
||||
#include "asterisk/app.h"
|
||||
|
||||
/*** DOCUMENTATION
|
||||
<application name="SendText" language="en_US">
|
||||
<synopsis>
|
||||
Send a Text Message.
|
||||
</synopsis>
|
||||
<syntax>
|
||||
<parameter name="text" required="true" />
|
||||
</syntax>
|
||||
<description>
|
||||
<para>Sends <replaceable>text</replaceable> to current channel (callee).</para>
|
||||
<para>Result of transmission will be stored in the <variable>SENDTEXTSTATUS</variable></para>
|
||||
<variablelist>
|
||||
<variable name="SENDTEXTSTATUS">
|
||||
<value name="SUCCESS">
|
||||
Transmission succeeded.
|
||||
</value>
|
||||
<value name="FAILURE">
|
||||
Transmission failed.
|
||||
</value>
|
||||
<value name="UNSUPPORTED">
|
||||
Text transmission not supported by channel.
|
||||
</value>
|
||||
</variable>
|
||||
</variablelist>
|
||||
<note><para>At this moment, text is supposed to be 7 bit ASCII in most channels.</para></note>
|
||||
</description>
|
||||
</application>
|
||||
***/
|
||||
|
||||
static const char *app = "SendText";
|
||||
|
||||
static const char *synopsis = "Send a Text Message";
|
||||
|
||||
static const char *descrip =
|
||||
" SendText(text): Sends text to current channel (callee).\n"
|
||||
"Result of transmission will be stored in the SENDTEXTSTATUS\n"
|
||||
"channel variable:\n"
|
||||
" SUCCESS Transmission succeeded\n"
|
||||
" FAILURE Transmission failed\n"
|
||||
" UNSUPPORTED Text transmission not supported by channel\n"
|
||||
"\n"
|
||||
"At this moment, text is supposed to be 7 bit ASCII in most channels.\n";
|
||||
|
||||
static int sendtext_exec(struct ast_channel *chan, void *data)
|
||||
{
|
||||
int res = 0;
|
||||
@@ -91,7 +108,7 @@ static int unload_module(void)
|
||||
|
||||
static int load_module(void)
|
||||
{
|
||||
return ast_register_application(app, sendtext_exec, synopsis, descrip);
|
||||
return ast_register_application_xml(app, sendtext_exec);
|
||||
}
|
||||
|
||||
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Send Text Applications");
|
||||
|
Reference in New Issue
Block a user