[asterisk-commits] branch group/new_loader_completion r29051 - in /team/group/new_loader_complet...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Sat May 20 12:43:11 MST 2006


Author: kpfleming
Date: Sat May 20 14:43:10 2006
New Revision: 29051

URL: http://svn.digium.com/view/asterisk?rev=29051&view=rev
Log:
merge up to trunk, fix a few more little nits

Added:
    team/group/new_loader_completion/build_tools/make_buildopts_h
      - copied unchanged from r29018, trunk/build_tools/make_buildopts_h
    team/group/new_loader_completion/doc/video.txt
      - copied unchanged from r29018, trunk/doc/video.txt
Modified:
    team/group/new_loader_completion/   (props changed)
    team/group/new_loader_completion/.cleancount
    team/group/new_loader_completion/Makefile
    team/group/new_loader_completion/UPGRADE.txt
    team/group/new_loader_completion/acinclude.m4
    team/group/new_loader_completion/app.c
    team/group/new_loader_completion/apps/Makefile
    team/group/new_loader_completion/apps/app_amd.c
    team/group/new_loader_completion/apps/app_authenticate.c
    team/group/new_loader_completion/apps/app_channelredirect.c
    team/group/new_loader_completion/apps/app_chanspy.c
    team/group/new_loader_completion/apps/app_db.c
    team/group/new_loader_completion/apps/app_dial.c
    team/group/new_loader_completion/apps/app_dictate.c
    team/group/new_loader_completion/apps/app_directory.c
    team/group/new_loader_completion/apps/app_disa.c
    team/group/new_loader_completion/apps/app_exec.c
    team/group/new_loader_completion/apps/app_externalivr.c
    team/group/new_loader_completion/apps/app_festival.c
    team/group/new_loader_completion/apps/app_hasnewvoicemail.c
    team/group/new_loader_completion/apps/app_image.c
    team/group/new_loader_completion/apps/app_meetme.c
    team/group/new_loader_completion/apps/app_mixmonitor.c
    team/group/new_loader_completion/apps/app_osplookup.c
    team/group/new_loader_completion/apps/app_page.c
    team/group/new_loader_completion/apps/app_playback.c
    team/group/new_loader_completion/apps/app_privacy.c
    team/group/new_loader_completion/apps/app_queue.c
    team/group/new_loader_completion/apps/app_random.c
    team/group/new_loader_completion/apps/app_read.c
    team/group/new_loader_completion/apps/app_readfile.c
    team/group/new_loader_completion/apps/app_realtime.c
    team/group/new_loader_completion/apps/app_record.c
    team/group/new_loader_completion/apps/app_sayunixtime.c
    team/group/new_loader_completion/apps/app_senddtmf.c
    team/group/new_loader_completion/apps/app_sendtext.c
    team/group/new_loader_completion/apps/app_setcallerid.c
    team/group/new_loader_completion/apps/app_settransfercapability.c
    team/group/new_loader_completion/apps/app_skel.c
    team/group/new_loader_completion/apps/app_sms.c
    team/group/new_loader_completion/apps/app_speech_utils.c
    team/group/new_loader_completion/apps/app_stack.c
    team/group/new_loader_completion/apps/app_talkdetect.c
    team/group/new_loader_completion/apps/app_transfer.c
    team/group/new_loader_completion/apps/app_url.c
    team/group/new_loader_completion/apps/app_userevent.c
    team/group/new_loader_completion/apps/app_verbose.c
    team/group/new_loader_completion/apps/app_voicemail.c
    team/group/new_loader_completion/apps/app_while.c
    team/group/new_loader_completion/apps/app_zapras.c
    team/group/new_loader_completion/apps/app_zapscan.c
    team/group/new_loader_completion/asterisk.c
    team/group/new_loader_completion/build_tools/Makefile
    team/group/new_loader_completion/build_tools/cflags.xml
    team/group/new_loader_completion/build_tools/menuselect.c
    team/group/new_loader_completion/build_tools/menuselect_curses.c
    team/group/new_loader_completion/callerid.c
    team/group/new_loader_completion/cdr/cdr_pgsql.c
    team/group/new_loader_completion/channel.c
    team/group/new_loader_completion/channels/Makefile
    team/group/new_loader_completion/channels/chan_agent.c
    team/group/new_loader_completion/channels/chan_h323.c
    team/group/new_loader_completion/channels/chan_iax2.c
    team/group/new_loader_completion/channels/chan_local.c
    team/group/new_loader_completion/channels/chan_misdn.c
    team/group/new_loader_completion/channels/chan_sip.c
    team/group/new_loader_completion/channels/chan_skinny.c
    team/group/new_loader_completion/channels/chan_zap.c
    team/group/new_loader_completion/channels/h323/Makefile
    team/group/new_loader_completion/channels/misdn/isdn_lib.c
    team/group/new_loader_completion/channels/misdn/isdn_lib.h
    team/group/new_loader_completion/channels/misdn/isdn_msg_parser.c
    team/group/new_loader_completion/cli.c
    team/group/new_loader_completion/codecs/codec_a_mu.c
    team/group/new_loader_completion/codecs/codec_adpcm.c
    team/group/new_loader_completion/codecs/codec_alaw.c
    team/group/new_loader_completion/codecs/codec_ulaw.c
    team/group/new_loader_completion/configs/iax.conf.sample
    team/group/new_loader_completion/configs/manager.conf.sample
    team/group/new_loader_completion/configs/say.conf.sample
    team/group/new_loader_completion/configs/sip.conf.sample
    team/group/new_loader_completion/configs/zapata.conf.sample
    team/group/new_loader_completion/configure
    team/group/new_loader_completion/configure.ac
    team/group/new_loader_completion/dnsmgr.c
    team/group/new_loader_completion/doc/cliprompt.txt
    team/group/new_loader_completion/dsp.c
    team/group/new_loader_completion/enum.c
    team/group/new_loader_completion/formats/Makefile
    team/group/new_loader_completion/funcs/Makefile
    team/group/new_loader_completion/funcs/func_cdr.c
    team/group/new_loader_completion/funcs/func_channel.c
    team/group/new_loader_completion/funcs/func_cut.c
    team/group/new_loader_completion/funcs/func_logic.c
    team/group/new_loader_completion/funcs/func_odbc.c
    team/group/new_loader_completion/funcs/func_strings.c
    team/group/new_loader_completion/image.c
    team/group/new_loader_completion/include/asterisk/   (props changed)
    team/group/new_loader_completion/include/asterisk/app.h
    team/group/new_loader_completion/include/asterisk/frame.h
    team/group/new_loader_completion/include/asterisk/linkedlists.h
    team/group/new_loader_completion/include/asterisk/lock.h
    team/group/new_loader_completion/include/asterisk/rtp.h
    team/group/new_loader_completion/include/asterisk/utils.h
    team/group/new_loader_completion/include/autoconfig.h.in
    team/group/new_loader_completion/indications.c
    team/group/new_loader_completion/loader.c
    team/group/new_loader_completion/logger.c
    team/group/new_loader_completion/makeopts.in
    team/group/new_loader_completion/manager.c
    team/group/new_loader_completion/netsock.c
    team/group/new_loader_completion/pbx.c
    team/group/new_loader_completion/pbx/Makefile
    team/group/new_loader_completion/pbx/pbx_dundi.c
    team/group/new_loader_completion/pbx/pbx_realtime.c
    team/group/new_loader_completion/pbx/pbx_spool.c
    team/group/new_loader_completion/res/Makefile
    team/group/new_loader_completion/res/res_agi.c
    team/group/new_loader_completion/res/res_clioriginate.c
    team/group/new_loader_completion/res/res_config_odbc.c
    team/group/new_loader_completion/res/res_config_pgsql.c
    team/group/new_loader_completion/res/res_convert.c
    team/group/new_loader_completion/res/res_features.c
    team/group/new_loader_completion/res/res_monitor.c
    team/group/new_loader_completion/res/res_musiconhold.c
    team/group/new_loader_completion/rtp.c
    team/group/new_loader_completion/sample.call
    team/group/new_loader_completion/strcompat.c
    team/group/new_loader_completion/utils/Makefile
    team/group/new_loader_completion/utils/ael_main.c
    team/group/new_loader_completion/utils/smsq.c

Propchange: team/group/new_loader_completion/
------------------------------------------------------------------------------
    automerge = please

Propchange: team/group/new_loader_completion/
------------------------------------------------------------------------------
Binary property 'branch-1.2-blocked' - no diff available.

Propchange: team/group/new_loader_completion/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Propchange: team/group/new_loader_completion/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sat May 20 14:43:10 2006
@@ -1,1 +1,1 @@
-/trunk:1-26418
+/trunk:1-29050

Modified: team/group/new_loader_completion/.cleancount
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/.cleancount?rev=29051&r1=29050&r2=29051&view=diff
==============================================================================
--- team/group/new_loader_completion/.cleancount (original)
+++ team/group/new_loader_completion/.cleancount Sat May 20 14:43:10 2006
@@ -1,1 +1,1 @@
-15
+17

Modified: team/group/new_loader_completion/Makefile
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/Makefile?rev=29051&r1=29050&r2=29051&view=diff
==============================================================================
--- team/group/new_loader_completion/Makefile (original)
+++ team/group/new_loader_completion/Makefile Sat May 20 14:43:10 2006
@@ -24,18 +24,6 @@
 #CROSS_PROC=arm
 #SUB_PROC=xscale # or maverick
 
-# Pentium Pro Optimize
-#PROC=i686
-
-# Pentium & VIA processors optimize
-#PROC=i586
-
-#PROC=k6
-#PROC=ppc
-
-CC=$(CROSS_COMPILE)gcc
-HOST_CC=gcc
-
 ifeq ($(CROSS_COMPILE),)
   OSARCH=$(shell uname -s)
   PROC?=$(shell uname -m)
@@ -69,37 +57,7 @@
 OVERWRITE=y
 
 # Include debug and macro symbols in the executables (-g) and profiling info (-pg)
-DEBUG=-g3 #-pg
-
-# Set NOCRYPTO to yes if you do not want to have crypto support or dependencies
-#NOCRYPTO=yes
-
-# If you are running a radio application, define RADIO_RELAX so that the DTMF
-# will be received more reliably
-#OPTIONS += -DRADIO_RELAX
-
-# If you don't have a lot of memory (e.g. embedded Asterisk), define LOW_MEMORY
-# to reduce the size of certain static buffers
-#ifneq ($(CROSS_COMPILE),)
-#OPTIONS += -DLOW_MEMORY
-#endif
-
-# Asterisk SMDI integration
-WITH_SMDI = 1
-
-# Optional debugging parameters
-DEBUG_THREADS = #-DDUMP_SCHEDULER #-DDEBUG_SCHEDULER #-DDEBUG_THREADS #-DDO_CRASH #-DDETECT_DEADLOCKS
-
-# If you want to debug channel locking, try this (depends on code using
-# ast_channel_lock and companions to work)
-DEBUG_THREADS += #-DDEBUG_CHANNEL_LOCKS
-
-# Uncomment next one to enable ast_frame tracing (for debugging)
-TRACE_FRAMES = #-DTRACE_FRAMES
-
-# Where to install asterisk after compiling
-# Default -> leave empty
-INSTALL_PREFIX?=
+DEBUG=-g3
 
 # Staging directory
 # Files are copied here temporarily during the install process
@@ -110,55 +68,41 @@
 #DESTDIR?=/tmp/asterisk
 
 # Original busydetect routine
-BUSYDETECT = #-DBUSYDETECT
+#BUSYDETECT = -DBUSYDETECT
 
 # Improved busydetect routine, comment the previous one if you use this one
-BUSYDETECT+= #-DBUSYDETECT_MARTIN 
+#BUSYDETECT+= -DBUSYDETECT_MARTIN 
 # Detect the busy signal looking only at tone lengths
 # For example if you have 3 beeps 100ms tone, 100ms silence separated by 500 ms of silence
-BUSYDETECT+= #-DBUSYDETECT_TONEONLY
+#BUSYDETECT+= -DBUSYDETECT_TONEONLY
 # Enforce the detection of busy signal (get rid of false hangups)
 # Don't use together with -DBUSYDETECT_TONEONLY
-BUSYDETECT+= #-DBUSYDETECT_COMPARE_TONE_AND_SILENCE
+#BUSYDETECT+= -DBUSYDETECT_COMPARE_TONE_AND_SILENCE
 
 # Define standard directories for various platforms
 # These apply if they are not redefined in asterisk.conf 
 ifeq ($(OSARCH),SunOS)
-  ASTETCDIR=$(INSTALL_PREFIX)/etc/opt/asterisk
-  ASTLIBDIR=$(INSTALL_PREFIX)/opt/asterisk/lib
-  ASTVARLIBDIR=$(INSTALL_PREFIX)/var/opt/asterisk/lib
-  ASTSPOOLDIR=$(INSTALL_PREFIX)/var/opt/asterisk/spool
-  ASTLOGDIR=$(INSTALL_PREFIX)/var/opt/asterisk/log
-  ASTHEADERDIR=$(INSTALL_PREFIX)/opt/asterisk/usr/include/asterisk
-  ASTBINDIR=$(INSTALL_PREFIX)/opt/asterisk/usr/bin
-  ASTSBINDIR=$(INSTALL_PREFIX)/opt/asterisk/usr/sbin
-  ASTVARRUNDIR=$(INSTALL_PREFIX)/var/opt/asterisk/run
-  ASTMANDIR=$(INSTALL_PREFIX)/opt/asterisk/usr/share/man
+  ASTETCDIR=/etc/opt/asterisk
+  ASTLIBDIR=/opt/asterisk/lib
+  ASTVARLIBDIR=/var/opt/asterisk/lib
+  ASTSPOOLDIR=/var/opt/asterisk/spool
+  ASTLOGDIR=/var/opt/asterisk/log
+  ASTHEADERDIR=/opt/asterisk/usr/include/asterisk
+  ASTBINDIR=/opt/asterisk/usr/bin
+  ASTSBINDIR=/opt/asterisk/usr/sbin
+  ASTVARRUNDIR=/var/opt/asterisk/run
+  ASTMANDIR=/opt/asterisk/usr/share/man
 else
-ifeq ($(OSARCH),FreeBSD)
-  PREFIX?=/usr/local
-  ASTETCDIR=$(INSTALL_PREFIX)$(PREFIX)/etc/asterisk
-  ASTLIBDIR=$(INSTALL_PREFIX)$(PREFIX)/lib/asterisk
-  ASTVARLIBDIR=$(INSTALL_PREFIX)$(PREFIX)/share/asterisk
-  ASTSPOOLDIR=$(INSTALL_PREFIX)/var/spool/asterisk
-  ASTLOGDIR=$(INSTALL_PREFIX)/var/log/asterisk
-  ASTHEADERDIR=$(INSTALL_PREFIX)$(PREFIX)/include/asterisk
-  ASTBINDIR=$(INSTALL_PREFIX)$(PREFIX)/bin
-  ASTSBINDIR=$(INSTALL_PREFIX)$(PREFIX)/sbin
-  ASTVARRUNDIR=$(INSTALL_PREFIX)/var/run
-  ASTMANDIR=$(INSTALL_PREFIX)$(PREFIX)/man
-else
-  ASTETCDIR=$(INSTALL_PREFIX)/etc/asterisk
-  ASTLIBDIR=$(INSTALL_PREFIX)/usr/lib/asterisk
-  ASTVARLIBDIR=$(INSTALL_PREFIX)/var/lib/asterisk
-  ASTSPOOLDIR=$(INSTALL_PREFIX)/var/spool/asterisk
-  ASTLOGDIR=$(INSTALL_PREFIX)/var/log/asterisk
-  ASTHEADERDIR=$(INSTALL_PREFIX)/usr/include/asterisk
-  ASTBINDIR=$(INSTALL_PREFIX)/usr/bin
-  ASTSBINDIR=$(INSTALL_PREFIX)/usr/sbin
-  ASTVARRUNDIR=$(INSTALL_PREFIX)/var/run
-  ASTMANDIR=$(INSTALL_PREFIX)/usr/share/man
-endif
+  ASTETCDIR=$(sysconfdir)/asterisk
+  ASTLIBDIR=$(libdir)/asterisk
+  ASTVARLIBDIR=$(localstatedir)/lib/asterisk
+  ASTSPOOLDIR=$(localstatedir)/spool/asterisk
+  ASTLOGDIR=$(localstatedir)/log/asterisk
+  ASTHEADERDIR=$(includedir)/asterisk
+  ASTBINDIR=$(bindir)
+  ASTSBINDIR=$(sbindir)
+  ASTVARRUNDIR=$(localstatedir)/run
+  ASTMANDIR=$(mandir)
 endif
 ASTDATADIR?=$(ASTVARLIBDIR)
 
@@ -195,14 +139,13 @@
   include makeopts
 endif
 
-ASTCFLAGS+=$(MENUSELECT_CFLAGS)
 TOPDIR_CFLAGS=-include include/autoconfig.h -Iinclude
 MOD_SUBDIR_CFLAGS=-include ../include/autoconfig.h -I../include -I..
 OTHER_SUBDIR_CFLAGS=-include ../include/autoconfig.h -I../include -I..
 
 #   *CLI> show memory allocations [filename]
 #   *CLI> show memory summary [filename]
-ifneq ($(findstring -DMALLOC_DEBUG,$(ASTCFLAGS)),)
+ifneq ($(findstring MALLOC_DEBUG,$(MENUSELECT_CFLAGS)),)
   TOPDIR_CFLAGS+=-include include/asterisk/astmm.h
   MOD_SUBDIR_CFLAGS+=-include ../include/asterisk/astmm.h
 endif
@@ -252,7 +195,7 @@
   ID=/usr/xpg4/bin/id
 endif
 
-ASTCFLAGS+=-pipe  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG) $(INCLUDE) #-DMAKE_VALGRIND_HAPPY
+ASTCFLAGS+=-pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG)
 ASTCFLAGS+=$(OPTIMIZE)
 
 ifeq ($(AST_DEVMODE),yes)
@@ -260,7 +203,7 @@
 endif
 
 ifeq ($(shell gcc -v 2>&1 | grep 'gcc version' | cut -f3 -d' ' | cut -f1 -d.),4)
-ASTCFLAGS+= -Wno-pointer-sign
+ASTCFLAGS+=-Wno-pointer-sign
 endif
 ASTOBJ=-o asterisk
 
@@ -287,8 +230,7 @@
 endif # FreeBSD
 
 ifeq ($(OSARCH),NetBSD)
-  ASTCFLAGS+=-pthread
-  INCLUDE+=-I$(CROSS_COMPILE_TARGET)/usr/pkg/include
+  AST_CFLAGS+=-pthread -I$(CROSS_COMPILE_TARGET)/usr/pkg/include
   MPG123TARG=netbsd
 endif
 
@@ -297,8 +239,7 @@
 endif
 
 ifeq ($(OSARCH),SunOS)
-  ASTCFLAGS+=-Wcast-align -DSOLARIS
-  INCLUDE+=-Iinclude/solaris-compat -I$(CROSS_COMPILE_TARGET)/usr/local/ssl/include
+  ASTCFLAGS+=-Wcast-align -DSOLARIS -Iinclude/solaris-compat -I$(CROSS_COMPILE_TARGET)/usr/local/ssl/include
 endif
 
 LIBEDIT=editline/libedit.a
@@ -323,17 +264,11 @@
   endif
 endif
 
-ASTCFLAGS+= $(DEBUG_THREADS)
-ASTCFLAGS+= $(TRACE_FRAMES)
-ASTCFLAGS+= $(MALLOC_DEBUG)
-ASTCFLAGS+= $(BUSYDETECT)
-ASTCFLAGS+= $(OPTIONS)
-ifeq ($(findstring dont-optimize,$(MAKECMDGOALS)),)
-ASTCFLAGS+= -fomit-frame-pointer 
-endif
+ASTCFLAGS+=$(MALLOC_DEBUG)$(BUSYDETECT)$(OPTIONS)
 
 MOD_SUBDIRS=res channels pbx codecs formats cdr funcs apps
-SUBDIRS:=$(MOD_SUBDIRS) utils stdtime agi
+OTHER_SUBDIRS=utils stdtime agi
+SUBDIRS:=$(MOD_SUBDIRS) $(OTHER_SUBDIRS)
 
 OBJS=io.o sched.o logger.o frame.o loader.o config.o channel.o \
 	translate.o file.o pbx.o cli.o md5.o term.o \
@@ -348,11 +283,11 @@
 # we need to link in the objects statically, not as a library, because
 # otherwise modules will not have them available if none of the static
 # objects use it.
-OBJS+= stdtime/localtime.o
+OBJS+=stdtime/localtime.o
 
 # At the moment say.o is an optional component which can be overridden
 # by a module.
-OBJS+= say.o
+OBJS+=say.o
 
 ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/sys/poll.h),)
   OBJS+= poll.o
@@ -411,7 +346,7 @@
 endif
 
 ifeq ($(MAKETOPLEVEL),$(MAKELEVEL))
-  CFLAGS+=$(TOPDIR_CFLAGS) $(ASTCFLAGS)
+  CFLAGS+=$(TOPDIR_CFLAGS)$(ASTCFLAGS)
 endif
 
 # This is used when generating the doxygen documentation
@@ -432,7 +367,7 @@
 	@echo " +               make install                +"  
 	@echo " +-------------------------------------------+"  
 
-all: config.status menuselect.makeopts cleantest depend asterisk subdirs
+all: cleantest defaults.h config.status menuselect.makeopts depend asterisk subdirs
 
 config.status: configure
 	@CFLAGS="" ./configure
@@ -512,23 +447,30 @@
 	docbook2txt asterisk.sgml
 
 defaults.h: makeopts
-	build_tools/make_defaults_h > $@.tmp
-	if cmp -s $@.tmp $@ ; then echo ; else \
+	@build_tools/make_defaults_h > $@.tmp
+	@if cmp -s $@.tmp $@ ; then echo ; else \
 		mv $@.tmp $@ ; \
 	fi
-	rm -f $@.tmp
+	@rm -f $@.tmp
 
 include/asterisk/version.h:
-	build_tools/make_version_h > $@.tmp
-	if cmp -s $@.tmp $@ ; then echo; else \
+	@build_tools/make_version_h > $@.tmp
+	@if cmp -s $@.tmp $@ ; then echo; else \
 		mv $@.tmp $@ ; \
 	fi
-	rm -f $@.tmp
+	@rm -f $@.tmp
+
+include/asterisk/buildopts.h: menuselect.makeopts
+	@build_tools/make_buildopts_h > $@.tmp
+	@if cmp -s $@.tmp $@ ; then echo; else \
+		mv $@.tmp $@ ; \
+	fi
+	@rm -f $@.tmp
 
 stdtime/libtime.a:
-	CFLAGS="$(MOD_SUBDIR_CFLAGS) $(ASTCFLAGS)" $(MAKE) -C stdtime libtime.a
-
-asterisk: editline/libedit.a db1-ast/libdb1.a stdtime/libtime.a $(OBJS)
+	CFLAGS="$(MOD_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) -C stdtime libtime.a
+
+asterisk: include/asterisk/buildopts.h editline/libedit.a db1-ast/libdb1.a stdtime/libtime.a $(OBJS)
 	build_tools/make_build_h > include/asterisk/build.h.tmp
 	if cmp -s include/asterisk/build.h.tmp include/asterisk/build.h ; then echo ; else \
 		mv include/asterisk/build.h.tmp include/asterisk/build.h ; \
@@ -541,9 +483,9 @@
 	$(CC) $(AUDIO_LIBS) -o muted muted.o
 
 subdirs: 
-	@for x in $(MOD_SUBDIRS); do CFLAGS="$(MOD_SUBDIR_CFLAGS) $(ASTCFLAGS)" $(MAKE) -C $$x || exit 1 ; done
-	@CFLAGS="$(OTHER_SUBDIR_CFLAGS) $(ASTCFLAGS)" $(MAKE) -C utils
-	@CFLAGS="$(OTHER_SUBDIR_CFLAGS) $(ASTCFLAGS)" $(MAKE) -C agi
+	@for x in $(MOD_SUBDIRS); do CFLAGS="$(MOD_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) -C $$x || exit 1 ; done
+	@CFLAGS="$(OTHER_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) -C utils
+	@CFLAGS="$(OTHER_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) -C agi
 
 clean-depend:
 	@for x in $(SUBDIRS); do $(MAKE) -C $$x clean-depend || exit 1 ; done
@@ -567,6 +509,7 @@
 	rm -f menuselect.makeopts makeopts makeopts.xml
 	rm -f config.log config.status
 	rm -f include/autoconfig.h
+	rm -f include/asterisk/buildopts.h
 	$(MAKE) -C mxml clean
 	$(MAKE) -C build_tools dist-clean
 
@@ -675,7 +618,7 @@
 	if [ -f asterisk.dll ]; then $(INSTALL) -m 755 asterisk.dll $(DESTDIR)$(ASTSBINDIR)/; fi
 	ln -sf asterisk $(DESTDIR)$(ASTSBINDIR)/rasterisk
 	$(INSTALL) -m 755 contrib/scripts/astgenkey $(DESTDIR)$(ASTSBINDIR)/
-	$(INSTALL) -m 755 contrib/scripts/autosupport $(DESTDIR)$(ASTSBINDIR)/	
+	$(INSTALL) -m 755 contrib/scripts/autosupport $(DESTDIR)$(ASTSBINDIR)/
 	if [ ! -f $(DESTDIR)$(ASTSBINDIR)/safe_asterisk ]; then \
 		cat contrib/scripts/safe_asterisk | sed 's|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;' > $(DESTDIR)$(ASTSBINDIR)/safe_asterisk ;\
 		chmod 755 $(DESTDIR)$(ASTSBINDIR)/safe_asterisk;\
@@ -862,7 +805,7 @@
 
 rpm: __rpm
 
-__rpm: include/asterisk/version.h spec
+__rpm: include/asterisk/version.h include/asterisk/buildopts.h spec
 	rm -rf /tmp/asterisk ; \
 	mkdir -p /tmp/asterisk/redhat/RPMS/i386 ; \
 	$(MAKE) DESTDIR=/tmp/asterisk install ; \
@@ -911,10 +854,11 @@
 
 valgrind: dont-optimize
 
-depend: include/asterisk/version.h .depend defaults.h 
-	@for x in $(SUBDIRS); do $(MAKE) -C $$x depend || exit 1 ; done
-
-.depend: include/asterisk/version.h defaults.h
+depend: include/asterisk/version.h include/asterisk/buildopts.h .depend defaults.h 
+	@for x in $(MOD_SUBDIRS); do CFLAGS="$(MOD_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) -C $$x depend || exit 1 ; done
+	@for x in $(OTHER_SUBDIRS); do CFLAGS="$(OTHER_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) -C $$x depend || exit 1 ; done
+
+.depend: include/asterisk/version.h include/asterisk/buildopts.h defaults.h
 	build_tools/mkdep $(CFLAGS) $(wildcard *.c)
 
 .tags-depend:
@@ -957,7 +901,7 @@
 # last clean count we had
 
 cleantest:
-	if cmp -s .cleancount .lastclean ; then echo ; else \
+	@if cmp -s .cleancount .lastclean ; then echo ; else \
 		$(MAKE) clean; cp -f .cleancount .lastclean;\
 	fi
 
@@ -997,7 +941,7 @@
 menuselect: build_tools/menuselect makeopts.xml
 	- at build_tools/menuselect ${GLOBAL_MAKEOPTS} ${USER_MAKEOPTS} menuselect.makeopts && echo "menuselect changes saved!" || echo "menuselect changes NOT saved!"
 
-build_tools/menuselect: build_tools/menuselect.c build_tools/menuselect_curses.c build_tools/menuselect.h include/autoconfig.h mxml/libmxml.a $(MENUSELECT_OBJS)
+build_tools/menuselect: build_tools/menuselect.c build_tools/menuselect_curses.c build_tools/menuselect.h config.status mxml/libmxml.a $(MENUSELECT_OBJS)
 	$(MAKE) -C build_tools menuselect
 
 mxml/libmxml.a:

Modified: team/group/new_loader_completion/UPGRADE.txt
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/UPGRADE.txt?rev=29051&r1=29050&r2=29051&view=diff
==============================================================================
--- team/group/new_loader_completion/UPGRADE.txt (original)
+++ team/group/new_loader_completion/UPGRADE.txt Sat May 20 14:43:10 2006
@@ -107,6 +107,12 @@
   to specify which DTMF digits can be used to accept a recording and
   which digits can be used to cancel a recording.
 
+* ast_app_messagecount has been renamed to ast_app_inboxcount.  There is now a
+  new ast_app_messagecount function which takes a single context/mailbox/folder
+  mailbox specification and returns the message count for that folder only.
+  This addresses the deficiency of not being able to count the number of
+  messages in folders other than INBOX and Old.
+
 Manager:
 
 * After executing the 'status' manager action, the "Status" manager events
@@ -120,6 +126,11 @@
   which contains the unique ID of the queue member channel that is taking the 
   call. This is useful when trying to link recording filenames back to 
   a particular call from the queue.
+
+* app_userevent has been modified to always send Event: UserEvent with the
+  additional header UserEvent: <userspec>.  Also, the Channel and UniqueID
+  headers are not automatically sent, unless you specify them as separate
+  arguments.  Please see the application help for the new syntax.
 
 Variables:
 

Modified: team/group/new_loader_completion/acinclude.m4
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/acinclude.m4?rev=29051&r1=29050&r2=29051&view=diff
==============================================================================
--- team/group/new_loader_completion/acinclude.m4 (original)
+++ team/group/new_loader_completion/acinclude.m4 Sat May 20 14:43:10 2006
@@ -20,17 +20,17 @@
 PBX_LIB$1=0
 
 if test "${USE_$1}" != "no"; then
-   libdir=""
+   pbxlibdir=""
    if test "x${$1_DIR}" != "x"; then
-      libdir="-L${$1_DIR}/lib"
+      pbxlibdir="-L${$1_DIR}/lib"
    fi
-   AC_CHECK_LIB([$1], [$2], [:], [], ${libdir} $6)
+   AC_CHECK_LIB([$1], [$2], [:], [], ${pbxlibdir} $6)
 
    if test "${ac_cv_lib_$1_$2}" = "yes"; then
       $1_LIB="-l$1 $6"
       $4_HEADER_FOUND="1"
       if test "x${$1_DIR}" != "x"; then
-         $1_LIB="${libdir} ${$1_LIB}"
+         $1_LIB="${pbxlibdir} ${$1_LIB}"
 	 $1_INCLUDE="-I${$1_DIR}/include"
 	 if test "x$3" != "x" ; then
 	    AC_CHECK_HEADER([${$1_DIR}/include/$3], [$4_HEADER_FOUND=1], [$4_HEADER_FOUND=0] )

Modified: team/group/new_loader_completion/app.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/app.c?rev=29051&r1=29050&r2=29051&view=diff
==============================================================================
--- team/group/new_loader_completion/app.c (original)
+++ team/group/new_loader_completion/app.c Sat May 20 14:43:10 2006
@@ -145,18 +145,22 @@
 }
 
 static int (*ast_has_voicemail_func)(const char *mailbox, const char *folder) = NULL;
-static int (*ast_messagecount_func)(const char *mailbox, int *newmsgs, int *oldmsgs) = NULL;
+static int (*ast_inboxcount_func)(const char *mailbox, int *newmsgs, int *oldmsgs) = NULL;
+static int (*ast_messagecount_func)(const char *context, const char *mailbox, const char *folder) = NULL;
 
 void ast_install_vm_functions(int (*has_voicemail_func)(const char *mailbox, const char *folder),
-			      int (*messagecount_func)(const char *mailbox, int *newmsgs, int *oldmsgs))
+			      int (*inboxcount_func)(const char *mailbox, int *newmsgs, int *oldmsgs),
+			      int (*messagecount_func)(const char *context, const char *mailbox, const char *folder))
 {
 	ast_has_voicemail_func = has_voicemail_func;
+	ast_inboxcount_func = inboxcount_func;
 	ast_messagecount_func = messagecount_func;
 }
 
 void ast_uninstall_vm_functions(void)
 {
 	ast_has_voicemail_func = NULL;
+	ast_inboxcount_func = NULL;
 	ast_messagecount_func = NULL;
 }
 
@@ -174,19 +178,33 @@
 }
 
 
-int ast_app_messagecount(const char *mailbox, int *newmsgs, int *oldmsgs)
+int ast_app_inboxcount(const char *mailbox, int *newmsgs, int *oldmsgs)
 {
 	static int warned = 0;
 	if (newmsgs)
 		*newmsgs = 0;
 	if (oldmsgs)
 		*oldmsgs = 0;
-	if (ast_messagecount_func)
-		return ast_messagecount_func(mailbox, newmsgs, oldmsgs);
+	if (ast_inboxcount_func)
+		return ast_inboxcount_func(mailbox, newmsgs, oldmsgs);
 
 	if (!warned && (option_verbose > 2)) {
 		warned++;
 		ast_verbose(VERBOSE_PREFIX_3 "Message count requested for mailbox %s but voicemail not loaded.\n", mailbox);
+	}
+
+	return 0;
+}
+
+int ast_app_messagecount(const char *context, const char *mailbox, const char *folder)
+{
+	static int warned = 0;
+	if (ast_messagecount_func)
+		return ast_messagecount_func(context, mailbox, folder);
+
+	if (!warned && (option_verbose > 2)) {
+		warned++;
+		ast_verbose(VERBOSE_PREFIX_3 "Message count requested for mailbox %s@%s/%s but voicemail not loaded.\n", mailbox, context, folder);
 	}
 
 	return 0;
@@ -523,7 +541,7 @@
 	ast_log(LOG_DEBUG,"Recording Formats: sfmts=%s\n", fmts);
 	sfmt[0] = ast_strdupa(fmts);
 
-	while((fmt = strsep(&stringp, "|"))) {
+	while ((fmt = strsep(&stringp, "|"))) {
 		if (fmtcnt > MAX_OTHER_FORMATS - 1) {
 			ast_log(LOG_WARNING, "Please increase MAX_OTHER_FORMATS in app.c\n");
 			break;
@@ -1092,13 +1110,12 @@
 	case AST_ACTION_BACKLIST:
 		res = 0;
 		c = ast_strdupa(option->adata);
-		if (c) {
-			while((n = strsep(&c, ";")))
-				if ((res = ast_stream_and_wait(chan, n, chan->language,
-						(option->action == AST_ACTION_BACKLIST) ? AST_DIGIT_ANY : "")))
-					break;
-			ast_stopstream(chan);
-		}
+		while ((n = strsep(&c, ";"))) {
+			if ((res = ast_stream_and_wait(chan, n, chan->language,
+					(option->action == AST_ACTION_BACKLIST) ? AST_DIGIT_ANY : "")))
+				break;
+		}
+		ast_stopstream(chan);
 		return res;
 	default:
 		ast_log(LOG_NOTICE, "Unknown dispatch function %d, ignoring!\n", option->action);

Modified: team/group/new_loader_completion/apps/Makefile
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/apps/Makefile?rev=29051&r1=29050&r2=29051&view=diff
==============================================================================
--- team/group/new_loader_completion/apps/Makefile (original)
+++ team/group/new_loader_completion/apps/Makefile Sat May 20 14:43:10 2006
@@ -12,10 +12,6 @@
 #
 
 MODS:=$(filter-out $(MENUSELECT_APPS),$(patsubst %.c,%.so,$(wildcard app_*.c)))
-
-ifneq ($(WITH_SMDI),)
-  CFLAGS+=-DWITH_SMDI
-endif
 
 # If you have UnixODBC you can use ODBC voicemail
 # storage

Modified: team/group/new_loader_completion/apps/app_amd.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/apps/app_amd.c?rev=29051&r1=29050&r2=29051&view=diff
==============================================================================
--- team/group/new_loader_completion/apps/app_amd.c (original)
+++ team/group/new_loader_completion/apps/app_amd.c Sat May 20 14:43:10 2006
@@ -140,12 +140,7 @@
 		ast_log(LOG_NOTICE, "AMD using the default parameters.\n");
 	} else {
 		/* Some arguments have been passed. Lets parse them and overwrite the defaults. */
-		if (!(parse = ast_strdupa(data))) {
-			ast_log(LOG_WARNING, "Memory allocation failure\n");
-			pbx_builtin_setvar_helper(chan , "AMDSTATUS" , "" );
-			pbx_builtin_setvar_helper(chan , "AMDCAUSE" , "" );
-			return;
-		}
+		parse = ast_strdupa(data);
 
 		AST_STANDARD_APP_ARGS(args, parse);
 

Modified: team/group/new_loader_completion/apps/app_authenticate.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/apps/app_authenticate.c?rev=29051&r1=29050&r2=29051&view=diff
==============================================================================
--- team/group/new_loader_completion/apps/app_authenticate.c (original)
+++ team/group/new_loader_completion/apps/app_authenticate.c Sat May 20 14:43:10 2006
@@ -123,10 +123,7 @@
 		}
 	}
 	
-	if (!(argcopy = ast_strdupa(data))) {
-		ast_module_user_remove(u);
-		return -1;
-	}
+	argcopy = ast_strdupa(data);
 
 	AST_STANDARD_APP_ARGS(arglist,argcopy);
 	

Modified: team/group/new_loader_completion/apps/app_channelredirect.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/apps/app_channelredirect.c?rev=29051&r1=29050&r2=29051&view=diff
==============================================================================
--- team/group/new_loader_completion/apps/app_channelredirect.c (original)
+++ team/group/new_loader_completion/apps/app_channelredirect.c Sat May 20 14:43:10 2006
@@ -40,6 +40,7 @@
 #include "asterisk/lock.h"
 #include "asterisk/app.h"
 #include "asterisk/features.h"
+#include "asterisk/options.h"
 
 static char *app = "ChannelRedirect";
 static char *synopsis = "Redirects given channel to a dialplan target.";
@@ -104,7 +105,8 @@
 		goto chanquit;
 	}
 
-	ast_log(LOG_DEBUG, "Attempting async goto (%s) to %s|%s|%d\n", args.channel, S_OR(context, chan2->context), S_OR(exten, chan2->exten), prio);
+	if (option_debug > 1)
+		ast_log(LOG_DEBUG, "Attempting async goto (%s) to %s|%s|%d\n", args.channel, S_OR(context, chan2->context), S_OR(exten, chan2->exten), prio);
 
 	if (ast_async_goto_if_exists(chan2, S_OR(context, chan2->context), S_OR(exten, chan2->exten), prio))
 		ast_log(LOG_WARNING, "%s failed for %s\n", app, args.channel);

Modified: team/group/new_loader_completion/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/apps/app_chanspy.c?rev=29051&r1=29050&r2=29051&view=diff
==============================================================================
--- team/group/new_loader_completion/apps/app_chanspy.c (original)
+++ team/group/new_loader_completion/apps/app_chanspy.c Sat May 20 14:43:10 2006
@@ -196,9 +196,9 @@
 
 	ast_log(LOG_NOTICE, "Attaching %s to %s\n", spychan->name, chan->name);
 
-	ast_mutex_lock(&chan->lock);
+	ast_channel_lock(chan);
 	res = ast_channel_spy_add(chan, spy);
-	ast_mutex_unlock(&chan->lock);
+	ast_channel_unlock(chan);
 
 	if (!res && ast_test_flag(chan, AST_FLAG_NBRIDGE) && (peer = ast_bridged_channel(chan))) {
 		ast_softhangup(peer, AST_SOFTHANGUP_UNBRIDGE);	
@@ -217,9 +217,9 @@
 	if (!chan)
 		return;
 
-	ast_mutex_lock(&chan->lock);
+	ast_channel_lock(chan);
 	ast_channel_spy_remove(chan, spy);
-	ast_mutex_unlock(&chan->lock);
+	ast_channel_unlock(chan);
 };
 
 /* Map 'volume' levels from -4 through +4 into

Modified: team/group/new_loader_completion/apps/app_db.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/apps/app_db.c?rev=29051&r1=29050&r2=29051&view=diff
==============================================================================
--- team/group/new_loader_completion/apps/app_db.c (original)
+++ team/group/new_loader_completion/apps/app_db.c Sat May 20 14:43:10 2006
@@ -70,10 +70,7 @@
 
 	u = ast_module_user_add(chan);
 
-	if (!(argv = ast_strdupa(data))) {
-		ast_module_user_remove(u);
-		return 0;
-	}
+	argv = ast_strdupa(data);
 
 	if (strchr(argv, '/')) {
 		family = strsep(&argv, "/");
@@ -114,10 +111,7 @@
 
 	u = ast_module_user_add(chan);
 
-	if (!(argv = ast_strdupa(data))) {
-		ast_module_user_remove(u);
-		return 0;
-	}
+	argv = ast_strdupa(data);
 
 	if (strchr(argv, '/')) {
 		family = strsep(&argv, "/");

Modified: team/group/new_loader_completion/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/apps/app_dial.c?rev=29051&r1=29050&r2=29051&view=diff
==============================================================================
--- team/group/new_loader_completion/apps/app_dial.c (original)
+++ team/group/new_loader_completion/apps/app_dial.c Sat May 20 14:43:10 2006
@@ -471,6 +471,8 @@
 					c = o->chan = ast_request(tech, in->nativeformats, stuff, &cause);
 					if (!c)
 						ast_log(LOG_NOTICE, "Unable to create local channel for call forward to '%s/%s' (cause = %d)\n", tech, stuff, cause);
+					else
+						ast_channel_inherit_variables(in, o->chan);
 				} else {
 					if (option_verbose > 2)
 						ast_verbose(VERBOSE_PREFIX_3 "Too many forwards from %s\n", c->name);
@@ -786,8 +788,7 @@
 
 	u = ast_module_user_add(chan);
 
-	if (!(parse = ast_strdupa(data)))
-		goto done;
+	parse = ast_strdupa(data);
 
 	AST_STANDARD_APP_ARGS(args, parse);
 
@@ -1051,6 +1052,8 @@
 				tmp->chan = ast_request(tech, chan->nativeformats, stuff, &cause);
 				if (!tmp->chan)
 					ast_log(LOG_NOTICE, "Unable to create local channel for call forward to '%s/%s' (cause = %d)\n", tech, stuff, cause);
+				else
+					ast_channel_inherit_variables(chan, tmp->chan);
 			} else {
 				if (option_verbose > 2)
 					ast_verbose(VERBOSE_PREFIX_3 "Too many forwards from %s\n", tmp->chan->name);
@@ -1595,8 +1598,7 @@
 
 	u = ast_module_user_add(chan);
 
-	if (!(announce = ast_strdupa(data)))
-		goto done;
+	announce = ast_strdupa(data);
 
 	memset(&peerflags, 0, sizeof(peerflags));
 

Modified: team/group/new_loader_completion/apps/app_dictate.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/apps/app_dictate.c?rev=29051&r1=29050&r2=29051&view=diff
==============================================================================
--- team/group/new_loader_completion/apps/app_dictate.c (original)
+++ team/group/new_loader_completion/apps/app_dictate.c Sat May 20 14:43:10 2006
@@ -106,8 +106,7 @@
 	
 	snprintf(dftbase, sizeof(dftbase), "%s/dictate", ast_config_AST_SPOOL_DIR);
 	if (!ast_strlen_zero(data)) {
-		if (!(parse = ast_strdupa(data)))
-			return -1;
+		parse = ast_strdupa(data);
 		AST_STANDARD_APP_ARGS(args, parse);
 	} else
 		args.argc = 0;

Modified: team/group/new_loader_completion/apps/app_directory.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/apps/app_directory.c?rev=29051&r1=29050&r2=29051&view=diff
==============================================================================
--- team/group/new_loader_completion/apps/app_directory.c (original)
+++ team/group/new_loader_completion/apps/app_directory.c Sat May 20 14:43:10 2006
@@ -410,10 +410,7 @@
 
 	u = ast_module_user_add(chan);
 
-	if (!(parse = ast_strdupa(data))) {
-		ast_module_user_remove(u);
-		return -1; 
-	}
+	parse = ast_strdupa(data);
 
 	AST_STANDARD_APP_ARGS(args, parse);
 		

Modified: team/group/new_loader_completion/apps/app_disa.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/apps/app_disa.c?rev=29051&r1=29050&r2=29051&view=diff
==============================================================================
--- team/group/new_loader_completion/apps/app_disa.c (original)
+++ team/group/new_loader_completion/apps/app_disa.c Sat May 20 14:43:10 2006
@@ -157,10 +157,7 @@
 	ast_log(LOG_DEBUG, "Digittimeout: %d\n", digittimeout);
 	ast_log(LOG_DEBUG, "Responsetimeout: %d\n", firstdigittimeout);
 
-	if (!(tmp = ast_strdupa(data))) {
-		ast_module_user_remove(u);
-		return -1;
-	}	
+	tmp = ast_strdupa(data);
 
 	AST_STANDARD_APP_ARGS(args, tmp);
 

Modified: team/group/new_loader_completion/apps/app_exec.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/apps/app_exec.c?rev=29051&r1=29050&r2=29051&view=diff
==============================================================================
--- team/group/new_loader_completion/apps/app_exec.c (original)
+++ team/group/new_loader_completion/apps/app_exec.c Sat May 20 14:43:10 2006
@@ -78,8 +78,7 @@
 "The channel variable TRYSTATUS will be set to:\n"
 "    SUCCESS   if the application returned zero\n"
 "    FAILED    if the application returned non-zero\n"
-"    NOAPP     if the application was not found or was not specified\n"
-"    NOMEMORY  if there was not enough memory to execute.\n";
+"    NOAPP     if the application was not found or was not specified\n";
 
 static char *app_execif = "ExecIf";
 static char *execif_synopsis = "Executes dialplan application, conditionally";
@@ -100,25 +99,23 @@
 
 	/* Check and parse arguments */
 	if (data) {
-		if ((s = ast_strdupa(data))) {
-			appname = strsep(&s, "(");
-			if (s) {
-				endargs = strrchr(s, ')');
-				if (endargs)
-					*endargs = '\0';
-				pbx_substitute_variables_helper(chan, s, args, MAXRESULT - 1);
+		s = ast_strdupa(data);
+		appname = strsep(&s, "(");
+		if (s) {
+			endargs = strrchr(s, ')');
+			if (endargs)
+				*endargs = '\0';
+			pbx_substitute_variables_helper(chan, s, args, MAXRESULT - 1);
+		}
+		if (appname) {
+			app = pbx_findapp(appname);
+			if (app) {
+				res = pbx_exec(chan, app, args);
+			} else {
+				ast_log(LOG_WARNING, "Could not find application (%s)\n", appname);
+				res = -1;
 			}
-			if (appname) {
-				app = pbx_findapp(appname);
-				if (app) {
-					res = pbx_exec(chan, app, args);
-				} else {
-					ast_log(LOG_WARNING, "Could not find application (%s)\n", appname);
-					res = -1;
-				}
-			}
-		} else
-			res = -1;
+		}
 	}
 
 	ast_module_user_remove(u);
@@ -136,27 +133,23 @@
 
 	/* Check and parse arguments */
 	if (data) {
-		if ((s = ast_strdupa(data))) {
-			appname = strsep(&s, "(");
-			if (s) {
-				endargs = strrchr(s, ')');
-				if (endargs)
-					*endargs = '\0';
-				pbx_substitute_variables_helper(chan, s, args, MAXRESULT - 1);
+		s = ast_strdupa(data);
+		appname = strsep(&s, "(");
+		if (s) {
+			endargs = strrchr(s, ')');
+			if (endargs)
+				*endargs = '\0';
+			pbx_substitute_variables_helper(chan, s, args, MAXRESULT - 1);
+		}
+		if (appname) {
+			app = pbx_findapp(appname);
+			if (app) {
+				res = pbx_exec(chan, app, args);
+				pbx_builtin_setvar_helper(chan, "TRYSTATUS", res ? "FAILED" : "SUCCESS");
+			} else {
+				ast_log(LOG_WARNING, "Could not find application (%s)\n", appname);
+				pbx_builtin_setvar_helper(chan, "TRYSTATUS", "NOAPP");
 			}
-			if (appname) {
-				app = pbx_findapp(appname);
-				if (app) {
-					res = pbx_exec(chan, app, args);
-					pbx_builtin_setvar_helper(chan, "TRYSTATUS", res ? "FAILED" : "SUCCESS");
-				} else {
-					ast_log(LOG_WARNING, "Could not find application (%s)\n", appname);
-					pbx_builtin_setvar_helper(chan, "TRYSTATUS", "NOAPP");
-				}
-			}
-		} else {

[... 12254 lines stripped ...]


More information about the asterisk-commits mailing list