[asterisk-commits] moy: branch moy/mfcr2 r153781 - in /team/moy/mfcr2: ./ agi/ apps/ autoconf/ b...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Nov 2 22:01:38 CST 2008


Author: moy
Date: Sun Nov  2 22:01:35 2008
New Revision: 153781

URL: http://svn.digium.com/view/asterisk?view=rev&rev=153781
Log:
merged changes from trunk 153780

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

Propchange: team/moy/mfcr2/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: team/moy/mfcr2/CHANGES
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/CHANGES?view=diff&rev=153781&r1=153780&r2=153781
==============================================================================
--- team/moy/mfcr2/CHANGES (original)
+++ team/moy/mfcr2/CHANGES Sun Nov  2 22:01:35 2008
@@ -26,6 +26,8 @@
  * Permit the syntax and synopsis fields of the corresponding dialplan
    functions to be individually set from func_odbc.conf.
  * Added debugging CLI functions to func_odbc, 'odbc read' and 'odbc write'.
+ * func_odbc now may specify an insert query to execute, when the write query
+   affects 0 rows (usually indicating that no such row exists).
 
 Applications
 ------------
@@ -33,6 +35,9 @@
    using MeetMeAdmin.
  * app_authenticate now gives the ability to select a prompt other than
    the default.
+ * app_directory now pays attention to the searchcontexts setting in
+   voicemail.conf and will look through all contexts, if no context is
+   specified in the initial argument.
 
 Miscellaneous
 -------------
@@ -680,6 +685,7 @@
      WaitForRing() now takes floating pt timeout arg.
      SpeechBackground() -- clarified in the docstrings that the timeout is an integer seconds.
   * Added 's' option to Page application.
+  * Added an optional timeout argument to the Page application.
   * Added 'E', 'V', and 'P' commands to ExternalIVR.
   * Added 'o' and 'X' options to Chanspy.
   * Added a new dialplan application, Bridge, which allows you to bridge the
@@ -766,6 +772,7 @@
      the first one available.
   * Added cli command 'features reload' to reload call features from features.conf
   * Moved into core asterisk binary.
+  * Changed the default setting for featuredigittimeout to 2000 ms from 500 ms.
 
 Language Support Changes
 ------------------------

Modified: team/moy/mfcr2/Makefile
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/Makefile?view=diff&rev=153781&r1=153780&r2=153781
==============================================================================
--- team/moy/mfcr2/Makefile (original)
+++ team/moy/mfcr2/Makefile Sun Nov  2 22:01:35 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/moy/mfcr2/agi/eagi-sphinx-test.c
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/agi/eagi-sphinx-test.c?view=diff&rev=153781&r1=153780&r2=153781
==============================================================================
--- team/moy/mfcr2/agi/eagi-sphinx-test.c (original)
+++ team/moy/mfcr2/agi/eagi-sphinx-test.c Sun Nov  2 22:01:35 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/moy/mfcr2/agi/eagi-test.c
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/agi/eagi-test.c?view=diff&rev=153781&r1=153780&r2=153781
==============================================================================
--- team/moy/mfcr2/agi/eagi-test.c (original)
+++ team/moy/mfcr2/agi/eagi-test.c Sun Nov  2 22:01:35 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/moy/mfcr2/apps/app_adsiprog.c
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/apps/app_adsiprog.c?view=diff&rev=153781&r1=153780&r2=153781
==============================================================================
--- team/moy/mfcr2/apps/app_adsiprog.c (original)
+++ team/moy/mfcr2/apps/app_adsiprog.c Sun Nov  2 22:01:35 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;
@@ -828,7 +838,7 @@
 			ast_log(LOG_WARNING, "'%s' is not a valid state name at line %d of %s\n", tok, lineno, script);
 			return 0;
 		}
-		if ((snums[scnt] = getstatebyname(state, sname, script, lineno, 0) < 0)) {
+		if ((snums[scnt] = getstatebyname(state, sname, script, lineno, 0) == NULL)) {
 			ast_log(LOG_WARNING, "State '%s' not declared at line %d of %s\n", sname, lineno, script);
 			return 0;
 		}
@@ -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/moy/mfcr2/apps/app_alarmreceiver.c
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/apps/app_alarmreceiver.c?view=diff&rev=153781&r1=153780&r2=153781
==============================================================================
--- team/moy/mfcr2/apps/app_alarmreceiver.c (original)
+++ team/moy/mfcr2/apps/app_alarmreceiver.c Sun Nov  2 22:01:35 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/moy/mfcr2/apps/app_amd.c
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/apps/app_amd.c?view=diff&rev=153781&r1=153780&r2=153781
==============================================================================
--- team/moy/mfcr2/apps/app_amd.c (original)
+++ team/moy/mfcr2/apps/app_amd.c Sun Nov  2 22:01:35 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/moy/mfcr2/apps/app_authenticate.c
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/apps/app_authenticate.c?view=diff&rev=153781&r1=153780&r2=153781
==============================================================================
--- team/moy/mfcr2/apps/app_authenticate.c (original)
+++ team/moy/mfcr2/apps/app_authenticate.c Sun Nov  2 22:01:35 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/moy/mfcr2/apps/app_cdr.c
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/apps/app_cdr.c?view=diff&rev=153781&r1=153780&r2=153781
==============================================================================
--- team/moy/mfcr2/apps/app_cdr.c (original)
+++ team/moy/mfcr2/apps/app_cdr.c Sun Nov  2 22:01:35 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/moy/mfcr2/apps/app_chanisavail.c
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/apps/app_chanisavail.c?view=diff&rev=153781&r1=153780&r2=153781
==============================================================================
--- team/moy/mfcr2/apps/app_chanisavail.c (original)
+++ team/moy/mfcr2/apps/app_chanisavail.c Sun Nov  2 22:01:35 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/moy/mfcr2/apps/app_channelredirect.c
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/apps/app_channelredirect.c?view=diff&rev=153781&r1=153780&r2=153781
==============================================================================
--- team/moy/mfcr2/apps/app_channelredirect.c (original)
+++ team/moy/mfcr2/apps/app_channelredirect.c Sun Nov  2 22:01:35 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/moy/mfcr2/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/apps/app_chanspy.c?view=diff&rev=153781&r1=153780&r2=153781
==============================================================================
--- team/moy/mfcr2/apps/app_chanspy.c (original)
+++ team/moy/mfcr2/apps/app_chanspy.c Sun Nov  2 22:01:35 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">

[... 19780 lines stripped ...]



More information about the asterisk-commits mailing list