[asterisk-commits] mmichelson: branch mmichelson/ao2_containers r153943 - in /team/mmichelson/ao...

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


Author: mmichelson
Date: Mon Nov  3 10:26:29 2008
New Revision: 153943

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


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

Propchange: team/mmichelson/ao2_containers/
------------------------------------------------------------------------------
    automerge = *

Propchange: team/mmichelson/ao2_containers/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Propchange: team/mmichelson/ao2_containers/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Nov  3 10:26:29 2008
@@ -1,1 +1,1 @@
-/trunk:1-153316
+/trunk:1-153942

Modified: team/mmichelson/ao2_containers/CHANGES
URL: http://svn.digium.com/view/asterisk/team/mmichelson/ao2_containers/CHANGES?view=diff&rev=153943&r1=153942&r2=153943
==============================================================================
--- team/mmichelson/ao2_containers/CHANGES (original)
+++ team/mmichelson/ao2_containers/CHANGES Mon Nov  3 10:26:29 2008
@@ -11,6 +11,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/mmichelson/ao2_containers/Makefile
URL: http://svn.digium.com/view/asterisk/team/mmichelson/ao2_containers/Makefile?view=diff&rev=153943&r1=153942&r2=153943
==============================================================================
--- team/mmichelson/ao2_containers/Makefile (original)
+++ team/mmichelson/ao2_containers/Makefile Mon Nov  3 10:26:29 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/mmichelson/ao2_containers/agi/eagi-sphinx-test.c
URL: http://svn.digium.com/view/asterisk/team/mmichelson/ao2_containers/agi/eagi-sphinx-test.c?view=diff&rev=153943&r1=153942&r2=153943
==============================================================================
--- team/mmichelson/ao2_containers/agi/eagi-sphinx-test.c (original)
+++ team/mmichelson/ao2_containers/agi/eagi-sphinx-test.c Mon Nov  3 10:26:29 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/mmichelson/ao2_containers/agi/eagi-test.c
URL: http://svn.digium.com/view/asterisk/team/mmichelson/ao2_containers/agi/eagi-test.c?view=diff&rev=153943&r1=153942&r2=153943
==============================================================================
--- team/mmichelson/ao2_containers/agi/eagi-test.c (original)
+++ team/mmichelson/ao2_containers/agi/eagi-test.c Mon Nov  3 10:26:29 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/mmichelson/ao2_containers/apps/app_adsiprog.c
URL: http://svn.digium.com/view/asterisk/team/mmichelson/ao2_containers/apps/app_adsiprog.c?view=diff&rev=153943&r1=153942&r2=153943
==============================================================================
--- team/mmichelson/ao2_containers/apps/app_adsiprog.c (original)
+++ team/mmichelson/ao2_containers/apps/app_adsiprog.c Mon Nov  3 10:26:29 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/mmichelson/ao2_containers/apps/app_alarmreceiver.c
URL: http://svn.digium.com/view/asterisk/team/mmichelson/ao2_containers/apps/app_alarmreceiver.c?view=diff&rev=153943&r1=153942&r2=153943
==============================================================================
--- team/mmichelson/ao2_containers/apps/app_alarmreceiver.c (original)
+++ team/mmichelson/ao2_containers/apps/app_alarmreceiver.c Mon Nov  3 10:26:29 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/mmichelson/ao2_containers/apps/app_amd.c
URL: http://svn.digium.com/view/asterisk/team/mmichelson/ao2_containers/apps/app_amd.c?view=diff&rev=153943&r1=153942&r2=153943
==============================================================================
--- team/mmichelson/ao2_containers/apps/app_amd.c (original)
+++ team/mmichelson/ao2_containers/apps/app_amd.c Mon Nov  3 10:26:29 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/mmichelson/ao2_containers/apps/app_authenticate.c
URL: http://svn.digium.com/view/asterisk/team/mmichelson/ao2_containers/apps/app_authenticate.c?view=diff&rev=153943&r1=153942&r2=153943
==============================================================================
--- team/mmichelson/ao2_containers/apps/app_authenticate.c (original)
+++ team/mmichelson/ao2_containers/apps/app_authenticate.c Mon Nov  3 10:26:29 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/mmichelson/ao2_containers/apps/app_cdr.c
URL: http://svn.digium.com/view/asterisk/team/mmichelson/ao2_containers/apps/app_cdr.c?view=diff&rev=153943&r1=153942&r2=153943
==============================================================================
--- team/mmichelson/ao2_containers/apps/app_cdr.c (original)
+++ team/mmichelson/ao2_containers/apps/app_cdr.c Mon Nov  3 10:26:29 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/mmichelson/ao2_containers/apps/app_chanisavail.c
URL: http://svn.digium.com/view/asterisk/team/mmichelson/ao2_containers/apps/app_chanisavail.c?view=diff&rev=153943&r1=153942&r2=153943
==============================================================================
--- team/mmichelson/ao2_containers/apps/app_chanisavail.c (original)
+++ team/mmichelson/ao2_containers/apps/app_chanisavail.c Mon Nov  3 10:26:29 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/mmichelson/ao2_containers/apps/app_channelredirect.c
URL: http://svn.digium.com/view/asterisk/team/mmichelson/ao2_containers/apps/app_channelredirect.c?view=diff&rev=153943&r1=153942&r2=153943
==============================================================================
--- team/mmichelson/ao2_containers/apps/app_channelredirect.c (original)
+++ team/mmichelson/ao2_containers/apps/app_channelredirect.c Mon Nov  3 10:26:29 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) ?

[... 16691 lines stripped ...]



More information about the asterisk-commits mailing list