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 /apps/app_url.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 'apps/app_url.c')
-rw-r--r-- | apps/app_url.c | 61 |
1 files changed, 43 insertions, 18 deletions
diff --git a/apps/app_url.c b/apps/app_url.c index f71b32fd0..e20159f5a 100644 --- a/apps/app_url.c +++ b/apps/app_url.c @@ -34,24 +34,49 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/app.h" #include "asterisk/channel.h" -static char *app = "SendURL"; - -static char *synopsis = "Send a URL"; +/*** DOCUMENTATION + <application name="SendURL" language="en_US"> + <synopsis> + Send a URL. + </synopsis> + <syntax> + <parameter name="URL" required="true" /> + <parameter name="option"> + <optionlist> + <option name="w"> + <para>Execution will wait for an acknowledgement that the + URL has been loaded before continuing.</para> + </option> + </optionlist> + </parameter> + </syntax> + <description> + <para>Requests client go to <replaceable>URL</replaceable> (IAX2) or sends the + URL to the client (other channels).</para> + <para>Result is returned in the <variable>SENDURLSTATUS</variable> channel variable:</para> + <variablelist> + <variable name="SENDURLSTATUS"> + <value name="SUCCESS"> + URL successfully sent to client. + </value> + <value name="FAILURE"> + Failed to send URL. + </value> + <value name="NOLOAD"> + Client failed to load URL (wait enabled). + </value> + <value name="UNSUPPORTED"> + Channel does not support URL transport. + </value> + </variable> + </variablelist> + <para>SendURL continues normally if the URL was sent correctly or if the channel + does not support HTML transport. Otherwise, the channel is hung up.</para> + </description> + </application> + ***/ -static char *descrip = -" SendURL(URL[,option]): Requests client go to URL (IAX2) or sends the \n" -"URL to the client (other channels).\n" -"Result is returned in the SENDURLSTATUS channel variable:\n" -" SUCCESS URL successfully sent to client\n" -" FAILURE Failed to send URL\n" -" NOLOAD Client failed to load URL (wait enabled)\n" -" UNSUPPORTED Channel does not support URL transport\n" -"\n" -"If the option 'w' is specified, execution will wait for an\n" -"acknowledgement that the URL has been loaded before continuing\n" -"\n" -"SendURL continues normally if the URL was sent correctly or if the channel\n" -"does not support HTML transport. Otherwise, the channel is hung up.\n"; +static char *app = "SendURL"; enum { OPTION_WAIT = (1 << 0), @@ -143,7 +168,7 @@ static int unload_module(void) static int load_module(void) { - return ast_register_application(app, sendurl_exec, synopsis, descrip); + return ast_register_application_xml(app, sendurl_exec); } AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Send URL Applications"); |