[asterisk-commits] moy: branch moy/mfcr2-1.4 r236351 - in /team/moy/mfcr2-1.4: ./ agi/ apps/ aut...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Dec 23 14:25:07 CST 2009


Author: moy
Date: Wed Dec 23 14:24:57 2009
New Revision: 236351

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=236351
Log:
merged asterisk 1.4.28

Added:
    team/moy/mfcr2-1.4/.lastclean
      - copied unchanged from r236348, tags/1.4.28/.lastclean
    team/moy/mfcr2-1.4/.version
      - copied unchanged from r236348, tags/1.4.28/.version
    team/moy/mfcr2-1.4/ChangeLog
      - copied unchanged from r236348, tags/1.4.28/ChangeLog
    team/moy/mfcr2-1.4/apps/app_voicemail.exports
      - copied unchanged from r236348, tags/1.4.28/apps/app_voicemail.exports
    team/moy/mfcr2-1.4/asterisk-1.4.28-summary.html
      - copied unchanged from r236348, tags/1.4.28/asterisk-1.4.28-summary.html
    team/moy/mfcr2-1.4/asterisk-1.4.28-summary.txt
      - copied unchanged from r236348, tags/1.4.28/asterisk-1.4.28-summary.txt
    team/moy/mfcr2-1.4/autoconf/libcurl.m4
      - copied unchanged from r236348, tags/1.4.28/autoconf/libcurl.m4
    team/moy/mfcr2-1.4/contrib/valgrind.supp
      - copied unchanged from r236348, tags/1.4.28/contrib/valgrind.supp
    team/moy/mfcr2-1.4/doc/IAX2-security.pdf
      - copied unchanged from r236348, tags/1.4.28/doc/IAX2-security.pdf
    team/moy/mfcr2-1.4/doc/IAX2-security.txt
      - copied unchanged from r236348, tags/1.4.28/doc/IAX2-security.txt
    team/moy/mfcr2-1.4/doc/musiconhold-opsound.txt
      - copied unchanged from r236348, tags/1.4.28/doc/musiconhold-opsound.txt
Removed:
    team/moy/mfcr2-1.4/asterisk-1.4.26.2-summary.html
    team/moy/mfcr2-1.4/asterisk-1.4.26.2-summary.txt
    team/moy/mfcr2-1.4/contrib/firmware/iax/iaxy.bin
    team/moy/mfcr2-1.4/doc/musiconhold-fpm.txt
Modified:
    team/moy/mfcr2-1.4/   (props changed)
    team/moy/mfcr2-1.4/CREDITS
    team/moy/mfcr2-1.4/Makefile
    team/moy/mfcr2-1.4/Makefile.moddir_rules
    team/moy/mfcr2-1.4/Makefile.rules
    team/moy/mfcr2-1.4/UPGRADE.txt
    team/moy/mfcr2-1.4/agi/Makefile
    team/moy/mfcr2-1.4/apps/app_amd.c
    team/moy/mfcr2-1.4/apps/app_chanisavail.c
    team/moy/mfcr2-1.4/apps/app_chanspy.c
    team/moy/mfcr2-1.4/apps/app_dial.c
    team/moy/mfcr2-1.4/apps/app_directed_pickup.c
    team/moy/mfcr2-1.4/apps/app_followme.c
    team/moy/mfcr2-1.4/apps/app_meetme.c
    team/moy/mfcr2-1.4/apps/app_milliwatt.c
    team/moy/mfcr2-1.4/apps/app_mixmonitor.c
    team/moy/mfcr2-1.4/apps/app_playback.c
    team/moy/mfcr2-1.4/apps/app_queue.c
    team/moy/mfcr2-1.4/apps/app_softhangup.c
    team/moy/mfcr2-1.4/apps/app_voicemail.c
    team/moy/mfcr2-1.4/autoconf/ast_ext_lib.m4
    team/moy/mfcr2-1.4/build_tools/mkpkgconfig
    team/moy/mfcr2-1.4/build_tools/prep_tarball
    team/moy/mfcr2-1.4/channels/Makefile
    team/moy/mfcr2-1.4/channels/chan_dahdi.c
    team/moy/mfcr2-1.4/channels/chan_iax2.c
    team/moy/mfcr2-1.4/channels/chan_local.c
    team/moy/mfcr2-1.4/channels/chan_misdn.c
    team/moy/mfcr2-1.4/channels/chan_oss.c
    team/moy/mfcr2-1.4/channels/chan_sip.c
    team/moy/mfcr2-1.4/channels/chan_skinny.c
    team/moy/mfcr2-1.4/channels/chan_vpb.cc
    team/moy/mfcr2-1.4/channels/misdn/ie.c
    team/moy/mfcr2-1.4/channels/misdn/isdn_lib.c
    team/moy/mfcr2-1.4/channels/misdn/isdn_lib.h
    team/moy/mfcr2-1.4/channels/misdn/isdn_lib_intern.h
    team/moy/mfcr2-1.4/channels/misdn_config.c
    team/moy/mfcr2-1.4/codecs/Makefile
    team/moy/mfcr2-1.4/codecs/codec_dahdi.c
    team/moy/mfcr2-1.4/codecs/codec_g726.c
    team/moy/mfcr2-1.4/codecs/codec_ilbc.c
    team/moy/mfcr2-1.4/codecs/gsm/Makefile
    team/moy/mfcr2-1.4/codecs/lpc10/Makefile
    team/moy/mfcr2-1.4/configs/cdr_custom.conf.sample
    team/moy/mfcr2-1.4/configs/chan_dahdi.conf.sample
    team/moy/mfcr2-1.4/configs/extensions.conf.sample
    team/moy/mfcr2-1.4/configs/iax.conf.sample
    team/moy/mfcr2-1.4/configs/queues.conf.sample
    team/moy/mfcr2-1.4/configs/sip.conf.sample
    team/moy/mfcr2-1.4/configs/udptl.conf.sample
    team/moy/mfcr2-1.4/configure
    team/moy/mfcr2-1.4/configure.ac
    team/moy/mfcr2-1.4/contrib/init.d/rc.redhat.asterisk
    team/moy/mfcr2-1.4/contrib/scripts/iax-friends.sql
    team/moy/mfcr2-1.4/doc/00README.1st
    team/moy/mfcr2-1.4/doc/channelvariables.txt
    team/moy/mfcr2-1.4/doc/externalivr.txt
    team/moy/mfcr2-1.4/doc/imapstorage.txt
    team/moy/mfcr2-1.4/doc/localchannel.txt
    team/moy/mfcr2-1.4/doc/valgrind.txt
    team/moy/mfcr2-1.4/formats/format_g723.c
    team/moy/mfcr2-1.4/formats/format_g726.c
    team/moy/mfcr2-1.4/formats/format_g729.c
    team/moy/mfcr2-1.4/formats/format_gsm.c
    team/moy/mfcr2-1.4/formats/format_h263.c
    team/moy/mfcr2-1.4/formats/format_h264.c
    team/moy/mfcr2-1.4/formats/format_ilbc.c
    team/moy/mfcr2-1.4/formats/format_jpeg.c
    team/moy/mfcr2-1.4/formats/format_ogg_vorbis.c
    team/moy/mfcr2-1.4/formats/format_pcm.c
    team/moy/mfcr2-1.4/formats/format_sln.c
    team/moy/mfcr2-1.4/formats/format_vox.c
    team/moy/mfcr2-1.4/formats/format_wav.c
    team/moy/mfcr2-1.4/formats/format_wav_gsm.c
    team/moy/mfcr2-1.4/funcs/func_base64.c
    team/moy/mfcr2-1.4/funcs/func_cut.c
    team/moy/mfcr2-1.4/funcs/func_groupcount.c
    team/moy/mfcr2-1.4/funcs/func_realtime.c
    team/moy/mfcr2-1.4/funcs/func_strings.c
    team/moy/mfcr2-1.4/include/asterisk.h
    team/moy/mfcr2-1.4/include/asterisk/astobj2.h
    team/moy/mfcr2-1.4/include/asterisk/autoconfig.h.in
    team/moy/mfcr2-1.4/include/asterisk/cdr.h
    team/moy/mfcr2-1.4/include/asterisk/channel.h
    team/moy/mfcr2-1.4/include/asterisk/compat.h
    team/moy/mfcr2-1.4/include/asterisk/dsp.h
    team/moy/mfcr2-1.4/include/asterisk/file.h
    team/moy/mfcr2-1.4/include/asterisk/frame.h
    team/moy/mfcr2-1.4/include/asterisk/linkedlists.h
    team/moy/mfcr2-1.4/include/asterisk/lock.h
    team/moy/mfcr2-1.4/include/asterisk/module.h
    team/moy/mfcr2-1.4/include/asterisk/netsock.h
    team/moy/mfcr2-1.4/include/asterisk/rtp.h
    team/moy/mfcr2-1.4/include/asterisk/translate.h
    team/moy/mfcr2-1.4/main/Makefile
    team/moy/mfcr2-1.4/main/abstract_jb.c
    team/moy/mfcr2-1.4/main/acl.c
    team/moy/mfcr2-1.4/main/app.c
    team/moy/mfcr2-1.4/main/asterisk.c
    team/moy/mfcr2-1.4/main/asterisk.exports
    team/moy/mfcr2-1.4/main/astfd.c
    team/moy/mfcr2-1.4/main/astobj2.c
    team/moy/mfcr2-1.4/main/audiohook.c
    team/moy/mfcr2-1.4/main/autoservice.c
    team/moy/mfcr2-1.4/main/callerid.c
    team/moy/mfcr2-1.4/main/channel.c
    team/moy/mfcr2-1.4/main/config.c
    team/moy/mfcr2-1.4/main/db1-ast/Makefile
    team/moy/mfcr2-1.4/main/db1-ast/mpool/mpool.c
    team/moy/mfcr2-1.4/main/dsp.c
    team/moy/mfcr2-1.4/main/editline/makelist.in   (props changed)
    team/moy/mfcr2-1.4/main/file.c
    team/moy/mfcr2-1.4/main/frame.c
    team/moy/mfcr2-1.4/main/loader.c
    team/moy/mfcr2-1.4/main/manager.c
    team/moy/mfcr2-1.4/main/netsock.c
    team/moy/mfcr2-1.4/main/pbx.c
    team/moy/mfcr2-1.4/main/rtp.c
    team/moy/mfcr2-1.4/main/say.c
    team/moy/mfcr2-1.4/main/translate.c
    team/moy/mfcr2-1.4/main/udptl.c
    team/moy/mfcr2-1.4/main/utils.c
    team/moy/mfcr2-1.4/pbx/Makefile
    team/moy/mfcr2-1.4/pbx/pbx_config.c
    team/moy/mfcr2-1.4/res/Makefile
    team/moy/mfcr2-1.4/res/res_crypto.c
    team/moy/mfcr2-1.4/res/res_features.c
    team/moy/mfcr2-1.4/res/res_monitor.c
    team/moy/mfcr2-1.4/res/res_musiconhold.c
    team/moy/mfcr2-1.4/sounds/Makefile
    team/moy/mfcr2-1.4/sounds/sounds.xml
    team/moy/mfcr2-1.4/static-http/prototype.js
    team/moy/mfcr2-1.4/utils/Makefile
    team/moy/mfcr2-1.4/utils/frame.c

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

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

Propchange: team/moy/mfcr2-1.4/
------------------------------------------------------------------------------
--- svn:externals (original)
+++ svn:externals Wed Dec 23 14:24:57 2009
@@ -1,1 +1,1 @@
-menuselect https://origsvn.digium.com/svn/menuselect/tags/autotag_for_asterisk/1.4.26-rc6
+menuselect https://origsvn.digium.com/svn/menuselect/tags/autotag_for_asterisk/1.4.28-rc1

Modified: team/moy/mfcr2-1.4/CREDITS
URL: http://svnview.digium.com/svn/asterisk/team/moy/mfcr2-1.4/CREDITS?view=diff&rev=236351&r1=236350&r2=236351
==============================================================================
--- team/moy/mfcr2-1.4/CREDITS (original)
+++ team/moy/mfcr2-1.4/CREDITS Wed Dec 23 14:24:57 2009
@@ -161,7 +161,7 @@
 	This product includes software developed by Brian M. Clapper <bmc at clapper.org>
 
 === HOLD MUSIC ===
-Music provided by www.freeplaymusic.com
+Music provided by www.opsound.org
 
 === OTHER SOURCE CODE IN ASTERISK ===
 Asterisk uses libedit, the lightweight readline replacement from NetBSD.

Modified: team/moy/mfcr2-1.4/Makefile
URL: http://svnview.digium.com/svn/asterisk/team/moy/mfcr2-1.4/Makefile?view=diff&rev=236351&r1=236350&r2=236351
==============================================================================
--- team/moy/mfcr2-1.4/Makefile (original)
+++ team/moy/mfcr2-1.4/Makefile Wed Dec 23 14:24:57 2009
@@ -13,18 +13,24 @@
 
 # All Makefiles use the following variables:
 #
-# ASTCFLAGS - compiler options
-# ASTLDFLAGS - linker flags (not libraries)
+# ASTCFLAGS - compiler options provided by the user (if any)
+# _ASTCFLAGS - compiler options provided by the build system
+# ASTLDFLAGS - linker flags (not libraries) provided by the user (if any)
+# _ASTLDFLAGS - linker flags (not libraries) provided by the build system
 # AST_LIBS - libraries to build binaries XXX
 # LIBS - additional libraries, at top-level for all links,
 #      on a single object just for that object
 # SOLINK - linker flags used only for creating shared objects (.so files),
 #      used for all .so links
 #
-# Default values fo ASTCFLAGS and ASTLDFLAGS can be specified in the
+# Values for ASTCFLAGS and ASTLDFLAGS can be specified in the
 # environment when running make, as follows:
 #
-# $ ASTCFLAGS="-Werror" make
+#	$ ASTCFLAGS="-Werror" make ...
+#
+# or as a variable value on the make command line itself:
+#
+#	$ make ASTCFLAGS="-Werror" ...
 
 export ASTTOPDIR
 export ASTERISKVERSION
@@ -150,7 +156,7 @@
 HTTP_CGIDIR=/var/www/cgi-bin
 
 # Uncomment this to use the older DSP routines
-#ASTCFLAGS+=-DOLD_DSP_ROUTINES
+#_ASTCFLAGS+=-DOLD_DSP_ROUTINES
 
 # If the file .asterisk.makeopts is present in your home directory, you can
 # include all of your favorite menuselect options so that every time you download
@@ -197,53 +203,53 @@
   endif
 endif
 
-ifeq ($(findstring -save-temps,$(ASTCFLAGS)),)
-ASTCFLAGS+=-pipe
-endif
-
-ASTCFLAGS+=-Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG)
+ifeq ($(findstring -save-temps,$(_ASTCFLAGS) $(ASTCFLAGS)),)
+_ASTCFLAGS+=-pipe
+endif
+
+_ASTCFLAGS+=-Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG)
 
 ifeq ($(AST_DEVMODE),yes)
-  ASTCFLAGS+=-Werror
-  ASTCFLAGS+=-Wunused
-  ASTCFLAGS+=$(AST_DECLARATION_AFTER_STATEMENT)
-  ASTCFLAGS+=$(AST_FORTIFY_SOURCE)
-# ASTCFLAGS+=-Wundef 
-  ASTCFLAGS+=-Wformat -Wformat-security
-  ASTCFLAGS+=-Wmissing-format-attribute
-# ASTCFLAGS+=-Wformat=2
+  _ASTCFLAGS+=-Werror
+  _ASTCFLAGS+=-Wunused
+  _ASTCFLAGS+=$(AST_DECLARATION_AFTER_STATEMENT)
+  _ASTCFLAGS+=$(AST_FORTIFY_SOURCE)
+# _ASTCFLAGS+=-Wundef 
+  _ASTCFLAGS+=-Wformat -Wformat-security
+  _ASTCFLAGS+=-Wmissing-format-attribute
+# _ASTCFLAGS+=-Wformat=2
 endif
 
 ifneq ($(findstring BSD,$(OSARCH)),)
-  ASTCFLAGS+=-I/usr/local/include
-  ASTLDFLAGS+=-L/usr/local/lib
+  _ASTCFLAGS+=-isystem /usr/local/include
+  _ASTLDFLAGS+=-L/usr/local/lib
 endif
 
 ifneq ($(PROC),ultrasparc)
-  ASTCFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi)
+  _ASTCFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi)
 endif
 
 ifeq ($(PROC),ppc)
-  ASTCFLAGS+=-fsigned-char
+  _ASTCFLAGS+=-fsigned-char
 endif
 
 ifeq ($(OSARCH),FreeBSD)
   # -V is understood by BSD Make, not by GNU make.
   BSDVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk)
-  ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi)
+  _ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi)
   AST_LIBS+=$(shell if test  $(BSDVERSION) -lt 502102 ; then echo "-lc_r"; else echo "-pthread"; fi)
 endif
 
 ifeq ($(OSARCH),NetBSD)
-  ASTCFLAGS+=-pthread -I/usr/pkg/include
+  _ASTCFLAGS+=-pthread -I/usr/pkg/include
 endif
 
 ifeq ($(OSARCH),OpenBSD)
-  ASTCFLAGS+=-pthread
+  _ASTCFLAGS+=-pthread
 endif
 
 ifeq ($(OSARCH),SunOS)
-  ASTCFLAGS+=-Wcast-align -DSOLARIS -I../include/solaris-compat -I/opt/ssl/include -I/usr/local/ssl/include
+  _ASTCFLAGS+=-Wcast-align -DSOLARIS -I../include/solaris-compat -I/opt/ssl/include -I/usr/local/ssl/include
 endif
 
 ASTERISKVERSION:=$(shell GREP=$(GREP) AWK=$(AWK) build_tools/make_version .)
@@ -256,7 +262,7 @@
   ASTERISKVERSIONNUM=999999
 endif
 
-ASTCFLAGS+=$(MALLOC_DEBUG)$(BUSYDETECT)$(OPTIONS)
+_ASTCFLAGS+=$(BUSYDETECT)$(OPTIONS)
 
 MOD_SUBDIRS:=res channels pbx apps codecs formats cdr funcs main
 OTHER_SUBDIRS:=utils agi
@@ -271,7 +277,7 @@
 MOD_SUBDIRS_MENUSELECT_TREE:=$(MOD_SUBDIRS:%=%-menuselect-tree)
 
 ifneq ($(findstring darwin,$(OSARCH)),)
-  ASTCFLAGS+=-D__Darwin__
+  _ASTCFLAGS+=-D__Darwin__
   AUDIO_LIBS=-framework CoreAudio
   SOLINK=-dynamic -bundle -undefined suppress -force_flat_namespace
 else
@@ -316,8 +322,8 @@
 	@echo "****"
 	@exit 1
 
-menuselect.makeopts: menuselect/menuselect menuselect-tree
-	menuselect/menuselect --check-deps menuselect.makeopts $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS)
+menuselect.makeopts: menuselect/menuselect menuselect-tree makeopts build_tools/menuselect-deps $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS)
+	menuselect/menuselect --check-deps $@ $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS)
 
 $(MOD_SUBDIRS_EMBED_LDSCRIPT):
 	+ at echo "EMBED_LDSCRIPTS+="`$(SUBMAKE) -C $(@:-embed-ldscript=) SUBDIR=$(@:-embed-ldscript=) __embed_ldscript` >> makeopts.embed_rules
@@ -348,10 +354,10 @@
 main: $(filter-out main,$(MOD_SUBDIRS))
 
 $(MOD_SUBDIRS):
-	@ASTCFLAGS="$(MOD_SUBDIR_CFLAGS) $(ASTCFLAGS)" ASTLDFLAGS="$(ASTLDFLAGS)" AST_LIBS="$(AST_LIBS)" $(MAKE) --no-builtin-rules -C $@ SUBDIR=$@ all
+	+ at _ASTCFLAGS="$(MOD_SUBDIR_CFLAGS) $(_ASTCFLAGS)" $(MAKE) --no-builtin-rules -C $@ SUBDIR=$@ all
 
 $(OTHER_SUBDIRS):
-	@ASTCFLAGS="$(OTHER_SUBDIR_CFLAGS) $(ASTCFLAGS)" ASTLDFLAGS="$(ASTLDFLAGS)" AUDIO_LIBS="$(AUDIO_LIBS)" $(MAKE) --no-builtin-rules -C $@ SUBDIR=$@ all
+	+ at _ASTCFLAGS="$(OTHER_SUBDIR_CFLAGS) $(_ASTCFLAGS)" $(MAKE) --no-builtin-rules -C $@ SUBDIR=$@ all
 
 defaults.h: makeopts
 	@build_tools/make_defaults_h > $@.tmp
@@ -404,7 +410,9 @@
 	rm -f build_tools/menuselect-deps
 
 datafiles: _all
-	if [ x`$(ID) -un` = xroot ]; then CFLAGS="$(ASTCFLAGS)" bash build_tools/mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; fi
+	if [ `$(ID) -u` = 0 ]; then \
+		CFLAGS="$(_ASTCFLAGS) $(ASTCFLAGS)" build_tools/mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; \
+	fi
 # Should static HTTP be installed during make samples or even with its own target ala
 # webvoicemail?  There are portions here that *could* be customized but might also be
 # improved a lot.  I'll put it here for now.
@@ -665,7 +673,7 @@
 			if [ -z "$(DESTDIR)" ]; then /sbin/chkconfig --add asterisk; fi; \
 		elif [ -f /etc/debian_version ]; then \
 			$(INSTALL) -m 755 contrib/init.d/rc.debian.asterisk $(DESTDIR)/etc/init.d/asterisk; \
-			if [ -z "$(DESTDIR)" ]; then /usr/sbin/update-rc.d asterisk start 50 2 3 4 5 . stop 91 2 3 4 5 .; fi; \
+			if [ -z "$(DESTDIR)" ]; then /usr/sbin/update-rc.d asterisk defaults 50 91; fi; \
 		elif [ -f /etc/gentoo-release ]; then \
 			$(INSTALL) -m 755 contrib/init.d/rc.gentoo.asterisk $(DESTDIR)/etc/init.d/asterisk; \
 			if [ -z "$(DESTDIR)" ]; then /sbin/rc-update add asterisk default; fi; \
@@ -767,6 +775,29 @@
 	@cat sounds/sounds.xml >> $@
 	@echo "</menu>" >> $@
 
-.PHONY: menuselect main sounds clean dist-clean distclean all prereqs cleantest uninstall _uninstall uninstall-all 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 menuselect.makeopts installdirs _clean
+.PHONY: menuselect
+.PHONY: main
+.PHONY: sounds
+.PHONY: clean
+.PHONY: dist-clean
+.PHONY: distclean
+.PHONY: all
+.PHONY: prereqs
+.PHONY: cleantest
+.PHONY: uninstall
+.PHONY: _uninstall
+.PHONY: uninstall-all
+.PHONY: dont-optimize
+.PHONY: badshell
+.PHONY: installdirs
+.PHONY: _clean
+.PHONY: $(SUBDIRS_INSTALL)
+.PHONY: $(SUBDIRS_DIST_CLEAN)
+.PHONY: $(SUBDIRS_CLEAN)
+.PHONY: $(SUBDIRS_UNINSTALL)
+.PHONY: $(SUBDIRS)
+.PHONY: $(MOD_SUBDIRS_EMBED_LDSCRIPT)
+.PHONY: $(MOD_SUBDIRS_EMBED_LDFLAGS)
+.PHONY: $(MOD_SUBDIRS_EMBED_LIBS)
 
 FORCE:

Modified: team/moy/mfcr2-1.4/Makefile.moddir_rules
URL: http://svnview.digium.com/svn/asterisk/team/moy/mfcr2-1.4/Makefile.moddir_rules?view=diff&rev=236351&r1=236350&r2=236351
==============================================================================
--- team/moy/mfcr2-1.4/Makefile.moddir_rules (original)
+++ team/moy/mfcr2-1.4/Makefile.moddir_rules Wed Dec 23 14:24:57 2009
@@ -12,7 +12,7 @@
 #
 
 ifeq ($(findstring LOADABLE_MODULES,$(MENUSELECT_CFLAGS)),)
-  ASTCFLAGS+=${GC_CFLAGS}
+  _ASTCFLAGS+=${GC_CFLAGS}
 endif
 
 ifneq ($(findstring STATIC_BUILD,$(MENUSELECT_CFLAGS)),)
@@ -23,12 +23,12 @@
 
 comma:=,
 
-$(addsuffix .o,$(C_MODS)): ASTCFLAGS+=-DAST_MODULE=\"$*\" $(MENUSELECT_OPTS_$*:%=-D%) $(foreach dep,$(MENUSELECT_DEPENDS_$*),$(value $(dep)_INCLUDE))
-$(addsuffix .oo,$(CC_MODS)): ASTCFLAGS+=-DAST_MODULE=\"$*\" $(MENUSELECT_OPTS_$*:%=-D%) $(foreach dep,$(MENUSELECT_DEPENDS_$*),$(value $(dep)_INCLUDE))
+$(addsuffix .o,$(C_MODS)): _ASTCFLAGS+=-DAST_MODULE=\"$*\" $(MENUSELECT_OPTS_$*:%=-D%) $(foreach dep,$(MENUSELECT_DEPENDS_$*),$(value $(dep)_INCLUDE))
+$(addsuffix .oo,$(CC_MODS)): _ASTCFLAGS+=-DAST_MODULE=\"$*\" $(MENUSELECT_OPTS_$*:%=-D%) $(foreach dep,$(MENUSELECT_DEPENDS_$*),$(value $(dep)_INCLUDE))
 
-$(LOADABLE_MODS:%=%.so): ASTCFLAGS+=-fPIC
+$(LOADABLE_MODS:%=%.so): _ASTCFLAGS+=-fPIC
 $(LOADABLE_MODS:%=%.so): LIBS+=$(foreach dep,$(MENUSELECT_DEPENDS_$*),$(value $(dep)_LIB))
-$(LOADABLE_MODS:%=%.so): ASTLDFLAGS+=$(foreach dep,$(MENUSELECT_DEPENDS_$*),$(value $(dep)_LDFLAGS))
+$(LOADABLE_MODS:%=%.so): _ASTLDFLAGS+=$(foreach dep,$(MENUSELECT_DEPENDS_$*),$(value $(dep)_LDFLAGS))
 
 $(addsuffix .so,$(filter $(LOADABLE_MODS),$(C_MODS))): %.so: %.o
 $(addsuffix .so,$(filter $(LOADABLE_MODS),$(CC_MODS))): %.so: %.oo

Modified: team/moy/mfcr2-1.4/Makefile.rules
URL: http://svnview.digium.com/svn/asterisk/team/moy/mfcr2-1.4/Makefile.rules?view=diff&rev=236351&r1=236350&r2=236351
==============================================================================
--- team/moy/mfcr2-1.4/Makefile.rules (original)
+++ team/moy/mfcr2-1.4/Makefile.rules Wed Dec 23 14:24:57 2009
@@ -38,26 +38,22 @@
 OPTIMIZE?=-O6
 
 ifeq ($(findstring DONT_OPTIMIZE,$(MENUSELECT_CFLAGS)),)
-    # More GSM codec optimization
-    # Uncomment to enable MMXTM optimizations for x86 architecture CPU's
-    # which support MMX instructions.  This should be newer pentiums,
-    # ppro's, etc, as well as the AMD K6 and K7.  
-    #K6OPT=-DK6OPT
-
-    ASTCFLAGS+=$(OPTIMIZE)
+    _ASTCFLAGS+=$(OPTIMIZE)
+else
+    _ASTCFLAGS+=-O0
 endif
 
 # shortcuts for common combinations of flags; these must be recursively expanded so that
 # per-target settings will be applied
-CC_CFLAGS=$(PTHREAD_CFLAGS) $(ASTCFLAGS)
-CXX_CFLAGS=$(PTHREAD_CFLAGS) $(filter-out -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(AST_DECLARATION_AFTER_STATEMENT),$(ASTCFLAGS))
+CC_CFLAGS=$(PTHREAD_CFLAGS) $(_ASTCFLAGS) $(ASTCFLAGS)
+CXX_CFLAGS=$(PTHREAD_CFLAGS) $(filter-out -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(AST_DECLARATION_AFTER_STATEMENT),$(_ASTCFLAGS) $(ASTCFLAGS))
 
 ifeq ($(GNU_LD),1)
 SO_SUPPRESS_SYMBOLS=-Wl,--version-script,$(if $(wildcard $(subst .so,.exports,$@)),$(subst .so,.exports,$@),$(ASTTOPDIR)/default.exports)
 endif
 
-CC_LDFLAGS_SO=$(PTHREAD_CFLAGS) $(ASTLDFLAGS) $(SOLINK) $(SO_SUPPRESS_SYMBOLS)
-CXX_LDFLAGS_SO=$(PTHREAD_CFLAGS) $(ASTLDFLAGS) $(SOLINK) $(SO_SUPPRESS_SYMBOLS)
+CC_LDFLAGS_SO=$(PTHREAD_CFLAGS) $(_ASTLDFLAGS) $(SOLINK) $(SO_SUPPRESS_SYMBOLS) $(ASTLDFLAGS)
+CXX_LDFLAGS_SO=$(PTHREAD_CFLAGS) $(_ASTLDFLAGS) $(SOLINK) $(SO_SUPPRESS_SYMBOLS) $(ASTLDFLAGS)
 CC_LIBS=$(PTHREAD_LIBS) $(LIBS)
 CXX_LIBS=$(PTHREAD_LIBS) $(LIBS)
 
@@ -73,43 +69,43 @@
 %.o: %.s
 	$(ECHO_PREFIX) echo "   [AS] $< -> $@"
 ifeq ($(COMPILE_DOUBLE),yes)
-	$(CMD_PREFIX) $(CC) -o /dev/null -c $< $(CC_CFLAGS) $(OPTIMIZE)
+	$(CMD_PREFIX) $(CC) -o /dev/null -c $< $(OPTIMIZE) $(CC_CFLAGS)
 endif
 	$(CMD_PREFIX) $(CC) -o $@ -c $< $(CC_CFLAGS)
 
 %.o: %.i
 	$(ECHO_PREFIX) echo "   [CCi] $< -> $@"
 ifeq ($(COMPILE_DOUBLE),yes)
-	$(CMD_PREFIX) $(CC) -o /dev/null -c $< $(CC_CFLAGS) $(OPTIMIZE)
+	$(CMD_PREFIX) $(CC) -o /dev/null -c $< $(OPTIMIZE) $(CC_CFLAGS)
 endif
 	$(CMD_PREFIX) $(CC) -o $@ -c $< $(CC_CFLAGS)
 
 ifneq ($(COMPILE_DOUBLE),yes)
 %.o: %.c
 	$(ECHO_PREFIX) echo "   [CC] $< -> $@"
-	$(CMD_PREFIX) $(CC) -o $@ -c $< $(CC_CFLAGS) $(MAKE_DEPS)
+	$(CMD_PREFIX) $(CC) -o $@ -c $< $(MAKE_DEPS) $(CC_CFLAGS)
 endif
 
 %.i: %.c
 	$(ECHO_PREFIX) echo "   [CPP] $< -> $@"
-	$(CMD_PREFIX) $(CC) -o $@ -E $< $(CC_CFLAGS) $(MAKE_DEPS)
+	$(CMD_PREFIX) $(CC) -o $@ -E $< $(MAKE_DEPS) $(CC_CFLAGS)
 
 %.oo: %.ii
 	$(ECHO_PREFIX) echo "   [CXXi] $< -> $@"
 ifeq ($(COMPILE_DOUBLE),yes)
-	$(CMD_PREFIX) $(CXX) -o /dev/null -c $< $(CXX_CFLAGS) $(OPTIMIZE)
+	$(CMD_PREFIX) $(CXX) -o /dev/null -c $< $(OPTIMIZE) $(CXX_CFLAGS)
 endif
 	$(CMD_PREFIX) $(CXX) -o $@ -c $< $(CXX_CFLAGS)
 
 ifneq ($(COMPILE_DOUBLE),yes)
 %.oo: %.cc
 	$(ECHO_PREFIX) echo "   [CXX] $< -> $@"
-	$(CMD_PREFIX) $(CXX) -o $@ -c $< $(CXX_CFLAGS) $(MAKE_DEPS)
+	$(CMD_PREFIX) $(CXX) -o $@ -c $< $(MAKE_DEPS) $(CXX_CFLAGS)
 endif
 
 %.ii: %.cc
 	$(ECHO_PREFIX) echo "   [CPP] $< -> $@"
-	$(CMD_PREFIX) $(CXX) -o $@ -E $< $(CXX_CFLAGS) $(MAKE_DEPS)
+	$(CMD_PREFIX) $(CXX) -o $@ -E $< $(MAKE_DEPS) $(CXX_CFLAGS)
 
 %.c: %.y
 	$(ECHO_PREFIX) echo "   [BISON] $< -> $@"
@@ -129,6 +125,6 @@
 
 %: %.o
 	$(ECHO_PREFIX) echo "   [LD] $^ -> $@"
-	$(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(PTHREAD_CFLAGS) $(ASTLDFLAGS) $^ $(CXX_LIBS)
+	$(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(PTHREAD_CFLAGS) $(_ASTLDFLAGS) $^ $(CXX_LIBS) $(ASTLDFLAGS)
 
 dist-clean:: clean

Modified: team/moy/mfcr2-1.4/UPGRADE.txt
URL: http://svnview.digium.com/svn/asterisk/team/moy/mfcr2-1.4/UPGRADE.txt?view=diff&rev=236351&r1=236350&r2=236351
==============================================================================
--- team/moy/mfcr2-1.4/UPGRADE.txt (original)
+++ team/moy/mfcr2-1.4/UPGRADE.txt Wed Dec 23 14:24:57 2009
@@ -7,6 +7,12 @@
 =========================================================
 
 IAX2:
+
+* The firmware for the IAXy has been removed from Asterisk.  It can be
+  downloaded from http://downloads.digium.com/pub/iaxy/.  To have Asterisk
+  install the firmware into its proper location, place the firmware in the
+  contrib/firmware/iax/ directory in the Asterisk source tree before running
+  "make install".
 
 * There have been some changes to the IAX2 protocol to address the security
   concerns documented in the security advisory AST-2009-006.  Please see the
@@ -72,11 +78,11 @@
 use with Asterisk have been replaced with new versions produced from high quality
 master recordings, and are available in three languages (English, French and
 Spanish) and in five formats (WAV (uncompressed), mu-Law, a-Law, GSM and G.729).
-In addition, the music on hold files provided by FreePlay Music are now available
+In addition, the music on hold files provided by opsound.org Music are now available
 in the same five formats, but no longer available in MP3 format.
 
 The Asterisk 1.4 tarball packages will only include English prompts in GSM format,
-(as were supplied with previous releases) and the FreePlay MOH files in WAV format.
+(as were supplied with previous releases) and the opsound.org MOH files in WAV format.
 All of the other variations can be installed by running 'make menuselect' and
 selecting the packages you wish to install; when you run 'make install', those
 packages will be downloaded and installed along with the standard files included

Modified: team/moy/mfcr2-1.4/agi/Makefile
URL: http://svnview.digium.com/svn/asterisk/team/moy/mfcr2-1.4/agi/Makefile?view=diff&rev=236351&r1=236350&r2=236351
==============================================================================
--- team/moy/mfcr2-1.4/agi/Makefile (original)
+++ team/moy/mfcr2-1.4/agi/Makefile Wed Dec 23 14:24:57 2009
@@ -21,7 +21,7 @@
 
 include $(ASTTOPDIR)/Makefile.rules
 
-ASTCFLAGS+=-DSTANDALONE
+_ASTCFLAGS+=-DSTANDALONE
 
 all: $(AGIS)
 

Modified: team/moy/mfcr2-1.4/apps/app_amd.c
URL: http://svnview.digium.com/svn/asterisk/team/moy/mfcr2-1.4/apps/app_amd.c?view=diff&rev=236351&r1=236350&r2=236351
==============================================================================
--- team/moy/mfcr2-1.4/apps/app_amd.c (original)
+++ team/moy/mfcr2-1.4/apps/app_amd.c Wed Dec 23 14:24:57 2009
@@ -209,6 +209,7 @@
 			if (option_debug)
 				ast_log(LOG_DEBUG, "Got hangup\n");
 			strcpy(amdStatus, "HANGUP");
+			res = 1;
 			break;
 		}
 

Modified: team/moy/mfcr2-1.4/apps/app_chanisavail.c
URL: http://svnview.digium.com/svn/asterisk/team/moy/mfcr2-1.4/apps/app_chanisavail.c?view=diff&rev=236351&r1=236350&r2=236351
==============================================================================
--- team/moy/mfcr2-1.4/apps/app_chanisavail.c (original)
+++ team/moy/mfcr2-1.4/apps/app_chanisavail.c Wed Dec 23 14:24:57 2009
@@ -55,7 +55,12 @@
 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. The following variables will be set by this application:\n"
+"available. Note that the AVAILSTATUS variable is used for both device state\n"
+"and cause code. It is therefore possible for it to give a value that may\n"
+"indicate a device is available when it is not. It is suggested that the\n"
+"AVAILORIGCHAN variable is used instead to see whether a device is available\n"
+"or not.\n"
+"The following variables will be set by this application:\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"

Modified: team/moy/mfcr2-1.4/apps/app_chanspy.c
URL: http://svnview.digium.com/svn/asterisk/team/moy/mfcr2-1.4/apps/app_chanspy.c?view=diff&rev=236351&r1=236350&r2=236351
==============================================================================
--- team/moy/mfcr2-1.4/apps/app_chanspy.c (original)
+++ team/moy/mfcr2-1.4/apps/app_chanspy.c Wed Dec 23 14:24:57 2009
@@ -250,9 +250,10 @@
 	ast_channel_unlock(chan);
 
 	ast_mutex_lock(&spyee_chanspy_ds->lock);
-	if (spyee_chanspy_ds->chan) {
-		spyee = spyee_chanspy_ds->chan;
-		ast_channel_lock(spyee);
+	while ((spyee = spyee_chanspy_ds->chan) && ast_channel_trylock(spyee)) {
+		/* avoid a deadlock here, just in case spyee is masqueraded and
+		 * chanspy_ds_chan_fixup() is called with the channel locked */
+		DEADLOCK_AVOIDANCE(&spyee_chanspy_ds->lock);
 	}
 	ast_mutex_unlock(&spyee_chanspy_ds->lock);
 
@@ -422,17 +423,20 @@
 
 static struct chanspy_ds *chanspy_ds_free(struct chanspy_ds *chanspy_ds)
 {
-	if (!chanspy_ds)
+	struct ast_channel *chan;
+
+	if (!chanspy_ds) {
 		return NULL;
+	}
 
 	ast_mutex_lock(&chanspy_ds->lock);
-	if (chanspy_ds->chan) {
+	while ((chan = chanspy_ds->chan)) {
 		struct ast_datastore *datastore;
-		struct ast_channel *chan;
-
-		chan = chanspy_ds->chan;
-
-		ast_channel_lock(chan);
+
+		if (ast_channel_trylock(chan)) {
+			DEADLOCK_AVOIDANCE(&chanspy_ds->lock);
+			continue;
+		}
 		if ((datastore = ast_channel_datastore_find(chan, &chanspy_ds_info, chanspy_ds->unique_id))) {
 			ast_channel_datastore_remove(chan, datastore);
 			/* chanspy_ds->chan is NULL after this call */
@@ -441,6 +445,7 @@
 			ast_channel_datastore_free(datastore);
 		}
 		ast_channel_unlock(chan);
+		break;
 	}
 	ast_mutex_unlock(&chanspy_ds->lock);
 

Modified: team/moy/mfcr2-1.4/apps/app_dial.c
URL: http://svnview.digium.com/svn/asterisk/team/moy/mfcr2-1.4/apps/app_dial.c?view=diff&rev=236351&r1=236350&r2=236351
==============================================================================
--- team/moy/mfcr2-1.4/apps/app_dial.c (original)
+++ team/moy/mfcr2-1.4/apps/app_dial.c Wed Dec 23 14:24:57 2009
@@ -171,9 +171,12 @@
 "           You cannot use any additional action post answer options in conjunction\n"
 "           with this option. Also, pbx services are not run on the peer (called) channel,\n"
 "           so you will not be able to set timeouts via the TIMEOUT() function in this macro.\n"
-"    n    - This option is a modifier for the screen/privacy mode. It specifies\n"
-"           that no introductions are to be saved in the priv-callerintros\n"
-"           directory.\n"
+"    n([x]) - This option is a modifier for the screen/privacy mode. It specifies\n"
+"             that no introductions are to be saved in the priv-callerintros\n"
+"             directory.\n"
+"             Specified without an arg, or with 0, the introduction is saved after\n"
+"             an unanswered call originating from the same CallerID. With\n"
+"             a 1 specified, the introduction is always deleted and rerequested.\n"
 "    N    - This option is a modifier for the screen/privacy mode. It specifies\n"
 "           that if callerID is present, do not screen the call.\n"
 "    o    - Specify that the CallerID that was present on the *calling* channel\n"
@@ -271,6 +274,7 @@
 	OPT_ARG_PRIVACY,
 	OPT_ARG_DURATION_STOP,
 	OPT_ARG_OPERMODE,
+	OPT_ARG_SCREEN_NOINTRO,
 	/* note: this entry _MUST_ be the last one in the enum */
 	OPT_ARG_ARRAY_SIZE,
 } dial_exec_option_args;
@@ -292,7 +296,7 @@
 	AST_APP_OPTION_ARG('L', OPT_DURATION_LIMIT, OPT_ARG_DURATION_LIMIT),
 	AST_APP_OPTION_ARG('m', OPT_MUSICBACK, OPT_ARG_MUSICBACK),
 	AST_APP_OPTION_ARG('M', OPT_CALLEE_MACRO, OPT_ARG_CALLEE_MACRO),
-	AST_APP_OPTION('n', OPT_SCREEN_NOINTRO),
+	AST_APP_OPTION_ARG('n', OPT_SCREEN_NOINTRO, OPT_ARG_SCREEN_NOINTRO),
 	AST_APP_OPTION('N', OPT_SCREEN_NOCLID),
 	AST_APP_OPTION('o', OPT_ORIGINAL_CLID),
 	AST_APP_OPTION_ARG('O', OPT_OPERMODE,OPT_ARG_OPERMODE),
@@ -308,7 +312,8 @@
 
 #define CAN_EARLY_BRIDGE(flags,chan,peer) (!ast_test_flag(flags, OPT_CALLEE_HANGUP | \
 	OPT_CALLER_HANGUP | OPT_CALLEE_TRANSFER | OPT_CALLER_TRANSFER | \
-	OPT_CALLEE_MONITOR | OPT_CALLER_MONITOR | OPT_CALLEE_PARK | OPT_CALLER_PARK) && \
+	OPT_CALLEE_MONITOR | OPT_CALLER_MONITOR | OPT_CALLEE_PARK |  \
+	OPT_CALLER_PARK | OPT_ANNOUNCE | OPT_CALLEE_MACRO) && \
 	!chan->audiohooks && !peer->audiohooks)
 
 /* We define a custom "local user" structure because we
@@ -533,7 +538,9 @@
 					ast_clear_flag(o, DIAL_STILLGOING);	
 					HANDLE_CAUSE(cause, in);
 				} else {
-					ast_rtp_make_compatible(c, in, single);
+					if (CAN_EARLY_BRIDGE(peerflags, c, in)) {
+						ast_rtp_make_compatible(c, in, single);
+					}
 					if (c->cid.cid_num)
 						free(c->cid.cid_num);
 					c->cid.cid_num = NULL;
@@ -654,8 +661,13 @@
 					/* Setup early media if appropriate */
 					if (single && CAN_EARLY_BRIDGE(peerflags, in, c))
 						ast_rtp_early_bridge(in, c);
-					if (!ast_test_flag(outgoing, OPT_RINGBACK))
-						ast_indicate(in, AST_CONTROL_PROGRESS);
+					if (!ast_test_flag(outgoing, OPT_RINGBACK)) {
+							if (single || (!single && !(*sentringing))) {
+							/* want progress to go through if it's a single legged call or it's a
+							 * branched call and ringing has not been sent */
+								ast_indicate(in, AST_CONTROL_PROGRESS);
+							}
+					}
 					break;
 				case AST_CONTROL_VIDUPDATE:
 					if (option_verbose > 2)
@@ -906,6 +918,7 @@
 	char privcid[256];
 	char *parse;
 	int opermode = 0;
+	int delprivintro = 0;
 	AST_DECLARE_APP_ARGS(args,
 			     AST_APP_ARG(peers);
 			     AST_APP_ARG(timeout);
@@ -946,6 +959,17 @@
 		ast_log(LOG_WARNING, "Dial requires an argument (technology/number)\n");
 		pbx_builtin_setvar_helper(chan, "DIALSTATUS", status);
 		goto done;
+	}
+
+	if (ast_test_flag(&opts, OPT_SCREEN_NOINTRO)) {
+		if (!ast_strlen_zero(opt_args[OPT_ARG_SCREEN_NOINTRO])) {
+			int mode = atoi(opt_args[OPT_ARG_SCREEN_NOINTRO]);
+			if (mode < 0 || mode > 1) {
+				ast_log(LOG_WARNING, "Unknown argument %d specified to n option, ignoring\n", mode);
+			} else {
+				delprivintro = mode;
+			}
+		}
 	}
 
 	if (ast_test_flag(&opts, OPT_OPERMODE)) {
@@ -1020,10 +1044,10 @@
 		warning_sound = S_OR(var, "timeleft");
 		
 		var = pbx_builtin_getvar_helper(chan,"LIMIT_TIMEOUT_FILE");
-		end_sound = S_OR(var, NULL);	/* XXX not much of a point in doing this! */
+		end_sound = S_OR(var, "");
 		
 		var = pbx_builtin_getvar_helper(chan,"LIMIT_CONNECT_FILE");
-		start_sound = S_OR(var, NULL);	/* XXX not much of a point in doing this! */
+		start_sound = S_OR(var, "");
 
 		/* undo effect of S(x) in case they are both used */
 		calldurationlimit = -1;
@@ -1152,11 +1176,7 @@
 										   conflicts by naming the privintro file */
 				if (res == -1) {
 					/* Delete the file regardless since they hung up during recording */
-                                        ast_filedelete(privintro, NULL);
-                                        if( ast_fileexists(privintro,NULL,NULL ) > 0 )
-                                                ast_log(LOG_NOTICE,"privacy: ast_filedelete didn't do its job on %s\n", privintro);
-                                        else if (option_verbose > 2)
-                                                ast_verbose( VERBOSE_PREFIX_3 "Successfully deleted %s intro file\n", privintro);
+					delprivintro = 1;
 					goto out;
 				}
                                 if( !ast_streamfile(chan, "vm-dialout", chan->language) )
@@ -1176,7 +1196,7 @@
 		outbound_group = pbx_builtin_getvar_helper(chan, "OUTBOUND_GROUP");
 	}
 	    
-	ast_copy_flags(peerflags, &opts, OPT_DTMF_EXIT | OPT_GO_ON | OPT_ORIGINAL_CLID | OPT_CALLER_HANGUP | OPT_IGNORE_FORWARDING);
+	ast_copy_flags(peerflags, &opts, OPT_DTMF_EXIT | OPT_GO_ON | OPT_ORIGINAL_CLID | OPT_CALLER_HANGUP | OPT_IGNORE_FORWARDING | OPT_ANNOUNCE | OPT_CALLEE_MACRO);
 
 	/* loop through the list of dial destinations */
 	rest = args.peers;
@@ -1224,6 +1244,7 @@
 			datastore->inheritance = DATASTORE_INHERIT_FOREVER;
 
 			if (!(dialed_interfaces = ast_calloc(1, sizeof(*dialed_interfaces)))) {
+				ast_channel_datastore_free(datastore);
 				free(tmp);
 				goto out;
 			}
@@ -1280,11 +1301,13 @@
 			continue;
 		}
 
-				pbx_builtin_setvar_helper(tmp->chan, "DIALEDPEERNUMBER", numsubst);
+		pbx_builtin_setvar_helper(tmp->chan, "DIALEDPEERNUMBER", numsubst);
 
 		/* Setup outgoing SDP to match incoming one */
-		ast_rtp_make_compatible(tmp->chan, chan, !outgoing && !rest);
-		
+		if (CAN_EARLY_BRIDGE(peerflags, chan, tmp->chan)) {
+			ast_rtp_make_compatible(tmp->chan, chan, !outgoing && !rest);
+		}
+
 		/* Inherit specially named variables from parent channel */
 		ast_channel_inherit_variables(chan, tmp->chan);
 		ast_channel_datastore_inherit(chan, tmp->chan);
@@ -1608,32 +1631,77 @@
 			/* if the intro is NOCALLERID, then there's no reason to leave it on disk, it'll 
 			   just clog things up, and it's not useful information, not being tied to a CID */
 			if( strncmp(privcid,"NOCALLERID",10) == 0 || ast_test_flag(&opts, OPT_SCREEN_NOINTRO) ) {
-				ast_filedelete(privintro, NULL);
-				if( ast_fileexists(privintro, NULL, NULL ) > 0 )
-					ast_log(LOG_NOTICE, "privacy: ast_filedelete didn't do its job on %s\n", privintro);
-				else if (option_verbose > 2)
-					ast_verbose(VERBOSE_PREFIX_3 "Successfully deleted %s intro file\n", privintro);
+				delprivintro = 1;
 			}
 		}
 		if (!ast_test_flag(&opts, OPT_ANNOUNCE) || ast_strlen_zero(opt_args[OPT_ARG_ANNOUNCE])) {
 			res = 0;
 		} else {
 			int digit = 0;
-			/* Start autoservice on the other chan */
-			res = ast_autoservice_start(chan);
-			/* Now Stream the File */
-			if (!res)
-				res = ast_streamfile(peer, opt_args[OPT_ARG_ANNOUNCE], peer->language);
-			if (!res) {
-				digit = ast_waitstream(peer, AST_DIGIT_ANY); 
-			}
-			/* Ok, done. stop autoservice */
-			res = ast_autoservice_stop(chan);
-			if (digit > 0 && !res)
-				res = ast_senddigit(chan, digit); 
-			else
-				res = digit;
-
+			struct ast_channel *chans[2];
+			struct ast_channel *active_chan;
+
+			chans[0] = chan;
+			chans[1] = peer;
+
+			/* we need to stream the announcment while monitoring the caller for a hangup */
+
+			/* stream the file */
+			res = ast_streamfile(peer, opt_args[OPT_ARG_ANNOUNCE], peer->language);
+			if (res) {
+				res = 0;
+				ast_log(LOG_ERROR, "error streaming file '%s' to callee\n", opt_args[OPT_ARG_ANNOUNCE]);
+			}
+
+			ast_set_flag(peer, AST_FLAG_END_DTMF_ONLY);
+			while (peer->stream) {
+				int ms;
+
+				ms = ast_sched_wait(peer->sched);
+
+				if (ms < 0 && !peer->timingfunc) {
+					ast_stopstream(peer);
+					break;
+				}
+				if (ms < 0)
+					ms = 1000;
+
+				active_chan = ast_waitfor_n(chans, 2, &ms);
+				if (active_chan) {
+					struct ast_frame *fr = ast_read(active_chan);
+					if (!fr) {
+						ast_hangup(peer);
+						res = -1;
+						goto done;
+					}
+					switch(fr->frametype) {
+						case AST_FRAME_DTMF_END:
+							digit = fr->subclass;
+							if (active_chan == peer && strchr(AST_DIGIT_ANY, res)) {
+								ast_stopstream(peer);
+								res = ast_senddigit(chan, digit);
+							}
+							break;
+						case AST_FRAME_CONTROL:
+							switch (fr->subclass) {
+								case AST_CONTROL_HANGUP:
+									ast_frfree(fr);
+									ast_hangup(peer);
+									res = -1;
+									goto done;
+								default:
+									break;
+							}
+							break;
+						default:
+							/* Ignore all others */
+							break;
+					}
+					ast_frfree(fr);
+				}
+				ast_sched_runq(peer->sched);
+			}
+			ast_clear_flag(peer, AST_FLAG_END_DTMF_ONLY);
 		}
 
 		if (chan && peer && ast_test_flag(&opts, OPT_GOTO) && !ast_strlen_zero(opt_args[OPT_ARG_GOTO])) {
@@ -1674,7 +1742,6 @@
 			}
 
 			if (ast_autoservice_stop(chan) < 0) {
-				ast_log(LOG_ERROR, "Could not stop autoservice on calling channel\n");
 				res = -1;
 			}
 
@@ -1818,6 +1885,15 @@
 		sentringing = 0;
 		ast_indicate(chan, -1);
 	}
+	if (delprivintro) {
+		ast_filedelete(privintro, NULL);
+		if(ast_fileexists(privintro, NULL, NULL) > 0) {
+			ast_log(LOG_NOTICE,"privacy: ast_filedelete didn't do its job on %s\n", privintro);
+		} else if (option_verbose > 2) {
+			ast_verbose(VERBOSE_PREFIX_3 "Successfully deleted %s intro file\n", privintro);
+		}
+	}
+
 	ast_rtp_early_bridge(chan, NULL);
 	hanguptree(outgoing, NULL);
 	pbx_builtin_setvar_helper(chan, "DIALSTATUS", status);

Modified: team/moy/mfcr2-1.4/apps/app_directed_pickup.c
URL: http://svnview.digium.com/svn/asterisk/team/moy/mfcr2-1.4/apps/app_directed_pickup.c?view=diff&rev=236351&r1=236350&r2=236351
==============================================================================
--- team/moy/mfcr2-1.4/apps/app_directed_pickup.c (original)
+++ team/moy/mfcr2-1.4/apps/app_directed_pickup.c Wed Dec 23 14:24:57 2009
@@ -98,7 +98,7 @@
 	while ((target = ast_channel_walk_locked(target))) {
 		if ((!strcasecmp(target->macroexten, exten) || !strcasecmp(target->exten, exten)) &&
 		    !strcasecmp(target->dialcontext, context) &&
-		    can_pickup(target)) {
+		    (chan != target) && can_pickup(target)) {
 			res = pickup_do(chan, target);

[... 16237 lines stripped ...]



More information about the asterisk-commits mailing list