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_shell.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_shell.c')
-rw-r--r-- | funcs/func_shell.c | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/funcs/func_shell.c b/funcs/func_shell.c index 57a9819cd..df7164d5f 100644 --- a/funcs/func_shell.c +++ b/funcs/func_shell.c @@ -63,19 +63,31 @@ static int shell_helper(struct ast_channel *chan, const char *cmd, char *data, return 0; } +/*** DOCUMENTATION + <function name="SHELL" language="en_US"> + <synopsis> + Executes a command as if you were at a shell. + </synopsis> + <syntax> + <parameter name="command" required="true"> + <para>This is the argument to the function, the command you want to pass to the shell.</para> + </parameter> + </syntax> + <description> + <para>Returns the value from a system command</para> + <para>Example: <literal>Set(foo=${SHELL(echo \bar\)})</literal></para> + <note><para>When using the SHELL() dialplan function, your \SHELL\ is /bin/sh, + which may differ as to the underlying shell, depending upon your production + platform. Also keep in mind that if you are using a common path, you should + be mindful of race conditions that could result from two calls running + SHELL() simultaneously.</para></note> + </description> + + </function> + ***/ static struct ast_custom_function shell_function = { .name = "SHELL", - .synopsis = "Executes a command as if you were at a shell.", - .syntax = "SHELL(<command>)", .read = shell_helper, - .desc = -"Returns the value from a system command\n" -" Example: Set(foo=${SHELL(echo \"bar\")})\n" -" Note: When using the SHELL() dialplan function, your \"SHELL\" is /bin/sh,\n" -" which may differ as to the underlying shell, depending upon your production\n" -" platform. Also keep in mind that if you are using a common path, you should\n" -" be mindful of race conditions that could result from two calls running\n" -" SHELL() simultaneously.\n", }; static int unload_module(void) |