mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-29 18:19:30 +00:00
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
This commit is contained in:
@@ -35,19 +35,30 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
#include "asterisk/manager.h"
|
||||
#include "asterisk/channel.h"
|
||||
|
||||
/*** DOCUMENTATION
|
||||
<application name="SendDTMF" language="en_US">
|
||||
<synopsis>
|
||||
Sends arbitrary DTMF digits
|
||||
</synopsis>
|
||||
<syntax>
|
||||
<parameter name="digits" required="true">
|
||||
<para>List of digits 0-9,*#,abcd</para>
|
||||
</parameter>
|
||||
<parameter name="timeout_ms" required="false">
|
||||
<para>Amount of time to wait in ms between tones. (defaults to .25s)</para>
|
||||
</parameter>
|
||||
<parameter name="duration_ms" required="false">
|
||||
<para>Duration of each digit</para>
|
||||
</parameter>
|
||||
</syntax>
|
||||
<description>
|
||||
<para>DTMF digits sent to a channel with half second pause</para>
|
||||
<para>It will pass all digits or terminate if it encounters an error.</para>
|
||||
</description>
|
||||
</application>
|
||||
***/
|
||||
static char *app = "SendDTMF";
|
||||
|
||||
static char *synopsis = "Sends arbitrary DTMF digits";
|
||||
|
||||
static char *descrip =
|
||||
" SendDTMF(digits[,[timeout_ms][,duration_ms]]): Sends DTMF digits on a channel. \n"
|
||||
" Accepted digits: 0-9, *#abcd, (default .25s pause between digits)\n"
|
||||
" The application will either pass the assigned digits or terminate if it\n"
|
||||
" encounters an error.\n"
|
||||
" Optional Params: \n"
|
||||
" timeout_ms: pause between digits.\n"
|
||||
" duration_ms: duration of each digit.\n";
|
||||
|
||||
static int senddtmf_exec(struct ast_channel *chan, void *vdata)
|
||||
{
|
||||
int res = 0;
|
||||
@@ -121,7 +132,7 @@ static int load_module(void)
|
||||
int res;
|
||||
|
||||
res = ast_manager_register2( "PlayDTMF", EVENT_FLAG_CALL, manager_play_dtmf, "Play DTMF signal on a specific channel.", mandescr_playdtmf );
|
||||
res |= ast_register_application(app, senddtmf_exec, synopsis, descrip);
|
||||
res |= ast_register_application_xml(app, senddtmf_exec);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
Reference in New Issue
Block a user