[asterisk-commits] russell: trunk r153365 - in /trunk: ./ apps/ build_tools/ doc/ doc/tex/ funcs...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sat Nov 1 16:10:08 CDT 2008
Author: russell
Date: Sat Nov 1 16:10:07 2008
New Revision: 153365
URL: http://svn.digium.com/view/asterisk?view=rev&rev=153365
Log:
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
Added:
trunk/build_tools/get_documentation
- copied unchanged from r153364, team/group/appdocsxml/build_tools/get_documentation
trunk/doc/appdocsxml.dtd
- copied unchanged from r153364, team/group/appdocsxml/doc/appdocsxml.dtd
trunk/include/asterisk/xml.h
- copied unchanged from r153364, team/group/appdocsxml/include/asterisk/xml.h
trunk/main/xml.c
- copied unchanged from r153364, team/group/appdocsxml/main/xml.c
Modified:
trunk/Makefile
trunk/apps/app_adsiprog.c
trunk/apps/app_alarmreceiver.c
trunk/apps/app_amd.c
trunk/apps/app_authenticate.c
trunk/apps/app_cdr.c
trunk/apps/app_chanisavail.c
trunk/apps/app_channelredirect.c
trunk/apps/app_chanspy.c
trunk/apps/app_controlplayback.c
trunk/apps/app_dahdibarge.c
trunk/apps/app_dahdiras.c
trunk/apps/app_dahdiscan.c
trunk/apps/app_dial.c
trunk/apps/app_dictate.c
trunk/apps/app_directed_pickup.c
trunk/apps/app_directory.c
trunk/apps/app_disa.c
trunk/apps/app_dumpchan.c
trunk/apps/app_echo.c
trunk/apps/app_exec.c
trunk/apps/app_fax.c
trunk/apps/app_festival.c
trunk/apps/app_getcpeid.c
trunk/apps/app_ices.c
trunk/apps/app_image.c
trunk/apps/app_jack.c
trunk/apps/app_milliwatt.c
trunk/apps/app_mixmonitor.c
trunk/apps/app_morsecode.c
trunk/apps/app_mp3.c
trunk/apps/app_nbscat.c
trunk/apps/app_page.c
trunk/apps/app_playback.c
trunk/apps/app_privacy.c
trunk/apps/app_queue.c
trunk/apps/app_readexten.c
trunk/apps/app_readfile.c
trunk/apps/app_record.c
trunk/apps/app_sayunixtime.c
trunk/apps/app_senddtmf.c
trunk/apps/app_sendtext.c
trunk/apps/app_setcallerid.c
trunk/apps/app_skel.c
trunk/apps/app_softhangup.c
trunk/apps/app_stack.c
trunk/apps/app_system.c
trunk/apps/app_talkdetect.c
trunk/apps/app_transfer.c
trunk/apps/app_url.c
trunk/apps/app_userevent.c
trunk/apps/app_verbose.c
trunk/apps/app_waituntil.c
trunk/apps/app_while.c
trunk/apps/app_zapateller.c
trunk/configure
trunk/configure.ac
trunk/doc/ (props changed)
trunk/doc/tex/asterisk-conf.tex
trunk/funcs/func_base64.c
trunk/funcs/func_blacklist.c
trunk/funcs/func_callerid.c
trunk/funcs/func_cdr.c
trunk/funcs/func_channel.c
trunk/funcs/func_config.c
trunk/funcs/func_cut.c
trunk/funcs/func_db.c
trunk/funcs/func_devstate.c
trunk/funcs/func_dialgroup.c
trunk/funcs/func_dialplan.c
trunk/funcs/func_enum.c
trunk/funcs/func_env.c
trunk/funcs/func_extstate.c
trunk/funcs/func_global.c
trunk/funcs/func_groupcount.c
trunk/funcs/func_iconv.c
trunk/funcs/func_lock.c
trunk/funcs/func_logic.c
trunk/funcs/func_math.c
trunk/funcs/func_md5.c
trunk/funcs/func_module.c
trunk/funcs/func_odbc.c
trunk/funcs/func_rand.c
trunk/funcs/func_realtime.c
trunk/funcs/func_sha1.c
trunk/funcs/func_shell.c
trunk/funcs/func_speex.c
trunk/funcs/func_strings.c
trunk/funcs/func_timeout.c
trunk/funcs/func_uri.c
trunk/funcs/func_version.c
trunk/funcs/func_vmcount.c
trunk/funcs/func_volume.c
trunk/include/asterisk/_private.h
trunk/include/asterisk/autoconfig.h.in
trunk/include/asterisk/compat.h
trunk/include/asterisk/extconf.h
trunk/include/asterisk/module.h
trunk/include/asterisk/pbx.h
trunk/include/asterisk/strings.h
trunk/include/asterisk/term.h
trunk/main/Makefile
trunk/main/asterisk.c
trunk/main/config.c
trunk/main/features.c
trunk/main/pbx.c
trunk/main/term.c
trunk/makeopts.in
Modified: trunk/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/Makefile?view=diff&rev=153365&r1=153364&r2=153365
==============================================================================
--- trunk/Makefile (original)
+++ trunk/Makefile Sat Nov 1 16:10:07 2008
@@ -104,6 +104,9 @@
# CFLAGS and LDFLAGS in the COPTS and LDOPTS variables.
ASTCFLAGS+=$(COPTS)
ASTLDFLAGS+=$(LDOPTS)
+
+# libxml2 cflags
+ASTCFLAGS+=$(LIBXML2_INCLUDE)
#Uncomment this to see all build commands instead of 'quiet' output
#NOISY_BUILD=yes
@@ -481,6 +484,20 @@
mkdir -p $(DESTDIR)$(AGI_DIR)
$(MAKE) -C sounds install
+documentation:
+ @echo -n "Building Documentation For: "
+ @echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > doc/core-en_US.xml
+ @echo "<!DOCTYPE docs SYSTEM \"appdocsxml.dtd\">" >> doc/core-en_US.xml
+ @echo "<docs>" >> doc/core-en_US.xml
+ @for x in $(MOD_SUBDIRS); do \
+ echo -n "$$x " ; \
+ for i in $$x/*.c; do \
+ $(AWK) -f build_tools/get_documentation $$i >> doc/core-en_US.xml ; \
+ done ; \
+ done
+ @echo "</docs>" >> doc/core-en_US.xml
+ @echo -e "\ndoc/core-en_US.xml --> $(ASTDATADIR)/documentation/core-en_US.xml"
+
update:
@if [ -d .svn ]; then \
echo "Updating from Subversion..." ; \
@@ -529,12 +546,16 @@
if [ -n "$(OLDHEADERS)" ]; then \
rm -f $(addprefix $(DESTDIR)$(ASTHEADERDIR)/,$(OLDHEADERS)) ;\
fi
+ mkdir -p $(DESTDIR)$(ASTDATADIR)/documentation
+ mkdir -p $(DESTDIR)$(ASTDATADIR)/documentation/thirdparty
mkdir -p $(DESTDIR)$(ASTLOGDIR)/cdr-csv
mkdir -p $(DESTDIR)$(ASTLOGDIR)/cdr-custom
mkdir -p $(DESTDIR)$(ASTDATADIR)/keys
mkdir -p $(DESTDIR)$(ASTDATADIR)/firmware
mkdir -p $(DESTDIR)$(ASTDATADIR)/firmware/iax
mkdir -p $(DESTDIR)$(ASTMANDIR)/man8
+ $(INSTALL) -m 644 doc/core-*.xml $(ASTDATADIR)/documentation
+ $(INSTALL) -m 644 doc/appdocsxml.dtd $(ASTVARLIBDIR)/documentation
$(INSTALL) -m 644 keys/iaxtel.pub $(DESTDIR)$(ASTDATADIR)/keys
$(INSTALL) -m 644 keys/freeworlddialup.pub $(DESTDIR)$(ASTDATADIR)/keys
$(INSTALL) -m 644 doc/asterisk.8 $(DESTDIR)$(ASTMANDIR)/man8
@@ -576,7 +597,7 @@
@exit 1
endif
-install: badshell datafiles bininstall
+install: badshell datafiles documentation bininstall
@if [ -x /usr/sbin/asterisk-post-install ]; then \
/usr/sbin/asterisk-post-install $(DESTDIR) . ; \
fi
@@ -656,7 +677,7 @@
echo "astrundir => $(ASTVARRUNDIR)" ; \
echo "astlogdir => $(ASTLOGDIR)" ; \
echo "" ; \
- echo ";[options]" ; \
+ echo "[options]" ; \
echo ";verbose = 3" ; \
echo ";debug = 3" ; \
echo ";alwaysfork = yes ; same as -F at startup" ; \
@@ -686,6 +707,7 @@
echo ";runuser = asterisk ; The user to run as" ; \
echo ";rungroup = asterisk ; The group to run as" ; \
echo ";lightbackground = yes ; If your terminal is set for a light-colored background" ; \
+ echo "documentation_language = en_US ; Set the Language you want Documentation displayed in. Value is in the same format as locale names" ; \
echo "" ; \
echo "; Changing the following lines may compromise your security." ; \
echo ";[files]" ; \
Modified: trunk/apps/app_adsiprog.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_adsiprog.c?view=diff&rev=153365&r1=153364&r2=153365
==============================================================================
--- trunk/apps/app_adsiprog.c (original)
+++ trunk/apps/app_adsiprog.c Sat Nov 1 16:10:07 2008
@@ -47,13 +47,23 @@
static char *app = "ADSIProg";
-static char *synopsis = "Load Asterisk ADSI Scripts into phone";
+/*** DOCUMENTATION
+ <application name="ADSIProg" language="en_US">
+ <synopsis>
+ Load Asterisk ADSI Scripts into phone
+ </synopsis>
+ <syntax>
+ <parameter name="script" required="false">
+ <para>adsi script to use. If not given uses the default script <filename>asterisk.adsi</filename></para>
+ </parameter>
+ </syntax>
+ <description>
+ <para>This application programs an ADSI Phone with the given script</para>
+ </description>
+ </application>
+ ***/
/* #define DUMP_MESSAGES */
-
-static char *descrip =
-" ADSIProg(script): This application programs an ADSI Phone with the given\n"
-"script. If nothing is specified, the default script (asterisk.adsi) is used.\n";
struct adsi_event {
int id;
@@ -1570,7 +1580,7 @@
static int load_module(void)
{
- if (ast_register_application(app, adsi_exec, synopsis, descrip))
+ if (ast_register_application_xml(app, adsi_exec))
return AST_MODULE_LOAD_FAILURE;
return AST_MODULE_LOAD_SUCCESS;
}
Modified: trunk/apps/app_alarmreceiver.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_alarmreceiver.c?view=diff&rev=153365&r1=153364&r2=153365
==============================================================================
--- trunk/apps/app_alarmreceiver.c (original)
+++ trunk/apps/app_alarmreceiver.c Sat Nov 1 16:10:07 2008
@@ -63,18 +63,21 @@
typedef struct event_node event_node_t;
static char *app = "AlarmReceiver";
-
-static char *synopsis = "Provide support for receiving alarm reports from a burglar or fire alarm panel";
-static char *descrip =
-" AlarmReceiver(): Only 1 signalling format is supported at this time: Ademco\n"
-"Contact ID. This application should be called whenever there is an alarm\n"
-"panel calling in to dump its events. The application will handshake with the\n"
-"alarm panel, and receive events, validate them, handshake them, and store them\n"
-"until the panel hangs up. Once the panel hangs up, the application will run the\n"
-"system command specified by the eventcmd setting in alarmreceiver.conf and pipe\n"
-"the events to the standard input of the application. The configuration file also\n"
-"contains settings for DTMF timing, and for the loudness of the acknowledgement\n"
-"tones.\n";
+/*** DOCUMENTATION
+ <application name="AlarmReceiver" language="en_US">
+ <synopsis>
+ Provide support for receiving alarm reports from a burglar or fire alarm panel
+ </synopsis>
+ <syntax />
+ <description>
+ <para>This application should be called whenever there is an alarm panel calling in to dump its events.
+ The application will handshake with the alarm panel, and receive events, validate them, handshake them, and store them until the panel hangs up.
+ Once the panel hangs up, the application will run the system command specified by the eventcmd setting in <filename>alarmreceiver.conf</filename> and pipe the events to the standard input of the application.
+ The configuration file also contains settings for DTMF timing, and for the loudness of the acknowledgement tones.</para>
+ <note><para>Only 1 signalling format is supported at this time: Ademco Contact ID.</para></note>
+ </description>
+ </application>
+ ***/
/* Config Variables */
static int fdtimeout = 2000;
@@ -711,7 +714,7 @@
static int load_module(void)
{
if (load_config()) {
- if (ast_register_application(app, alarmreceiver_exec, synopsis, descrip))
+ if (ast_register_application_xml(app, alarmreceiver_exec))
return AST_MODULE_LOAD_FAILURE;
return AST_MODULE_LOAD_SUCCESS;
} else
Modified: trunk/apps/app_amd.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_amd.c?view=diff&rev=153365&r1=153364&r2=153365
==============================================================================
--- trunk/apps/app_amd.c (original)
+++ trunk/apps/app_amd.c Sat Nov 1 16:10:07 2008
@@ -39,45 +39,88 @@
#include "asterisk/config.h"
#include "asterisk/app.h"
+/*** DOCUMENTATION
+ <application name="AMD" language="en_US">
+ <synopsis>
+ Attempt to detect answering machines.
+ </synopsis>
+ <syntax>
+ <parameter name="initialSilence" required="false">
+ <para>Is maximum initial silence duration before greeting.</para>
+ <para>If this is exceeded set as MACHINE</para>
+ </parameter>
+ <parameter name="greeting" required="false">
+ <para>is the maximum length of a greeting.</para>
+ <para>If this is exceeded set as MACHINE</para>
+ </parameter>
+ <parameter name="afterGreetingSilence" required="false">
+ <para>Is the silence after detecting a greeting.</para>
+ <para>If this is exceeded set as HUMAN</para>
+ </parameter>
+ <parameter name="totalAnalysis Time" required="false">
+ <para>Is the maximum time allowed for the algorithm</para>
+ <para>to decide HUMAN or MACHINE</para>
+ </parameter>
+ <parameter name="miniumWordLength" required="false">
+ <para>Is the minimum duration of Voice considered to be a word</para>
+ </parameter>
+ <parameter name="betweenWordSilence" required="false">
+ <para>Is the minimum duration of silence after a word to
+ consider the audio that follows to be a new word</para>
+ </parameter>
+ <parameter name="maximumNumberOfWords" required="false">
+ <para>Is the maximum number of words in a greeting</para>
+ <para>If this is exceeded set as MACHINE</para>
+ </parameter>
+ <parameter name="silenceThreshold" required="false">
+ <para>How long do we consider silence</para>
+ </parameter>
+ <parameter name="maximumWordLength" required="false">
+ <para>Is the maximum duration of a word to accept.</para>
+ <para>If exceeded set as MACHINE</para>
+ </parameter>
+ </syntax>
+ <description>
+ <para>This application attempts to detect answering machines at the beginning
+ of outbound calls. Simply call this application after the call
+ has been answered (outbound only, of course).</para>
+ <para>When loaded, AMD reads amd.conf and uses the parameters specified as
+ default values. Those default values get overwritten when the calling AMD
+ with parameters.</para>
+ <para>This application sets the following channel variables:</para>
+ <variablelist>
+ <variable name="AMDSTATUS">
+ <para>This is the status of the answering machine detection</para>
+ <value name="MACHINE" />
+ <value name="HUMAN" />
+ <value name="NOTSURE" />
+ <value name="HANGUP" />
+ </variable>
+ <variable name="AMDCAUSE">
+ <para>Indicates the cause that led to the conclusion</para>
+ <value name="TOOLONG">
+ Total Time.
+ </value>
+ <value name="INITIALSILENCE">
+ Silence Duration - Initial Silence.
+ </value>
+ <value name="HUMAN">
+ Silence Duration - afterGreetingSilence.
+ </value>
+ <value name="LONGGREETING">
+ Voice Duration - Greeting.
+ </value>
+ <value name="MAXWORDLENGTH">
+ Word Count - maximum number of words.
+ </value>
+ </variable>
+ </variablelist>
+ </description>
+ </application>
+
+ ***/
static char *app = "AMD";
-static char *synopsis = "Attempts to detect answering machines";
-static char *descrip =
-" AMD([initialSilence],[greeting],[afterGreetingSilence],[totalAnalysisTime]\n"
-" ,[minimumWordLength],[betweenWordsSilence],[maximumNumberOfWords]\n"
-" ,[silenceThreshold],[|maximumWordLength])\n"
-" This application attempts to detect answering machines at the beginning\n"
-" of outbound calls. Simply call this application after the call\n"
-" has been answered (outbound only, of course).\n"
-" When loaded, AMD reads amd.conf and uses the parameters specified as\n"
-" default values. Those default values get overwritten when calling AMD\n"
-" with parameters.\n"
-"- 'initialSilence' is the maximum silence duration before the greeting. If\n"
-" exceeded then MACHINE.\n"
-"- 'greeting' is the maximum length of a greeting. If exceeded then MACHINE.\n"
-"- 'afterGreetingSilence' is the silence after detecting a greeting.\n"
-" If exceeded then HUMAN.\n"
-"- 'totalAnalysisTime' is the maximum time allowed for the algorithm to decide\n"
-" on a HUMAN or MACHINE.\n"
-"- 'minimumWordLength'is the minimum duration of Voice to considered as a word.\n"
-"- 'betweenWordsSilence' is the minimum duration of silence after a word to \n"
-" consider the audio that follows as a new word.\n"
-"- 'maximumNumberOfWords'is the maximum number of words in the greeting. \n"
-" If exceeded then MACHINE.\n"
-"- 'silenceThreshold' is the silence threshold.\n"
-"- 'maximumWordLength' is the maximum duration of a word to accept. If exceeded then MACHINE\n"
-"This application sets the following channel variables upon completion:\n"
-" AMDSTATUS - This is the status of the answering machine detection.\n"
-" Possible values are:\n"
-" MACHINE | HUMAN | NOTSURE | HANGUP\n"
-" AMDCAUSE - Indicates the cause that led to the conclusion.\n"
-" Possible values are:\n"
-" TOOLONG-<%d total_time>\n"
-" INITIALSILENCE-<%d silenceDuration>-<%d initialSilence>\n"
-" HUMAN-<%d silenceDuration>-<%d afterGreetingSilence>\n"
-" MAXWORDS-<%d wordsCount>-<%d maximumNumberOfWords>\n"
-" LONGGREETING-<%d voiceDuration>-<%d greeting>\n"
-" MAXWORDLENGTH-<%d consecutiveVoiceDuration>\n";
#define STATE_IN_WORD 1
#define STATE_IN_SILENCE 2
@@ -437,7 +480,7 @@
{
if (load_config(0))
return AST_MODULE_LOAD_DECLINE;
- if (ast_register_application(app, amd_exec, synopsis, descrip))
+ if (ast_register_application_xml(app, amd_exec))
return AST_MODULE_LOAD_FAILURE;
return AST_MODULE_LOAD_SUCCESS;
}
Modified: trunk/apps/app_authenticate.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_authenticate.c?view=diff&rev=153365&r1=153364&r2=153365
==============================================================================
--- trunk/apps/app_authenticate.c (original)
+++ trunk/apps/app_authenticate.c Sat Nov 1 16:10:07 2008
@@ -54,31 +54,52 @@
static char *app = "Authenticate";
-
-static char *synopsis = "Authenticate a user";
-
-static char *descrip =
-" Authenticate(password[,options[,maxdigits[,prompt]]]): This application asks the caller\n"
-"to enter a given password in order to continue dialplan execution. If the password\n"
-"begins with the '/' character, it is interpreted as a file which contains a list of\n"
-"valid passwords, listed 1 password per line in the file.\n"
-" When using a database key, the value associated with the key can be anything.\n"
-"Users have three attempts to authenticate before the channel is hung up.\n"
-" Options:\n"
-" a - Set the channels' account code to the password that is entered\n"
-" d - Interpret the given path as database key, not a literal file\n"
-" m - Interpret the given path as a file which contains a list of account\n"
-" codes and password hashes delimited with ':', listed one per line in\n"
-" the file. When one of the passwords is matched, the channel will have\n"
-" its account code set to the corresponding account code in the file.\n"
-" r - Remove the database key upon successful entry (valid with 'd' only)\n"
-" maxdigits - maximum acceptable number of digits. Stops reading after\n"
-" maxdigits have been entered (without requiring the user to\n"
-" press the '#' key).\n"
-" Defaults to 0 - no limit - wait for the user press the '#' key.\n"
-" prompt - Override the agent-pass prompt file.\n"
- ;
-;
+/*** DOCUMENTATION
+ <application name="Authenticate" language="en_US">
+ <synopsis>
+ Authenticate a user
+ </synopsis>
+ <syntax>
+ <parameter name="password" required="true">
+ <para>Password the user should know</para>
+ </parameter>
+ <parameter name="options" required="false">
+ <optionlist>
+ <option name="a">
+ <para>Set the channels' account code to the password that is entered</para>
+ </option>
+ <option name="d">
+ <para>Interpret the given path as database key, not a literal file</para>
+ </option>
+ <option name="m">
+ <para>Interpret the given path as a file which contains a list of account
+ codes and password hashes delimited with <literal>:</literal>, listed one per line in
+ the file. When one of the passwords is matched, the channel will have
+ its account code set to the corresponding account code in the file.</para>
+ </option>
+ <option name="r">
+ <para>Remove the database key upon successful entry (valid with <literal>d</literal> only)</para>
+ </option>
+ </optionlist>
+ </parameter>
+ <parameter name="maxdigits" required="false">
+ <para>maximum acceptable number of digits. Stops reading after
+ maxdigits have been entered (without requiring the user to press the <literal>#</literal> key).
+ Defaults to 0 - no limit - wait for the user press the <literal>#</literal> key.</para>
+ </parameter>
+ <parameter name="prompt" required="false">
+ <para>Override the agent-pass prompt file.</para>
+ </parameter>
+ </syntax>
+ <description>
+ <para>This application asks the caller to enter a given password in order to continue dialplan execution.</para>
+ <para>If the password begins with the <literal>/</literal> character,
+ it is interpreted as a file which contains a list of valid passwords, listed 1 password per line in the file.</para>
+ <para>When using a database key, the value associated with the key can be anything.</para>
+ <para>Users have three attempts to authenticate before the channel is hung up.</para>
+ </description>
+ </application>
+ ***/
static int auth_exec(struct ast_channel *chan, void *data)
{
@@ -225,7 +246,7 @@
static int load_module(void)
{
- if (ast_register_application(app, auth_exec, synopsis, descrip))
+ if (ast_register_application_xml(app, auth_exec))
return AST_MODULE_LOAD_FAILURE;
return AST_MODULE_LOAD_SUCCESS;
}
Modified: trunk/apps/app_cdr.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_cdr.c?view=diff&rev=153365&r1=153364&r2=153365
==============================================================================
--- trunk/apps/app_cdr.c (original)
+++ trunk/apps/app_cdr.c Sat Nov 1 16:10:07 2008
@@ -32,13 +32,19 @@
#include "asterisk/channel.h"
#include "asterisk/module.h"
-static char *nocdr_descrip =
-" NoCDR(): This application will tell Asterisk not to maintain a CDR for the\n"
-"current call.\n";
+/*** DOCUMENTATION
+ <application name="NoCDR" language="en_US">
+ <synopsis>
+ Tell Asterisk to not maintain a CDR for the current call
+ </synopsis>
+ <syntax />
+ <description>
+ <para>This application will tell Asterisk not to maintain a CDR for the current call.</para>
+ </description>
+ </application>
+ ***/
static char *nocdr_app = "NoCDR";
-static char *nocdr_synopsis = "Tell Asterisk to not maintain a CDR for the current call";
-
static int nocdr_exec(struct ast_channel *chan, void *data)
{
@@ -55,7 +61,7 @@
static int load_module(void)
{
- if (ast_register_application(nocdr_app, nocdr_exec, nocdr_synopsis, nocdr_descrip))
+ if (ast_register_application_xml(nocdr_app, nocdr_exec))
return AST_MODULE_LOAD_FAILURE;
return AST_MODULE_LOAD_SUCCESS;
}
Modified: trunk/apps/app_chanisavail.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_chanisavail.c?view=diff&rev=153365&r1=153364&r2=153365
==============================================================================
--- trunk/apps/app_chanisavail.c (original)
+++ trunk/apps/app_chanisavail.c Sat Nov 1 16:10:07 2008
@@ -43,22 +43,54 @@
static char *app = "ChanIsAvail";
-static char *synopsis = "Check channel availability";
-
-static char *descrip =
-" ChanIsAvail(Technology/resource[&Technology2/resource2...][,options]): \n"
-"This application will check to see if any of the specified channels are\n"
-"available.\n"
-" Options:\n"
-" a - Check for all available channels, not only the first one.\n"
-" s - Consider the channel unavailable if the channel is in use at all.\n"
-" t - Simply checks if specified channels exist in the channel list\n"
-" (implies option s).\n"
-"This application sets the following channel variable upon completion:\n"
-" AVAILCHAN - the name of the available channel, if one exists\n"
-" AVAILORIGCHAN - the canonical channel name that was used to create the channel\n"
-" AVAILSTATUS - the status code for the available channel\n";
-
+/*** DOCUMENTATION
+ <application name="ChanIsAvail" language="en_US">
+ <synopsis>
+ Check channel availability
+ </synopsis>
+ <syntax>
+ <parameter name="Technology/Resource" required="true" argsep="&">
+ <argument name="Technology2/Resource2" multiple="true">
+ <para>Optional extra devices to check</para>
+ <para>If you need more then one enter them as
+ Technology2/Resource2&Technology3/Resourse3&.....</para>
+ </argument>
+ <para>Specification of the device(s) to check. These must be in the format of
+ <literal>Technology/Resource</literal>, where <replaceable>Technology</replaceable>
+ represents a particular channel driver, and <replaceable>Resource</replaceable>
+ represents a resource available to that particular channel driver.</para>
+ </parameter>
+ <parameter name="options" required="false">
+ <optionlist>
+ <option name="a">
+ <para>Check for all available channels, not only the first one</para>
+ </option>
+ <option name="s">
+ <para>Consider the channel unavailable if the channel is in use at all</para>
+ </option>
+ <option name="t" implies="s">
+ <para>Simply checks if specified channels exist in the channel list</para>
+ </option>
+ </optionlist>
+ </parameter>
+ </syntax>
+ <description>
+ <para>This application will check to see if any of the specified channels are available.</para>
+ <para>This application sets the following channel variables:</para>
+ <variablelist>
+ <variable name="AVAILCHAN">
+ <para>The name of the available channel, if one exists</para>
+ </variable>
+ <variable name="AVAILORIGCHAN">
+ <para>The canonical channel name that was used to create the channel</para>
+ </variable>
+ <variable name="AVAILSTATUS">
+ <para>The status code for the available channel</para>
+ </variable>
+ </variablelist>
+ </description>
+ </application>
+ ***/
static int chanavail_exec(struct ast_channel *chan, void *data)
{
@@ -165,7 +197,7 @@
static int load_module(void)
{
- return ast_register_application(app, chanavail_exec, synopsis, descrip) ?
+ return ast_register_application_xml(app, chanavail_exec) ?
AST_MODULE_LOAD_DECLINE : AST_MODULE_LOAD_SUCCESS;
}
Modified: trunk/apps/app_channelredirect.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_channelredirect.c?view=diff&rev=153365&r1=153364&r2=153365
==============================================================================
--- trunk/apps/app_channelredirect.c (original)
+++ trunk/apps/app_channelredirect.c Sat Nov 1 16:10:07 2008
@@ -35,14 +35,32 @@
#include "asterisk/app.h"
#include "asterisk/features.h"
+/*** DOCUMENTATION
+ <application name="ChannelRedirect" language="en_US">
+ <synopsis>
+ Redirects given channel to a dialplan target
+ </synopsis>
+ <syntax>
+ <parameter name="channel" required="true" />
+ <parameter name="context" required="false" />
+ <parameter name="extension" required="false" />
+ <parameter name="priority" required="true" />
+ </syntax>
+ <description>
+ <para>Sends the specified channel to the specified extension priority</para>
+
+ <para>This application sets the following channel variables upon completion</para>
+ <variablelist>
+ <variable name="CHANNELREDIRECT_STATUS">
+ <value name="NOCHANNEL" />
+ <value name="SUCCESS" />
+ <para>Are set to the result of the redirection</para>
+ </variable>
+ </variablelist>
+ </description>
+ </application>
+ ***/
static char *app = "ChannelRedirect";
-static char *synopsis = "Redirects given channel to a dialplan target.";
-static char *descrip =
-"ChannelRedirect(channel,[[context,]extension,]priority)\n"
-" Sends the specified channel to the specified extension priority\n"
-"This application sets the following channel variables upon completion:\n"
-" CHANNELREDIRECT_STATUS - Are set to the result of the redirection\n"
-" either NOCHANNEL or SUCCESS\n";
static int asyncgoto_exec(struct ast_channel *chan, void *data)
{
@@ -89,7 +107,7 @@
static int load_module(void)
{
- return ast_register_application(app, asyncgoto_exec, synopsis, descrip) ?
+ return ast_register_application_xml(app, asyncgoto_exec) ?
AST_MODULE_LOAD_DECLINE : AST_MODULE_LOAD_SUCCESS;
}
Modified: trunk/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_chanspy.c?view=diff&rev=153365&r1=153364&r2=153365
==============================================================================
--- trunk/apps/app_chanspy.c (original)
+++ trunk/apps/app_chanspy.c Sat Nov 1 16:10:07 2008
@@ -52,128 +52,238 @@
#define AST_NAME_STRLEN 256
#define NUM_SPYGROUPS 128
-static const char *tdesc = "Listen to a channel, and optionally whisper into it";
+/*** DOCUMENTATION
+ <application name="ChanSpy" language="en_US">
+ <synopsis>
+ Listen to a channel, and optionally whisper into it.
+ </synopsis>
+ <syntax>
+ <parameter name="chanprefix" />
+ <parameter name="options">
+ <optionlist>
+ <option name="b">
+ <para>Only spy on channels involved in a bridged call.</para>
+ </option>
+ <option name="B">
+ <para>Instead of whispering on a single channel barge in on both
+ channels involved in the call.</para>
+ </option>
+ <option name="d">
+ <para>Override the typical numeric DTMF functionality and instead
+ use DTMF to switch between spy modes.</para>
+ <enumlist>
+ <enum name="4">
+ <para>spy mode</para>
+ </enum>
+ <enum name="5">
+ <para>whisper mode</para>
+ </enum>
+ <enum name="6">
+ <para>barge mode</para>
+ </enum>
+ </enumlist>
+ </option>
+ <option name="g">
+ <argument name="grp" required="true">
+ <para>Only spy on channels in which one or more of the groups
+ listed in <replaceable>grp</replaceable> matches one or more groups from the
+ <variable>SPYGROUP</variable> variable set on the channel to be spied upon.</para>
+ </argument>
+ <note><para>both <replaceable>grp</replaceable> and <variable>SPYGROUP</variable> can contain
+ either a single group or a colon-delimited list of groups, such
+ as <literal>sales:support:accounting</literal>.</para></note>
+ </option>
+ <option name="n" argsep="@">
+ <para>Say the name of the person being spied on if that person has recorded
+ his/her name. If a context is specified, then that voicemail context will
+ be searched when retrieving the name, otherwise the <literal>default</literal> context
+ be used when searching for the name (i.e. if SIP/1000 is the channel being
+ spied on and no mailbox is specified, then <literal>1000</literal> will be used when searching
+ for the name).</para>
+ <argument name="mailbox" />
+ <argument name="context" />
+ </option>
+ <option name="q">
+ <para>Don't play a beep when beginning to spy on a channel, or speak the
+ selected channel name.</para>
+ </option>
+ <option name="r">
+ <para>Record the session to the monitor spool directory. An optional base for the filename
+ may be specified. The default is <literal>chanspy</literal>.</para>
+ <argument name="basename" />
+ </option>
+ <option name="s">
+ <para>Skip the playback of the channel type (i.e. SIP, IAX, etc) when
+ speaking the selected channel name.</para>
+ </option>
+ <option name="v">
+ <argument name="value" />
+ <para>Adjust the initial volume in the range from <literal>-4</literal>
+ to <literal>4</literal>. A negative value refers to a quieter setting.</para>
+ </option>
+ <option name="w">
+ <para>Enable <literal>whisper</literal> mode, so the spying channel can talk to
+ the spied-on channel.</para>
+ </option>
+ <option name="W">
+ <para>Enable <literal>private whisper</literal> mode, so the spying channel can
+ talk to the spied-on channel but cannot listen to that channel.</para>
+ </option>
+ <option name="o">
+ <para>Only listen to audio coming from this channel.</para>
+ </option>
+ <option name="X">
+ <para>Allow the user to exit ChanSpy to a valid single digit
+ numeric extension in the current context or the context
+ specified by the <variable>SPY_EXIT_CONTEXT</variable> channel variable. The
+ name of the last channel that was spied on will be stored
+ in the <variable>SPY_CHANNEL</variable> variable.</para>
+ </option>
+ <option name="e">
+ <argument name="ext" required="true" />
+ <para>Enable <emphasis>enforced</emphasis> mode, so the spying channel can
+ only monitor extensions whose name is in the <replaceable>ext</replaceable> : delimited
+ list.</para>
+ </option>
+ </optionlist>
+ </parameter>
+ </syntax>
+ <description>
+ <para>This application is used to listen to the audio from an Asterisk channel. This includes the audio
+ coming in and "out of the channel being spied on. If the <literal>chanprefix</literal> parameter is specified,
+ only channels beginning with this string will be spied upon.</para>
+ <para>While spying, the following actions may be performed:</para>
+ <para> - Dialing <literal>#</literal> cycles the volume level.</para>
+ <para> - Dialing <literal>*</literal> will stop spying and look for another channel to spy on.</para>
+ <para> - Dialing a series of digits followed by <literal>#</literal> builds a channel name to append
+ to 'chanprefix'. For example, executing ChanSpy(Agent) and then dialing the digits '1234#'
+ while spying will begin spying on the channel 'Agent/1234'. Note that this feature will be overriden if the 'd' option
+ is used</para>
+ <note><para>The <replaceable>X</replaceable> option supersedes the three features above in that if a valid
+ single digit extension exists in the correct context ChanSpy will exit to it.
+ This also disables choosing a channel based on <literal>chanprefix</literal> and a digit sequence.</para></note>
+ </description>
+ </application>
+ <application name="ExtenSpy" language="en_US">
+ <synopsis>
+ Listen to a channel, and optionally whisper into it.
+ </synopsis>
+ <syntax>
+ <parameter name="exten" required="true" argsep="@">
+ <argument name="exten" required="true">
+ <para>Specify extension.</para>
+ </argument>
+ <argument name="context">
+ <para>Optionally specify a context, defaults to <literal>default</literal>.</para>
+ </argument>
+ </parameter>
+ <parameter name="options">
+ <optionlist>
+ <option name="b">
+ <para>Only spy on channels involved in a bridged call.</para>
+ </option>
+ <option name="B">
+ <para>Instead of whispering on a single channel barge in on both
+ channels involved in the call.</para>
+ </option>
+ <option name="d">
+ <para>Override the typical numeric DTMF functionality and instead
+ use DTMF to switch between spy modes.</para>
+ <enumlist>
+ <enum name="4">
+ <para>spy mode</para>
+ </enum>
+ <enum name="5">
+ <para>whisper mode</para>
+ </enum>
+ <enum name="6">
+ <para>barge mode</para>
+ </enum>
+ </enumlist>
+ </option>
+ <option name="g">
+ <argument name="grp" required="true">
+ <para>Only spy on channels in which one or more of the groups
+ listed in <replaceable>grp</replaceable> matches one or more groups from the
+ <variable>SPYGROUP</variable> variable set on the channel to be spied upon.</para>
+ </argument>
+ <note><para>both <replaceable>grp</replaceable> and <variable>SPYGROUP</variable> can contain
+ either a single group or a colon-delimited list of groups, such
+ as <literal>sales:support:accounting</literal>.</para></note>
+ </option>
+ <option name="n" argsep="@">
+ <para>Say the name of the person being spied on if that person has recorded
+ his/her name. If a context is specified, then that voicemail context will
+ be searched when retrieving the name, otherwise the <literal>default</literal> context
+ be used when searching for the name (i.e. if SIP/1000 is the channel being
+ spied on and no mailbox is specified, then <literal>1000</literal> will be used when searching
+ for the name).</para>
+ <argument name="mailbox" />
+ <argument name="context" />
+ </option>
+ <option name="q">
+ <para>Don't play a beep when beginning to spy on a channel, or speak the
+ selected channel name.</para>
+ </option>
+ <option name="r">
+ <para>Record the session to the monitor spool directory. An optional base for the filename
+ may be specified. The default is <literal>chanspy</literal>.</para>
+ <argument name="basename" />
+ </option>
+ <option name="s">
+ <para>Skip the playback of the channel type (i.e. SIP, IAX, etc) when
+ speaking the selected channel name.</para>
+ </option>
+ <option name="v">
+ <argument name="value" />
+ <para>Adjust the initial volume in the range from <literal>-4</literal>
+ to <literal>4</literal>. A negative value refers to a quieter setting.</para>
+ </option>
+ <option name="w">
+ <para>Enable <literal>whisper</literal> mode, so the spying channel can talk to
+ the spied-on channel.</para>
+ </option>
+ <option name="W">
+ <para>Enable <literal>private whisper</literal> mode, so the spying channel can
+ talk to the spied-on channel but cannot listen to that channel.</para>
+ </option>
+ <option name="o">
+ <para>Only listen to audio coming from this channel.</para>
+ </option>
+ <option name="X">
+ <para>Allow the user to exit ChanSpy to a valid single digit
+ numeric extension in the current context or the context
+ specified by the <variable>SPY_EXIT_CONTEXT</variable> channel variable. The
+ name of the last channel that was spied on will be stored
+ in the <variable>SPY_CHANNEL</variable> variable.</para>
+ </option>
+ <option name="e">
+ <argument name="ext" required="true" />
+ <para>Enable <emphasis>enforced</emphasis> mode, so the spying channel can
+ only monitor extensions whose name is in the <replaceable>ext</replaceable> : delimited
+ list.</para>
+ </option>
+ </optionlist>
+ </parameter>
+ </syntax>
+ <description>
+ <para>This application is used to listen to the audio from an Asterisk channel. This includes
+ the audio coming in and out of the channel being spied on. Only channels created by outgoing calls for the
+ specified extension will be selected for spying. If the optional context is not supplied,
+ the current channel's context will be used.</para>
+ <para>While spying, the following actions may be performed:</para>
+ <para> - Dialing <literal>#</literal> cycles the volume level.</para>
+ <para> - Dialing <literal>*</literal> will stop spying and look for another channel to spy on.</para>
+ <note><para>The <replaceable>X</replaceable> option supersedes the three features above in that if a valid
+ single digit extension exists in the correct context ChanSpy will exit to it.
+ This also disables choosing a channel based on <literal>chanprefix</literal> and a digit sequence.</para></note>
+ </description>
+ </application>
+
+ ***/
static const char *app_chan = "ChanSpy";
-static const char *desc_chan =
[... 11880 lines stripped ...]
More information about the asterisk-commits
mailing list