[asterisk-commits] twilson: branch group/srtp_reboot r261183 - in /team/group/srtp_reboot: ./ ap...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue May 4 20:01:14 CDT 2010


Author: twilson
Date: Tue May  4 20:01:08 2010
New Revision: 261183

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=261183
Log:
Merged revisions 259957,260007,260050,260148,260231,260280,260292,260344,260346,260435,260437,260521,260570,260663,260757,260802,260924,261007,261051,261095,261124,261180 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
  r259957 | mmichelson | 2010-04-28 17:34:15 -0500 (Wed, 28 Apr 2010) | 11 lines
  
  Don't override peer context with domain context.
  
  (closes issue #17040)
  Reported by: pprindeville
  Patches:
        asterisk-1.6-bugid17040.patch uploaded by pprindeville (license 347)
  Tested by: pprindeville
  
  Review: https://reviewboard.asterisk.org/r/565/
................
  r260007 | rmudgett | 2010-04-28 19:35:14 -0500 (Wed, 28 Apr 2010) | 1 line
  
  Fix comment.
................
  r260050 | dvossel | 2010-04-29 10:33:27 -0500 (Thu, 29 Apr 2010) | 24 lines
  
  Merged revisions 260049 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r260049 | dvossel | 2010-04-29 10:31:02 -0500 (Thu, 29 Apr 2010) | 14 lines
    
    Fixes crash in audiohook_write_list
    
    The middle_frame in the audiohook_write_list function was
    being freed if a audiohook manipulator returned a failure.
    This is incorrect logic.  This patch resolves this and
    adds detailed descriptions of how this function should work
    and why manipulator failures must be ignored.
    
    (closes issue #17052)
    Reported by: dvossel
    Tested by: dvossel
  
    (closes issue #16196)
    Reported by: atis
    
    Review: https://reviewboard.asterisk.org/r/623/
  ........
................
  r260148 | tilghman | 2010-04-29 13:15:57 -0500 (Thu, 29 Apr 2010) | 2 lines
  
  Pattern match fail.
................
  r260231 | rmudgett | 2010-04-29 17:44:14 -0500 (Thu, 29 Apr 2010) | 33 lines
  
  Merged revisions 260195 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r260195 | rmudgett | 2010-04-29 17:11:47 -0500 (Thu, 29 Apr 2010) | 26 lines
    
    DTMF CallerID detection problems.
    
    The code handling DTMF CallerID drops digits on long CallerID numbers and
    may timeout waiting for the first ring with shorter numbers.
    
    The DTMF emulation mode was not turned off when processing DTMF CallerID.
    When the emulation code gets behind in processing the DTMF digits it can
    skip a digit.
    
    For shorter numbers, the timeout may have been too short.  I increased it
    from 2 seconds to 4 seconds.  Four seconds is a typical time between rings
    for many countries.
    
    (closes issue #16460)
    Reported by: sum
    Patches:
          issue16460.patch uploaded by rmudgett (license 664)
          issue16460_v1.6.2.patch uploaded by rmudgett (license 664)
    Tested by: sum, rmudgett
    
    Review: https://reviewboard.asterisk.org/r/634/
    
    JIRA SWP-562
    JIRA AST-334
    JIRA SWP-901
  ........
................
  r260280 | tilghman | 2010-04-30 00:23:56 -0500 (Fri, 30 Apr 2010) | 7 lines
  
  Logic fixups for a sample FREENUM dialplan context.
  
  (closes issue #17263)
   Reported by: pprindeville
   Patches: 
         freenum-dialplan.patch#3 uploaded by pprindeville (license 347)
................
  r260292 | tilghman | 2010-04-30 01:19:35 -0500 (Fri, 30 Apr 2010) | 13 lines
  
  Don't allow file descriptors to go above 64k, when we're closing them in a fork(2).
  
  This saves time, when, even though the system allows the process limit to be
  that high, the practical limit is much lower.  Also introduce an additional
  optimization, in the form of using the CLOEXEC flag to close descriptors at
  the right time.
  
  (closes issue #17223)
   Reported by: dbackeberg
   Patches: 
         20100423__issue17223.diff.txt uploaded by tilghman (license 14)
   Tested by: dbackeberg
................
  r260344 | mmichelson | 2010-04-30 14:53:36 -0500 (Fri, 30 Apr 2010) | 10 lines
  
  Fix logic reversal error when queue callers join the queue.
  
  When a specific position is specified for the queue, the idea
  was that the caller cannot be placed ahead of higher-priority
  callers. Unfortunately, the logic was reversed so that the caller
  could ONLY be placed ahead of higher priority callers.
  
  Discovered while writing a unit test.
................
  r260346 | mmichelson | 2010-04-30 15:11:02 -0500 (Fri, 30 Apr 2010) | 24 lines
  
  Merged revisions 260345 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r260345 | mmichelson | 2010-04-30 15:08:15 -0500 (Fri, 30 Apr 2010) | 18 lines
    
    Fix potential crash from race condition due to accessing channel data without the channel locked.
    
    In res_musiconhold.c, there are several places where a channel's
    stream's existence is checked prior to calling ast_closestream on it. The issue
    here is that in several cases, the channel was not locked while checking the
    stream. The result was that if two threads checked the state of the channel's
    stream at approximately the same time, then there could be a situation where
    both threads attempt to call ast_closestream on the channel's stream. The result
    here is that the refcount for the stream would go below 0, resulting in a crash.
    
    I have added proper channel locking to res_musiconhold.c to ensure that
    we do not try to check chan->stream without the channel locked. A Digium customer
    has been using this patch for several weeks and has not had any crashes since
    applying the patch.
    
    ABE-2147
  ........
................
  r260435 | rmudgett | 2010-04-30 17:24:28 -0500 (Fri, 30 Apr 2010) | 11 lines
  
  Separate the uses of NUM_DCHANS and MAX_CHANNELS into PRI, SS7, and MFCR2 users.
  
  Created
  SIG_PRI_MAX_CHANNELS, SIG_PRI_NUM_DCHANS
  SIG_SS7_MAX_CHANNELS, SIG_SS7_NUM_DCHANS
  SIG_MFCR2_MAX_CHANNELS
  
  Also fixed the declaration of pollers[] in mfcr2_monitor().  It was
  dimensioned to the number of bytes in struct dahdi_mfcr2.pvts[] and not to
  the same dimension of the struct dahdi_mfcr2.pvts[].
................
  r260437 | jpeeler | 2010-04-30 17:36:49 -0500 (Fri, 30 Apr 2010) | 18 lines
  
  Merged revisions 260434 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r260434 | jpeeler | 2010-04-30 17:22:46 -0500 (Fri, 30 Apr 2010) | 11 lines
    
    Ensure channel state is not incorrectly set in the case of a very early answer.
    
    The needringing bit was being read in dahdi_read after answering thereby
    setting the state to ringing from up. This clears needringing upon answering
    so that is no longer possible.
    
    (closes issue #17067)
    Reported by: tzafrir
    Patches: 
          needringing.diff uploaded by tzafrir (license 46)
  ........
................
  r260521 | eliel | 2010-05-01 21:52:23 -0500 (Sat, 01 May 2010) | 8 lines
  
  Avoid making AstData depend on libxml2 to compile.
  
  We have some functions inside the AstData API to get the tree
  in XML form, but it is not required at the moment to compile 
  asterisk and we can disable that part of the API if we don't have
  libxml2 support.
................
  r260570 | lmadsen | 2010-05-03 09:58:23 -0500 (Mon, 03 May 2010) | 9 lines
  
  Merged revisions 260569 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r260569 | lmadsen | 2010-05-03 09:57:39 -0500 (Mon, 03 May 2010) | 1 line
    
    Minor typo pointed out by pabelanger on IRC.
  ........
................
  r260663 | pabelanger | 2010-05-03 12:06:48 -0500 (Mon, 03 May 2010) | 20 lines
  
  Merged revisions 260661-260662 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r260661 | pabelanger | 2010-05-03 12:41:30 -0400 (Mon, 03 May 2010) | 10 lines
    
    non-root make install PREFIX=/tmp fails.
    Prepend libdir when executing mkpkgconfig allowing non-root installs to work.
    
    (closes issue #17268)
    Reported by: pabelanger
    Patches:
          issue17268.patch uploaded by pabelanger (license 224)
    Tested by: pabelanger
  ........
    r260662 | pabelanger | 2010-05-03 12:54:41 -0400 (Mon, 03 May 2010) | 3 lines
    
    Should have removed /usr/lib/ part. Thanks Qwell.
  ........
................
  r260757 | jpeeler | 2010-05-03 17:13:24 -0500 (Mon, 03 May 2010) | 16 lines
  
  Add new admin features to meetme: Roll call, eject all, mute all, record in-conf 
  
  This patch adds the following in-conference admin DTMF features:
  *81 - Roll call (or simply user count if INTROUSER isn't enabled)
  *82 - Eject all non-admins
  *83 - Mute/unmute all non-admins
  *84 - Start recording the conference on the fly
  
  FWIW, this code uses newly recorded prompts.
  
  (closes issue #16379)
  Reported by: rfinnie
  Patches:
        meetme-enhancements-232771-v1.patch uploaded by rfinnie (license 940)
        modified slightly by me
................
  r260802 | qwell | 2010-05-04 10:49:57 -0500 (Tue, 04 May 2010) | 9 lines
  
  Merged revisions 260801 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r260801 | qwell | 2010-05-04 10:49:27 -0500 (Tue, 04 May 2010) | 1 line
    
    Fix fallout from removing  from configure script.  Pointed out by philipp64 on #asterisk-dev
  ........
................
  r260924 | jpeeler | 2010-05-04 13:51:28 -0500 (Tue, 04 May 2010) | 18 lines
  
  Merged revisions 260923 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r260923 | jpeeler | 2010-05-04 13:46:46 -0500 (Tue, 04 May 2010) | 12 lines
    
    Voicemail transfer to operator should occur immediately, not after main menu.
    
    There were two scenarios in the advanced options that while using the
    operator=yes and review=yes options, the transfer occurred only after exiting
    the main menu (after sending a reply or leaving a message for an extension).
    Now after the audio is processed for the reply or message the transfer occurs
    immediately as expected.
    
    ABE-2107
    ABE-2108
  ........
................
  r261007 | rmudgett | 2010-05-04 16:10:58 -0500 (Tue, 04 May 2010) | 8 lines
  
  The inalarm flag is not passed up from the sig_analog and sig_pri submodules.
  
  The CLI "dahdi show channel" command was not correctly reporting the
  InAlarm status.
  
  The inalarm flag is now consistently passed between chan_dahdi and
  submodules.
................
  r261051 | mmichelson | 2010-05-04 17:46:42 -0500 (Tue, 04 May 2010) | 12 lines
  
  Add new possible value to autopause option to allow members to be autopaused in all queues.
  
  See the CHANGES file and queues.conf.sample for more details.
  
  (closes issue #17008)
  Reported by: jlpedrosa
  Patches:
        queues.autopause_en_review.diff uploaded by jlpedrosa (license 1002)
  
  Review: https://reviewboard.asterisk.org/r/581/
................
  r261095 | tilghman | 2010-05-04 18:51:52 -0500 (Tue, 04 May 2010) | 18 lines
  
  Merged revisions 261093-261094 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r261093 | tilghman | 2010-05-04 18:36:53 -0500 (Tue, 04 May 2010) | 7 lines
    
    Protect against overflow, when calculating how long to wait for a frame.
    
    (closes issue #17128)
     Reported by: under
     Patches: 
           d.diff uploaded by under (license 914)
  ........
    r261094 | tilghman | 2010-05-04 18:47:08 -0500 (Tue, 04 May 2010) | 2 lines
    
    Add a tiny corner case to the previous commit
  ........
................
  r261124 | pabelanger | 2010-05-04 19:22:32 -0500 (Tue, 04 May 2010) | 14 lines
  
  New static asterisk.conf.sample file.
  
  This simply moves the functionality from the Makefile (cleaning it up) into an external
  asterisk.conf.samples file.  Also updates formatting (easier to read) and grammar
  changes to asterisk.conf.samples.
  
  (closes issue #17027)
  Reported by: pabelanger
  Patches:
        0017027.asterisk.conf.v6.patch uploaded by pabelanger (license 224)
  Tested by: qwell, lmadsen, pabelanger, chappell
  
  Review: https://reviewboard.asterisk.org/r/616/
................
  r261180 | pabelanger | 2010-05-04 19:44:37 -0500 (Tue, 04 May 2010) | 12 lines
  
  New 'manager show settings' CLI command.
  
  See the CHANGES file for more details.
  
  (closes issue #16343)
  Reported by: pabelanger
  Patches:
        issue16343.patch.v5 uploaded by pabelanger (license 224)
  Tested by: pabelanger, tilghman, lmadsen
  
  Review: https://reviewboard.asterisk.org/r/630/
................

Added:
    team/group/srtp_reboot/configs/asterisk.conf.sample
      - copied unchanged from r261180, trunk/configs/asterisk.conf.sample
Modified:
    team/group/srtp_reboot/   (props changed)
    team/group/srtp_reboot/CHANGES
    team/group/srtp_reboot/Makefile
    team/group/srtp_reboot/apps/app_meetme.c
    team/group/srtp_reboot/apps/app_queue.c
    team/group/srtp_reboot/apps/app_voicemail.c
    team/group/srtp_reboot/build_tools/make_build_h
    team/group/srtp_reboot/channels/chan_dahdi.c
    team/group/srtp_reboot/channels/chan_sip.c
    team/group/srtp_reboot/channels/sig_analog.c
    team/group/srtp_reboot/channels/sig_analog.h
    team/group/srtp_reboot/channels/sig_pri.c
    team/group/srtp_reboot/channels/sig_pri.h
    team/group/srtp_reboot/channels/sip/include/sip.h
    team/group/srtp_reboot/configs/extensions.conf.sample
    team/group/srtp_reboot/configs/queues.conf.sample
    team/group/srtp_reboot/doc/HOWTO_collect_debug_information.txt
    team/group/srtp_reboot/include/asterisk/audiohook.h
    team/group/srtp_reboot/include/asterisk/cli.h
    team/group/srtp_reboot/include/asterisk/data.h
    team/group/srtp_reboot/include/asterisk/extconf.h
    team/group/srtp_reboot/include/asterisk/manager.h
    team/group/srtp_reboot/main/audiohook.c
    team/group/srtp_reboot/main/channel.c
    team/group/srtp_reboot/main/data.c
    team/group/srtp_reboot/main/manager.c
    team/group/srtp_reboot/main/strcompat.c
    team/group/srtp_reboot/res/res_musiconhold.c

Propchange: team/group/srtp_reboot/
------------------------------------------------------------------------------
    automerge = *

Propchange: team/group/srtp_reboot/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Propchange: team/group/srtp_reboot/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue May  4 20:01:08 2010
@@ -1,1 +1,1 @@
-/trunk:1-259949
+/trunk:1-261181

Modified: team/group/srtp_reboot/CHANGES
URL: http://svnview.digium.com/svn/asterisk/team/group/srtp_reboot/CHANGES?view=diff&rev=261183&r1=261182&r2=261183
==============================================================================
--- team/group/srtp_reboot/CHANGES (original)
+++ team/group/srtp_reboot/CHANGES Tue May  4 20:01:08 2010
@@ -248,6 +248,10 @@
   * A 'relative-peroidic-announce' option has been added to queues.conf.  When
     enabled, this option will cause periodic announce times to be calculated
     from the end of announcements rather than from the beginning.
+  * The autopause option in queues.conf can be passed a new value, "all." The
+    result is that if a member becomes auto-paused, he will be paused in all
+	queues for which he is a member, not just the queue that failed to reach
+	the member.
 
 mISDN channel driver (chan_misdn) changes
 ----------------------------------------
@@ -470,6 +474,8 @@
    can optionally accept *module* names instead (with or without the .so extension),
    which applies the setting to the entire module specified, regardless of which source
    files it was built from.
+ * New 'manager show settings' command showing the current settings loaded from
+   manager.conf. 
 
 ------------------------------------------------------------------------------
 --- Functionality changes from Asterisk 1.6.1 to Asterisk 1.6.2  -------------
@@ -1289,6 +1295,8 @@
      conference when there is only one member and the M option is used.
   * Added MEETME_INFO dialplan function which provides a way to query
      various properties of a Meetme conference.
+  * Added new admin features: *81: Roll call, *82: eject all, *83: mute all, 
+     and *84: record in-conf
 
 Other Dialplan Application Changes
 ----------------------------------

Modified: team/group/srtp_reboot/Makefile
URL: http://svnview.digium.com/svn/asterisk/team/group/srtp_reboot/Makefile?view=diff&rev=261183&r1=261182&r2=261183
==============================================================================
--- team/group/srtp_reboot/Makefile (original)
+++ team/group/srtp_reboot/Makefile Tue May  4 20:01:08 2010
@@ -60,6 +60,7 @@
 export ASTSBINDIR
 export AGI_DIR
 export ASTCONFPATH
+export ASTKEYDIR
 
 export OSARCH			# Operating system
 export PROC			# Processor type
@@ -489,7 +490,7 @@
 	rm -f build_tools/menuselect-deps
 
 datafiles: _all
-	CFLAGS="$(_ASTCFLAGS) $(ASTCFLAGS)" build_tools/mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig;
+	CFLAGS="$(_ASTCFLAGS) $(ASTCFLAGS)" build_tools/mkpkgconfig $(DESTDIR)$(libdir)/pkgconfig;
 # 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.
@@ -701,73 +702,22 @@
 		echo "Installing file $$x"; \
 		$(INSTALL) -m 644 $$x $${dst} ;\
 	done
-	@if [ "$(OVERWRITE)" = "y" ] || [ ! -f $(DESTDIR)$(ASTCONFPATH) ]; then \
-		echo "Creating asterisk.conf"; \
-		( \
-		echo "[directories](!) ; remove the (!) to enable this" ; \
-		echo "astetcdir => $(ASTETCDIR)" ; \
-		echo "astmoddir => $(MODULES_DIR)" ; \
-		echo "astvarlibdir => $(ASTVARLIBDIR)" ; \
-		echo "astdbdir => $(ASTDBDIR)" ; \
-		echo "astkeydir => $(ASTKEYDIR)" ; \
-		echo "astdatadir => $(ASTDATADIR)" ; \
-		echo "astagidir => $(AGI_DIR)" ; \
-		echo "astspooldir => $(ASTSPOOLDIR)" ; \
-		echo "astrundir => $(ASTVARRUNDIR)" ; \
-		echo "astlogdir => $(ASTLOGDIR)" ; \
-		echo "" ; \
-		echo "[options]" ; \
-		echo ";verbose = 3" ; \
-		echo ";debug = 3" ; \
-		echo ";alwaysfork = yes ; same as -F at startup" ; \
-		echo ";nofork = yes ; same as -f at startup" ; \
-		echo ";quiet = yes ; same as -q at startup" ; \
-		echo ";timestamp = yes ; same as -T at startup" ; \
-		echo ";execincludes = yes ; support #exec in config files" ; \
-		echo ";console = yes ; Run as console (same as -c at startup)" ; \
-		echo ";highpriority = yes ; Run realtime priority (same as -p at startup)" ; \
-		echo ";initcrypto = yes ; Initialize crypto keys (same as -i at startup)" ; \
-		echo ";nocolor = yes ; Disable console colors" ; \
-		echo ";dontwarn = yes ; Disable some warnings" ; \
-		echo ";dumpcore = yes ; Dump core on crash (same as -g at startup)" ; \
-		echo ";languageprefix = yes ; Use the new sound prefix path syntax" ; \
-		echo ";internal_timing = yes" ; \
-		echo ";systemname = my_system_name ; prefix uniqueid with a system name for global uniqueness issues" ; \
-		echo ";autosystemname = yes ; automatically set systemname to hostname - uses 'localhost' on failure, or systemname if set" ; \
-		echo ";maxcalls = 10 ; Maximum amount of calls allowed" ; \
-		echo ";maxload = 0.9 ; Asterisk stops accepting new calls if the load average exceed this limit" ; \
-		echo ";maxfiles = 1000 ; Maximum amount of openfiles" ; \
-		echo ";minmemfree = 1 ; in MBs, Asterisk stops accepting new calls if the amount of free memory falls below this watermark" ; \
-		echo ";cache_record_files = yes ; Cache recorded sound files to another directory during recording" ; \
-		echo ";record_cache_dir = /tmp ; Specify cache directory (used in conjunction with cache_record_files)" ; \
-		echo ";transmit_silence = yes ; Transmit silence while a channel is in a waiting state, a recording only state, or when DTMF is" ; \
-		echo "                        ; being generated.  Note that the silence internally is generated in raw signed linear format." ; \
-		echo "                        ; This means that it must be transcoded into the native format of the channel before it can be sent" ; \
-		echo "                        ; to the device.  It is for this reason that this is optional, as it may result in requiring a" ; \
-		echo "                        ; temporary codec translation path for a channel that may not otherwise require one." ; \
-		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" ; \
-		echo ";lightbackground = yes ; If your terminal is set for a light-colored background" ; \
-		echo "documentation_language = en_US ; Set the Language you want Documentation displayed in. Value is in the same format as locale names" ; \
-		echo ";hideconnect = yes ; Hide messages displayed when a remote console connects and disconnects" ; \
-		echo ";lockconfdir = no ; Protect the directory containing the configuration files (/etc/asterisk) with a lock" ; \
-		echo "" ; \
-		echo "; Changing the following lines may compromise your security." ; \
-		echo ";[files]" ; \
-		echo ";astctlpermissions = 0660" ; \
-		echo ";astctlowner = root" ; \
-		echo ";astctlgroup = apache" ; \
-		echo ";astctl = asterisk.ctl" ; \
-		echo "" ; \
-		echo "[compat]" ; \
-		echo "pbx_realtime=1.6" ; \
-		echo "res_agi=1.6" ; \
-		echo "app_set=1.6" ; \
-		) > $(DESTDIR)$(ASTCONFPATH) ; \
-	else \
-		echo "Skipping asterisk.conf creation"; \
-	fi
+	if [ "$(OVERWRITE)" = "y" ]; then \
+		echo "Updating asterisk.conf"; \
+		sed \
+			-e 's|^;astetcdir.*$$|;astetcdir => $(ASTETCDIR)|' \
+			-e 's|^;astmoddir.*$$|;astmoddir => $(MODULES_DIR)|' \
+			-e 's|^;astvarlibdir.*$$|;astvarlibdir => $(ASTVARLIBDIR)|' \
+			-e 's|^;astdbdir.*$$|;astdbdir => $(ASTDBDIR)|' \
+			-e 's|^;astkeydir.*$$|;astkeydir => $(ASTKEYDIR)|' \
+			-e 's|^;astdatadir.*$$|;astdatadir => $(ASTDATADIR)|' \
+			-e 's|^;astagidir.*$$|;astagidir => $(AGI_DIR)|' \
+			-e 's|^;astspooldir.*$$|;astspooldir => $(ASTSPOOLDIR)|' \
+			-e 's|^;astrundir.*$$|;astrundir => $(ASTVARRUNDIR)|' \
+			-e 's|^;astlogdir.*$$|;astlogdir => $(ASTLOGDIR)|' \
+			$(DESTDIR)$(ASTCONFPATH) > $(DESTDIR)$(ASTCONFPATH).tmp \
+			&& mv $(DESTDIR)$(ASTCONFPATH).tmp $(DESTDIR)$(ASTCONFPATH); \
+	fi ;\
 	mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/INBOX
 	build_tools/make_sample_voicemail $(DESTDIR)/$(ASTDATADIR) $(DESTDIR)/$(ASTSPOOLDIR)
 	@mkdir -p $(DESTDIR)$(ASTDATADIR)/phoneprov

Modified: team/group/srtp_reboot/apps/app_meetme.c
URL: http://svnview.digium.com/svn/asterisk/team/group/srtp_reboot/apps/app_meetme.c?view=diff&rev=261183&r1=261182&r2=261183
==============================================================================
--- team/group/srtp_reboot/apps/app_meetme.c (original)
+++ team/group/srtp_reboot/apps/app_meetme.c Tue May  4 20:01:08 2010
@@ -706,6 +706,7 @@
 	enum recording_state recording:2;       /*!< recording status */
 	unsigned int isdynamic:1;               /*!< Created on the fly? */
 	unsigned int locked:1;                  /*!< Is the conference locked? */
+	unsigned int gmuted:1;                  /*!< Is the conference globally muted? (all non-admins) */
 	pthread_t recordthread;                 /*!< thread for recording */
 	ast_mutex_t recordthreadlock;           /*!< control threads trying to start recordthread */
 	pthread_attr_t attr;                    /*!< thread attribute */
@@ -2105,6 +2106,7 @@
 	int ret = -1;
 	int x;
 	int menu_active = 0;
+	int menu8_active = 0;
 	int talkreq_manager = 0;
 	int using_pseudo = 0;
 	int duration = 20;
@@ -2326,6 +2328,7 @@
 	user->chan = chan;
 	user->userflags = *confflags;
 	user->adminflags = ast_test_flag64(confflags, CONFFLAG_STARTMUTED) ? ADMINFLAG_SELFMUTED : 0;
+	user->adminflags |= (conf->gmuted) ? ADMINFLAG_MUTED : 0;
 	user->talking = -1;
 
 	ast_mutex_unlock(&conf->playlock);
@@ -3057,7 +3060,159 @@
 					if (musiconhold) {
 			   			ast_moh_stop(chan);
 					}
-					if (ast_test_flag64(confflags, CONFFLAG_ADMIN)) {
+					if (menu8_active) {
+						/* *8 Submenu */
+						dtmf = f->subclass.integer;
+						if (dtmf) {
+							int keepplaying;
+							int playednamerec;
+							switch(dtmf) {
+							case '1': /* *81 Roll call */
+								keepplaying = 1;
+								playednamerec = 0;
+								if (conf->users == 1) {
+									if (keepplaying && !ast_streamfile(chan, "conf-onlyperson", chan->language)) {
+										res = ast_waitstream(chan, AST_DIGIT_ANY);
+										ast_stopstream(chan);
+										if (res > 0)
+											keepplaying = 0;
+									}
+								} else if (conf->users == 2) {
+									if (keepplaying && !ast_streamfile(chan, "conf-onlyone", chan->language)) {
+										res = ast_waitstream(chan, AST_DIGIT_ANY);
+										ast_stopstream(chan);
+										if (res > 0)
+											keepplaying = 0;
+									}
+								} else {
+									if (keepplaying && !ast_streamfile(chan, "conf-thereare", chan->language)) {
+										res = ast_waitstream(chan, AST_DIGIT_ANY);
+										ast_stopstream(chan);
+										if (res > 0)
+											keepplaying = 0;
+									}
+									if (keepplaying) {
+										res = ast_say_number(chan, conf->users - 1, AST_DIGIT_ANY, chan->language, (char *) NULL);
+										if (res > 0)
+											keepplaying = 0;
+									}
+									if (keepplaying && !ast_streamfile(chan, "conf-otherinparty", chan->language)) {
+										res = ast_waitstream(chan, AST_DIGIT_ANY);
+										ast_stopstream(chan);
+										if (res > 0)
+											keepplaying = 0;
+									}
+								}
+								AST_LIST_TRAVERSE(&conf->userlist, usr, list) {
+									if (ast_fileexists(usr->namerecloc, NULL, NULL)) {
+										if (keepplaying && !ast_streamfile(chan, usr->namerecloc, chan->language)) {
+											res = ast_waitstream(chan, AST_DIGIT_ANY);
+											ast_stopstream(chan);
+											if (res > 0)
+												keepplaying = 0;
+										}
+										playednamerec = 1;
+									}
+								}
+								if (keepplaying && playednamerec && !ast_streamfile(chan, "conf-roll-callcomplete", chan->language)) {
+									res = ast_waitstream(chan, AST_DIGIT_ANY);
+									ast_stopstream(chan);
+									if (res > 0)
+										keepplaying = 0;
+								}
+								break;
+							case '2': /* *82 Eject all non-admins */
+								if (conf->users == 1) {
+									if(!ast_streamfile(chan, "conf-errormenu", chan->language))
+										ast_waitstream(chan, "");
+								} else {
+									AST_LIST_TRAVERSE(&conf->userlist, usr, list) {
+										if (!ast_test_flag64(&usr->userflags, CONFFLAG_ADMIN))
+											usr->adminflags |= ADMINFLAG_KICKME;
+									}
+								}
+								ast_stopstream(chan);
+								break;
+							case '3': /* *83 (Admin) mute/unmute all non-admins */
+								if(conf->gmuted) {
+									conf->gmuted = 0;
+									AST_LIST_TRAVERSE(&conf->userlist, usr, list) {
+										if (!ast_test_flag64(&usr->userflags, CONFFLAG_ADMIN))
+											usr->adminflags &= ~ADMINFLAG_MUTED;
+									}
+									if (!ast_streamfile(chan, "conf-now-unmuted", chan->language))
+										ast_waitstream(chan, "");
+								} else {
+									conf->gmuted = 1;
+									AST_LIST_TRAVERSE(&conf->userlist, usr, list) {
+										if (!ast_test_flag64(&usr->userflags, CONFFLAG_ADMIN))
+											usr->adminflags |= ADMINFLAG_MUTED;
+									}
+									if (!ast_streamfile(chan, "conf-now-muted", chan->language))
+										ast_waitstream(chan, "");
+								}
+								ast_stopstream(chan);
+								break;
+							case '4': /* *84 Record conference */
+								if (conf->recording != MEETME_RECORD_ACTIVE) {
+									ast_set_flag64(confflags, CONFFLAG_RECORDCONF);
+
+									if (!conf->recordingfilename) {
+										const char *var;
+										ast_channel_lock(chan);
+										if ((var = pbx_builtin_getvar_helper(chan, "MEETME_RECORDINGFILE"))) {
+											conf->recordingfilename = ast_strdup(var);
+										}
+										if ((var = pbx_builtin_getvar_helper(chan, "MEETME_RECORDINGFORMAT"))) {
+											conf->recordingformat = ast_strdup(var);
+										}
+										ast_channel_unlock(chan);
+										if (!conf->recordingfilename) {
+											snprintf(recordingtmp, sizeof(recordingtmp), "meetme-conf-rec-%s-%s", conf->confno, chan->uniqueid);
+											conf->recordingfilename = ast_strdup(recordingtmp);
+										}
+										if (!conf->recordingformat) {
+											conf->recordingformat = ast_strdup("wav");
+										}
+										ast_verb(4, "Starting recording of MeetMe Conference %s into file %s.%s.\n",
+				    							conf->confno, conf->recordingfilename, conf->recordingformat);
+									}
+
+									ast_mutex_lock(&conf->recordthreadlock);
+									if ((conf->recordthread == AST_PTHREADT_NULL) && ast_test_flag64(confflags, CONFFLAG_RECORDCONF) && ((conf->lchan = ast_request("DAHDI", AST_FORMAT_SLINEAR, chan, "pseudo", NULL)))) {
+										ast_set_read_format(conf->lchan, AST_FORMAT_SLINEAR);
+										ast_set_write_format(conf->lchan, AST_FORMAT_SLINEAR);
+										dahdic.chan = 0;
+										dahdic.confno = conf->dahdiconf;
+										dahdic.confmode = DAHDI_CONF_CONFANN | DAHDI_CONF_CONFANNMON;
+										if (ioctl(conf->lchan->fds[0], DAHDI_SETCONF, &dahdic)) {
+											ast_log(LOG_WARNING, "Error starting listen channel\n");
+											ast_hangup(conf->lchan);
+											conf->lchan = NULL;
+										} else {
+											ast_pthread_create_detached_background(&conf->recordthread, NULL, recordthread, conf);
+										}
+									}
+									ast_mutex_unlock(&conf->recordthreadlock);
+
+									if (!ast_streamfile(chan, "conf-now-recording", chan->language))
+										ast_waitstream(chan, "");
+
+								}
+
+								ast_stopstream(chan);
+								break;
+							default:
+								if (!ast_streamfile(chan, "conf-errormenu", chan->language))
+									ast_waitstream(chan, "");
+								ast_stopstream(chan);
+								break;
+							}
+						}
+
+						menu8_active = 0;
+						menu_active = 0;
+					} else if (ast_test_flag64(confflags, CONFFLAG_ADMIN)) {
 						/* Admin menu */
 						if (!menu_active) {
 							menu_active = 1;
@@ -3145,7 +3300,7 @@
 								tweak_talk_volume(user, VOL_DOWN);
 								break;
 							case '8':
-								menu_active = 0;
+								menu8_active = 1;
 								break;
 							case '9':
 								tweak_talk_volume(user, VOL_UP);
@@ -3234,7 +3389,7 @@
 							}
 						}
 					}
-					if (musiconhold) {
+					if (musiconhold && !menu_active) {
 						conf_start_moh(chan, optargs[OPT_ARG_MOH_CLASS]);
 					}
 

Modified: team/group/srtp_reboot/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/team/group/srtp_reboot/apps/app_queue.c?view=diff&rev=261183&r1=261182&r2=261183
==============================================================================
--- team/group/srtp_reboot/apps/app_queue.c (original)
+++ team/group/srtp_reboot/apps/app_queue.c Tue May  4 20:01:08 2010
@@ -671,6 +671,12 @@
 	QUEUE_STRATEGY_WRANDOM
 };
 
+enum {
+     QUEUE_AUTOPAUSE_OFF = 0,
+     QUEUE_AUTOPAUSE_ON,
+     QUEUE_AUTOPAUSE_ALL
+};
+
 enum queue_reload_mask {
 	QUEUE_RELOAD_PARAMETERS = (1 << 0),
 	QUEUE_RELOAD_MEMBER = (1 << 1),
@@ -691,6 +697,16 @@
 	{ QUEUE_STRATEGY_LINEAR, "linear" },
 	{ QUEUE_STRATEGY_WRANDOM, "wrandom"},
 };
+
+static const struct autopause {
+	int autopause;
+	const char *name;
+} autopausesmodes [] = {
+	{ QUEUE_AUTOPAUSE_OFF,"no" },
+	{ QUEUE_AUTOPAUSE_ON, "yes" },
+	{ QUEUE_AUTOPAUSE_ALL,"all" },
+};
+
 
 static struct ast_taskprocessor *devicestate_tps;
 
@@ -1037,6 +1053,26 @@
 	return -1;
 }
 
+static int autopause2int(const char *autopause)
+{
+	int x;
+	/*This 'double check' that default value is OFF */
+	if (ast_strlen_zero(autopause))
+		return QUEUE_AUTOPAUSE_OFF;
+
+	/*This 'double check' is to ensure old values works */
+	if(ast_true(autopause))
+		return QUEUE_AUTOPAUSE_ON;
+
+	for (x = 0; x < ARRAY_LEN(autopausesmodes); x++) {
+		if (!strcasecmp(autopause, autopausesmodes[x].name))
+			return autopausesmodes[x].autopause;
+	}
+
+	/*This 'double check' that default value is OFF */
+	return QUEUE_AUTOPAUSE_OFF;
+}
+
 static int queue_hash_cb(const void *obj, const int flags)
 {
 	const struct call_queue *q = obj;
@@ -1466,6 +1502,7 @@
 	q->periodicannouncefrequency = 0;
 	q->randomperiodicannounce = 0;
 	q->numperiodicannounce = 0;
+	q->autopause = QUEUE_AUTOPAUSE_OFF;
 	q->timeoutpriority = TIMEOUT_PRIORITY_APP;
 	if (!q->members) {
 		if (q->strategy == QUEUE_STRATEGY_LINEAR)
@@ -1771,7 +1808,7 @@
 		if (!strcasecmp(val, "mixmonitor"))
 			q->montype = 1;
 	} else if (!strcasecmp(param, "autopause")) {
-		q->autopause = ast_true(val);
+		q->autopause = autopause2int(val);
 	} else if (!strcasecmp(param, "maxlen")) {
 		q->maxlen = atoi(val);
 		if (q->maxlen < 0)
@@ -2263,7 +2300,7 @@
 			/* <= is necessary for the position comparison because it may not be possible to enter
 			 * at our desired position since higher-priority callers may have taken the position we want
 			 */
-			if (!inserted && (qe->prio <= cur->prio) && position && (position <= pos + 1)) {
+			if (!inserted && (qe->prio >= cur->prio) && position && (position <= pos + 1)) {
 				insert_entry(q, prev, qe, &pos);
 				/*pos is incremented inside insert_entry, so don't need to add 1 here*/
 				if (position < pos) {
@@ -3128,11 +3165,23 @@
 						qe->parent->eventwhencalled == QUEUE_EVENT_VARIABLES ? vars2manager(qe->chan, vars, sizeof(vars)) : "");
 	}
 	ast_queue_log(qe->parent->name, qe->chan->uniqueid, membername, "RINGNOANSWER", "%d", rnatime);
-	if (qe->parent->autopause && pause) {
-		if (!set_member_paused(qe->parent->name, interface, "Auto-Pause", 1)) {
-			ast_verb(3, "Auto-Pausing Queue Member %s in queue %s since they failed to answer.\n", interface, qe->parent->name);
+	if (qe->parent->autopause != QUEUE_AUTOPAUSE_OFF && pause) {
+		if (qe->parent->autopause == QUEUE_AUTOPAUSE_ON) {
+			if (!set_member_paused(qe->parent->name, interface, "Auto-Pause", 1)) {
+				ast_verb(3, "Auto-Pausing Queue Member %s in queue %s since they failed to answer.\n",
+					interface, qe->parent->name);
+			} else {
+				ast_verb(3, "Failed to pause Queue Member %s in queue %s!\n", interface, qe->parent->name);
+			}
 		} else {
-			ast_verb(3, "Failed to pause Queue Member %s in queue %s!\n", interface, qe->parent->name);
+			/* If queue autopause is mode all, just don't send any queue to stop.
+			* the function will stop in all queues */
+			if (!set_member_paused("", interface, "Auto-Pause", 1)) {
+				ast_verb(3, "Auto-Pausing Queue Member %s in all queues since they failed to answer on queue %s.\n",
+						interface, qe->parent->name);
+			} else {
+					ast_verb(3, "Failed to pause Queue Member %s in all queues!\n", interface);
+			}
 		}
 	}
 	return;

Modified: team/group/srtp_reboot/apps/app_voicemail.c
URL: http://svnview.digium.com/svn/asterisk/team/group/srtp_reboot/apps/app_voicemail.c?view=diff&rev=261183&r1=261182&r2=261183
==============================================================================
--- team/group/srtp_reboot/apps/app_voicemail.c (original)
+++ team/group/srtp_reboot/apps/app_voicemail.c Tue May  4 20:01:08 2010
@@ -464,6 +464,7 @@
 #define VM_MESSAGEWRAP   (1 << 17)  /*!< Wrap around from the last message to the first, and vice-versa */
 #define VM_FWDURGAUTO    (1 << 18)  /*!< Autoset of Urgent flag on forwarded Urgent messages set globally */
 #define ERROR_LOCK_PATH  -100
+#define OPERATOR_EXIT     300
 
 
 enum vm_box {
@@ -5594,7 +5595,7 @@
 			pbx_builtin_setvar_helper(chan, "VMSTATUS", "USEREXIT");
 		}
 		ast_free(tmp);
-		return 0;
+		return OPERATOR_EXIT;
 	}
 
 	/* Allow all other digits to exit Voicemail and return to the dialplan */
@@ -9713,7 +9714,7 @@
 				case '1': /* Reply */
 					if (vms.lastmsg > -1 && !vms.starting) {
 						cmd = advanced_options(chan, vmu, &vms, vms.curmsg, 1, record_gain);
-						if (cmd == ERROR_LOCK_PATH) {
+						if (cmd == ERROR_LOCK_PATH || cmd == OPERATOR_EXIT) {
 							res = cmd;
 							goto out;
 						}
@@ -9763,9 +9764,8 @@
 				case '5': /* Leave VoiceMail */
 					if (ast_test_flag(vmu, VM_SVMAIL)) {
 						cmd = forward_message(chan, context, &vms, vmu, vmfmts, 1, record_gain, 0);
-						if (cmd == ERROR_LOCK_PATH) {
+						if (cmd == ERROR_LOCK_PATH || cmd == OPERATOR_EXIT) {
 							res = cmd;
-							ast_log(AST_LOG_WARNING, "forward_message failed to lock path.\n");
 							goto out;
 						}
 					} else
@@ -10074,13 +10074,14 @@
 	if (res > -1) {
 		ast_stopstream(chan);
 		adsi_goodbye(chan);
-		if (valid) {
+		if (valid && res != OPERATOR_EXIT) {
 			if (silentexit)
 				res = ast_play_and_wait(chan, "vm-dialout");
 			else 
 				res = ast_play_and_wait(chan, "vm-goodbye");
-			if (res > 0)
-				res = 0;
+		}
+		if ((valid && res > 0) || res == OPERATOR_EXIT) {
+			res = 0;
 		}
 		if (useadsi)
 			ast_adsi_unload_session(chan);

Modified: team/group/srtp_reboot/build_tools/make_build_h
URL: http://svnview.digium.com/svn/asterisk/team/group/srtp_reboot/build_tools/make_build_h?view=diff&rev=261183&r1=261182&r2=261183
==============================================================================
--- team/group/srtp_reboot/build_tools/make_build_h (original)
+++ team/group/srtp_reboot/build_tools/make_build_h Tue May  4 20:01:08 2010
@@ -3,7 +3,7 @@
 KERNEL=`uname -r`
 MACHINE=`uname -m`
 OS=`uname -s`
-USER=`${ID} -un`
+USER=`id | awk -F")" '{print $1}'| awk -F"(" '{print $2}'`
 DATE=`date -u "+%Y-%m-%d %H:%M:%S"`
 cat << END
 /*

Modified: team/group/srtp_reboot/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/group/srtp_reboot/channels/chan_dahdi.c?view=diff&rev=261183&r1=261182&r2=261183
==============================================================================
--- team/group/srtp_reboot/channels/chan_dahdi.c (original)
+++ team/group/srtp_reboot/channels/chan_dahdi.c Tue May  4 20:01:08 2010
@@ -75,12 +75,14 @@
 
 #ifdef HAVE_SS7
 /* put this here until sig_ss7 comes along */
-#define NUM_DCHANS		4		/*!< No more than 4 d-channels */
-#define MAX_CHANNELS	672		/*!< No more than a DS3 per trunk group */
+#define SIG_SS7_NUM_DCHANS		4		/*!< No more than 4 d-channels */
+#define SIG_SS7_MAX_CHANNELS	672		/*!< No more than a DS3 per trunk group */
 #include <libss7.h>
 #endif
 
 #ifdef HAVE_OPENR2
+/* put this here until sig_mfcr2 comes along */
+#define SIG_MFCR2_MAX_CHANNELS	672		/*!< No more than a DS3 per trunk group */
 #include <openr2.h>
 #endif
 
@@ -528,9 +530,9 @@
 struct dahdi_ss7 {
 	pthread_t master;						/*!< Thread of master */
 	ast_mutex_t lock;
-	int fds[NUM_DCHANS];
+	int fds[SIG_SS7_NUM_DCHANS];
 	int numsigchans;
-	int linkstate[NUM_DCHANS];
+	int linkstate[SIG_SS7_NUM_DCHANS];
 	int numchans;
 	int type;
 	enum {
@@ -544,7 +546,7 @@
 	char subscriberprefix[20];					/*!< area access code + area code ('0'+area code for european dialplans) */
 	char unknownprefix[20];						/*!< for unknown dialplans */
 	struct ss7 *ss7;
-	struct dahdi_pvt *pvts[MAX_CHANNELS];				/*!< Member channel pvt structs */
+	struct dahdi_pvt *pvts[SIG_SS7_MAX_CHANNELS];	/*!< Member channel pvt structs */
 	int flags;							/*!< Linkset flags */
 };
 
@@ -563,7 +565,7 @@
 struct dahdi_mfcr2 {
 	pthread_t r2master;		       /*!< Thread of master */
 	openr2_context_t *protocol_context;    /*!< OpenR2 context handle */
-	struct dahdi_pvt *pvts[MAX_CHANNELS];     /*!< Member channel pvt structs */
+	struct dahdi_pvt *pvts[SIG_MFCR2_MAX_CHANNELS];     /*!< Member channel pvt structs */
 	int numchans;                          /*!< Number of channels in this R2 block */
 	int monitored_count;                   /*!< Number of channels being monitored */
 };
@@ -601,8 +603,8 @@
 #ifdef HAVE_PRI
 

[... 1587 lines stripped ...]



More information about the asterisk-commits mailing list