summaryrefslogtreecommitdiff
path: root/apps/app_channelredirect.c
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2008-11-01 21:10:07 +0000
committerRussell Bryant <russell@russellbryant.com>2008-11-01 21:10:07 +0000
commit5b168ee34babe562be856ec8f1dd14c0abd7c1a5 (patch)
tree9c836ac808552d20be6bd2baa3a3c29f642eda53 /apps/app_channelredirect.c
parent1fef0f63bbbde9530837995c8790b839f73b74e7 (diff)
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
Diffstat (limited to 'apps/app_channelredirect.c')
-rw-r--r--apps/app_channelredirect.c34
1 files changed, 26 insertions, 8 deletions
diff --git a/apps/app_channelredirect.c b/apps/app_channelredirect.c
index 610f254df..f89c45225 100644
--- a/apps/app_channelredirect.c
+++ b/apps/app_channelredirect.c
@@ -35,14 +35,32 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/app.h"
#include "asterisk/features.h"
+/*** DOCUMENTATION
+ <application name="ChannelRedirect" language="en_US">
+ <synopsis>
+ Redirects given channel to a dialplan target
+ </synopsis>
+ <syntax>
+ <parameter name="channel" required="true" />
+ <parameter name="context" required="false" />
+ <parameter name="extension" required="false" />
+ <parameter name="priority" required="true" />
+ </syntax>
+ <description>
+ <para>Sends the specified channel to the specified extension priority</para>
+
+ <para>This application sets the following channel variables upon completion</para>
+ <variablelist>
+ <variable name="CHANNELREDIRECT_STATUS">
+ <value name="NOCHANNEL" />
+ <value name="SUCCESS" />
+ <para>Are set to the result of the redirection</para>
+ </variable>
+ </variablelist>
+ </description>
+ </application>
+ ***/
static char *app = "ChannelRedirect";
-static char *synopsis = "Redirects given channel to a dialplan target.";
-static char *descrip =
-"ChannelRedirect(channel,[[context,]extension,]priority)\n"
-" Sends the specified channel to the specified extension priority\n"
-"This application sets the following channel variables upon completion:\n"
-" CHANNELREDIRECT_STATUS - Are set to the result of the redirection\n"
-" either NOCHANNEL or SUCCESS\n";
static int asyncgoto_exec(struct ast_channel *chan, void *data)
{
@@ -89,7 +107,7 @@ static int unload_module(void)
static int load_module(void)
{
- return ast_register_application(app, asyncgoto_exec, synopsis, descrip) ?
+ return ast_register_application_xml(app, asyncgoto_exec) ?
AST_MODULE_LOAD_DECLINE : AST_MODULE_LOAD_SUCCESS;
}