[asterisk-commits] eliel: branch group/appdocsxml r147810 - /team/group/appdocsxml/apps/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Oct 9 09:58:04 CDT 2008
Author: eliel
Date: Thu Oct 9 09:58:03 2008
New Revision: 147810
URL: http://svn.digium.com/view/asterisk?view=rev&rev=147810
Log:
Introduce Playback() application XML documentation.
Patch by: snuffy (snuff-home, snuff-work) <- Thanks!!
Modified:
team/group/appdocsxml/apps/app_playback.c
Modified: team/group/appdocsxml/apps/app_playback.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/apps/app_playback.c?view=diff&rev=147810&r1=147809&r2=147810
==============================================================================
--- team/group/appdocsxml/apps/app_playback.c (original)
+++ team/group/appdocsxml/apps/app_playback.c Thu Oct 9 09:58:03 2008
@@ -39,26 +39,49 @@
#include "asterisk/say.h" /* provides config-file based 'say' functions */
#include "asterisk/cli.h"
+/*** DOCUMENTATION
+ <application name="Playback" language="en_US">
+ <synopsis>
+ Play a file.
+ </synopsis>
+ <syntax>
+ <parameter name="filenames" required="true" argsep="&">
+ <argument name="filename" required="true" />
+ <argument name="filename2" multiple="true" />
+ </parameter>
+ <parameter name="options">
+ <para>Comma separated list of options</para>
+ <optionlist>
+ <option name="skip">
+ <para>Do not play if not answered</para>
+ </option>
+ <option name="noanswer">
+ <para>Playback without answering, otherwise the channel will
+ be answered before the sound is played.</para>
+ <note><para>Not all channel types support playing messages while still on hook.</para></note>
+ </option>
+ </optionlist>
+ </parameter>
+ </syntax>
+ <description>
+ <para>Plays back given filenames (do not put extension of wav/alaw etc).
+ The playback command answer the channel if no options are specified.
+ If the file is non-existant it will fail</para>
+ <para>This application sets the following channel variable upon completion:</para>
+ <variablelist>
+ <variable name="PLAYBACKSTATUS">
+ <para>The status of the playback attempt as a text string.</para>
+ <value name="SUCCESS"/>
+ <value name="FAILED"/>
+ </variable>
+ </variablelist>
+ <para>See Also: Background (application) -- for playing soundfiles that are interruptible</para>
+ <para>WaitExten (application) -- wait for digits from caller, optionally play music on hold</para>
+ </description>
+ </application>
+ ***/
+
static char *app = "Playback";
-
-static char *synopsis = "Play a file";
-
-static char *descrip =
-" Playback(filename[&filename2...][,option]): Plays back given filenames (do not put\n"
-"extension). Options may also be included following a comma.\n"
-"The 'skip' option causes the playback of the message to be skipped if the channel\n"
-"is not in the 'up' state (i.e. it hasn't been answered yet). If 'skip' is \n"
-"specified, the application will return immediately should the channel not be\n"
-"off hook. Otherwise, unless 'noanswer' is specified, the channel will\n"
-"be answered before the sound is played. Not all channels support playing\n"
-"messages while still on hook.\n"
-"This application sets the following channel variable upon completion:\n"
-" PLAYBACKSTATUS The status of the playback attempt as a text string, one of\n"
-" SUCCESS | FAILED\n"
-"See Also: Background (application) -- for playing soundfiles that are interruptible\n"
-" WaitExten (application) -- wait for digits from caller, optionally play music on hold\n"
-;
-
static struct ast_config *say_cfg = NULL;
/* save the say' api calls.
@@ -520,7 +543,7 @@
}
ast_cli_register_multiple(cli_playback, sizeof(cli_playback) / sizeof(struct ast_cli_entry));
- return ast_register_application(app, playback_exec, synopsis, descrip);
+ return ast_register_application_xml(app, playback_exec);
}
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Sound File Playback Application",
More information about the asterisk-commits
mailing list