[asterisk-commits] kpfleming: branch jdixon/chan_usbradio-1.4 r114611 - in /team/jdixon/chan_usb...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Apr 24 11:18:31 CDT 2008


Author: kpfleming
Date: Thu Apr 24 11:18:30 2008
New Revision: 114611

URL: http://svn.digium.com/view/asterisk?view=rev&rev=114611
Log:
resolve, reset, add automerge email property to Dude's branch

Added:
    team/jdixon/chan_usbradio-1.4/build_tools/cflags-devmode.xml
      - copied unchanged from r114608, branches/1.4/build_tools/cflags-devmode.xml
    team/jdixon/chan_usbradio-1.4/contrib/scripts/get_ilbc_source.sh
      - copied unchanged from r114608, branches/1.4/contrib/scripts/get_ilbc_source.sh
    team/jdixon/chan_usbradio-1.4/pbx/ael/ael-test/ael-ntest23/
      - copied from r114608, branches/1.4/pbx/ael/ael-test/ael-ntest23/
    team/jdixon/chan_usbradio-1.4/pbx/ael/ael-test/ael-ntest23/extensions.ael
      - copied unchanged from r114608, branches/1.4/pbx/ael/ael-test/ael-ntest23/extensions.ael
    team/jdixon/chan_usbradio-1.4/pbx/ael/ael-test/ael-ntest23/qq.ael
      - copied unchanged from r114608, branches/1.4/pbx/ael/ael-test/ael-ntest23/qq.ael
    team/jdixon/chan_usbradio-1.4/pbx/ael/ael-test/ael-ntest23/t1/
      - copied from r114608, branches/1.4/pbx/ael/ael-test/ael-ntest23/t1/
    team/jdixon/chan_usbradio-1.4/pbx/ael/ael-test/ael-ntest23/t1/a.ael
      - copied unchanged from r114608, branches/1.4/pbx/ael/ael-test/ael-ntest23/t1/a.ael
    team/jdixon/chan_usbradio-1.4/pbx/ael/ael-test/ael-ntest23/t1/b.ael
      - copied unchanged from r114608, branches/1.4/pbx/ael/ael-test/ael-ntest23/t1/b.ael
    team/jdixon/chan_usbradio-1.4/pbx/ael/ael-test/ael-ntest23/t1/c.ael
      - copied unchanged from r114608, branches/1.4/pbx/ael/ael-test/ael-ntest23/t1/c.ael
    team/jdixon/chan_usbradio-1.4/pbx/ael/ael-test/ael-ntest23/t2/
      - copied from r114608, branches/1.4/pbx/ael/ael-test/ael-ntest23/t2/
    team/jdixon/chan_usbradio-1.4/pbx/ael/ael-test/ael-ntest23/t2/d.ael
      - copied unchanged from r114608, branches/1.4/pbx/ael/ael-test/ael-ntest23/t2/d.ael
    team/jdixon/chan_usbradio-1.4/pbx/ael/ael-test/ael-ntest23/t2/e.ael
      - copied unchanged from r114608, branches/1.4/pbx/ael/ael-test/ael-ntest23/t2/e.ael
    team/jdixon/chan_usbradio-1.4/pbx/ael/ael-test/ael-ntest23/t2/f.ael
      - copied unchanged from r114608, branches/1.4/pbx/ael/ael-test/ael-ntest23/t2/f.ael
    team/jdixon/chan_usbradio-1.4/pbx/ael/ael-test/ael-ntest23/t3/
      - copied from r114608, branches/1.4/pbx/ael/ael-test/ael-ntest23/t3/
    team/jdixon/chan_usbradio-1.4/pbx/ael/ael-test/ael-ntest23/t3/g.ael
      - copied unchanged from r114608, branches/1.4/pbx/ael/ael-test/ael-ntest23/t3/g.ael
    team/jdixon/chan_usbradio-1.4/pbx/ael/ael-test/ael-ntest23/t3/h.ael
      - copied unchanged from r114608, branches/1.4/pbx/ael/ael-test/ael-ntest23/t3/h.ael
    team/jdixon/chan_usbradio-1.4/pbx/ael/ael-test/ael-ntest23/t3/i.ael
      - copied unchanged from r114608, branches/1.4/pbx/ael/ael-test/ael-ntest23/t3/i.ael
    team/jdixon/chan_usbradio-1.4/pbx/ael/ael-test/ael-ntest23/t3/j.ael
      - copied unchanged from r114608, branches/1.4/pbx/ael/ael-test/ael-ntest23/t3/j.ael
    team/jdixon/chan_usbradio-1.4/pbx/ael/ael-test/ref.ael-ntest23
      - copied unchanged from r114608, branches/1.4/pbx/ael/ael-test/ref.ael-ntest23
Removed:
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/FrameClassify.c
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/FrameClassify.h
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/LPCdecode.c
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/LPCdecode.h
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/LPCencode.c
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/LPCencode.h
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/StateConstructW.c
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/StateConstructW.h
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/StateSearchW.c
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/StateSearchW.h
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/anaFilter.c
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/anaFilter.h
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/constants.c
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/constants.h
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/createCB.c
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/createCB.h
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/doCPLC.c
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/doCPLC.h
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/enhancer.c
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/enhancer.h
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/filter.c
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/filter.h
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/gainquant.c
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/gainquant.h
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/getCBvec.c
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/getCBvec.h
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/helpfun.c
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/helpfun.h
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/hpInput.c
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/hpInput.h
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/hpOutput.c
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/hpOutput.h
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/iCBConstruct.c
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/iCBConstruct.h
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/iCBSearch.c
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/iCBSearch.h
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/iLBC_decode.c
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/iLBC_decode.h
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/iLBC_define.h
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/iLBC_encode.c
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/iLBC_encode.h
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/libilbc.vcproj
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/lsf.c
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/lsf.h
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/packing.c
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/packing.h
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/syntFilter.c
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/syntFilter.h
Modified:
    team/jdixon/chan_usbradio-1.4/   (props changed)
    team/jdixon/chan_usbradio-1.4/CHANGES
    team/jdixon/chan_usbradio-1.4/Makefile
    team/jdixon/chan_usbradio-1.4/Makefile.rules
    team/jdixon/chan_usbradio-1.4/UPGRADE.txt
    team/jdixon/chan_usbradio-1.4/apps/app_chanspy.c
    team/jdixon/chan_usbradio-1.4/apps/app_dial.c
    team/jdixon/chan_usbradio-1.4/apps/app_followme.c
    team/jdixon/chan_usbradio-1.4/apps/app_meetme.c
    team/jdixon/chan_usbradio-1.4/apps/app_mixmonitor.c
    team/jdixon/chan_usbradio-1.4/apps/app_parkandannounce.c
    team/jdixon/chan_usbradio-1.4/apps/app_playback.c
    team/jdixon/chan_usbradio-1.4/apps/app_queue.c
    team/jdixon/chan_usbradio-1.4/apps/app_setcallerid.c
    team/jdixon/chan_usbradio-1.4/apps/app_voicemail.c
    team/jdixon/chan_usbradio-1.4/build_tools/cflags.xml
    team/jdixon/chan_usbradio-1.4/cdr/cdr_csv.c
    team/jdixon/chan_usbradio-1.4/cdr/cdr_custom.c
    team/jdixon/chan_usbradio-1.4/channels/Makefile
    team/jdixon/chan_usbradio-1.4/channels/chan_agent.c
    team/jdixon/chan_usbradio-1.4/channels/chan_gtalk.c
    team/jdixon/chan_usbradio-1.4/channels/chan_h323.c
    team/jdixon/chan_usbradio-1.4/channels/chan_iax2.c
    team/jdixon/chan_usbradio-1.4/channels/chan_oss.c
    team/jdixon/chan_usbradio-1.4/channels/chan_sip.c
    team/jdixon/chan_usbradio-1.4/channels/chan_skinny.c
    team/jdixon/chan_usbradio-1.4/channels/chan_vpb.cc
    team/jdixon/chan_usbradio-1.4/channels/chan_zap.c
    team/jdixon/chan_usbradio-1.4/codecs/Makefile
    team/jdixon/chan_usbradio-1.4/codecs/codec_ilbc.c
    team/jdixon/chan_usbradio-1.4/codecs/gsm/Makefile
    team/jdixon/chan_usbradio-1.4/codecs/ilbc/   (props changed)
    team/jdixon/chan_usbradio-1.4/codecs/log2comp.h
    team/jdixon/chan_usbradio-1.4/configs/cdr.conf.sample
    team/jdixon/chan_usbradio-1.4/configs/skinny.conf.sample
    team/jdixon/chan_usbradio-1.4/contrib/init.d/rc.suse.asterisk
    team/jdixon/chan_usbradio-1.4/contrib/scripts/astgenkey.8
    team/jdixon/chan_usbradio-1.4/contrib/scripts/autosupport
    team/jdixon/chan_usbradio-1.4/contrib/scripts/iax-friends.sql
    team/jdixon/chan_usbradio-1.4/contrib/scripts/sip-friends.sql
    team/jdixon/chan_usbradio-1.4/doc/valgrind.txt
    team/jdixon/chan_usbradio-1.4/doc/voicemail_odbc_postgresql.txt
    team/jdixon/chan_usbradio-1.4/formats/format_pcm.c
    team/jdixon/chan_usbradio-1.4/formats/format_wav_gsm.c
    team/jdixon/chan_usbradio-1.4/funcs/func_strings.c
    team/jdixon/chan_usbradio-1.4/include/asterisk/ael_structs.h
    team/jdixon/chan_usbradio-1.4/include/asterisk/astobj.h
    team/jdixon/chan_usbradio-1.4/include/asterisk/audiohook.h
    team/jdixon/chan_usbradio-1.4/include/asterisk/channel.h
    team/jdixon/chan_usbradio-1.4/include/asterisk/dsp.h
    team/jdixon/chan_usbradio-1.4/include/asterisk/frame.h
    team/jdixon/chan_usbradio-1.4/include/asterisk/lock.h
    team/jdixon/chan_usbradio-1.4/include/asterisk/manager.h
    team/jdixon/chan_usbradio-1.4/include/asterisk/options.h
    team/jdixon/chan_usbradio-1.4/include/asterisk/sched.h
    team/jdixon/chan_usbradio-1.4/include/asterisk/slinfactory.h
    team/jdixon/chan_usbradio-1.4/main/Makefile
    team/jdixon/chan_usbradio-1.4/main/acl.c
    team/jdixon/chan_usbradio-1.4/main/app.c
    team/jdixon/chan_usbradio-1.4/main/asterisk.c
    team/jdixon/chan_usbradio-1.4/main/audiohook.c
    team/jdixon/chan_usbradio-1.4/main/autoservice.c
    team/jdixon/chan_usbradio-1.4/main/callerid.c
    team/jdixon/chan_usbradio-1.4/main/channel.c
    team/jdixon/chan_usbradio-1.4/main/config.c
    team/jdixon/chan_usbradio-1.4/main/dial.c
    team/jdixon/chan_usbradio-1.4/main/dns.c
    team/jdixon/chan_usbradio-1.4/main/dsp.c
    team/jdixon/chan_usbradio-1.4/main/file.c
    team/jdixon/chan_usbradio-1.4/main/frame.c
    team/jdixon/chan_usbradio-1.4/main/http.c
    team/jdixon/chan_usbradio-1.4/main/manager.c
    team/jdixon/chan_usbradio-1.4/main/pbx.c
    team/jdixon/chan_usbradio-1.4/main/rtp.c
    team/jdixon/chan_usbradio-1.4/main/slinfactory.c
    team/jdixon/chan_usbradio-1.4/main/utils.c
    team/jdixon/chan_usbradio-1.4/pbx/ael/ael.flex
    team/jdixon/chan_usbradio-1.4/pbx/ael/ael_lex.c
    team/jdixon/chan_usbradio-1.4/pbx/pbx_ael.c
    team/jdixon/chan_usbradio-1.4/res/res_agi.c
    team/jdixon/chan_usbradio-1.4/res/res_features.c
    team/jdixon/chan_usbradio-1.4/res/res_jabber.c
    team/jdixon/chan_usbradio-1.4/res/res_musiconhold.c

Propchange: team/jdixon/chan_usbradio-1.4/
------------------------------------------------------------------------------
    automerge = dude

Propchange: team/jdixon/chan_usbradio-1.4/
------------------------------------------------------------------------------
    automerge-email = telesistant at hotmail.com

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

Modified: team/jdixon/chan_usbradio-1.4/CHANGES
URL: http://svn.digium.com/view/asterisk/team/jdixon/chan_usbradio-1.4/CHANGES?view=diff&rev=114611&r1=114610&r2=114611
==============================================================================
--- team/jdixon/chan_usbradio-1.4/CHANGES (original)
+++ team/jdixon/chan_usbradio-1.4/CHANGES Thu Apr 24 11:18:30 2008
@@ -339,3 +339,4 @@
          1. aelparse -- compile .ael files outside of asterisk
     * New manager events:
          1. OriginateResponse event comes to replace OriginateSuccess and OriginateFailure
+    * iLBC source code no longer included (see UPGRADE.txt for details)

Modified: team/jdixon/chan_usbradio-1.4/Makefile
URL: http://svn.digium.com/view/asterisk/team/jdixon/chan_usbradio-1.4/Makefile?view=diff&rev=114611&r1=114610&r2=114611
==============================================================================
--- team/jdixon/chan_usbradio-1.4/Makefile (original)
+++ team/jdixon/chan_usbradio-1.4/Makefile Thu Apr 24 11:18:30 2008
@@ -432,7 +432,7 @@
 NEWHEADERS=$(notdir $(wildcard include/asterisk/*.h))
 OLDHEADERS=$(filter-out $(NEWHEADERS),$(notdir $(wildcard $(DESTDIR)$(ASTHEADERDIR)/*.h)))
 
-bininstall: _all
+installdirs:
 	mkdir -p $(DESTDIR)$(MODULES_DIR)
 	mkdir -p $(DESTDIR)$(ASTSBINDIR)
 	mkdir -p $(DESTDIR)$(ASTETCDIR)
@@ -444,6 +444,8 @@
 	mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/tmp
 	mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/meetme
 	mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/monitor
+
+bininstall: _all installdirs $(SUBDIRS_INSTALL)
 	$(INSTALL) -m 755 main/asterisk $(DESTDIR)$(ASTSBINDIR)/
 	$(LN) -sf asterisk $(DESTDIR)$(ASTSBINDIR)/rasterisk
 	$(INSTALL) -m 755 contrib/scripts/astgenkey $(DESTDIR)$(ASTSBINDIR)/
@@ -505,7 +507,7 @@
 	@exit 1
 endif
 
-install: badshell datafiles bininstall $(SUBDIRS_INSTALL)
+install: badshell datafiles bininstall
 	@if [ -x /usr/sbin/asterisk-post-install ]; then \
 		/usr/sbin/asterisk-post-install $(DESTDIR) . ; \
 	fi
@@ -601,6 +603,7 @@
 		echo ";cache_record_files = yes ; Cache recorded sound files to another directory during recording" ; \
 		echo ";record_cache_dir = /tmp ; Specify cache directory (used in cnjunction with cache_record_files)" ; \
 		echo ";transmit_silence_during_record = yes ; Transmit SLINEAR silence while a channel is being recorded" ; \
+		echo ";transmit_silence = yes ; Transmit SLINEAR silence while a channel is being recorded or DTMF is being generated" ; \
 		echo ";transcode_via_sln = yes ; Build transcode paths via SLINEAR, instead of directly" ; \
 		echo ";runuser = asterisk ; The user to run as" ; \
 		echo ";rungroup = asterisk ; The group to run as" ; \
@@ -756,7 +759,7 @@
 menuselect/gmenuselect: makeopts menuselect/menuselect.c menuselect/menuselect_gtk.c menuselect/menuselect_stub.c menuselect/menuselect.h menuselect/linkedlists.h makeopts
 	@CC="$(HOST_CC)" CXX="$(CXX)" LD="" AR="" RANLIB="" CFLAGS="" $(MAKE) -C menuselect _gmenuselect CONFIGURE_SILENT="--silent"
 
-menuselect-tree: $(foreach dir,$(filter-out main,$(MOD_SUBDIRS)),$(wildcard $(dir)/*.c) $(wildcard $(dir)/*.cc)) build_tools/cflags.xml sounds/sounds.xml build_tools/embed_modules.xml configure
+menuselect-tree: $(foreach dir,$(filter-out main,$(MOD_SUBDIRS)),$(wildcard $(dir)/*.c) $(wildcard $(dir)/*.cc)) build_tools/cflags.xml build_tools/cflags-devmode.xml sounds/sounds.xml build_tools/embed_modules.xml configure
 	@echo "Generating input for menuselect ..."
 	@echo "<?xml version=\"1.0\"?>" > $@
 	@echo >> $@
@@ -764,8 +767,11 @@
 	@for dir in $(sort $(filter-out main,$(MOD_SUBDIRS))); do $(SUBMAKE) -C $${dir} SUBDIR=$${dir} moduleinfo >> $@; done
 	@for dir in $(sort $(filter-out main,$(MOD_SUBDIRS))); do $(SUBMAKE) -C $${dir} SUBDIR=$${dir} makeopts >> $@; done
 	@cat build_tools/cflags.xml >> $@
+	@if [ "${AST_DEVMODE}" = "yes" ]; then \
+		cat build_tools/cflags-devmode.xml >> $@; \
+	fi
 	@cat build_tools/embed_modules.xml >> $@
 	@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 include/asterisk/version.h
+.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 include/asterisk/version.h installdirs

Modified: team/jdixon/chan_usbradio-1.4/Makefile.rules
URL: http://svn.digium.com/view/asterisk/team/jdixon/chan_usbradio-1.4/Makefile.rules?view=diff&rev=114611&r1=114610&r2=114611
==============================================================================
--- team/jdixon/chan_usbradio-1.4/Makefile.rules (original)
+++ team/jdixon/chan_usbradio-1.4/Makefile.rules Thu Apr 24 11:18:30 2008
@@ -48,7 +48,7 @@
 
 %.oo: %.cc
 	$(ECHO_PREFIX) echo "   [CXX] $< -> $@"
-	$(CMD_PREFIX) $(CXX) -o $@ -c $< $(PTHREAD_CFLAGS) $(filter-out -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations,$(ASTCFLAGS)) -MMD -MT $@ -MF .$(subst /,_,$@).d -MP
+	$(CMD_PREFIX) $(CXX) -o $@ -c $< $(PTHREAD_CFLAGS) $(filter-out -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(AST_DECLARATION_AFTER_STATEMENT),$(ASTCFLAGS)) -MMD -MT $@ -MF .$(subst /,_,$@).d -MP
 
 %.c: %.y
 	$(ECHO_PREFIX) echo "   [BISON] $< -> $@"

Modified: team/jdixon/chan_usbradio-1.4/UPGRADE.txt
URL: http://svn.digium.com/view/asterisk/team/jdixon/chan_usbradio-1.4/UPGRADE.txt?view=diff&rev=114611&r1=114610&r2=114611
==============================================================================
--- team/jdixon/chan_usbradio-1.4/UPGRADE.txt (original)
+++ team/jdixon/chan_usbradio-1.4/UPGRADE.txt Thu Apr 24 11:18:30 2008
@@ -481,3 +481,15 @@
   future release.  The use of GAIN for the increasing of voicemail message
   volume should use the 'volgain' option in voicemail.conf
 
+iLBC Codec:
+
+* Previously, the Asterisk source code distribution included the iLBC
+  encoder/decoder source code, from Global IP Solutions
+  (http://www.gipscorp.com). This code is not licensed for
+  distribution, and thus has been removed from the Asterisk source
+  code distribution. If you wish to use codec_ilbc to support iLBC
+  channels in Asterisk, you can run the contrib/scripts/get_ilbc_source.sh
+  script to download the source and put it in the proper place in
+  the Asterisk build tree. Once that is done you can follow your normal
+  steps of building Asterisk. You will need to run 'menuselect' and enable
+  the iLBC codec in the 'Codec  Translators' category.

Modified: team/jdixon/chan_usbradio-1.4/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/team/jdixon/chan_usbradio-1.4/apps/app_chanspy.c?view=diff&rev=114611&r1=114610&r2=114611
==============================================================================
--- team/jdixon/chan_usbradio-1.4/apps/app_chanspy.c (original)
+++ team/jdixon/chan_usbradio-1.4/apps/app_chanspy.c Thu Apr 24 11:18:30 2008
@@ -2,7 +2,7 @@
  * Asterisk -- An open source telephony toolkit.
  *
  * Copyright (C) 2005 Anthony Minessale II (anthmct at yahoo.com)
- * Copyright (C) 2005 - 2006, Digium, Inc.
+ * Copyright (C) 2005 - 2008, Digium, Inc.
  *
  * A license has been granted to Digium (via disclaimer) for the use of
  * this code.
@@ -23,6 +23,8 @@
  * \brief ChanSpy: Listen in on any channel.
  *
  * \author Anthony Minessale II <anthmct at yahoo.com>
+ * \author Joshua Colp <jcolp at digium.com>
+ * \author Russell Bryant <russell at digium.com>
  *
  * \ingroup applications
  */
@@ -248,8 +250,10 @@
 
 	/* We now hold the channel lock on spyee */
 
-	if (ast_check_hangup(chan) || ast_check_hangup(spyee))
+	if (ast_check_hangup(chan) || ast_check_hangup(spyee)) {
+		ast_channel_unlock(spyee);
 		return 0;
+	}
 
 	name = ast_strdupa(spyee->name);
 	if (option_verbose >= 2)
@@ -388,9 +392,19 @@
 	ast_mutex_unlock(&chanspy_ds->lock);
 }
 
+static void chanspy_ds_chan_fixup(void *data, struct ast_channel *old_chan, struct ast_channel *new_chan)
+{
+	struct chanspy_ds *chanspy_ds = data;
+	
+	ast_mutex_lock(&chanspy_ds->lock);
+	chanspy_ds->chan = new_chan;
+	ast_mutex_unlock(&chanspy_ds->lock);
+}
+
 static const struct ast_datastore_info chanspy_ds_info = {
 	.type = "chanspy",
 	.destroy = chanspy_ds_destroy,
+	.chan_fixup = chanspy_ds_chan_fixup,
 };
 
 static struct chanspy_ds *chanspy_ds_free(struct chanspy_ds *chanspy_ds)
@@ -427,16 +441,15 @@
 
 	ast_mutex_lock(&chanspy_ds->lock);
 
-	chanspy_ds->chan = chan;
-
 	if (!(datastore = ast_channel_datastore_alloc(&chanspy_ds_info, NULL))) {
+		ast_mutex_unlock(&chanspy_ds->lock);
 		chanspy_ds = chanspy_ds_free(chanspy_ds);
 		ast_channel_unlock(chan);
 		return NULL;
 	}
-
+	
+	chanspy_ds->chan = chan;
 	datastore->data = chanspy_ds;
-
 	ast_channel_datastore_add(chan, datastore);
 
 	return chanspy_ds;
@@ -530,7 +543,6 @@
 			char *dup_group;
 			int x;
 			char *s;
-			struct ast_channel *peer;
 
 			peer = peer_chanspy_ds->chan;
 
@@ -586,27 +598,27 @@
 			for (s = peer_name; s < ptr; s++)
 				*s = tolower(*s);
 
-		
 			/* We have to unlock the peer channel here to avoid a deadlock.
-			 * So, when we need it again, we have to lock the datastore and get
-			 * the pointer from there to see if the channel is still valid. */
+			 * So, when we need to dereference it again, we have to lock the 
+			 * datastore and get the pointer from there to see if the channel 
+			 * is still valid. */
 			ast_channel_unlock(peer);
-			peer = NULL;
 
 			if (!ast_test_flag(flags, OPTION_QUIET)) {
 				if (ast_fileexists(peer_name, NULL, NULL) != -1) {
 					res = ast_streamfile(chan, peer_name, chan->language);
 					if (!res)
 						res = ast_waitstream(chan, "");
-					if (res)
+					if (res) {
+						chanspy_ds_free(peer_chanspy_ds);
 						break;
+					}
 				} else
 					res = ast_say_character_str(chan, peer_name, "", chan->language);
 				if ((num = atoi(ptr))) 
 					ast_say_digits(chan, atoi(ptr), "", chan->language);
 			}
 			
-			waitms = 5000;
 			res = channel_spy(chan, peer_chanspy_ds, &volfactor, fd, flags);
 			num_spyed_upon++;	
 
@@ -713,7 +725,7 @@
 	}
 
 	if (recbase) {
-		char filename[512];
+		char filename[PATH_MAX];
 
 		snprintf(filename, sizeof(filename), "%s/%s.%d.raw", ast_config_AST_MONITOR_DIR, recbase, (int) time(NULL));
 		if ((fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC, 0644)) <= 0) {
@@ -798,7 +810,7 @@
 	}
 
 	if (recbase) {
-		char filename[512];
+		char filename[PATH_MAX];
 
 		snprintf(filename, sizeof(filename), "%s/%s.%d.raw", ast_config_AST_MONITOR_DIR, recbase, (int) time(NULL));
 		if ((fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC, 0644)) <= 0) {

Modified: team/jdixon/chan_usbradio-1.4/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/jdixon/chan_usbradio-1.4/apps/app_dial.c?view=diff&rev=114611&r1=114610&r2=114611
==============================================================================
--- team/jdixon/chan_usbradio-1.4/apps/app_dial.c (original)
+++ team/jdixon/chan_usbradio-1.4/apps/app_dial.c Thu Apr 24 11:18:30 2008
@@ -1320,8 +1320,14 @@
 	time(&start_time);
 	peer = wait_for_answer(chan, outgoing, &to, peerflags, &sentringing, status, sizeof(status), numbusy, numnochan, numcongestion, ast_test_flag(&opts, OPT_PRIORITY_JUMP), &result);
 
-	ast_channel_datastore_remove(chan, datastore);
-	ast_channel_datastore_free(datastore);
+	/* The ast_channel_datastore_remove() function could fail here if the
+	 * datastore was moved to another channel during a masquerade. If this is
+	 * the case, don't free the datastore here because later, when the channel
+	 * to which the datastore was moved hangs up, it will attempt to free this
+	 * datastore again, causing a crash
+	 */
+	if (!ast_channel_datastore_remove(chan, datastore))
+		ast_channel_datastore_free(datastore);
 	if (!peer) {
 		if (result) {
 			res = result;

Modified: team/jdixon/chan_usbradio-1.4/apps/app_followme.c
URL: http://svn.digium.com/view/asterisk/team/jdixon/chan_usbradio-1.4/apps/app_followme.c?view=diff&rev=114611&r1=114610&r2=114611
==============================================================================
--- team/jdixon/chan_usbradio-1.4/apps/app_followme.c (original)
+++ team/jdixon/chan_usbradio-1.4/apps/app_followme.c Thu Apr 24 11:18:30 2008
@@ -818,9 +818,9 @@
 			}
 
 			if (!strcmp(tpargs->context, ""))
-				sprintf(dialarg, "%s", number);
+				snprintf(dialarg, sizeof(dialarg), "%s", number);
 			else
-				sprintf(dialarg, "%s@%s", number, tpargs->context);
+				snprintf(dialarg, sizeof(dialarg), "%s@%s", number, tpargs->context);
 					
 			tmpuser = ast_calloc(1, sizeof(*tmpuser));
 			if (!tmpuser) {

Modified: team/jdixon/chan_usbradio-1.4/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/jdixon/chan_usbradio-1.4/apps/app_meetme.c?view=diff&rev=114611&r1=114610&r2=114611
==============================================================================
--- team/jdixon/chan_usbradio-1.4/apps/app_meetme.c (original)
+++ team/jdixon/chan_usbradio-1.4/apps/app_meetme.c Thu Apr 24 11:18:30 2008
@@ -43,6 +43,8 @@
 #include <unistd.h>
 #include <errno.h>
 #include <sys/ioctl.h>
+#include <sys/stat.h>
+#include <sys/types.h>
 #include <zaptel/zaptel.h>
 
 #include "asterisk/lock.h"
@@ -1482,8 +1484,17 @@
 	ast_mutex_unlock(&conf->playlock);
 
 	if (!(confflags & CONFFLAG_QUIET) && ((confflags & CONFFLAG_INTROUSER) || (confflags & CONFFLAG_INTROUSERNOREVIEW))) {
+		char destdir[PATH_MAX];
+
+		snprintf(destdir, sizeof(destdir), "%s/meetme", ast_config_AST_SPOOL_DIR);
+
+		if (mkdir(destdir, 0777) && errno != EEXIST) {
+			ast_log(LOG_WARNING, "mkdir '%s' failed: %s\n", destdir, strerror(errno));
+			goto outrun;
+		}
+
 		snprintf(user->namerecloc, sizeof(user->namerecloc),
-			 "%s/meetme/meetme-username-%s-%d", ast_config_AST_SPOOL_DIR,
+			 "%s/meetme-username-%s-%d", destdir,
 			 conf->confno, user->user_no);
 		if (confflags & CONFFLAG_INTROUSERNOREVIEW)
 			res = ast_play_and_record(chan, "vm-rec-name", user->namerecloc, 10, "sln", &duration, 128, 0, NULL);
@@ -4353,7 +4364,9 @@
 	conf = NULL;
 	trunk->chan = NULL;
 	trunk->on_hold = 0;
-	
+
+	sla_change_trunk_state(trunk, SLA_TRUNK_STATE_IDLE, ALL_TRUNK_REFS, NULL);
+
 	if (!pbx_builtin_getvar_helper(chan, "SLATRUNK_STATUS"))
 		pbx_builtin_setvar_helper(chan, "SLATRUNK_STATUS", "SUCCESS");
 
@@ -4368,7 +4381,6 @@
 	AST_LIST_TRAVERSE_SAFE_END
 	ast_mutex_unlock(&sla.lock);
 	if (ringing_trunk) {
-		sla_change_trunk_state(ringing_trunk->trunk, SLA_TRUNK_STATE_IDLE, ALL_TRUNK_REFS, NULL);
 		free(ringing_trunk);
 		pbx_builtin_setvar_helper(chan, "SLATRUNK_STATUS", "UNANSWERED");
 		/* Queue reprocessing of ringing trunks to make stations stop ringing

Modified: team/jdixon/chan_usbradio-1.4/apps/app_mixmonitor.c
URL: http://svn.digium.com/view/asterisk/team/jdixon/chan_usbradio-1.4/apps/app_mixmonitor.c?view=diff&rev=114611&r1=114610&r2=114611
==============================================================================
--- team/jdixon/chan_usbradio-1.4/apps/app_mixmonitor.c (original)
+++ team/jdixon/chan_usbradio-1.4/apps/app_mixmonitor.c Thu Apr 24 11:18:30 2008
@@ -265,7 +265,7 @@
 		return;
 	}
 	
-	ast_set_flag(&mixmonitor->audiohook, AST_AUDIOHOOK_TRIGGER_WRITE);
+	ast_set_flag(&mixmonitor->audiohook, AST_AUDIOHOOK_TRIGGER_SYNC);
 	
 	if (readvol)
 		mixmonitor->audiohook.options.read_volume = readvol;

Modified: team/jdixon/chan_usbradio-1.4/apps/app_parkandannounce.c
URL: http://svn.digium.com/view/asterisk/team/jdixon/chan_usbradio-1.4/apps/app_parkandannounce.c?view=diff&rev=114611&r1=114610&r2=114611
==============================================================================
--- team/jdixon/chan_usbradio-1.4/apps/app_parkandannounce.c (original)
+++ team/jdixon/chan_usbradio-1.4/apps/app_parkandannounce.c Thu Apr 24 11:18:30 2008
@@ -211,7 +211,7 @@
 	tpl_working = template;
 	tpl_current=strsep(&tpl_working, ":");
 
-	while(tpl_current && looptemp < sizeof(tmp)) {
+	while(tpl_current && looptemp < ARRAY_LEN(tmp)) {
 		tmp[looptemp]=tpl_current;
 		looptemp++;
 		tpl_current=strsep(&tpl_working,":");

Modified: team/jdixon/chan_usbradio-1.4/apps/app_playback.c
URL: http://svn.digium.com/view/asterisk/team/jdixon/chan_usbradio-1.4/apps/app_playback.c?view=diff&rev=114611&r1=114610&r2=114611
==============================================================================
--- team/jdixon/chan_usbradio-1.4/apps/app_playback.c (original)
+++ team/jdixon/chan_usbradio-1.4/apps/app_playback.c Thu Apr 24 11:18:30 2008
@@ -65,6 +65,8 @@
 "This application sets the following channel variable upon completion:\n"
 " PLAYBACKSTATUS    The status of the playback attempt as a text string, one of\n"
 "               SUCCESS | FAILED\n"
+"See Also: Background (application) -- for playing soundfiles that are interruptible\n"
+"          WaitExten (application) -- wait for digits from caller, optionally play music on hold\n"
 ;
 
 
@@ -372,7 +374,7 @@
 static struct ast_cli_entry cli_playback[] = {
         { { "say", "load", NULL },
 	__say_init, "set/show the say mode",
-	"say load new|old" },
+	"Usage: say load [new|old]\n    Set/show the say mode\n" },
 };
 
 static int playback_exec(struct ast_channel *chan, void *data)

Modified: team/jdixon/chan_usbradio-1.4/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/jdixon/chan_usbradio-1.4/apps/app_queue.c?view=diff&rev=114611&r1=114610&r2=114611
==============================================================================
--- team/jdixon/chan_usbradio-1.4/apps/app_queue.c (original)
+++ team/jdixon/chan_usbradio-1.4/apps/app_queue.c Thu Apr 24 11:18:30 2008
@@ -572,65 +572,32 @@
 	int state;
 	char dev[0];
 };
-/*! \brief set a member's status based on device state of that member's interface*/
-static void *handle_statechange(struct statechange *sc)
-{
-	struct call_queue *q;
+
+static int update_status(const char *interface, const int status)
+{
 	struct member *cur;
 	struct ao2_iterator mem_iter;
-	struct member_interface *curint;
-	char *loc;
-	char *technology;
-
-	technology = ast_strdupa(sc->dev);
-	loc = strchr(technology, '/');
-	if (loc) {
-		*loc++ = '\0';
-	} else {
-		return NULL;
-	}
-
-	AST_LIST_LOCK(&interfaces);
-	AST_LIST_TRAVERSE(&interfaces, curint, list) {
-		char *interface;
-		char *slash_pos;
-		interface = ast_strdupa(curint->interface);
-		if ((slash_pos = strchr(interface, '/')))
-			if ((slash_pos = strchr(slash_pos + 1, '/')))
-				*slash_pos = '\0';
-
-		if (!strcasecmp(interface, sc->dev))
-			break;
-	}
-	AST_LIST_UNLOCK(&interfaces);
-
-	if (!curint) {
-		if (option_debug > 2)
-			ast_log(LOG_DEBUG, "Device '%s/%s' changed to state '%d' (%s) but we don't care because they're not a member of any queue.\n", technology, loc, sc->state, devstate2str(sc->state));
-		return NULL;
-	}
-
-	if (option_debug)
-		ast_log(LOG_DEBUG, "Device '%s/%s' changed to state '%d' (%s)\n", technology, loc, sc->state, devstate2str(sc->state));
+	struct call_queue *q;
+
 	AST_LIST_LOCK(&queues);
 	AST_LIST_TRAVERSE(&queues, q, list) {
 		ast_mutex_lock(&q->lock);
 		mem_iter = ao2_iterator_init(q->members, 0);
 		while ((cur = ao2_iterator_next(&mem_iter))) {
-			char *interface;
+			char *tmp_interface;
 			char *slash_pos;
-			interface = ast_strdupa(cur->interface);
-			if ((slash_pos = strchr(interface, '/')))
+			tmp_interface = ast_strdupa(cur->interface);
+			if ((slash_pos = strchr(tmp_interface, '/')))
 				if ((slash_pos = strchr(slash_pos + 1, '/')))
 					*slash_pos = '\0';
 
-			if (strcasecmp(sc->dev, interface)) {
+			if (strcasecmp(interface, tmp_interface)) {
 				ao2_ref(cur, -1);
 				continue;
 			}
 
-			if (cur->status != sc->state) {
-				cur->status = sc->state;
+			if (cur->status != status) {
+				cur->status = status;
 				if (q->maskmemberstatus) {
 					ao2_ref(cur, -1);
 					continue;
@@ -654,6 +621,49 @@
 		ast_mutex_unlock(&q->lock);
 	}
 	AST_LIST_UNLOCK(&queues);
+
+	return 0;
+}
+
+/*! \brief set a member's status based on device state of that member's interface*/
+static void *handle_statechange(struct statechange *sc)
+{
+	struct member_interface *curint;
+	char *loc;
+	char *technology;
+
+	technology = ast_strdupa(sc->dev);
+	loc = strchr(technology, '/');
+	if (loc) {
+		*loc++ = '\0';
+	} else {
+		return NULL;
+	}
+
+	AST_LIST_LOCK(&interfaces);
+	AST_LIST_TRAVERSE(&interfaces, curint, list) {
+		char *interface;
+		char *slash_pos;
+		interface = ast_strdupa(curint->interface);
+		if ((slash_pos = strchr(interface, '/')))
+			if ((slash_pos = strchr(slash_pos + 1, '/')))
+				*slash_pos = '\0';
+
+		if (!strcasecmp(interface, sc->dev))
+			break;
+	}
+	AST_LIST_UNLOCK(&interfaces);
+
+	if (!curint) {
+		if (option_debug > 2)
+			ast_log(LOG_DEBUG, "Device '%s/%s' changed to state '%d' (%s) but we don't care because they're not a member of any queue.\n", technology, loc, sc->state, devstate2str(sc->state));
+		return NULL;
+	}
+
+	if (option_debug)
+		ast_log(LOG_DEBUG, "Device '%s/%s' changed to state '%d' (%s)\n", technology, loc, sc->state, devstate2str(sc->state));
+
+	update_status(sc->dev, sc->state);
 
 	return NULL;
 }
@@ -812,7 +822,6 @@
 	q->reportholdtime = 0;
 	q->monjoin = 0;
 	q->wrapuptime = 0;
-	q->autofill = 0;
 	q->joinempty = 0;
 	q->leavewhenempty = 0;
 	q->memberdelay = 0;
@@ -1233,7 +1242,11 @@
 				*tmp++ = '-';
 		} else
 			tmp_name = v->name;
-		queue_set_param(q, tmp_name, v->value, -1, 0);
+
+		if (!ast_strlen_zero(v->value)) {
+			/* Don't want to try to set the option if the value is empty */
+			queue_set_param(q, tmp_name, v->value, -1, 0);
+		}
 	}
 
 	if (q->strategy == QUEUE_STRATEGY_ROUNDROBIN)
@@ -1685,54 +1698,6 @@
 	}
 }
 
-static int update_status(struct call_queue *q, struct member *member, int status)
-{
-	struct member *cur;
-	struct ao2_iterator mem_iter;
-
-	/* Since a reload could have taken place, we have to traverse the list to
-		be sure it's still valid */
-	ast_mutex_lock(&q->lock);
-	mem_iter = ao2_iterator_init(q->members, 0);
-	while ((cur = ao2_iterator_next(&mem_iter))) {
-		if (member != cur) {
-			ao2_ref(cur, -1);
-			continue;
-		}
-
-		cur->status = status;
-		if (!q->maskmemberstatus) {
-			manager_event(EVENT_FLAG_AGENT, "QueueMemberStatus",
-				"Queue: %s\r\n"
-				"Location: %s\r\n"
-				"MemberName: %s\r\n"
-				"Membership: %s\r\n"
-				"Penalty: %d\r\n"
-				"CallsTaken: %d\r\n"
-				"LastCall: %d\r\n"
-				"Status: %d\r\n"
-				"Paused: %d\r\n",
-				q->name, cur->interface, cur->membername, cur->dynamic ? "dynamic" : cur->realtime ? "realtime": "static",
-				cur->penalty, cur->calls, (int)cur->lastcall, cur->status, cur->paused);
-		}
-		ao2_ref(cur, -1);
-	}
-	ast_mutex_unlock(&q->lock);
-	return 0;
-}
-
-static int update_dial_status(struct call_queue *q, struct member *member, int status)
-{
-	if (status == AST_CAUSE_BUSY)
-		status = AST_DEVICE_BUSY;
-	else if (status == AST_CAUSE_UNREGISTERED)
-		status = AST_DEVICE_UNAVAILABLE;
-	else if (status == AST_CAUSE_NOSUCHDRIVER)
-		status = AST_DEVICE_INVALID;
-	else
-		status = AST_DEVICE_UNKNOWN;
-	return update_status(q, member, status);
-}
 
 /* traverse all defined queues which have calls waiting and contain this member
    return 0 if no other queue has precedence (higher weight) or 1 if found  */
@@ -1869,7 +1834,8 @@
 		if (qe->chan->cdr)
 			ast_cdr_busy(qe->chan->cdr);
 		tmp->stillgoing = 0;
-		update_dial_status(qe->parent, tmp->member, status);
+
+		update_status(tmp->member->interface, ast_device_state(tmp->member->interface));
 
 		ast_mutex_lock(&qe->parent->lock);
 		qe->parent->rrpos++;
@@ -1877,8 +1843,7 @@
 
 		(*busies)++;
 		return 0;
-	} else if (status != tmp->oldstatus)
-		update_dial_status(qe->parent, tmp->member, status);
+	}
 	
 	tmp->chan->appl = "AppQueue";
 	tmp->chan->data = "(Outgoing Line)";
@@ -2208,8 +2173,6 @@
 						ast_verbose(VERBOSE_PREFIX_3 "Now forwarding %s to '%s/%s' (thanks to %s)\n", in->name, tech, stuff, o->chan->name);
 					/* Setup parameters */
 					o->chan = ast_request(tech, in->nativeformats, stuff, &status);
-					if (status != o->oldstatus)
-						update_dial_status(qe->parent, o->member, status);						
 					if (!o->chan) {
 						ast_log(LOG_NOTICE, "Unable to create local channel for call forward to '%s/%s'\n", tech, stuff);
 						o->stillgoing = 0;
@@ -2788,13 +2751,18 @@
 	else
 		to = (qe->parent->timeout) ? qe->parent->timeout * 1000 : -1;
 	++qe->pending;
+	ast_mutex_unlock(&qe->parent->lock);
 	ring_one(qe, outgoing, &numbusies);
-	ast_mutex_unlock(&qe->parent->lock);
 	if (use_weight)
 		AST_LIST_UNLOCK(&queues);
 	lpeer = wait_for_answer(qe, outgoing, &to, &digit, numbusies, ast_test_flag(&(bridge_config.features_caller), AST_FEATURE_DISCONNECT), forwardsallowed);
-	if (datastore) {
-		ast_channel_datastore_remove(qe->chan, datastore);
+	/* The ast_channel_datastore_remove() function could fail here if the
+	 * datastore was moved to another channel during a masquerade. If this is
+	 * the case, don't free the datastore here because later, when the channel
+	 * to which the datastore was moved hangs up, it will attempt to free this
+	 * datastore again, causing a crash
+	 */
+	if (datastore && !ast_channel_datastore_remove(qe->chan, datastore)) {
 		ast_channel_datastore_free(datastore);
 	}
 	ast_mutex_lock(&qe->parent->lock);
@@ -3758,7 +3726,7 @@
 	qe.start = time(NULL);
 
 	/* set the expire time based on the supplied timeout; */
-	if (args.queuetimeoutstr)
+	if (!ast_strlen_zero(args.queuetimeoutstr))
 		qe.expire = qe.start + atoi(args.queuetimeoutstr);
 	else
 		qe.expire = 0;

Modified: team/jdixon/chan_usbradio-1.4/apps/app_setcallerid.c
URL: http://svn.digium.com/view/asterisk/team/jdixon/chan_usbradio-1.4/apps/app_setcallerid.c?view=diff&rev=114611&r1=114610&r2=114611
==============================================================================
--- team/jdixon/chan_usbradio-1.4/apps/app_setcallerid.c (original)
+++ team/jdixon/chan_usbradio-1.4/apps/app_setcallerid.c Thu Apr 24 11:18:30 2008
@@ -70,8 +70,11 @@
 	int pres = -1;
 
 	u = ast_module_user_add(chan);
-	
-	pres = ast_parse_caller_presentation(data);
+
+	/* For interface consistency, permit the argument to be specified as a number */
+	if (sscanf(data, "%d", &pres) != 1 || pres < 0 || pres > 255 || (pres & 0x9c)) {
+		pres = ast_parse_caller_presentation(data);
+	}
 
 	if (pres < 0) {
 		ast_log(LOG_WARNING, "'%s' is not a valid presentation (see 'show application SetCallerPres')\n",

Modified: team/jdixon/chan_usbradio-1.4/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/jdixon/chan_usbradio-1.4/apps/app_voicemail.c?view=diff&rev=114611&r1=114610&r2=114611
==============================================================================
--- team/jdixon/chan_usbradio-1.4/apps/app_voicemail.c (original)
+++ team/jdixon/chan_usbradio-1.4/apps/app_voicemail.c Thu Apr 24 11:18:30 2008
@@ -372,6 +372,7 @@
 	int starting;
 	int repeats;
 #ifdef IMAP_STORAGE
+	ast_mutex_t lock;
 	int updated; /* decremented on each mail check until 1 -allows delay */
 	long msgArray[256];
 	MAILSTREAM *mailstream;
@@ -4781,7 +4782,9 @@
 #endif
 		/* Connect to INBOX first to get folders delimiter */
 		imap_mailbox_name(tmp, sizeof(tmp), vms, 0, 1);
+		ast_mutex_lock(&vms->lock);
 		stream = mail_open (stream, tmp, debug ? OP_DEBUG : NIL);
+		ast_mutex_unlock(&vms->lock);
 		if (stream == NIL) {
 			ast_log (LOG_ERROR, "Can't connect to imap server %s\n", tmp);
 			return -1;
@@ -4796,7 +4799,9 @@
 	imap_mailbox_name(tmp, sizeof(tmp), vms, box, 1);
 	if (option_debug > 2)
 		ast_log (LOG_DEBUG,"Before mail_open, server: %s, box:%d\n", tmp, box);
+	ast_mutex_lock(&vms->lock);
 	vms->mailstream = mail_open (stream, tmp, debug ? OP_DEBUG : NIL);
+	ast_mutex_unlock(&vms->lock);
 	if (vms->mailstream == NIL) {
 		return -1;
 	} else {
@@ -5714,7 +5719,7 @@
 			res = say_and_wait(chan, dcnum, chan->language);
 		if (!res && lastnum) {
 			if (lastnum == 1) 
-				res = ast_play_and_wait(chan, "digits/ru/odno");
+				res = ast_play_and_wait(chan, "digits/odno");
 			else
 				res = say_and_wait(chan, lastnum, chan->language);
 		}
@@ -5733,7 +5738,7 @@
 			res = say_and_wait(chan, dcnum, chan->language);
 		if (!res && lastnum) {
 			if (lastnum == 1) 
-				res = ast_play_and_wait(chan, "digits/ru/odno");
+				res = ast_play_and_wait(chan, "digits/odno");
 			else
 				res = say_and_wait(chan, lastnum, chan->language);
 		}
@@ -6125,6 +6130,7 @@
 			cmd = 't';
 			break;
 		default: 
+			cmd = 0;
 			snprintf(prefile, sizeof(prefile), "%s%s/%s/temp", VM_SPOOL_DIR, vmu->context, vms->username);
 			if (ast_fileexists(prefile, NULL, NULL))
 				cmd = ast_play_and_wait(chan, "vm-tmpexists");
@@ -7927,7 +7933,7 @@
 	char *adsi_loaded = ast_module_helper("", "res_adsi.so", 0, 0, 0, 0);

[... 9560 lines stripped ...]



More information about the asterisk-commits mailing list