diff options
author | Russell Bryant <russell@russellbryant.com> | 2008-11-01 21:10:07 +0000 |
---|---|---|
committer | Russell Bryant <russell@russellbryant.com> | 2008-11-01 21:10:07 +0000 |
commit | 5b168ee34babe562be856ec8f1dd14c0abd7c1a5 (patch) | |
tree | 9c836ac808552d20be6bd2baa3a3c29f642eda53 /funcs/func_extstate.c | |
parent | 1fef0f63bbbde9530837995c8790b839f73b74e7 (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 '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, }; |