[asterisk-commits] eliel: branch group/appdocsxml r145551 - /team/group/appdocsxml/funcs/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Oct 1 13:59:47 CDT 2008


Author: eliel
Date: Wed Oct  1 13:59:46 2008
New Revision: 145551

URL: http://svn.digium.com/view/asterisk?view=rev&rev=145551
Log:
Introduce the EXTENSION_STATE() function XML documentation.

Modified:
    team/group/appdocsxml/funcs/func_extstate.c

Modified: team/group/appdocsxml/funcs/func_extstate.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/funcs/func_extstate.c?view=diff&rev=145551&r1=145550&r2=145551
==============================================================================
--- team/group/appdocsxml/funcs/func_extstate.c (original)
+++ team/group/appdocsxml/funcs/func_extstate.c Wed Oct  1 13:59:46 2008
@@ -35,6 +35,29 @@
 #include "asterisk/pbx.h"
 #include "asterisk/utils.h"
 #include "asterisk/devicestate.h"
+
+/*** DOCUMENTATION
+	<function name="EXTENSION_STATE" language="en_US">
+		<synopsis>
+			Get an extension's state.
+		</synopsis>	
+		<syntax argsep="@">
+			<parameter name="extension" required="true" />
+			<parameter name="context">
+				<para>If it is not specified defaults to <literal>default</literal>.</para>
+			</parameter>
+		</syntax>
+		<description>
+			<para>The EXTENSION_STATE function can be used to retrieve the state from any
+			hinted extension. For example:</para>
+			<para>NoOp(1234 at default has state ${EXTENSION_STATE(1234)})</para>
+			<para>NoOp(4567 at home has state ${EXTENSION_STATE(4567 at home)})</para>
+			<para>The possible values returned by this function are:</para>
+			<para>UNKNOWN | NOT_INUSE | INUSE | BUSY | INVALID | UNAVAILABLE | RINGING |
+			RINGINUSE | HOLDINUSE | ONHOLD</para>
+		</description>
+	</function>
+ ***/
 
 static const char *ast_extstate_str(int state)
 {
@@ -98,17 +121,6 @@
 
 static struct ast_custom_function extstate_function = {
 	.name = "EXTENSION_STATE",
-	.synopsis = "Get an extension's state",
-	.syntax = "EXTENSION_STATE(extension[@context])",
-	.desc =
-	"  The EXTENSION_STATE function can be used to retrieve the state from any\n"
-	"hinted extension.  For example:\n"
-	"   NoOp(1234 at default has state ${EXTENSION_STATE(1234)})\n"
-	"   NoOp(4567 at home has state ${EXTENSION_STATE(4567 at home)})\n"
-	"\n"
-	"  The possible values returned by this function are:\n"
-	"UNKNOWN | NOT_INUSE | INUSE | BUSY | INVALID | UNAVAILABLE | RINGING\n"
-	"RINGINUSE | HOLDINUSE | ONHOLD\n",
 	.read = extstate_read,
 };
 




More information about the asterisk-commits mailing list