[svn-commits] oej: branch oej/cancel_elsewhere_1.4 r164598 - in /team/oej/cancel_elsewhere_...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Dec 16 03:40:41 CST 2008


Author: oej
Date: Tue Dec 16 03:40:31 2008
New Revision: 164598

URL: http://svn.digium.com/view/asterisk?view=rev&rev=164598
Log:
Resolving conflict, resetting automerge

Added:
    team/oej/cancel_elsewhere_1.4/channels/busy_tone.h
      - copied unchanged from r164350, branches/1.4/channels/busy_tone.h
    team/oej/cancel_elsewhere_1.4/channels/ring_tone.h
      - copied unchanged from r164350, branches/1.4/channels/ring_tone.h
Modified:
    team/oej/cancel_elsewhere_1.4/   (props changed)
    team/oej/cancel_elsewhere_1.4/.cleancount
    team/oej/cancel_elsewhere_1.4/Makefile
    team/oej/cancel_elsewhere_1.4/Makefile.moddir_rules
    team/oej/cancel_elsewhere_1.4/Makefile.rules
    team/oej/cancel_elsewhere_1.4/agi/Makefile
    team/oej/cancel_elsewhere_1.4/agi/eagi-sphinx-test.c
    team/oej/cancel_elsewhere_1.4/agi/eagi-test.c
    team/oej/cancel_elsewhere_1.4/apps/app_adsiprog.c
    team/oej/cancel_elsewhere_1.4/apps/app_authenticate.c
    team/oej/cancel_elsewhere_1.4/apps/app_chanspy.c
    team/oej/cancel_elsewhere_1.4/apps/app_dial.c
    team/oej/cancel_elsewhere_1.4/apps/app_directed_pickup.c
    team/oej/cancel_elsewhere_1.4/apps/app_disa.c
    team/oej/cancel_elsewhere_1.4/apps/app_festival.c
    team/oej/cancel_elsewhere_1.4/apps/app_followme.c
    team/oej/cancel_elsewhere_1.4/apps/app_meetme.c
    team/oej/cancel_elsewhere_1.4/apps/app_queue.c
    team/oej/cancel_elsewhere_1.4/apps/app_rpt.c
    team/oej/cancel_elsewhere_1.4/apps/app_sms.c
    team/oej/cancel_elsewhere_1.4/apps/app_voicemail.c
    team/oej/cancel_elsewhere_1.4/apps/app_while.c
    team/oej/cancel_elsewhere_1.4/bootstrap.sh
    team/oej/cancel_elsewhere_1.4/channels/   (props changed)
    team/oej/cancel_elsewhere_1.4/channels/Makefile
    team/oej/cancel_elsewhere_1.4/channels/chan_agent.c
    team/oej/cancel_elsewhere_1.4/channels/chan_alsa.c
    team/oej/cancel_elsewhere_1.4/channels/chan_dahdi.c
    team/oej/cancel_elsewhere_1.4/channels/chan_h323.c
    team/oej/cancel_elsewhere_1.4/channels/chan_iax2.c
    team/oej/cancel_elsewhere_1.4/channels/chan_local.c
    team/oej/cancel_elsewhere_1.4/channels/chan_misdn.c
    team/oej/cancel_elsewhere_1.4/channels/chan_oss.c
    team/oej/cancel_elsewhere_1.4/channels/chan_phone.c
    team/oej/cancel_elsewhere_1.4/channels/chan_sip.c
    team/oej/cancel_elsewhere_1.4/channels/chan_skinny.c
    team/oej/cancel_elsewhere_1.4/channels/chan_vpb.cc
    team/oej/cancel_elsewhere_1.4/channels/misdn/   (props changed)
    team/oej/cancel_elsewhere_1.4/channels/misdn/Makefile
    team/oej/cancel_elsewhere_1.4/codecs/gsm/Makefile
    team/oej/cancel_elsewhere_1.4/codecs/gsm/src/   (props changed)
    team/oej/cancel_elsewhere_1.4/configs/features.conf.sample
    team/oej/cancel_elsewhere_1.4/configs/voicemail.conf.sample
    team/oej/cancel_elsewhere_1.4/configure
    team/oej/cancel_elsewhere_1.4/configure.ac
    team/oej/cancel_elsewhere_1.4/contrib/asterisk-ng-doxygen
    team/oej/cancel_elsewhere_1.4/doc/misdn.txt
    team/oej/cancel_elsewhere_1.4/doc/valgrind.txt
    team/oej/cancel_elsewhere_1.4/formats/format_gsm.c
    team/oej/cancel_elsewhere_1.4/formats/format_ogg_vorbis.c
    team/oej/cancel_elsewhere_1.4/formats/format_wav.c
    team/oej/cancel_elsewhere_1.4/formats/format_wav_gsm.c
    team/oej/cancel_elsewhere_1.4/funcs/func_callerid.c
    team/oej/cancel_elsewhere_1.4/funcs/func_channel.c
    team/oej/cancel_elsewhere_1.4/funcs/func_cut.c
    team/oej/cancel_elsewhere_1.4/funcs/func_enum.c
    team/oej/cancel_elsewhere_1.4/funcs/func_odbc.c
    team/oej/cancel_elsewhere_1.4/funcs/func_strings.c
    team/oej/cancel_elsewhere_1.4/include/asterisk/ael_structs.h
    team/oej/cancel_elsewhere_1.4/include/asterisk/astmm.h
    team/oej/cancel_elsewhere_1.4/include/asterisk/astobj2.h
    team/oej/cancel_elsewhere_1.4/include/asterisk/autoconfig.h.in
    team/oej/cancel_elsewhere_1.4/include/asterisk/channel.h
    team/oej/cancel_elsewhere_1.4/include/asterisk/cli.h
    team/oej/cancel_elsewhere_1.4/include/asterisk/dahdi_compat.h
    team/oej/cancel_elsewhere_1.4/include/asterisk/devicestate.h
    team/oej/cancel_elsewhere_1.4/include/asterisk/dundi.h
    team/oej/cancel_elsewhere_1.4/include/asterisk/features.h
    team/oej/cancel_elsewhere_1.4/include/asterisk/file.h
    team/oej/cancel_elsewhere_1.4/include/asterisk/frame.h
    team/oej/cancel_elsewhere_1.4/include/asterisk/linkedlists.h
    team/oej/cancel_elsewhere_1.4/include/asterisk/lock.h
    team/oej/cancel_elsewhere_1.4/include/asterisk/logger.h
    team/oej/cancel_elsewhere_1.4/include/asterisk/manager.h
    team/oej/cancel_elsewhere_1.4/include/asterisk/module.h
    team/oej/cancel_elsewhere_1.4/include/asterisk/pbx.h
    team/oej/cancel_elsewhere_1.4/include/asterisk/res_odbc.h
    team/oej/cancel_elsewhere_1.4/include/asterisk/stringfields.h
    team/oej/cancel_elsewhere_1.4/include/asterisk/strings.h
    team/oej/cancel_elsewhere_1.4/include/asterisk/threadstorage.h
    team/oej/cancel_elsewhere_1.4/include/asterisk/utils.h
    team/oej/cancel_elsewhere_1.4/include/jitterbuf.h
    team/oej/cancel_elsewhere_1.4/main/app.c
    team/oej/cancel_elsewhere_1.4/main/ast_expr2.c
    team/oej/cancel_elsewhere_1.4/main/ast_expr2f.c
    team/oej/cancel_elsewhere_1.4/main/asterisk.c
    team/oej/cancel_elsewhere_1.4/main/astobj2.c
    team/oej/cancel_elsewhere_1.4/main/autoservice.c
    team/oej/cancel_elsewhere_1.4/main/callerid.c
    team/oej/cancel_elsewhere_1.4/main/cdr.c
    team/oej/cancel_elsewhere_1.4/main/channel.c
    team/oej/cancel_elsewhere_1.4/main/cli.c
    team/oej/cancel_elsewhere_1.4/main/db1-ast/Makefile
    team/oej/cancel_elsewhere_1.4/main/db1-ast/btree/   (props changed)
    team/oej/cancel_elsewhere_1.4/main/db1-ast/db/   (props changed)
    team/oej/cancel_elsewhere_1.4/main/db1-ast/hash/   (props changed)
    team/oej/cancel_elsewhere_1.4/main/db1-ast/hash/hash_page.c
    team/oej/cancel_elsewhere_1.4/main/db1-ast/mpool/   (props changed)
    team/oej/cancel_elsewhere_1.4/main/db1-ast/recno/   (props changed)
    team/oej/cancel_elsewhere_1.4/main/dns.c
    team/oej/cancel_elsewhere_1.4/main/editline/read.c
    team/oej/cancel_elsewhere_1.4/main/enum.c
    team/oej/cancel_elsewhere_1.4/main/file.c
    team/oej/cancel_elsewhere_1.4/main/frame.c
    team/oej/cancel_elsewhere_1.4/main/http.c
    team/oej/cancel_elsewhere_1.4/main/jitterbuf.c
    team/oej/cancel_elsewhere_1.4/main/logger.c
    team/oej/cancel_elsewhere_1.4/main/manager.c
    team/oej/cancel_elsewhere_1.4/main/pbx.c
    team/oej/cancel_elsewhere_1.4/main/rtp.c
    team/oej/cancel_elsewhere_1.4/main/srv.c
    team/oej/cancel_elsewhere_1.4/main/stdtime/   (props changed)
    team/oej/cancel_elsewhere_1.4/main/stdtime/Makefile
    team/oej/cancel_elsewhere_1.4/main/translate.c
    team/oej/cancel_elsewhere_1.4/main/utils.c
    team/oej/cancel_elsewhere_1.4/makeopts.in
    team/oej/cancel_elsewhere_1.4/pbx/Makefile
    team/oej/cancel_elsewhere_1.4/pbx/ael/   (props changed)
    team/oej/cancel_elsewhere_1.4/pbx/ael/ael.flex
    team/oej/cancel_elsewhere_1.4/pbx/ael/ael.tab.c
    team/oej/cancel_elsewhere_1.4/pbx/ael/ael.tab.h
    team/oej/cancel_elsewhere_1.4/pbx/ael/ael.y
    team/oej/cancel_elsewhere_1.4/pbx/ael/ael_lex.c
    team/oej/cancel_elsewhere_1.4/pbx/pbx_ael.c
    team/oej/cancel_elsewhere_1.4/pbx/pbx_config.c
    team/oej/cancel_elsewhere_1.4/pbx/pbx_dundi.c
    team/oej/cancel_elsewhere_1.4/pbx/pbx_spool.c
    team/oej/cancel_elsewhere_1.4/res/Makefile
    team/oej/cancel_elsewhere_1.4/res/res_agi.c
    team/oej/cancel_elsewhere_1.4/res/res_crypto.c
    team/oej/cancel_elsewhere_1.4/res/res_features.c
    team/oej/cancel_elsewhere_1.4/res/res_indications.c
    team/oej/cancel_elsewhere_1.4/res/res_jabber.c
    team/oej/cancel_elsewhere_1.4/res/res_musiconhold.c
    team/oej/cancel_elsewhere_1.4/res/snmp/   (props changed)
    team/oej/cancel_elsewhere_1.4/utils/Makefile
    team/oej/cancel_elsewhere_1.4/utils/astman.c
    team/oej/cancel_elsewhere_1.4/utils/check_expr.c
    team/oej/cancel_elsewhere_1.4/utils/frame.c
    team/oej/cancel_elsewhere_1.4/utils/muted.c
    team/oej/cancel_elsewhere_1.4/utils/smsq.c
    team/oej/cancel_elsewhere_1.4/utils/stereorize.c
    team/oej/cancel_elsewhere_1.4/utils/streamplayer.c

Propchange: team/oej/cancel_elsewhere_1.4/
------------------------------------------------------------------------------
    automerge = http://www.codename-pineapple.org/

Propchange: team/oej/cancel_elsewhere_1.4/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Propchange: team/oej/cancel_elsewhere_1.4/
------------------------------------------------------------------------------
--- reviewboard:url (added)
+++ reviewboard:url Tue Dec 16 03:40:31 2008
@@ -1,0 +1,1 @@
+http://reviewboard.digium.com

Propchange: team/oej/cancel_elsewhere_1.4/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Dec 16 03:40:31 2008
@@ -1,1 +1,1 @@
-/branches/1.4:1-152485
+/branches/1.4:1-164411

Modified: team/oej/cancel_elsewhere_1.4/.cleancount
URL: http://svn.digium.com/view/asterisk/team/oej/cancel_elsewhere_1.4/.cleancount?view=diff&rev=164598&r1=164597&r2=164598
==============================================================================
--- team/oej/cancel_elsewhere_1.4/.cleancount (original)
+++ team/oej/cancel_elsewhere_1.4/.cleancount Tue Dec 16 03:40:31 2008
@@ -1,1 +1,1 @@
-32
+33

Modified: team/oej/cancel_elsewhere_1.4/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/cancel_elsewhere_1.4/Makefile?view=diff&rev=164598&r1=164597&r2=164598
==============================================================================
--- team/oej/cancel_elsewhere_1.4/Makefile (original)
+++ team/oej/cancel_elsewhere_1.4/Makefile Tue Dec 16 03:40:31 2008
@@ -204,7 +204,14 @@
 ASTCFLAGS+=-Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG)
 
 ifeq ($(AST_DEVMODE),yes)
-  ASTCFLAGS+=-Werror  -Wunused $(AST_DECLARATION_AFTER_STATEMENT)
+  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)),)
@@ -373,7 +380,9 @@
 $(SUBDIRS_DIST_CLEAN):
 	@$(MAKE) --no-print-directory -C $(@:-dist-clean=) dist-clean
 
-clean: $(SUBDIRS_CLEAN)
+clean: $(SUBDIRS_CLEAN) _clean
+
+_clean:
 	rm -f defaults.h
 	rm -f include/asterisk/build.h
 	rm -f include/asterisk/version.h
@@ -382,7 +391,7 @@
 
 dist-clean: distclean
 
-distclean: $(SUBDIRS_DIST_CLEAN) clean
+distclean: $(SUBDIRS_DIST_CLEAN) _clean
 	@$(MAKE) -C menuselect dist-clean
 	@$(MAKE) -C sounds dist-clean
 	rm -f menuselect.makeopts makeopts menuselect-tree menuselect.makedeps
@@ -758,6 +767,6 @@
 	@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
+.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
 
 FORCE:

Modified: team/oej/cancel_elsewhere_1.4/Makefile.moddir_rules
URL: http://svn.digium.com/view/asterisk/team/oej/cancel_elsewhere_1.4/Makefile.moddir_rules?view=diff&rev=164598&r1=164597&r2=164598
==============================================================================
--- team/oej/cancel_elsewhere_1.4/Makefile.moddir_rules (original)
+++ team/oej/cancel_elsewhere_1.4/Makefile.moddir_rules Tue Dec 16 03:40:31 2008
@@ -64,8 +64,8 @@
 	@for file in $(patsubst %,$(SUBDIR)/%,$(filter-out %.o,$^)); do echo "INPUT (../$${file})" >> $@; done
 
 clean::
-	rm -f *.so *.o *.oo *.s *.i
-	rm -f .*.o.d .*.oo.d
+	rm -f *.so *.o *.oo *.s *.i *.ii
+	rm -f .*.d
 	rm -f modules.link
 
 install:: all

Modified: team/oej/cancel_elsewhere_1.4/Makefile.rules
URL: http://svn.digium.com/view/asterisk/team/oej/cancel_elsewhere_1.4/Makefile.rules?view=diff&rev=164598&r1=164597&r2=164598
==============================================================================
--- team/oej/cancel_elsewhere_1.4/Makefile.rules (original)
+++ team/oej/cancel_elsewhere_1.4/Makefile.rules Tue Dec 16 03:40:31 2008
@@ -3,7 +3,7 @@
 # 
 # Makefile rules
 #
-# Copyright (C) 2006, Digium, Inc.
+# Copyright (C) 2006-2008, Digium, Inc.
 #
 # Kevin P. Fleming <kpfleming at digium.com>
 #
@@ -19,44 +19,92 @@
 
 .PHONY: dist-clean
 
+# If 'make' decides to create intermediate files to satisfy a build requirement
+# (like producing a .i from a .c), we want to keep them, so tell make to keep
+# all intermediate files
+.SECONDARY:
+
+# extra cflags to build dependencies. Recursively expanded.
+MAKE_DEPS=-MD -MT $@ -MF .$(subst /,_,$@).d -MP
+
 ifeq ($(NOISY_BUILD),)
-   ECHO_PREFIX=@
-   CMD_PREFIX=@
+    ECHO_PREFIX=@
+    CMD_PREFIX=@
 else
-   ECHO_PREFIX=@\# 
-   CMD_PREFIX=
+    ECHO_PREFIX=@\# 
+    CMD_PREFIX=
 endif
 
+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
+    # 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
 
-OPTIMIZE?=-O6
-ASTCFLAGS+=$(OPTIMIZE)
+    ASTCFLAGS+=$(OPTIMIZE)
 endif
 
-%.o: %.c
-	$(ECHO_PREFIX) echo "   [CC] $< -> $@"
-	$(CMD_PREFIX) $(CC) -o $@ -c $< $(PTHREAD_CFLAGS) $(ASTCFLAGS) -MD -MT $@ -MF .$(subst /,_,$@).d -MP
+# 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_LDFLAGS_SO=$(PTHREAD_CFLAGS) $(ASTLDFLAGS) $(SOLINK)
+CXX_LDFLAGS_SO=$(PTHREAD_CFLAGS) $(ASTLDFLAGS) $(SOLINK)
+CC_LIBS=$(PTHREAD_LIBS) $(LIBS)
+CXX_LIBS=$(PTHREAD_LIBS) $(LIBS)
+
+# determine whether to double-compile so that the optimizer can report code path problems
+# this is only done when developer mode and DONT_OPTIMIZE are both enabled
+# in that case, we run the preprocessor to produce a .i or .ii file from the source
+# code, then compile once with optimizer enabled (and the output to /dev/null),
+# and if that doesn't fail then compile again with optimizer disabled
+ifeq ($(findstring DONT_OPTIMIZE,$(MENUSELECT_CFLAGS))$(AST_DEVMODE),DONT_OPTIMIZEyes)
+COMPILE_DOUBLE=yes
+endif
+
+%.o: %.s
+	$(ECHO_PREFIX) echo "   [AS] $< -> $@"
+ifeq ($(COMPILE_DOUBLE),yes)
+	$(CMD_PREFIX) $(CC) -o /dev/null -c $< $(CC_CFLAGS) $(OPTIMIZE)
+endif
+	$(CMD_PREFIX) $(CC) -o $@ -c $< $(CC_CFLAGS)
 
 %.o: %.i
 	$(ECHO_PREFIX) echo "   [CCi] $< -> $@"
-	$(CMD_PREFIX) $(CC) -o $@ -c $< $(PTHREAD_CFLAGS) $(ASTCFLAGS) -MD -MT $@ -MF .$(subst /,_,$@).d -MP
+ifeq ($(COMPILE_DOUBLE),yes)
+	$(CMD_PREFIX) $(CC) -o /dev/null -c $< $(CC_CFLAGS) $(OPTIMIZE)
+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)
+endif
 
 %.i: %.c
 	$(ECHO_PREFIX) echo "   [CPP] $< -> $@"
-	$(CMD_PREFIX) $(CC) -o $@ -E $< $(PTHREAD_CFLAGS) $(ASTCFLAGS) -MD -MT $@ -MF .$(subst /,_,$@).d -MP
+	$(CMD_PREFIX) $(CC) -o $@ -E $< $(CC_CFLAGS) $(MAKE_DEPS)
 
-%.o: %.s
-	$(ECHO_PREFIX) echo "   [AS] $< -> $@"
-	$(CMD_PREFIX) $(CC) -o $@ -c $< $(PTHREAD_CFLAGS) $(ASTCFLAGS) -MD -MT $@ -MF .$(subst /,_,$@).d -MP
+%.oo: %.ii
+	$(ECHO_PREFIX) echo "   [CXXi] $< -> $@"
+ifeq ($(COMPILE_DOUBLE),yes)
+	$(CMD_PREFIX) $(CXX) -o /dev/null -c $< $(CXX_CFLAGS) $(OPTIMIZE)
+endif
+	$(CMD_PREFIX) $(CXX) -o $@ -c $< $(CXX_CFLAGS)
 
+ifneq ($(COMPILE_DOUBLE),yes)
 %.oo: %.cc
 	$(ECHO_PREFIX) echo "   [CXX] $< -> $@"
-	$(CMD_PREFIX) $(CXX) -o $@ -c $< $(PTHREAD_CFLAGS) $(filter-out -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(AST_DECLARATION_AFTER_STATEMENT),$(ASTCFLAGS)) -MD -MT $@ -MF .$(subst /,_,$@).d -MP
+	$(CMD_PREFIX) $(CXX) -o $@ -c $< $(CXX_CFLAGS) $(MAKE_DEPS)
+endif
+
+%.ii: %.cc
+	$(ECHO_PREFIX) echo "   [CPP] $< -> $@"
+	$(CMD_PREFIX) $(CXX) -o $@ -E $< $(CXX_CFLAGS) $(MAKE_DEPS)
 
 %.c: %.y
 	$(ECHO_PREFIX) echo "   [BISON] $< -> $@"
@@ -68,14 +116,14 @@
 
 %.so: %.o
 	$(ECHO_PREFIX) echo "   [LD] $^ -> $@"
-	$(CMD_PREFIX) $(CC) $(STATIC_BUILD) -o $@ $(PTHREAD_CFLAGS) $(ASTLDFLAGS) $(SOLINK) $^ $(PTHREAD_LIBS) $(LIBS)
+	$(CMD_PREFIX) $(CC) $(STATIC_BUILD) -o $@ $(CC_LDFLAGS_SO) $^ $(CC_LIBS)
 
 %.so: %.oo
 	$(ECHO_PREFIX) echo "   [LDXX] $^ -> $@"
-	$(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(PTHREAD_CFLAGS) $(ASTLDFLAGS) $(SOLINK) $^ $(PTHREAD_LIBS) $(LIBS)
+	$(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(CXX_LDFLAGS_SO) $^ $(CXX_LIBS)
 
 %: %.o
 	$(ECHO_PREFIX) echo "   [LD] $^ -> $@"
-	$(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(PTHREAD_CFLAGS) $(ASTLDFLAGS) $^ $(PTHREAD_LIBS) $(LIBS)
+	$(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(PTHREAD_CFLAGS) $(ASTLDFLAGS) $^ $(CXX_LIBS)
 
-dist-clean::
+dist-clean:: clean

Modified: team/oej/cancel_elsewhere_1.4/agi/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/cancel_elsewhere_1.4/agi/Makefile?view=diff&rev=164598&r1=164597&r2=164598
==============================================================================
--- team/oej/cancel_elsewhere_1.4/agi/Makefile (original)
+++ team/oej/cancel_elsewhere_1.4/agi/Makefile Tue Dec 16 03:40:31 2008
@@ -39,7 +39,7 @@
 
 clean:
 	rm -f *.so *.o look eagi-test eagi-sphinx-test
-	rm -f .*.o.d .*.oo.d *.s *.i
+	rm -f .*.d *.s *.i
 	rm -f strcompat.c
 
 ifneq ($(wildcard .*.d),)

Modified: team/oej/cancel_elsewhere_1.4/agi/eagi-sphinx-test.c
URL: http://svn.digium.com/view/asterisk/team/oej/cancel_elsewhere_1.4/agi/eagi-sphinx-test.c?view=diff&rev=164598&r1=164597&r2=164598
==============================================================================
--- team/oej/cancel_elsewhere_1.4/agi/eagi-sphinx-test.c (original)
+++ team/oej/cancel_elsewhere_1.4/agi/eagi-sphinx-test.c Tue Dec 16 03:40:31 2008
@@ -70,7 +70,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';
@@ -121,7 +123,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;
@@ -132,9 +136,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/oej/cancel_elsewhere_1.4/agi/eagi-test.c
URL: http://svn.digium.com/view/asterisk/team/oej/cancel_elsewhere_1.4/agi/eagi-test.c?view=diff&rev=164598&r1=164597&r2=164598
==============================================================================
--- team/oej/cancel_elsewhere_1.4/agi/eagi-test.c (original)
+++ team/oej/cancel_elsewhere_1.4/agi/eagi-test.c Tue Dec 16 03:40:31 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/oej/cancel_elsewhere_1.4/apps/app_adsiprog.c
URL: http://svn.digium.com/view/asterisk/team/oej/cancel_elsewhere_1.4/apps/app_adsiprog.c?view=diff&rev=164598&r1=164597&r2=164598
==============================================================================
--- team/oej/cancel_elsewhere_1.4/apps/app_adsiprog.c (original)
+++ team/oej/cancel_elsewhere_1.4/apps/app_adsiprog.c Tue Dec 16 03:40:31 2008
@@ -1364,7 +1364,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 */

Modified: team/oej/cancel_elsewhere_1.4/apps/app_authenticate.c
URL: http://svn.digium.com/view/asterisk/team/oej/cancel_elsewhere_1.4/apps/app_authenticate.c?view=diff&rev=164598&r1=164597&r2=164598
==============================================================================
--- team/oej/cancel_elsewhere_1.4/apps/app_authenticate.c (original)
+++ team/oej/cancel_elsewhere_1.4/apps/app_authenticate.c Tue Dec 16 03:40:31 2008
@@ -167,7 +167,9 @@
 					char *md5secret = NULL;
 
 					while (!feof(f)) {
-						fgets(buf, sizeof(buf), f);
+						if (!fgets(buf, sizeof(buf), f)) {
+							continue;
+						}
 						if (!ast_strlen_zero(buf)) {
 							size_t len = strlen(buf);
 							if (buf[len - 1] == '\n')

Modified: team/oej/cancel_elsewhere_1.4/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/team/oej/cancel_elsewhere_1.4/apps/app_chanspy.c?view=diff&rev=164598&r1=164597&r2=164598
==============================================================================
--- team/oej/cancel_elsewhere_1.4/apps/app_chanspy.c (original)
+++ team/oej/cancel_elsewhere_1.4/apps/app_chanspy.c Tue Dec 16 03:40:31 2008
@@ -38,6 +38,7 @@
 #include <string.h>
 #include <unistd.h>
 #include <ctype.h>
+#include <errno.h>
 
 #include "asterisk/file.h"
 #include "asterisk/logger.h"
@@ -190,8 +191,11 @@
 		return -1;
 	}
 
-	if (csth->fd)
-		write(csth->fd, f->data, f->datalen);
+	if (csth->fd) {
+		if (write(csth->fd, f->data, f->datalen) < 0) {
+			ast_log(LOG_WARNING, "write() failed: %s\n", strerror(errno));
+		}
+	}
 
 	ast_frfree(f);
 

Modified: team/oej/cancel_elsewhere_1.4/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/oej/cancel_elsewhere_1.4/apps/app_dial.c?view=diff&rev=164598&r1=164597&r2=164598
==============================================================================
--- team/oej/cancel_elsewhere_1.4/apps/app_dial.c (original)
+++ team/oej/cancel_elsewhere_1.4/apps/app_dial.c Tue Dec 16 03:40:31 2008
@@ -128,15 +128,19 @@
 "           Optionally, an extension, or extension and context may be specified. \n"
 "           Otherwise, the current extension is used. You cannot use any additional\n"
 "           action post answer options in conjunction with this option.\n" 
-"    h    - Allow the called party to hang up by sending the '*' DTMF digit.\n"
-"    H    - Allow the calling party to hang up by hitting the '*' DTMF digit.\n"
+"    h    - Allow the called party to hang up by sending the '*' DTMF digit, or\n"
+"           whatever sequence was defined in the featuremap section for\n"
+"           'disconnect' in features.conf\n"
+"    H    - Allow the calling party to hang up by hitting the '*' DTMF digit, or\n"
+"           whatever sequence was defined in the featuremap section for\n"
+"           'disconnect' in features.conf\n"
 "    i    - Asterisk will ignore any forwarding requests it may receive on this\n"
 "           dial attempt.\n"
 "    j    - Jump to priority n+101 if all of the requested channels were busy.\n"
 "    k    - Allow the called party to enable parking of the call by sending\n"
-"           the DTMF sequence defined for call parking in features.conf.\n"
+"           the DTMF sequence defined for call parking in the featuremap section of features.conf.\n"
 "    K    - Allow the calling party to enable parking of the call by sending\n"
-"           the DTMF sequence defined for call parking in features.conf.\n"
+"           the DTMF sequence defined for call parking in the featuremap section of features.conf.\n"
 "    L(x[:y][:z]) - Limit the call to 'x' ms. Play a warning when 'y' ms are\n"
 "           left. Repeat the warning every 'z' ms. The following special\n"
 "           variables can be used with this option:\n"
@@ -197,13 +201,17 @@
 "    S(x) - Hang up the call after 'x' seconds *after* the called party has\n"
 "           answered the call.\n"  	
 "    t    - Allow the called party to transfer the calling party by sending the\n"
-"           DTMF sequence defined in features.conf.\n"
+"           DTMF sequence defined in the blindxfer setting in the featuremap section\n"
+"           of features.conf.\n"
 "    T    - Allow the calling party to transfer the called party by sending the\n"
-"           DTMF sequence defined in features.conf.\n"
+"           DTMF sequence defined in the blindxfer setting in the featuremap section\n"
+"           of features.conf.\n"
 "    w    - Allow the called party to enable recording of the call by sending\n"
-"           the DTMF sequence defined for one-touch recording in features.conf.\n"
+"           the DTMF sequence defined in the automon setting in the featuremap section\n"
+"           of features.conf.\n"
 "    W    - Allow the calling party to enable recording of the call by sending\n"
-"           the DTMF sequence defined for one-touch recording in features.conf.\n";
+"           the DTMF sequence defined in the automon setting in the featuremap section\n"
+"           of features.conf.\n";
 
 /* RetryDial App by Anthony Minessale II <anthmct at yahoo.com> Jan/2005 */
 static char *rapp = "RetryDial";
@@ -831,6 +839,35 @@
 		ast_set_flag(&(features->features_caller), AST_FEATURE_PARKCALL);
 }
 
+static void end_bridge_callback (void *data)
+{
+	char buf[80];
+	time_t end;
+	struct ast_channel *chan = data;
+
+	if (!chan->cdr) {
+		return;
+	}
+
+	time(&end);
+
+	ast_channel_lock(chan);
+	if (chan->cdr->answer.tv_sec) {
+		snprintf(buf, sizeof(buf), "%ld", end - chan->cdr->answer.tv_sec);
+		pbx_builtin_setvar_helper(chan, "ANSWEREDTIME", buf);
+	}
+
+	if (chan->cdr->start.tv_sec) {
+		snprintf(buf, sizeof(buf), "%ld", end - chan->cdr->start.tv_sec);
+		pbx_builtin_setvar_helper(chan, "DIALEDTIME", buf);
+	}
+	ast_channel_unlock(chan);
+}
+
+static void end_bridge_callback_data_fixup(struct ast_bridge_config *bconfig, struct ast_channel *originator, struct ast_channel *terminator) {
+	bconfig->end_bridge_callback_data = originator;
+}
+
 static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags *peerflags, int *continue_exec)
 {
 	int res = -1;
@@ -846,7 +883,7 @@
 	char numsubst[256];
 	char cidname[AST_MAX_EXTENSION] = "";
 	int privdb_val = 0;
-	unsigned int calldurationlimit = 0;
+	int calldurationlimit = -1;
 	long timelimit = 0;
 	long play_warning = 0;
 	long warning_freq = 0;
@@ -987,7 +1024,7 @@
 		start_sound = S_OR(var, NULL);	/* XXX not much of a point in doing this! */
 
 		/* undo effect of S(x) in case they are both used */
-		calldurationlimit = 0;
+		calldurationlimit = -1;
 		/* more efficient to do it like S(x) does since no advanced opts */
 		if (!play_warning && !start_sound && !end_sound && timelimit) {
 			calldurationlimit = timelimit / 1000;
@@ -1356,6 +1393,9 @@
 				ast_log(LOG_DEBUG, "ast call on peer returned %d\n", res);
 			if (option_verbose > 2)
 				ast_verbose(VERBOSE_PREFIX_3 "Couldn't call %s\n", numsubst);
+			if (tmp->chan->hangupcause) {
+				chan->hangupcause = tmp->chan->hangupcause;
+			}
 			ast_hangup(tmp->chan);
 			tmp->chan = NULL;
 			free(tmp);
@@ -1436,9 +1476,9 @@
 		/* almost done, although the 'else' block is 400 lines */
 	} else {
 		const char *number;
-		time_t end_time, answer_time = time(NULL);
 
 		strcpy(status, "ANSWER");
+		pbx_builtin_setvar_helper(chan, "DIALSTATUS", status);
 		/* Ah ha!  Someone answered within the desired timeframe.  Of course after this
 		   we will always return with -1 so that it is hung up properly after the 
 		   conversation.  */
@@ -1721,6 +1761,9 @@
 		if (!res) {
 			if (calldurationlimit > 0) {
 				peer->whentohangup = time(NULL) + calldurationlimit;
+			} else if (calldurationlimit != -1 && timelimit > 0) {
+				/* Not enough granularity to make it less, but we can't use the special value 0 */
+				peer->whentohangup = time(NULL) + 1;
 			}
 			if (!ast_strlen_zero(dtmfcalled)) { 
 				if (option_verbose > 2)
@@ -1733,7 +1776,7 @@
 				res = ast_dtmf_stream(chan,peer,dtmfcalling,250);
 			}
 		}
-		
+
 		if (!res) {
 			struct ast_bridge_config config;
 
@@ -1767,6 +1810,9 @@
 			config.warning_sound = warning_sound;
 			config.end_sound = end_sound;
 			config.start_sound = start_sound;
+			config.end_bridge_callback = end_bridge_callback;
+			config.end_bridge_callback_data = chan;
+			config.end_bridge_callback_data_fixup = end_bridge_callback_data_fixup;
 			if (moh) {
 				moh = 0;
 				ast_moh_stop(chan);
@@ -1797,46 +1843,39 @@
 					AST_OPTION_OPRMODE,&oprmode,sizeof(struct oprmode),0);
 			}
 			res = ast_bridge_call(chan,peer,&config);
-			time(&end_time);
-			{
-				char toast[80];
-				snprintf(toast, sizeof(toast), "%ld", (long)(end_time - answer_time));
-				pbx_builtin_setvar_helper(chan, "ANSWEREDTIME", toast);
-			}
 		} else {
-			time(&end_time);
 			res = -1;
 		}
-		{
-			char toast[80];
-			snprintf(toast, sizeof(toast), "%ld", (long)(end_time - start_time));
-			pbx_builtin_setvar_helper(chan, "DIALEDTIME", toast);
-		}
-		
-		if (res != AST_PBX_NO_HANGUP_PEER) {
-			if (!chan->_softhangup)
+
+		if (res != AST_PBX_NO_HANGUP_PEER && res != AST_PBX_NO_HANGUP_PEER_PARKED) {
+			if (res != AST_PBX_KEEPALIVE && !chan->_softhangup)
 				chan->hangupcause = peer->hangupcause;
 			ast_hangup(peer);
 		}
 	}	
 out:
-	if (moh) {
-		moh = 0;
-		ast_moh_stop(chan);
-	} else if (sentringing) {
-		sentringing = 0;
-		ast_indicate(chan, -1);
-	}
-	ast_rtp_early_bridge(chan, NULL);
-	hanguptree(outgoing, NULL, 0);
-	pbx_builtin_setvar_helper(chan, "DIALSTATUS", status);
-	if (option_debug)
-		ast_log(LOG_DEBUG, "Exiting with DIALSTATUS=%s.\n", status);
-	
-	if ((ast_test_flag(peerflags, OPT_GO_ON)) && (!chan->_softhangup) && (res != AST_PBX_KEEPALIVE)) {
-		if (calldurationlimit)
-			chan->whentohangup = 0;
-		res = 0;
+	/* cleaning up chan is not a good idea here if AST_PBX_KEEPALIVE
+	   is returned; chan will get the love it needs from another
+	   thread */
+	if (res != AST_PBX_KEEPALIVE) {
+		if (moh) {
+			moh = 0;
+			ast_moh_stop(chan);
+		} else if (sentringing) {
+			sentringing = 0;
+			ast_indicate(chan, -1);
+		}
+		ast_rtp_early_bridge(chan, NULL);
+		hanguptree(outgoing, NULL, 0);
+		pbx_builtin_setvar_helper(chan, "DIALSTATUS", status);
+		if (option_debug)
+			ast_log(LOG_DEBUG, "Exiting with DIALSTATUS=%s.\n", status);
+		
+		if ((ast_test_flag(peerflags, OPT_GO_ON)) && (!chan->_softhangup) && (res != AST_PBX_KEEPALIVE)) {
+			if (timelimit)
+				chan->whentohangup = 0;
+			res = 0;
+		}
 	}
 
 done:

Modified: team/oej/cancel_elsewhere_1.4/apps/app_directed_pickup.c
URL: http://svn.digium.com/view/asterisk/team/oej/cancel_elsewhere_1.4/apps/app_directed_pickup.c?view=diff&rev=164598&r1=164597&r2=164598
==============================================================================
--- team/oej/cancel_elsewhere_1.4/apps/app_directed_pickup.c (original)
+++ team/oej/cancel_elsewhere_1.4/apps/app_directed_pickup.c Tue Dec 16 03:40:31 2008
@@ -83,7 +83,7 @@
 /* Helper function that determines whether a channel is capable of being picked up */
 static int can_pickup(struct ast_channel *chan)
 {
-	if (!chan->pbx && (chan->_state == AST_STATE_RINGING || chan->_state == AST_STATE_RING))
+	if (!chan->pbx && (chan->_state == AST_STATE_RINGING || chan->_state == AST_STATE_RING || chan->_state == AST_STATE_DOWN))
 		return 1;
 	else
 		return 0;

Modified: team/oej/cancel_elsewhere_1.4/apps/app_disa.c
URL: http://svn.digium.com/view/asterisk/team/oej/cancel_elsewhere_1.4/apps/app_disa.c?view=diff&rev=164598&r1=164597&r2=164598
==============================================================================
--- team/oej/cancel_elsewhere_1.4/apps/app_disa.c (original)
+++ team/oej/cancel_elsewhere_1.4/apps/app_disa.c Tue Dec 16 03:40:31 2008
@@ -298,8 +298,14 @@
 					continue;
 				}
 			} else {
-				if (j == '#') { /* end of extension */
-					break;
+				if (j == '#') { /* end of extension .. maybe */
+					if (i == 0 && 
+							(ast_matchmore_extension(chan, args.context, "#", 1, chan->cid.cid_num) ||
+							 ast_exists_extension(chan, args.context, "#", 1, chan->cid.cid_num)) ) {
+						/* Let the # be the part of, or the entire extension */
+					} else {
+						break;
+					}
 				}
 			}
 

Modified: team/oej/cancel_elsewhere_1.4/apps/app_festival.c
URL: http://svn.digium.com/view/asterisk/team/oej/cancel_elsewhere_1.4/apps/app_festival.c?view=diff&rev=164598&r1=164597&r2=164598
==============================================================================
--- team/oej/cancel_elsewhere_1.4/apps/app_festival.c (original)
+++ team/oej/cancel_elsewhere_1.4/apps/app_festival.c Tue Dec 16 03:40:31 2008
@@ -45,6 +45,7 @@
 #include <unistd.h>
 #include <fcntl.h>
 #include <ctype.h>
+#include <errno.h>
 
 #include "asterisk/file.h"
 #include "asterisk/logger.h"
@@ -160,7 +161,9 @@
 	}
 #endif
 	
-	write(fd,waveform,length);
+	if (write(fd,waveform,length) < 0) {
+		ast_log(LOG_WARNING, "write() failed: %s\n", strerror(errno));
+	}
 	close(fd);
 	exit(0);
 }
@@ -431,17 +434,25 @@
     				writecache=1;
     				strln=strlen((char *)data);
     				ast_log(LOG_DEBUG,"line length : %d\n",strln);
-    				write(fdesc,&strln,sizeof(int));
-    				write(fdesc,data,strln);
+    				if (write(fdesc,&strln,sizeof(int)) < 0) {
+					ast_log(LOG_WARNING, "write() failed: %s\n", strerror(errno));
+				}
+    				if (write(fdesc,data,strln) < 0) {
+					ast_log(LOG_WARNING, "write() failed: %s\n", strerror(errno));
+				}
 				seekpos=lseek(fdesc,0,SEEK_CUR);
 				ast_log(LOG_DEBUG,"Seek position : %d\n",seekpos);
     			}
     		} else {
-    			read(fdesc,&strln,sizeof(int));
+    			if (read(fdesc,&strln,sizeof(int)) != sizeof(int)) {
+				ast_log(LOG_WARNING, "read() failed: %s\n", strerror(errno));
+			}
     			ast_log(LOG_DEBUG,"Cache file exists, strln=%d, strlen=%d\n",strln,(int)strlen((char *)data));
     			if (strlen((char *)data)==strln) {
     				ast_log(LOG_DEBUG,"Size OK\n");
-    				read(fdesc,&bigstring,strln);
+    				if (read(fdesc,&bigstring,strln) != strln) {
+					ast_log(LOG_WARNING, "read() failed: %s\n", strerror(errno));
+				}
 	    			bigstring[strln] = 0;
 				if (strcmp(bigstring,data)==0) { 
 	    				readcache=1;
@@ -470,7 +481,9 @@
 	if (writecache==1) {
 		ast_log(LOG_DEBUG,"Writing result to cache...\n");
 		while ((strln=read(fd,buffer,16384))!=0) {
-			write(fdesc,buffer,strln);
+			if (write(fdesc,buffer,strln) < 0) {
+				ast_log(LOG_WARNING, "write() failed: %s\n", strerror(errno));
+			}
 		}
 		close(fd);
 		close(fdesc);

Modified: team/oej/cancel_elsewhere_1.4/apps/app_followme.c
URL: http://svn.digium.com/view/asterisk/team/oej/cancel_elsewhere_1.4/apps/app_followme.c?view=diff&rev=164598&r1=164597&r2=164598
==============================================================================
--- team/oej/cancel_elsewhere_1.4/apps/app_followme.c (original)
+++ team/oej/cancel_elsewhere_1.4/apps/app_followme.c Tue Dec 16 03:40:31 2008
@@ -152,7 +152,6 @@
 });
 
 static int ynlongest = 0;
-static time_t start_time, answer_time, end_time;
 
 static const char *featuredigittostr;
 static int featuredigittimeout = 5000;		/*!< Feature Digit Timeout */
@@ -805,7 +804,6 @@
 
 		if (option_debug > 1)	
 			ast_log(LOG_DEBUG, "Number %s timeout %ld\n", nm->number,nm->timeout);
-		time(&start_time);
 
 		number = ast_strdupa(nm->number);
 		if (option_debug > 2)
@@ -916,6 +914,32 @@
 		
 }
 
+static void end_bridge_callback (void *data)
+{
+	char buf[80];
+	time_t end;
+	struct ast_channel *chan = data;
+
+	time(&end);
+
+	ast_channel_lock(chan);
+	if (chan->cdr->answer.tv_sec) {
+		snprintf(buf, sizeof(buf), "%ld", end - chan->cdr->answer.tv_sec);
+		pbx_builtin_setvar_helper(chan, "ANSWEREDTIME", buf);
+	}
+
+	if (chan->cdr->start.tv_sec) {
+		snprintf(buf, sizeof(buf), "%ld", end - chan->cdr->start.tv_sec);
+		pbx_builtin_setvar_helper(chan, "DIALEDTIME", buf);
+	}
+	ast_channel_unlock(chan);
+}
+
+static void end_bridge_callback_data_fixup(struct ast_bridge_config *bconfig, struct ast_channel *originator, struct ast_channel *terminator)
+{
+	bconfig->end_bridge_callback_data = originator;
+}
+
 static int app_exec(struct ast_channel *chan, void *data)
 {
 	struct fm_args targs;
@@ -930,7 +954,6 @@
 	int duration = 0;
 	struct ast_channel *caller;
 	struct ast_channel *outbound;
-	static char toast[80];
 	
 	AST_DECLARE_APP_ARGS(args,
 		AST_APP_ARG(followmeid);
@@ -1036,7 +1059,11 @@
 			ast_set_flag(&(config.features_callee), AST_FEATURE_REDIRECT);
 			ast_set_flag(&(config.features_callee), AST_FEATURE_AUTOMON);
 			ast_set_flag(&(config.features_caller), AST_FEATURE_AUTOMON);
-				
+
+			config.end_bridge_callback = end_bridge_callback;
+			config.end_bridge_callback_data = chan;
+			config.end_bridge_callback_data_fixup = end_bridge_callback_data_fixup;
+
 			ast_moh_stop(caller);
 			/* Be sure no generators are left on it */
 			ast_deactivate_generator(caller);
@@ -1047,13 +1074,7 @@
 				ast_hangup(outbound);
 				goto outrun;
 			}
-			time(&answer_time);
 			res = ast_bridge_call(caller,outbound,&config);
-			time(&end_time);
-			snprintf(toast, sizeof(toast), "%ld", (long)(end_time - start_time));
-			pbx_builtin_setvar_helper(caller, "DIALEDTIME", toast);
-			snprintf(toast, sizeof(toast), "%ld", (long)(end_time - answer_time));
-			pbx_builtin_setvar_helper(caller, "ANSWEREDTIME", toast);
 			if (outbound)
 				ast_hangup(outbound);
 		}

Modified: team/oej/cancel_elsewhere_1.4/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/oej/cancel_elsewhere_1.4/apps/app_meetme.c?view=diff&rev=164598&r1=164597&r2=164598
==============================================================================
--- team/oej/cancel_elsewhere_1.4/apps/app_meetme.c (original)
+++ team/oej/cancel_elsewhere_1.4/apps/app_meetme.c Tue Dec 16 03:40:31 2008
@@ -64,6 +64,7 @@
 #include "asterisk/translate.h"
 #include "asterisk/ulaw.h"
 #include "asterisk/astobj.h"
+#include "asterisk/astobj2.h"
 #include "asterisk/devicestate.h"
 #include "asterisk/dial.h"
 #include "asterisk/causes.h"
@@ -164,6 +165,8 @@
 	CONFFLAG_SLA_STATION = (1 << 26),
 	/*! This is a SLA trunk. (Only for use by the SLA applications.) */
 	CONFFLAG_SLA_TRUNK = (1 << 27),
+	/*! Do not write any audio to this channel until the state is up. */
+	CONFFLAG_NO_AUDIO_UNTIL_UP = (1 << 28),
 };
 
 enum {
@@ -316,6 +319,20 @@
 #define MAX_CONFNUM 80
 #define MAX_PIN     80
 
+enum announcetypes {
+	CONF_HASJOIN,
+	CONF_HASLEFT
+};
+
+struct announce_listitem {
+	AST_LIST_ENTRY(announce_listitem) entry;

[... 13173 lines stripped ...]



More information about the svn-commits mailing list