diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-11-01 21:10:07 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-11-01 21:10:07 +0000 |
commit | b1f91b97d2085cc845d0f57bd9907de50c995105 (patch) | |
tree | 9c836ac808552d20be6bd2baa3a3c29f642eda53 /funcs/func_extstate.c | |
parent | c5d084051f21e943fcbcc347fc80b166885f298d (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: http://svn.digium.com/svn/asterisk/trunk@153365 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'funcs/func_extstate.c')
-rw-r--r-- | funcs/func_extstate.c | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/funcs/func_extstate.c b/funcs/func_extstate.c index 8866d89b9..7f2288560 100644 --- a/funcs/func_extstate.c +++ b/funcs/func_extstate.c @@ -36,6 +36,29 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #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@default has state ${EXTENSION_STATE(1234)})</para> + <para>NoOp(4567@home has state ${EXTENSION_STATE(4567@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) { const char *res = "UNKNOWN"; @@ -98,17 +121,6 @@ static int extstate_read(struct ast_channel *chan, const char *cmd, char *data, 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@default has state ${EXTENSION_STATE(1234)})\n" - " NoOp(4567@home has state ${EXTENSION_STATE(4567@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, }; |