[asterisk-commits] mvanbaak: branch group/appdocsxml r143402 - /team/group/appdocsxml/apps/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Sep 17 15:28:41 CDT 2008


Author: mvanbaak
Date: Wed Sep 17 15:28:40 2008
New Revision: 143402

URL: http://svn.digium.com/view/asterisk?view=rev&rev=143402
Log:
convert two more apps
This one is nice, because channelRedirect has 4 parameters
where the first one is required, the second and third are not, and the fourth
is required again.

Output looks good :)

Modified:
    team/group/appdocsxml/apps/app_cdr.c
    team/group/appdocsxml/apps/app_channelredirect.c

Modified: team/group/appdocsxml/apps/app_cdr.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/apps/app_cdr.c?view=diff&rev=143402&r1=143401&r2=143402
==============================================================================
--- team/group/appdocsxml/apps/app_cdr.c (original)
+++ team/group/appdocsxml/apps/app_cdr.c Wed Sep 17 15:28:40 2008
@@ -32,13 +32,19 @@
 #include "asterisk/channel.h"
 #include "asterisk/module.h"
 
-static char *nocdr_descrip =
-"  NoCDR(): This application will tell Asterisk not to maintain a CDR for the\n"
-"current call.\n";
+/*** DOCUMENTATION
+	<application name="NoCDR" language="en_US">
+		<synopsis>
+			Tell Asterisk to not maintain a CDR for the current call
+		</synopsis>
+		<syntax />
+		<description>
+			<para>This application will tell Asterisk not to maintain a CDR for the current call.</para>
+		</description>
+	</application>
+ ***/
 
 static char *nocdr_app = "NoCDR";
-static char *nocdr_synopsis = "Tell Asterisk to not maintain a CDR for the current call";
-
 
 static int nocdr_exec(struct ast_channel *chan, void *data)
 {
@@ -55,7 +61,7 @@
 
 static int load_module(void)
 {
-	if (ast_register_application(nocdr_app, nocdr_exec, nocdr_synopsis, nocdr_descrip))
+	if (ast_register_application_xml(nocdr_app, nocdr_exec))
 		return AST_MODULE_LOAD_FAILURE;
 	return AST_MODULE_LOAD_SUCCESS;
 }

Modified: team/group/appdocsxml/apps/app_channelredirect.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/apps/app_channelredirect.c?view=diff&rev=143402&r1=143401&r2=143402
==============================================================================
--- team/group/appdocsxml/apps/app_channelredirect.c (original)
+++ team/group/appdocsxml/apps/app_channelredirect.c Wed Sep 17 15:28:40 2008
@@ -35,14 +35,32 @@
 #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 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;
 }
 




More information about the asterisk-commits mailing list