[asterisk-commits] file: branch file/app_agents r153476 - in /team/file/app_agents: ./ apps/ bui...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sat Nov 1 22:03:32 CDT 2008
Author: file
Date: Sat Nov 1 22:03:31 2008
New Revision: 153476
URL: http://svn.digium.com/view/asterisk?view=rev&rev=153476
Log:
Merged revisions 153362,153365,153403,153435,153437,153468,153470,153472 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r153362 | russell | 2008-11-01 15:41:38 -0500 (Sat, 01 Nov 2008) | 3 lines
Ensure that the sip_pvt properly has its refcount incremented when the scheduler holds
a reference to it for session timer processing.
........
r153365 | russell | 2008-11-01 16:10:07 -0500 (Sat, 01 Nov 2008) | 11 lines
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
........
r153403 | russell | 2008-11-01 18:46:12 -0500 (Sat, 01 Nov 2008) | 2 lines
Don't ignore the result of find_peer() when looking for a peer by IP in check_peer_ok().
........
r153435 | russell | 2008-11-01 21:14:19 -0500 (Sat, 01 Nov 2008) | 3 lines
Instead of doing a couple of strlen() calls each iteration of the loop, only do it once
at the beginning of the function
........
r153437 | russell | 2008-11-01 21:20:10 -0500 (Sat, 01 Nov 2008) | 3 lines
- Use a for loop instead of a while loop
- Get rid of an unnecessary variable
........
r153468 | russell | 2008-11-01 21:50:33 -0500 (Sat, 01 Nov 2008) | 2 lines
Fix various spelling and grammatical issues in documentation
........
r153470 | russell | 2008-11-01 21:55:25 -0500 (Sat, 01 Nov 2008) | 1 line
fix a typo (thanks sean)
........
r153472 | seanbright | 2008-11-01 21:57:27 -0500 (Sat, 01 Nov 2008) | 1 line
Another little one.
........
Added:
team/file/app_agents/build_tools/get_documentation
- copied unchanged from r153472, trunk/build_tools/get_documentation
team/file/app_agents/doc/appdocsxml.dtd
- copied unchanged from r153472, trunk/doc/appdocsxml.dtd
team/file/app_agents/include/asterisk/xml.h
- copied unchanged from r153472, trunk/include/asterisk/xml.h
team/file/app_agents/main/xml.c
- copied unchanged from r153472, trunk/main/xml.c
Modified:
team/file/app_agents/ (props changed)
team/file/app_agents/Makefile
team/file/app_agents/apps/app_adsiprog.c
team/file/app_agents/apps/app_alarmreceiver.c
team/file/app_agents/apps/app_amd.c
team/file/app_agents/apps/app_authenticate.c
team/file/app_agents/apps/app_cdr.c
team/file/app_agents/apps/app_chanisavail.c
team/file/app_agents/apps/app_channelredirect.c
team/file/app_agents/apps/app_chanspy.c
team/file/app_agents/apps/app_controlplayback.c
team/file/app_agents/apps/app_dahdibarge.c
team/file/app_agents/apps/app_dahdiras.c
team/file/app_agents/apps/app_dahdiscan.c
team/file/app_agents/apps/app_dial.c
team/file/app_agents/apps/app_dictate.c
team/file/app_agents/apps/app_directed_pickup.c
team/file/app_agents/apps/app_directory.c
team/file/app_agents/apps/app_disa.c
team/file/app_agents/apps/app_dumpchan.c
team/file/app_agents/apps/app_echo.c
team/file/app_agents/apps/app_exec.c
team/file/app_agents/apps/app_fax.c
team/file/app_agents/apps/app_festival.c
team/file/app_agents/apps/app_getcpeid.c
team/file/app_agents/apps/app_ices.c
team/file/app_agents/apps/app_image.c
team/file/app_agents/apps/app_jack.c
team/file/app_agents/apps/app_milliwatt.c
team/file/app_agents/apps/app_mixmonitor.c
team/file/app_agents/apps/app_morsecode.c
team/file/app_agents/apps/app_mp3.c
team/file/app_agents/apps/app_nbscat.c
team/file/app_agents/apps/app_page.c
team/file/app_agents/apps/app_playback.c
team/file/app_agents/apps/app_privacy.c
team/file/app_agents/apps/app_queue.c
team/file/app_agents/apps/app_readexten.c
team/file/app_agents/apps/app_readfile.c
team/file/app_agents/apps/app_record.c
team/file/app_agents/apps/app_sayunixtime.c
team/file/app_agents/apps/app_senddtmf.c
team/file/app_agents/apps/app_sendtext.c
team/file/app_agents/apps/app_setcallerid.c
team/file/app_agents/apps/app_skel.c
team/file/app_agents/apps/app_softhangup.c
team/file/app_agents/apps/app_stack.c
team/file/app_agents/apps/app_system.c
team/file/app_agents/apps/app_talkdetect.c
team/file/app_agents/apps/app_transfer.c
team/file/app_agents/apps/app_url.c
team/file/app_agents/apps/app_userevent.c
team/file/app_agents/apps/app_verbose.c
team/file/app_agents/apps/app_voicemail.c
team/file/app_agents/apps/app_waituntil.c
team/file/app_agents/apps/app_while.c
team/file/app_agents/apps/app_zapateller.c
team/file/app_agents/channels/chan_sip.c
team/file/app_agents/configure
team/file/app_agents/configure.ac
team/file/app_agents/doc/ (props changed)
team/file/app_agents/doc/tex/asterisk-conf.tex
team/file/app_agents/funcs/func_base64.c
team/file/app_agents/funcs/func_blacklist.c
team/file/app_agents/funcs/func_callerid.c
team/file/app_agents/funcs/func_cdr.c
team/file/app_agents/funcs/func_channel.c
team/file/app_agents/funcs/func_config.c
team/file/app_agents/funcs/func_cut.c
team/file/app_agents/funcs/func_db.c
team/file/app_agents/funcs/func_devstate.c
team/file/app_agents/funcs/func_dialgroup.c
team/file/app_agents/funcs/func_dialplan.c
team/file/app_agents/funcs/func_enum.c
team/file/app_agents/funcs/func_env.c
team/file/app_agents/funcs/func_extstate.c
team/file/app_agents/funcs/func_global.c
team/file/app_agents/funcs/func_groupcount.c
team/file/app_agents/funcs/func_iconv.c
team/file/app_agents/funcs/func_lock.c
team/file/app_agents/funcs/func_logic.c
team/file/app_agents/funcs/func_math.c
team/file/app_agents/funcs/func_md5.c
team/file/app_agents/funcs/func_module.c
team/file/app_agents/funcs/func_odbc.c
team/file/app_agents/funcs/func_rand.c
team/file/app_agents/funcs/func_realtime.c
team/file/app_agents/funcs/func_sha1.c
team/file/app_agents/funcs/func_shell.c
team/file/app_agents/funcs/func_speex.c
team/file/app_agents/funcs/func_strings.c
team/file/app_agents/funcs/func_timeout.c
team/file/app_agents/funcs/func_uri.c
team/file/app_agents/funcs/func_version.c
team/file/app_agents/funcs/func_vmcount.c
team/file/app_agents/funcs/func_volume.c
team/file/app_agents/include/asterisk/_private.h
team/file/app_agents/include/asterisk/autoconfig.h.in
team/file/app_agents/include/asterisk/compat.h
team/file/app_agents/include/asterisk/extconf.h
team/file/app_agents/include/asterisk/module.h
team/file/app_agents/include/asterisk/pbx.h
team/file/app_agents/include/asterisk/strings.h
team/file/app_agents/include/asterisk/term.h
team/file/app_agents/main/Makefile
team/file/app_agents/main/asterisk.c
team/file/app_agents/main/config.c
team/file/app_agents/main/features.c
team/file/app_agents/main/pbx.c
team/file/app_agents/main/term.c
team/file/app_agents/makeopts.in
Propchange: team/file/app_agents/
------------------------------------------------------------------------------
automerge = *
Propchange: team/file/app_agents/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sat Nov 1 22:03:31 2008
@@ -1,1 +1,1 @@
-/trunk:1-153299
+/trunk:1-153475
Modified: team/file/app_agents/Makefile
URL: http://svn.digium.com/view/asterisk/team/file/app_agents/Makefile?view=diff&rev=153476&r1=153475&r2=153476
==============================================================================
--- team/file/app_agents/Makefile (original)
+++ team/file/app_agents/Makefile Sat Nov 1 22:03:31 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: team/file/app_agents/apps/app_adsiprog.c
URL: http://svn.digium.com/view/asterisk/team/file/app_agents/apps/app_adsiprog.c?view=diff&rev=153476&r1=153475&r2=153476
==============================================================================
--- team/file/app_agents/apps/app_adsiprog.c (original)
+++ team/file/app_agents/apps/app_adsiprog.c Sat Nov 1 22:03:31 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: team/file/app_agents/apps/app_alarmreceiver.c
URL: http://svn.digium.com/view/asterisk/team/file/app_agents/apps/app_alarmreceiver.c?view=diff&rev=153476&r1=153475&r2=153476
==============================================================================
--- team/file/app_agents/apps/app_alarmreceiver.c (original)
+++ team/file/app_agents/apps/app_alarmreceiver.c Sat Nov 1 22:03:31 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: team/file/app_agents/apps/app_amd.c
URL: http://svn.digium.com/view/asterisk/team/file/app_agents/apps/app_amd.c?view=diff&rev=153476&r1=153475&r2=153476
==============================================================================
--- team/file/app_agents/apps/app_amd.c (original)
+++ team/file/app_agents/apps/app_amd.c Sat Nov 1 22:03:31 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: team/file/app_agents/apps/app_authenticate.c
URL: http://svn.digium.com/view/asterisk/team/file/app_agents/apps/app_authenticate.c?view=diff&rev=153476&r1=153475&r2=153476
==============================================================================
--- team/file/app_agents/apps/app_authenticate.c (original)
+++ team/file/app_agents/apps/app_authenticate.c Sat Nov 1 22:03:31 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: team/file/app_agents/apps/app_cdr.c
URL: http://svn.digium.com/view/asterisk/team/file/app_agents/apps/app_cdr.c?view=diff&rev=153476&r1=153475&r2=153476
==============================================================================
--- team/file/app_agents/apps/app_cdr.c (original)
+++ team/file/app_agents/apps/app_cdr.c Sat Nov 1 22:03:31 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: team/file/app_agents/apps/app_chanisavail.c
URL: http://svn.digium.com/view/asterisk/team/file/app_agents/apps/app_chanisavail.c?view=diff&rev=153476&r1=153475&r2=153476
==============================================================================
--- team/file/app_agents/apps/app_chanisavail.c (original)
+++ team/file/app_agents/apps/app_chanisavail.c Sat Nov 1 22:03:31 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: team/file/app_agents/apps/app_channelredirect.c
URL: http://svn.digium.com/view/asterisk/team/file/app_agents/apps/app_channelredirect.c?view=diff&rev=153476&r1=153475&r2=153476
==============================================================================
--- team/file/app_agents/apps/app_channelredirect.c (original)
+++ team/file/app_agents/apps/app_channelredirect.c Sat Nov 1 22:03:31 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: team/file/app_agents/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/team/file/app_agents/apps/app_chanspy.c?view=diff&rev=153476&r1=153475&r2=153476
==============================================================================
--- team/file/app_agents/apps/app_chanspy.c (original)
+++ team/file/app_agents/apps/app_chanspy.c Sat Nov 1 22:03:31 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 overridden 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
[... 12194 lines stripped ...]
More information about the asterisk-commits
mailing list