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_timeout.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_timeout.c')
-rw-r--r-- | funcs/func_timeout.c | 59 |
1 files changed, 36 insertions, 23 deletions
diff --git a/funcs/func_timeout.c b/funcs/func_timeout.c index 625070217..a035a0563 100644 --- a/funcs/func_timeout.c +++ b/funcs/func_timeout.c @@ -34,6 +34,42 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/utils.h" #include "asterisk/app.h" +/*** DOCUMENTATION + <function name="TIMEOUT" language="en_US"> + <synopsis> + Gets or sets timeouts on the channel. Timeout values are in seconds. + </synopsis> + <syntax> + <parameter name="timeouttype" required="true"> + <para>The timeout that will be manipulated. The possible timeout types + are: <literal>absolute</literal>, <literal>digit</literal> or + <literal>response</literal></para> + </parameter> + </syntax> + <description> + <para>The timeouts that can be manipulated are:</para> + <para><literal>absolute</literal>: The absolute maximum amount of time permitted for a call. + Setting of 0 disables the timeout.</para> + <para><literal>digit</literal>: The maximum amount of time permitted between digits when the + user is typing in an extension. When this timeout expires, + after the user has started to type in an extension, the + extension will be considered complete, and will be + interpreted. Note that if an extension typed in is valid, + it will not have to timeout to be tested, so typically at + the expiry of this timeout, the extension will be considered + invalid (and thus control would be passed to the <literal>i</literal> + extension, or if it doesn't exist the call would be + terminated). The default timeout is 5 seconds.</para> + <para><literal>response</literal>: The maximum amount of time permitted after falling through a + series of priorities for a channel in which the user may + begin typing an extension. If the user does not type an + extension in this amount of time, control will pass to the + <literal>t</literal> extension if it exists, and if not the call would be + terminated. The default timeout is 10 seconds.</para> + </description> + </function> + ***/ + static int timeout_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len) { @@ -149,29 +185,6 @@ static int timeout_write(struct ast_channel *chan, const char *cmd, char *data, static struct ast_custom_function timeout_function = { .name = "TIMEOUT", - .synopsis = "Gets or sets timeouts on the channel. Timeout values are in seconds.", - .syntax = "TIMEOUT(timeouttype)", - .desc = - "Gets or sets various channel timeouts. The timeouts that can be\n" - "manipulated are:\n" "\n" - "absolute: The absolute maximum amount of time permitted for a call. A\n" - " setting of 0 disables the timeout.\n" "\n" - "digit: The maximum amount of time permitted between digits when the\n" - " user is typing in an extension. When this timeout expires,\n" - " after the user has started to type in an extension, the\n" - " extension will be considered complete, and will be\n" - " interpreted. Note that if an extension typed in is valid,\n" - " it will not have to timeout to be tested, so typically at\n" - " the expiry of this timeout, the extension will be considered\n" - " invalid (and thus control would be passed to the 'i'\n" - " extension, or if it doesn't exist the call would be\n" - " terminated). The default timeout is 5 seconds.\n" "\n" - "response: The maximum amount of time permitted after falling through a\n" - " series of priorities for a channel in which the user may\n" - " begin typing an extension. If the user does not type an\n" - " extension in this amount of time, control will pass to the\n" - " 't' extension if it exists, and if not the call would be\n" - " terminated. The default timeout is 10 seconds.\n", .read = timeout_read, .write = timeout_write, }; |