mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +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:
@@ -36,23 +36,44 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
#include "asterisk/app.h"
|
||||
#include "asterisk/channel.h"
|
||||
|
||||
/*** DOCUMENTATION
|
||||
<application name="Transfer" language="en_US">
|
||||
<synopsis>
|
||||
Transfer caller to remote extension.
|
||||
</synopsis>
|
||||
<syntax>
|
||||
<parameter name="dest" required="true" argsep="/">
|
||||
<argument name="Tech" />
|
||||
<argument name="destination" required="true" />
|
||||
</parameter>
|
||||
</syntax>
|
||||
<description>
|
||||
<para>Requests the remote caller be transferred
|
||||
to a given destination. If TECH (SIP, IAX2, LOCAL etc) is used, only
|
||||
an incoming call with the same channel technology will be transfered.
|
||||
Note that for SIP, if you transfer before call is setup, a 302 redirect
|
||||
SIP message will be returned to the caller.</para>
|
||||
<para>The result of the application will be reported in the <variable>TRANSFERSTATUS</variable>
|
||||
channel variable:</para>
|
||||
<variablelist>
|
||||
<variable name="TRANSFERSTATUS">
|
||||
<value name="SUCCESS">
|
||||
Transfer succeeded.
|
||||
</value>
|
||||
<value name="FAILURE">
|
||||
Transfer failed.
|
||||
</value>
|
||||
<value name="UNSUPPORTED">
|
||||
Transfer unsupported by channel driver.
|
||||
</value>
|
||||
</variable>
|
||||
</variablelist>
|
||||
</description>
|
||||
</application>
|
||||
***/
|
||||
|
||||
static const char *app = "Transfer";
|
||||
|
||||
static const char *synopsis = "Transfer caller to remote extension";
|
||||
|
||||
static const char *descrip =
|
||||
" Transfer([Tech/]dest): Requests the remote caller be transferred\n"
|
||||
"to a given destination. If TECH (SIP, IAX2, LOCAL etc) is used, only\n"
|
||||
"an incoming call with the same channel technology will be transfered.\n"
|
||||
"Note that for SIP, if you transfer before call is setup, a 302 redirect\n"
|
||||
"SIP message will be returned to the caller.\n"
|
||||
"\nThe result of the application will be reported in the TRANSFERSTATUS\n"
|
||||
"channel variable:\n"
|
||||
" SUCCESS Transfer succeeded\n"
|
||||
" FAILURE Transfer failed\n"
|
||||
" UNSUPPORTED Transfer unsupported by channel driver\n";
|
||||
|
||||
static int transfer_exec(struct ast_channel *chan, void *data)
|
||||
{
|
||||
int res;
|
||||
@@ -115,7 +136,7 @@ static int unload_module(void)
|
||||
|
||||
static int load_module(void)
|
||||
{
|
||||
return ast_register_application(app, transfer_exec, synopsis, descrip);
|
||||
return ast_register_application_xml(app, transfer_exec);
|
||||
}
|
||||
|
||||
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Transfers a caller to another extension");
|
||||
|
Reference in New Issue
Block a user