[asterisk-commits] mmichelson: branch group/issue8824 r153942 - in /team/group/issue8824: ./ agi...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Nov 3 10:21:28 CST 2008


Author: mmichelson
Date: Mon Nov  3 10:21:27 2008
New Revision: 153942

URL: http://svn.digium.com/view/asterisk?view=rev&rev=153942
Log:
Resolve conflicts and reset the automerge property


Added:
    team/group/issue8824/build_tools/get_documentation
      - copied unchanged from r153905, trunk/build_tools/get_documentation
    team/group/issue8824/doc/appdocsxml.dtd
      - copied unchanged from r153905, trunk/doc/appdocsxml.dtd
    team/group/issue8824/include/asterisk/xml.h
      - copied unchanged from r153905, trunk/include/asterisk/xml.h
    team/group/issue8824/main/xml.c
      - copied unchanged from r153905, trunk/main/xml.c
Modified:
    team/group/issue8824/   (props changed)
    team/group/issue8824/CHANGES
    team/group/issue8824/Makefile
    team/group/issue8824/agi/eagi-sphinx-test.c
    team/group/issue8824/agi/eagi-test.c
    team/group/issue8824/apps/app_adsiprog.c
    team/group/issue8824/apps/app_alarmreceiver.c
    team/group/issue8824/apps/app_amd.c
    team/group/issue8824/apps/app_authenticate.c
    team/group/issue8824/apps/app_cdr.c
    team/group/issue8824/apps/app_chanisavail.c
    team/group/issue8824/apps/app_channelredirect.c
    team/group/issue8824/apps/app_chanspy.c
    team/group/issue8824/apps/app_controlplayback.c
    team/group/issue8824/apps/app_dahdibarge.c
    team/group/issue8824/apps/app_dahdiras.c
    team/group/issue8824/apps/app_dahdiscan.c
    team/group/issue8824/apps/app_db.c
    team/group/issue8824/apps/app_dial.c
    team/group/issue8824/apps/app_dictate.c
    team/group/issue8824/apps/app_directed_pickup.c
    team/group/issue8824/apps/app_directory.c
    team/group/issue8824/apps/app_disa.c
    team/group/issue8824/apps/app_dumpchan.c
    team/group/issue8824/apps/app_echo.c
    team/group/issue8824/apps/app_exec.c
    team/group/issue8824/apps/app_fax.c
    team/group/issue8824/apps/app_festival.c
    team/group/issue8824/apps/app_flash.c
    team/group/issue8824/apps/app_getcpeid.c
    team/group/issue8824/apps/app_ices.c
    team/group/issue8824/apps/app_image.c
    team/group/issue8824/apps/app_ivrdemo.c
    team/group/issue8824/apps/app_jack.c
    team/group/issue8824/apps/app_milliwatt.c
    team/group/issue8824/apps/app_mixmonitor.c
    team/group/issue8824/apps/app_morsecode.c
    team/group/issue8824/apps/app_mp3.c
    team/group/issue8824/apps/app_nbscat.c
    team/group/issue8824/apps/app_page.c
    team/group/issue8824/apps/app_playback.c
    team/group/issue8824/apps/app_privacy.c
    team/group/issue8824/apps/app_queue.c
    team/group/issue8824/apps/app_readexten.c
    team/group/issue8824/apps/app_readfile.c
    team/group/issue8824/apps/app_record.c
    team/group/issue8824/apps/app_sayunixtime.c
    team/group/issue8824/apps/app_senddtmf.c
    team/group/issue8824/apps/app_sendtext.c
    team/group/issue8824/apps/app_setcallerid.c
    team/group/issue8824/apps/app_skel.c
    team/group/issue8824/apps/app_sms.c
    team/group/issue8824/apps/app_softhangup.c
    team/group/issue8824/apps/app_stack.c
    team/group/issue8824/apps/app_system.c
    team/group/issue8824/apps/app_talkdetect.c
    team/group/issue8824/apps/app_transfer.c
    team/group/issue8824/apps/app_url.c
    team/group/issue8824/apps/app_userevent.c
    team/group/issue8824/apps/app_verbose.c
    team/group/issue8824/apps/app_voicemail.c
    team/group/issue8824/apps/app_waitforring.c
    team/group/issue8824/apps/app_waitforsilence.c
    team/group/issue8824/apps/app_waituntil.c
    team/group/issue8824/apps/app_while.c
    team/group/issue8824/apps/app_zapateller.c
    team/group/issue8824/autoconf/ast_ext_lib.m4
    team/group/issue8824/autoconf/ast_gcc_attribute.m4
    team/group/issue8824/channels/Makefile
    team/group/issue8824/channels/chan_dahdi.c
    team/group/issue8824/channels/chan_h323.c
    team/group/issue8824/channels/chan_iax2.c
    team/group/issue8824/channels/chan_oss.c
    team/group/issue8824/channels/chan_sip.c
    team/group/issue8824/configs/sip.conf.sample
    team/group/issue8824/configure
    team/group/issue8824/configure.ac
    team/group/issue8824/doc/   (props changed)
    team/group/issue8824/doc/tex/asterisk-conf.tex
    team/group/issue8824/formats/format_gsm.c
    team/group/issue8824/formats/format_ogg_vorbis.c
    team/group/issue8824/formats/format_wav.c
    team/group/issue8824/formats/format_wav_gsm.c
    team/group/issue8824/funcs/func_base64.c
    team/group/issue8824/funcs/func_blacklist.c
    team/group/issue8824/funcs/func_callerid.c
    team/group/issue8824/funcs/func_cdr.c
    team/group/issue8824/funcs/func_channel.c
    team/group/issue8824/funcs/func_config.c
    team/group/issue8824/funcs/func_cut.c
    team/group/issue8824/funcs/func_db.c
    team/group/issue8824/funcs/func_devstate.c
    team/group/issue8824/funcs/func_dialgroup.c
    team/group/issue8824/funcs/func_dialplan.c
    team/group/issue8824/funcs/func_enum.c
    team/group/issue8824/funcs/func_env.c
    team/group/issue8824/funcs/func_extstate.c
    team/group/issue8824/funcs/func_global.c
    team/group/issue8824/funcs/func_groupcount.c
    team/group/issue8824/funcs/func_iconv.c
    team/group/issue8824/funcs/func_lock.c
    team/group/issue8824/funcs/func_logic.c
    team/group/issue8824/funcs/func_math.c
    team/group/issue8824/funcs/func_md5.c
    team/group/issue8824/funcs/func_module.c
    team/group/issue8824/funcs/func_odbc.c
    team/group/issue8824/funcs/func_rand.c
    team/group/issue8824/funcs/func_realtime.c
    team/group/issue8824/funcs/func_sha1.c
    team/group/issue8824/funcs/func_shell.c
    team/group/issue8824/funcs/func_speex.c
    team/group/issue8824/funcs/func_strings.c
    team/group/issue8824/funcs/func_timeout.c
    team/group/issue8824/funcs/func_uri.c
    team/group/issue8824/funcs/func_version.c
    team/group/issue8824/funcs/func_vmcount.c
    team/group/issue8824/funcs/func_volume.c
    team/group/issue8824/include/asterisk/_private.h
    team/group/issue8824/include/asterisk/agi.h
    team/group/issue8824/include/asterisk/autoconfig.h.in
    team/group/issue8824/include/asterisk/compat.h
    team/group/issue8824/include/asterisk/compiler.h
    team/group/issue8824/include/asterisk/extconf.h
    team/group/issue8824/include/asterisk/features.h
    team/group/issue8824/include/asterisk/module.h
    team/group/issue8824/include/asterisk/pbx.h
    team/group/issue8824/include/asterisk/strings.h
    team/group/issue8824/include/asterisk/term.h
    team/group/issue8824/main/Makefile
    team/group/issue8824/main/ast_expr2f.c
    team/group/issue8824/main/asterisk.c
    team/group/issue8824/main/channel.c
    team/group/issue8824/main/config.c
    team/group/issue8824/main/db1-ast/hash/hash_page.c
    team/group/issue8824/main/features.c
    team/group/issue8824/main/file.c
    team/group/issue8824/main/http.c
    team/group/issue8824/main/logger.c
    team/group/issue8824/main/manager.c
    team/group/issue8824/main/pbx.c
    team/group/issue8824/main/term.c
    team/group/issue8824/main/utils.c
    team/group/issue8824/makeopts.in
    team/group/issue8824/pbx/pbx_config.c
    team/group/issue8824/pbx/pbx_dundi.c
    team/group/issue8824/pbx/pbx_lua.c
    team/group/issue8824/res/ael/ael.flex
    team/group/issue8824/res/ael/ael.tab.c
    team/group/issue8824/res/ael/ael.y
    team/group/issue8824/res/ael/ael_lex.c
    team/group/issue8824/res/res_agi.c
    team/group/issue8824/res/res_config_sqlite.c
    team/group/issue8824/res/res_crypto.c
    team/group/issue8824/res/res_http_post.c
    team/group/issue8824/res/res_jabber.c
    team/group/issue8824/res/res_musiconhold.c
    team/group/issue8824/res/res_phoneprov.c
    team/group/issue8824/utils/astcanary.c
    team/group/issue8824/utils/astman.c
    team/group/issue8824/utils/frame.c
    team/group/issue8824/utils/muted.c
    team/group/issue8824/utils/stereorize.c
    team/group/issue8824/utils/streamplayer.c

Propchange: team/group/issue8824/
------------------------------------------------------------------------------
    automerge = *

Propchange: team/group/issue8824/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Propchange: team/group/issue8824/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Nov  3 10:21:27 2008
@@ -1,1 +1,1 @@
-/trunk:1-153307
+/trunk:1-153940

Modified: team/group/issue8824/CHANGES
URL: http://svn.digium.com/view/asterisk/team/group/issue8824/CHANGES?view=diff&rev=153942&r1=153941&r2=153942
==============================================================================
--- team/group/issue8824/CHANGES (original)
+++ team/group/issue8824/CHANGES Mon Nov  3 10:21:27 2008
@@ -47,6 +47,10 @@
    making the new/old message count available to local devices.
  * Added support for setting the domain in the URI for caller of an
    outbound call by using the SIPFROMDOMAIN channel variable.
+ * Added a new configuration option "remotesecret" for authentication to
+   remote services. For backwards compatibility, "secret" still has the
+   same function as before, but now you can configure both a remote secret and a
+   local secret for mutual authentication.
 
 Skinny Changes
 --------------

Modified: team/group/issue8824/Makefile
URL: http://svn.digium.com/view/asterisk/team/group/issue8824/Makefile?view=diff&rev=153942&r1=153941&r2=153942
==============================================================================
--- team/group/issue8824/Makefile (original)
+++ team/group/issue8824/Makefile Mon Nov  3 10:21:27 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
@@ -348,7 +351,7 @@
 	@echo " +               $(mK) install               +"  
 	@echo " +-------------------------------------------+"  
 
-_all: cleantest makeopts $(SUBDIRS)
+_all: cleantest makeopts $(SUBDIRS) doc/core-en_US.xml
 
 makeopts: configure
 	@echo "****"
@@ -480,6 +483,29 @@
 	done
 	mkdir -p $(DESTDIR)$(AGI_DIR)
 	$(MAKE) -C sounds install
+
+doc/core-en_US.xml: $(foreach dir,$(MOD_SUBDIRS),$(wildcard $(dir)/*.c) $(wildcard $(dir)/*.cc)) 
+	@echo -n "Building Documentation For: "
+	@echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > $@
+	@echo "<!DOCTYPE docs SYSTEM \"appdocsxml.dtd\">" >> $@
+	@echo "<docs>" >> $@
+	@for x in $(MOD_SUBDIRS); do \
+		echo -n "$$x " ; \
+		for i in $$x/*.c; do \
+			$(AWK) -f build_tools/get_documentation $$i >> $@ ; \
+		done ; \
+	done
+	@echo
+	@echo "</docs>" >> $@
+
+validate-docs: doc/core-en_US.xml
+ifeq ($(XMLSTARLET),:)
+	@echo "---------------------------------------------------------------"
+	@echo "--- Please install xmlstarlet to validate the documentation ---"
+	@echo "---------------------------------------------------------------"
+else
+	$(XMLSTARLET) val $<
+endif
 
 update: 
 	@if [ -d .svn ]; then \
@@ -529,12 +555,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
@@ -656,7 +686,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 +716,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]" ; \
@@ -902,7 +933,7 @@
 asterisk.pdf:
 	$(MAKE) -C doc/tex asterisk.pdf
 
-.PHONY: menuselect menuselect.makeopts main sounds clean dist-clean distclean all prereqs cleantest uninstall _uninstall uninstall-all pdf dont-optimize $(SUBDIRS_INSTALL) $(SUBDIRS_DIST_CLEAN) $(SUBDIRS_CLEAN) $(SUBDIRS_UNINSTALL) $(SUBDIRS) $(MOD_SUBDIRS_EMBED_LDSCRIPT) $(MOD_SUBDIRS_EMBED_LDFLAGS) $(MOD_SUBDIRS_EMBED_LIBS) badshell installdirs
+.PHONY: menuselect menuselect.makeopts main sounds clean dist-clean distclean all prereqs cleantest uninstall _uninstall uninstall-all pdf dont-optimize $(SUBDIRS_INSTALL) $(SUBDIRS_DIST_CLEAN) $(SUBDIRS_CLEAN) $(SUBDIRS_UNINSTALL) $(SUBDIRS) $(MOD_SUBDIRS_EMBED_LDSCRIPT) $(MOD_SUBDIRS_EMBED_LDFLAGS) $(MOD_SUBDIRS_EMBED_LIBS) badshell installdirs validate-docs
 
 FORCE:
 

Modified: team/group/issue8824/agi/eagi-sphinx-test.c
URL: http://svn.digium.com/view/asterisk/team/group/issue8824/agi/eagi-sphinx-test.c?view=diff&rev=153942&r1=153941&r2=153942
==============================================================================
--- team/group/issue8824/agi/eagi-sphinx-test.c (original)
+++ team/group/issue8824/agi/eagi-sphinx-test.c Mon Nov  3 10:21:27 2008
@@ -79,7 +79,9 @@
 	char *val;
 	/* Read environment */
 	for(;;) {
-		fgets(buf, sizeof(buf), stdin);
+		if (!fgets(buf, sizeof(buf), stdin)) {
+			return -1;
+		}
 		if (feof(stdin))
 			return -1;
 		buf[strlen(buf) - 1] = '\0';
@@ -130,7 +132,9 @@
 			return NULL;
 		}
 		if (FD_ISSET(STDIN_FILENO, &fds)) {
-			fgets(astresp, sizeof(astresp), stdin);
+			if (!fgets(astresp, sizeof(astresp), stdin)) {
+				return NULL;
+			}
 			if (feof(stdin)) {
 				fprintf(stderr, "Got hungup on apparently\n");
 				return NULL;
@@ -141,9 +145,10 @@
 		}
 		if (FD_ISSET(AUDIO_FILENO, &fds)) {
 			res = read(AUDIO_FILENO, audiobuf, sizeof(audiobuf));
-			if (res > 0) {
-				if (sphinx_sock > -1) 
-					write(sphinx_sock, audiobuf, res);
+			if ((res > 0) && (sphinx_sock > -1)) {
+				if (write(sphinx_sock, audiobuf, res) < 0) {
+					fprintf(stderr, "write() failed: %s\n", strerror(errno));
+				}
 			}
 		}
 		if ((sphinx_sock > -1) && FD_ISSET(sphinx_sock, &fds)) {

Modified: team/group/issue8824/agi/eagi-test.c
URL: http://svn.digium.com/view/asterisk/team/group/issue8824/agi/eagi-test.c?view=diff&rev=153942&r1=153941&r2=153942
==============================================================================
--- team/group/issue8824/agi/eagi-test.c (original)
+++ team/group/issue8824/agi/eagi-test.c Mon Nov  3 10:21:27 2008
@@ -24,7 +24,9 @@
 	char *val;
 	/* Read environment */
 	for(;;) {
-		fgets(buf, sizeof(buf), stdin);
+		if (!fgets(buf, sizeof(buf), stdin)) {
+			return -1;
+		}
 		if (feof(stdin))
 			return -1;
 		buf[strlen(buf) - 1] = '\0';
@@ -68,7 +70,9 @@
 			return NULL;
 		}
 		if (FD_ISSET(STDIN_FILENO, &fds)) {
-			fgets(astresp, sizeof(astresp), stdin);
+			if (!fgets(astresp, sizeof(astresp), stdin)) {
+				return NULL;
+			}
 			if (feof(stdin)) {
 				fprintf(stderr, "Got hungup on apparently\n");
 				return NULL;

Modified: team/group/issue8824/apps/app_adsiprog.c
URL: http://svn.digium.com/view/asterisk/team/group/issue8824/apps/app_adsiprog.c?view=diff&rev=153942&r1=153941&r2=153942
==============================================================================
--- team/group/issue8824/apps/app_adsiprog.c (original)
+++ team/group/issue8824/apps/app_adsiprog.c Mon Nov  3 10:21:27 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;
@@ -1369,7 +1379,9 @@
 	/* Create "main" as first subroutine */
 	getsubbyname(scr, "main", NULL, 0);
 	while (!feof(f)) {
-		fgets(buf, sizeof(buf), f);
+		if (!fgets(buf, sizeof(buf), f)) {
+			continue;
+		}
 		if (!feof(f)) {
 			lineno++;
 			/* Trim off trailing return */
@@ -1570,7 +1582,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/group/issue8824/apps/app_alarmreceiver.c
URL: http://svn.digium.com/view/asterisk/team/group/issue8824/apps/app_alarmreceiver.c?view=diff&rev=153942&r1=153941&r2=153942
==============================================================================
--- team/group/issue8824/apps/app_alarmreceiver.c (original)
+++ team/group/issue8824/apps/app_alarmreceiver.c Mon Nov  3 10:21:27 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/group/issue8824/apps/app_amd.c
URL: http://svn.digium.com/view/asterisk/team/group/issue8824/apps/app_amd.c?view=diff&rev=153942&r1=153941&r2=153942
==============================================================================
--- team/group/issue8824/apps/app_amd.c (original)
+++ team/group/issue8824/apps/app_amd.c Mon Nov  3 10:21:27 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/group/issue8824/apps/app_authenticate.c
URL: http://svn.digium.com/view/asterisk/team/group/issue8824/apps/app_authenticate.c?view=diff&rev=153942&r1=153941&r2=153942
==============================================================================
--- team/group/issue8824/apps/app_authenticate.c (original)
+++ team/group/issue8824/apps/app_authenticate.c Mon Nov  3 10:21:27 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)
 {
@@ -160,7 +181,9 @@
 				if (feof(f))
 					break;
 
-				fgets(buf, sizeof(buf), f);
+				if (!fgets(buf, sizeof(buf), f)) {
+					continue;
+				}
 
 				if (ast_strlen_zero(buf))
 					continue;
@@ -225,7 +248,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/group/issue8824/apps/app_cdr.c
URL: http://svn.digium.com/view/asterisk/team/group/issue8824/apps/app_cdr.c?view=diff&rev=153942&r1=153941&r2=153942
==============================================================================
--- team/group/issue8824/apps/app_cdr.c (original)
+++ team/group/issue8824/apps/app_cdr.c Mon Nov  3 10:21:27 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/group/issue8824/apps/app_chanisavail.c
URL: http://svn.digium.com/view/asterisk/team/group/issue8824/apps/app_chanisavail.c?view=diff&rev=153942&r1=153941&r2=153942
==============================================================================
--- team/group/issue8824/apps/app_chanisavail.c (original)
+++ team/group/issue8824/apps/app_chanisavail.c Mon Nov  3 10:21:27 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="&amp;">
+				<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&amp;Technology3/Resourse3&amp;.....</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/group/issue8824/apps/app_channelredirect.c
URL: http://svn.digium.com/view/asterisk/team/group/issue8824/apps/app_channelredirect.c?view=diff&rev=153942&r1=153941&r2=153942
==============================================================================
--- team/group/issue8824/apps/app_channelredirect.c (original)
+++ team/group/issue8824/apps/app_channelredirect.c Mon Nov  3 10:21:27 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/group/issue8824/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/team/group/issue8824/apps/app_chanspy.c?view=diff&rev=153942&r1=153941&r2=153942
==============================================================================
--- team/group/issue8824/apps/app_chanspy.c (original)
+++ team/group/issue8824/apps/app_chanspy.c Mon Nov  3 10:21:27 2008
@@ -34,6 +34,7 @@
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
 #include <ctype.h>
+#include <errno.h>
 
 #include "asterisk/paths.h" /* use ast_config_AST_MONITOR_DIR */
 #include "asterisk/file.h"
@@ -52,128 +53,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>

[... 16640 lines stripped ...]



More information about the asterisk-commits mailing list