[asterisk-commits] mmichelson: branch jrothenberger/asterisk-urgent r114869 - in /team/jrothenbe...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Apr 29 19:04:12 CDT 2008


Author: mmichelson
Date: Tue Apr 29 19:04:11 2008
New Revision: 114869

URL: http://svn.digium.com/view/asterisk?view=rev&rev=114869
Log:
Resolve and reset. Getting ready to merge this sometime purdy soon.


Added:
    team/jrothenberger/asterisk-urgent/contrib/scripts/astcli
      - copied unchanged from r114866, trunk/contrib/scripts/astcli
    team/jrothenberger/asterisk-urgent/doc/chan_sip-perf-testing.txt
      - copied unchanged from r114866, trunk/doc/chan_sip-perf-testing.txt
    team/jrothenberger/asterisk-urgent/include/asterisk/dlinkedlists.h
      - copied unchanged from r114866, trunk/include/asterisk/dlinkedlists.h
    team/jrothenberger/asterisk-urgent/pbx/ael/ael-test/ael-ntest24/
      - copied from r114866, trunk/pbx/ael/ael-test/ael-ntest24/
    team/jrothenberger/asterisk-urgent/pbx/ael/ael-test/ael-ntest24/extensions.ael
      - copied unchanged from r114866, trunk/pbx/ael/ael-test/ael-ntest24/extensions.ael
    team/jrothenberger/asterisk-urgent/pbx/ael/ael-test/ref.ael-ntest24
      - copied unchanged from r114866, trunk/pbx/ael/ael-test/ref.ael-ntest24
    team/jrothenberger/asterisk-urgent/phoneprov/polycom_line.xml
      - copied unchanged from r114866, trunk/phoneprov/polycom_line.xml
    team/jrothenberger/asterisk-urgent/res/res_http_post.c
      - copied unchanged from r114866, trunk/res/res_http_post.c
    team/jrothenberger/asterisk-urgent/tests/test_dlinklists.c
      - copied unchanged from r114866, trunk/tests/test_dlinklists.c
    team/jrothenberger/asterisk-urgent/utils/refcounter.c
      - copied unchanged from r114866, trunk/utils/refcounter.c
Removed:
    team/jrothenberger/asterisk-urgent/apps/app_pickupchan.c
Modified:
    team/jrothenberger/asterisk-urgent/   (props changed)
    team/jrothenberger/asterisk-urgent/CHANGES
    team/jrothenberger/asterisk-urgent/Makefile
    team/jrothenberger/asterisk-urgent/UPGRADE.txt
    team/jrothenberger/asterisk-urgent/apps/app_alarmreceiver.c
    team/jrothenberger/asterisk-urgent/apps/app_authenticate.c
    team/jrothenberger/asterisk-urgent/apps/app_chanspy.c
    team/jrothenberger/asterisk-urgent/apps/app_dial.c
    team/jrothenberger/asterisk-urgent/apps/app_directed_pickup.c
    team/jrothenberger/asterisk-urgent/apps/app_directory.c
    team/jrothenberger/asterisk-urgent/apps/app_disa.c
    team/jrothenberger/asterisk-urgent/apps/app_dumpchan.c
    team/jrothenberger/asterisk-urgent/apps/app_externalivr.c
    team/jrothenberger/asterisk-urgent/apps/app_festival.c
    team/jrothenberger/asterisk-urgent/apps/app_followme.c
    team/jrothenberger/asterisk-urgent/apps/app_ices.c
    team/jrothenberger/asterisk-urgent/apps/app_jack.c
    team/jrothenberger/asterisk-urgent/apps/app_meetme.c
    team/jrothenberger/asterisk-urgent/apps/app_minivm.c
    team/jrothenberger/asterisk-urgent/apps/app_mp3.c
    team/jrothenberger/asterisk-urgent/apps/app_nbscat.c
    team/jrothenberger/asterisk-urgent/apps/app_parkandannounce.c
    team/jrothenberger/asterisk-urgent/apps/app_playback.c
    team/jrothenberger/asterisk-urgent/apps/app_queue.c
    team/jrothenberger/asterisk-urgent/apps/app_rpt.c
    team/jrothenberger/asterisk-urgent/apps/app_setcallerid.c
    team/jrothenberger/asterisk-urgent/apps/app_sms.c
    team/jrothenberger/asterisk-urgent/apps/app_speech_utils.c
    team/jrothenberger/asterisk-urgent/apps/app_voicemail.c
    team/jrothenberger/asterisk-urgent/apps/app_waitforring.c
    team/jrothenberger/asterisk-urgent/apps/app_zapras.c
    team/jrothenberger/asterisk-urgent/apps/app_zapscan.c
    team/jrothenberger/asterisk-urgent/build_tools/cflags.xml
    team/jrothenberger/asterisk-urgent/cdr/cdr_csv.c
    team/jrothenberger/asterisk-urgent/cdr/cdr_pgsql.c
    team/jrothenberger/asterisk-urgent/channels/chan_alsa.c
    team/jrothenberger/asterisk-urgent/channels/chan_console.c
    team/jrothenberger/asterisk-urgent/channels/chan_gtalk.c
    team/jrothenberger/asterisk-urgent/channels/chan_h323.c
    team/jrothenberger/asterisk-urgent/channels/chan_iax2.c
    team/jrothenberger/asterisk-urgent/channels/chan_jingle.c
    team/jrothenberger/asterisk-urgent/channels/chan_local.c
    team/jrothenberger/asterisk-urgent/channels/chan_mgcp.c
    team/jrothenberger/asterisk-urgent/channels/chan_misdn.c
    team/jrothenberger/asterisk-urgent/channels/chan_oss.c
    team/jrothenberger/asterisk-urgent/channels/chan_sip.c
    team/jrothenberger/asterisk-urgent/channels/chan_skinny.c
    team/jrothenberger/asterisk-urgent/channels/chan_unistim.c
    team/jrothenberger/asterisk-urgent/channels/chan_usbradio.c
    team/jrothenberger/asterisk-urgent/channels/chan_vpb.cc
    team/jrothenberger/asterisk-urgent/channels/chan_zap.c
    team/jrothenberger/asterisk-urgent/channels/iax2-provision.c
    team/jrothenberger/asterisk-urgent/configs/cdr.conf.sample
    team/jrothenberger/asterisk-urgent/configs/features.conf.sample
    team/jrothenberger/asterisk-urgent/configs/iax.conf.sample
    team/jrothenberger/asterisk-urgent/configs/manager.conf.sample
    team/jrothenberger/asterisk-urgent/configs/res_ldap.conf.sample
    team/jrothenberger/asterisk-urgent/configs/sip.conf.sample
    team/jrothenberger/asterisk-urgent/configs/sip_notify.conf.sample
    team/jrothenberger/asterisk-urgent/configs/skinny.conf.sample
    team/jrothenberger/asterisk-urgent/configs/voicemail.conf.sample
    team/jrothenberger/asterisk-urgent/configure
    team/jrothenberger/asterisk-urgent/configure.ac
    team/jrothenberger/asterisk-urgent/contrib/scripts/astgenkey.8
    team/jrothenberger/asterisk-urgent/contrib/scripts/autosupport
    team/jrothenberger/asterisk-urgent/contrib/scripts/get_ilbc_source.sh
    team/jrothenberger/asterisk-urgent/contrib/scripts/vmail.cgi
    team/jrothenberger/asterisk-urgent/doc/CODING-GUIDELINES
    team/jrothenberger/asterisk-urgent/doc/tex/ael.tex
    team/jrothenberger/asterisk-urgent/doc/tex/channelvariables.tex
    team/jrothenberger/asterisk-urgent/formats/format_wav.c
    team/jrothenberger/asterisk-urgent/funcs/func_channel.c
    team/jrothenberger/asterisk-urgent/funcs/func_strings.c
    team/jrothenberger/asterisk-urgent/include/asterisk/app.h
    team/jrothenberger/asterisk-urgent/include/asterisk/astobj.h
    team/jrothenberger/asterisk-urgent/include/asterisk/astobj2.h
    team/jrothenberger/asterisk-urgent/include/asterisk/channel.h
    team/jrothenberger/asterisk-urgent/include/asterisk/dnsmgr.h
    team/jrothenberger/asterisk-urgent/include/asterisk/dsp.h
    team/jrothenberger/asterisk-urgent/include/asterisk/features.h
    team/jrothenberger/asterisk-urgent/include/asterisk/frame.h
    team/jrothenberger/asterisk-urgent/include/asterisk/http.h
    team/jrothenberger/asterisk-urgent/include/asterisk/lock.h
    team/jrothenberger/asterisk-urgent/include/asterisk/logger.h
    team/jrothenberger/asterisk-urgent/include/asterisk/manager.h
    team/jrothenberger/asterisk-urgent/include/asterisk/mod_format.h
    team/jrothenberger/asterisk-urgent/include/asterisk/pbx.h
    team/jrothenberger/asterisk-urgent/include/asterisk/sched.h
    team/jrothenberger/asterisk-urgent/include/asterisk/slinfactory.h
    team/jrothenberger/asterisk-urgent/include/asterisk/strings.h
    team/jrothenberger/asterisk-urgent/main/Makefile
    team/jrothenberger/asterisk-urgent/main/app.c
    team/jrothenberger/asterisk-urgent/main/ast_expr2.c
    team/jrothenberger/asterisk-urgent/main/ast_expr2.fl
    team/jrothenberger/asterisk-urgent/main/ast_expr2.h
    team/jrothenberger/asterisk-urgent/main/ast_expr2.y
    team/jrothenberger/asterisk-urgent/main/ast_expr2f.c
    team/jrothenberger/asterisk-urgent/main/asterisk.c
    team/jrothenberger/asterisk-urgent/main/astobj2.c
    team/jrothenberger/asterisk-urgent/main/audiohook.c
    team/jrothenberger/asterisk-urgent/main/autoservice.c
    team/jrothenberger/asterisk-urgent/main/callerid.c
    team/jrothenberger/asterisk-urgent/main/channel.c
    team/jrothenberger/asterisk-urgent/main/dns.c
    team/jrothenberger/asterisk-urgent/main/dnsmgr.c
    team/jrothenberger/asterisk-urgent/main/dsp.c
    team/jrothenberger/asterisk-urgent/main/event.c
    team/jrothenberger/asterisk-urgent/main/features.c
    team/jrothenberger/asterisk-urgent/main/file.c
    team/jrothenberger/asterisk-urgent/main/frame.c
    team/jrothenberger/asterisk-urgent/main/http.c
    team/jrothenberger/asterisk-urgent/main/logger.c
    team/jrothenberger/asterisk-urgent/main/manager.c
    team/jrothenberger/asterisk-urgent/main/pbx.c
    team/jrothenberger/asterisk-urgent/main/rtp.c
    team/jrothenberger/asterisk-urgent/main/sched.c
    team/jrothenberger/asterisk-urgent/main/slinfactory.c
    team/jrothenberger/asterisk-urgent/main/utils.c
    team/jrothenberger/asterisk-urgent/pbx/ael/ael-test/ref.ael-ntest10
    team/jrothenberger/asterisk-urgent/pbx/ael/ael-test/ref.ael-test1
    team/jrothenberger/asterisk-urgent/pbx/ael/ael-test/ref.ael-test18
    team/jrothenberger/asterisk-urgent/pbx/ael/ael-test/ref.ael-test19
    team/jrothenberger/asterisk-urgent/pbx/ael/ael-test/ref.ael-test3
    team/jrothenberger/asterisk-urgent/pbx/ael/ael-test/ref.ael-test5
    team/jrothenberger/asterisk-urgent/pbx/ael/ael-test/ref.ael-test8
    team/jrothenberger/asterisk-urgent/pbx/ael/ael-test/ref.ael-vtest13
    team/jrothenberger/asterisk-urgent/pbx/ael/ael-test/ref.ael-vtest17
    team/jrothenberger/asterisk-urgent/pbx/pbx_lua.c
    team/jrothenberger/asterisk-urgent/phoneprov/000000000000-directory.xml
    team/jrothenberger/asterisk-urgent/phoneprov/polycom.xml
    team/jrothenberger/asterisk-urgent/res/res_agi.c
    team/jrothenberger/asterisk-urgent/res/res_config_ldap.c
    team/jrothenberger/asterisk-urgent/res/res_config_pgsql.c
    team/jrothenberger/asterisk-urgent/res/res_config_sqlite.c
    team/jrothenberger/asterisk-urgent/res/res_jabber.c
    team/jrothenberger/asterisk-urgent/res/res_musiconhold.c
    team/jrothenberger/asterisk-urgent/res/res_phoneprov.c
    team/jrothenberger/asterisk-urgent/utils/   (props changed)
    team/jrothenberger/asterisk-urgent/utils/Makefile
    team/jrothenberger/asterisk-urgent/utils/ael_main.c
    team/jrothenberger/asterisk-urgent/utils/astman.c
    team/jrothenberger/asterisk-urgent/utils/check_expr.c
    team/jrothenberger/asterisk-urgent/utils/conf2ael.c
    team/jrothenberger/asterisk-urgent/utils/hashtest.c
    team/jrothenberger/asterisk-urgent/utils/hashtest2.c

Propchange: team/jrothenberger/asterisk-urgent/
------------------------------------------------------------------------------
    automerge = *

Propchange: team/jrothenberger/asterisk-urgent/
------------------------------------------------------------------------------
--- automerge-email (original)
+++ automerge-email Tue Apr 29 19:04:11 2008
@@ -1,1 +1,1 @@
-*
+mmichelson at digium.com

Propchange: team/jrothenberger/asterisk-urgent/
------------------------------------------------------------------------------
Binary property 'branch-1.4-blocked' - no diff available.

Propchange: team/jrothenberger/asterisk-urgent/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Propchange: team/jrothenberger/asterisk-urgent/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Apr 29 19:04:11 2008
@@ -1,1 +1,1 @@
-/trunk:1-111736
+/trunk:1-114867

Modified: team/jrothenberger/asterisk-urgent/CHANGES
URL: http://svn.digium.com/view/asterisk/team/jrothenberger/asterisk-urgent/CHANGES?view=diff&rev=114869&r1=114868&r2=114869
==============================================================================
--- team/jrothenberger/asterisk-urgent/CHANGES (original)
+++ team/jrothenberger/asterisk-urgent/CHANGES Tue Apr 29 19:04:11 2008
@@ -6,6 +6,7 @@
 ------------------
  * Added a new dialplan function, AST_CONFIG(), which allows you to access
    variables from an Asterisk configuration file.
+ * The JACK_HOOK function now has a c() option to supply a custom client name.
 
 Zaptel channel driver (chan_zap) Changes
 ----------------------------------------
@@ -25,17 +26,51 @@
    the arguments to Directory; previously, you could enter only 3, regardless
    of how many names are in your company.  For large companies, this should be
    quite helpful.
+ * Voicemail now permits a mailbox setting to wrap around from first to last
+   messages, if the "messagewrap" option is set to a true value.
+ * Dial has a new option: F(context^extension^pri), which permits a callee to
+   continue in the dialplan, at the specified label, if the caller hangs up.
+ * ChanSpy and ExtenSpy have a new option, 's' which suppresses speaking the
+   technology name (e.g. SIP, IAX, etc) of the channel being spied on.
+ * The Jack application now has a c() option to supply a custom client name.
+ * Chanspy has a new option, 'B', which can be used to "barge" on a call. This is
+   like the pre-existing whisper mode, except that the spy can also talk to the
+   participant on the bridged channel as well.
+ * Chanspy has a new option, 'n', which will allow for the spied-on party's name
+   to be spoken instead of the channel name or number. For more information on the
+   use of this option, issue the command "core show application ChanSpy" from the 
+   Asterisk CLI.
 
 SIP Changes
 -----------
  * The ATTENDED_TRANSFER_COMPLETE_SOUND can now be set using setvar to cause a given
    audio file to be played upon completion of an attended transfer.
+ * Added DNS manager support to registrations for peers referencing peer entries.
+   DNS manager runs in the background which allows DNS lookups to be run asynchronously 
+   as well as periodically updating the IP address. These properties allow for
+   better performance as well as recovery in the event of an IP change.
+ * Performance improvements via using hash tables (astobj2) and doubly-linked lists to improve 
+   load/reload of large numbers of peers/users by ~40x (for large lists of peers.
+   Initially, we saw 4x improvement in call setup/destruction, but at the time
+   of merging, this gain has disappeared; further research will be done to try
+   and restore this performance improvement. Astobj2 refcounting is now used
+   for users, peers, and dialogs.  Users are encouraged to assist in regression
+   testing and problem reporting!
+
+IAX Changes
+-----------
+ * Existing DNS manager lookups extended to check for SRV records.
 
 CLI Changes
 -----------
   * New CLI command, "config reload <file.conf>" which reloads any module that
      references that particular configuration file.  Also added "config list"
      which shows which configuration files are in use.
+
+DNS manager changes
+-------------------
+  * Addresses managed by DNS manager now can check to see if there is a DNS
+    SRV record for a given domain and will use that hostname/port if present.
 
 ------------------------------------------------------------------------------
 --- Functionality changes from Asterisk 1.4.X to Asterisk 1.6.0  -------------
@@ -141,6 +176,10 @@
   * Added a CLI command, "devstate change", which allows you to set custom device
      states from the func_devstate module that provides the DEVICE_STATE() function
      and handling of the "Custom:" devices.
+  * New CLI command: "sip show sched" which shows all ast_sched entries for sip,
+    sorted into the different possible callbacks, with the number of entries
+    currently scheduled for each. Gives you a feel for how busy the sip channel
+    driver is.
 
 SIP changes
 -----------
@@ -194,7 +233,7 @@
      configs/sip.conf.sample for more information on how it is used.
   * Added a new configuration option "authfailureevents" that enables manager events when
     a peer can't authenticate properly. 
-  * Added DNS manager support to registrations not referencing a peer entry.
+  * Added DNS manager support to registrations for peers not referencing a peer entry.
 
 IAX2 changes
 ------------
@@ -243,6 +282,9 @@
      SIP call to Voicemail by putting a Local channel in the middle.  This
      feature is enabled by using the 'j' option in the Dial string to the Local
      channel in conjunction with the existing 'n' option for local channels.
+  * A 'b' option has been added which causes chan_local to return the actual channel
+     that is behind it when queried. This is useful for transfer scenarios as the
+     actual channel will be transferred, not the Local channel.
 
 Zaptel channel driver (chan_zap) Changes
 ----------------------------------------
@@ -397,6 +439,8 @@
      for the "meetme" command.
   * Added the ability to specify the music on hold class used to play into the
      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.
 
 Other Dialplan Application Changes
 ----------------------------------
@@ -469,6 +513,17 @@
      first pass at conversion.
   * aelparse will now read extensions.conf to see if a referenced
      macro or context is there before issueing a warning.
+  * AEL parser sets a local channel variable ~~EXTEN~~, to 
+    preserve the value of ${EXTEN} thru switch statements.
+  * New operator in $[...] expressions: the ~~ operator serves
+    as a concatenation operator. AT THE MOMENT, it is really only
+    necessary and useful in AEL, especially in if() expressions.
+    Operation: ${a} ~~ ${b|  with force both a and b to strings, strip 
+    any enclosing double-quotes, and evaluate to the value of a
+    concatenated with the value of b.  For example if a is set to
+    "xyz"  and b has the value "abc", then ${a} ~~ ${b| would
+    evaluate to xyzabc .
+
 
 Call Features (res_features) Changes
 ------------------------------------
@@ -598,6 +653,18 @@
   * A new option when starting a remote asterisk (rasterisk, asterisk -r) for
      specifying which socket to use to connect to the running Asterisk daemon
      (-s)
+  * Performance enhancements to the sched facility, which is used in
+    the channel drivers, etc. Added hashtabs and doubly-linked lists
+    to speed up deletion; start at the beginning or end of list to
+    speed up insertion.
+  * Added Doubly-linked lists after the fashion of linkedlists.h. They are in
+    dlinkedlists.h. Doubly-linked lists feature fast deletion times.
+    Added regression tests to the tests/ dir, also.
+  * Added a refcount trace feature to astobj2 for those trying to balance
+    object creation, deletion; work, play; space and time. See the
+    notes in astobj2.h. Also, see utils/refcounter as well, as a
+    quick way to find unbalanced refcounts in what could be a sea
+    of objects that were balanced.
   * Added logging to 'make update' command.  See update.log
   * Added strictrtp option to rtp.conf. If enabled this will drop RTP packets that
      do not come from the remote party.

Modified: team/jrothenberger/asterisk-urgent/Makefile
URL: http://svn.digium.com/view/asterisk/team/jrothenberger/asterisk-urgent/Makefile?view=diff&rev=114869&r1=114868&r2=114869
==============================================================================
--- team/jrothenberger/asterisk-urgent/Makefile (original)
+++ team/jrothenberger/asterisk-urgent/Makefile Tue Apr 29 19:04:11 2008
@@ -498,7 +498,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)
@@ -510,6 +510,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)/
@@ -571,7 +573,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
@@ -845,7 +847,7 @@
 menuselect/nmenuselect: menuselect/makeopts
 	$(MAKE_MENUSELECT) nmenuselect
 
-menuselect/makeopts:
+menuselect/makeopts: makeopts
 	$(MAKE_MENUSELECT) makeopts
 
 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
@@ -867,4 +869,4 @@
 asterisk.pdf:
 	$(MAKE) -C doc/tex asterisk.pdf
 
-.PHONY: menuselect main sounds clean dist-clean distclean all prereqs cleantest uninstall _uninstall uninstall-all pdf 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 main/version.c include/asterisk/version.h
+.PHONY: menuselect main sounds clean dist-clean distclean all prereqs cleantest uninstall _uninstall uninstall-all pdf 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 main/version.c include/asterisk/version.h installdirs

Modified: team/jrothenberger/asterisk-urgent/UPGRADE.txt
URL: http://svn.digium.com/view/asterisk/team/jrothenberger/asterisk-urgent/UPGRADE.txt?view=diff&rev=114869&r1=114868&r2=114869
==============================================================================
--- team/jrothenberger/asterisk-urgent/UPGRADE.txt (original)
+++ team/jrothenberger/asterisk-urgent/UPGRADE.txt Tue Apr 29 19:04:11 2008
@@ -105,6 +105,8 @@
 * WaitMusicOnHold application is now deprecated in favor of extended MusicOnHold.
 * SetMusicOnHold is now deprecated. You should use Set(CHANNEL(musicclass)=...)
   instead.
+* While app_directory has always relied on having a voicemail.conf or users.conf file
+  correctly set up, it now is dependent on app_voicemail being compiled as well.
 
 Dialplan Functions:
 

Modified: team/jrothenberger/asterisk-urgent/apps/app_alarmreceiver.c
URL: http://svn.digium.com/view/asterisk/team/jrothenberger/asterisk-urgent/apps/app_alarmreceiver.c?view=diff&rev=114869&r1=114868&r2=114869
==============================================================================
--- team/jrothenberger/asterisk-urgent/apps/app_alarmreceiver.c (original)
+++ team/jrothenberger/asterisk-urgent/apps/app_alarmreceiver.c Tue Apr 29 19:04:11 2008
@@ -252,6 +252,9 @@
 
 		/* If they hung up, leave */
 		if ((f->frametype == AST_FRAME_CONTROL) && (f->subclass == AST_CONTROL_HANGUP)) {
+			if (f->seqno) {
+				chan->hangupcause = f->seqno;
+			}
 			ast_frfree(f);
 			res = -1;
 			break;

Modified: team/jrothenberger/asterisk-urgent/apps/app_authenticate.c
URL: http://svn.digium.com/view/asterisk/team/jrothenberger/asterisk-urgent/apps/app_authenticate.c?view=diff&rev=114869&r1=114868&r2=114869
==============================================================================
--- team/jrothenberger/asterisk-urgent/apps/app_authenticate.c (original)
+++ team/jrothenberger/asterisk-urgent/apps/app_authenticate.c Tue Apr 29 19:04:11 2008
@@ -126,9 +126,7 @@
 			/* Compare against a fixed password */
 			if (!strcmp(passwd, arglist.password))
 				break;
-		}
-
-		if (ast_test_flag(&flags,OPT_DATABASE)) {
+		} else if (ast_test_flag(&flags,OPT_DATABASE)) {
 			char tmp[256];
 			/* Compare against a database key */
 			if (!ast_db_get(arglist.password + 1, passwd, tmp, sizeof(tmp))) {

Modified: team/jrothenberger/asterisk-urgent/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/team/jrothenberger/asterisk-urgent/apps/app_chanspy.c?view=diff&rev=114869&r1=114868&r2=114869
==============================================================================
--- team/jrothenberger/asterisk-urgent/apps/app_chanspy.c (original)
+++ team/jrothenberger/asterisk-urgent/apps/app_chanspy.c Tue Apr 29 19:04:11 2008
@@ -49,6 +49,7 @@
 #include "asterisk/lock.h"
 
 #define AST_NAME_STRLEN 256
+#define NUM_SPYGROUPS 128
 
 static const char *tdesc = "Listen to a channel, and optionally whisper into it";
 static const char *app_chan = "ChanSpy";
@@ -69,30 +70,43 @@
 "        exit to it. This also disables choosing a channel based on 'chanprefix'\n"
 "        and a digit sequence.\n"
 "  Options:\n"
-"    b             - Only spy on channels involved in a bridged call.\n"
-"    g(grp)        - Match only channels where their SPYGROUP variable is set to\n"
-"                    contain 'grp' in an optional : delimited list.\n"
-"    q             - Don't play a beep when beginning to spy on a channel, or speak the\n"
-"                    selected channel name.\n"
-"    r[(basename)] - Record the session to the monitor spool directory. An\n"
-"                    optional base for the filename may be specified. The\n"
-"                    default is 'chanspy'.\n"
-"    v([value])    - Adjust the initial volume in the range from -4 to 4. A\n"
-"                    negative value refers to a quieter setting.\n"
-"    w             - Enable 'whisper' mode, so the spying channel can talk to\n"
-"                    the spied-on channel.\n"
-"    W             - Enable 'private whisper' mode, so the spying channel can\n"
-"                    talk to the spied-on channel but cannot listen to that\n"
-"                    channel.\n"
-"    o             - Only listen to audio coming from this channel.\n"
-"    X             - Allow the user to exit ChanSpy to a valid single digit\n"
-"                    numeric extension in the current context or the context\n"
-"                    specified by the SPY_EXIT_CONTEXT channel variable. The\n"
-"                    name of the last channel that was spied on will be stored\n"
-"                    in the SPY_CHANNEL variable.\n"
-"    e(ext)        - Enable 'enforced' mode, so the spying channel can\n"
-"                    only monitor extensions whose name is in the 'ext' : \n"
-"                    delimited list.\n"
+"    b                      - Only spy on channels involved in a bridged call.\n"
+"    g(grp)                 - Only spy on channels in which one or more of the groups \n"
+"                             listed in 'grp' matches one or more groups from the\n"
+"                             SPYGROUP variable set on the channel to be spied upon.\n"
+"                             Note that both 'grp' and SPYGROUP can contain either a\n"
+"                             single group or a colon-delimited list of groups, such\n"
+"                             as 'sales:support:accounting'.\n"
+"    n([mailbox][@context]) - Say the name of the person being spied on if that person has recorded\n"
+"                             his/her name. If a context is specified, then that voicemail context will\n"
+"                             be searched when retrieving the name, otherwise the \"default\" context\n"
+"                             will be searched. If no mailbox is specified, then the channel name will\n"
+"                             be used when searching for the name (i.e. if SIP/1000 is the channel being\n"
+"                             spied on and no mailbox is specified, then \"1000\" will be used when searching\n"
+"                             for the name).\n"
+"    q                      - Don't play a beep when beginning to spy on a channel, or speak the\n"
+"                             selected channel name.\n"
+"    r[(basename)]          - Record the session to the monitor spool directory. An\n"
+"                             optional base for the filename may be specified. The\n"
+"                             default is 'chanspy'.\n"
+"    s                      - Skip the playback of the channel type (i.e. SIP, IAX, etc) when\n"
+"                             speaking the selected channel name.\n"
+"    v([value])             - Adjust the initial volume in the range from -4 to 4. A\n"
+"                             negative value refers to a quieter setting.\n"
+"    w                      - Enable 'whisper' mode, so the spying channel can talk to\n"
+"                             the spied-on channel.\n"
+"    W                      - Enable 'private whisper' mode, so the spying channel can\n"
+"                             talk to the spied-on channel but cannot listen to that\n"
+"                             channel.\n"
+"    o                      - Only listen to audio coming from this channel.\n"
+"    X                      - Allow the user to exit ChanSpy to a valid single digit\n"
+"                             numeric extension in the current context or the context\n"
+"                             specified by the SPY_EXIT_CONTEXT channel variable. The\n"
+"                             name of the last channel that was spied on will be stored\n"
+"                             in the SPY_CHANNEL variable.\n"
+"    e(ext)                 - Enable 'enforced' mode, so the spying channel can\n"
+"                             only monitor extensions whose name is in the 'ext' : \n"
+"                             delimited list.\n"
 ;
 
 static const char *app_ext = "ExtenSpy";
@@ -109,27 +123,40 @@
 "        single digit extension exists in the correct context it ChanSpy will\n"
 "        exit to it.\n"
 "  Options:\n"
-"    b             - Only spy on channels involved in a bridged call.\n"
-"    g(grp)        - Match only channels where their ${SPYGROUP} variable is set to\n"
-"                    contain 'grp' in an optional : delimited list.\n"
-"    q             - Don't play a beep when beginning to spy on a channel, or speak the\n"
-"                    selected channel name.\n"
-"    r[(basename)] - Record the session to the monitor spool directory. An\n"
-"                    optional base for the filename may be specified. The\n"
-"                    default is 'chanspy'.\n"
-"    v([value])    - Adjust the initial volume in the range from -4 to 4. A\n"
-"                    negative value refers to a quieter setting.\n"
-"    w             - Enable 'whisper' mode, so the spying channel can talk to\n"
-"                    the spied-on channel.\n"
-"    W             - Enable 'private whisper' mode, so the spying channel can\n"
-"                    talk to the spied-on channel but cannot listen to that\n"
-"                    channel.\n"
-"    o             - Only listen to audio coming from this channel.\n"
-"    X             - Allow the user to exit ChanSpy to a valid single digit\n"
-"                    numeric extension in the current context or the context\n"
-"                    specified by the SPY_EXIT_CONTEXT channel variable. The\n"
-"                    name of the last channel that was spied on will be stored\n"
-"                    in the SPY_CHANNEL variable.\n"
+"    b                      - Only spy on channels involved in a bridged call.\n"
+"    g(grp)                 - Only spy on channels in which one or more of the groups \n"
+"                             listed in 'grp' matches one or more groups from the\n"
+"                             SPYGROUP variable set on the channel to be spied upon.\n"
+"                             Note that both 'grp' and SPYGROUP can contain either a\n"
+"                             single group or a colon-delimited list of groups, such\n"
+"                             as 'sales:support:accounting'.\n"
+"    n([mailbox][@context]) - Say the name of the person being spied on if that person has recorded\n"
+"                             his/her name. If a context is specified, then that voicemail context will\n"
+"                             be searched when retrieving the name, otherwise the \"default\" context\n"
+"                             will be searched. If no mailbox is specified, then the channel name will\n"
+"                             be used when searching for the name (i.e. if SIP/1000 is the channel being\n"
+"                             spied on and no mailbox is specified, then \"1000\" will be used when searching\n"
+"                             for the name).\n"
+"    q                      - Don't play a beep when beginning to spy on a channel, or speak the\n"
+"                             selected channel name.\n"
+"    r[(basename)]          - Record the session to the monitor spool directory. An\n"
+"                             optional base for the filename may be specified. The\n"
+"                             default is 'chanspy'.\n"
+"    s                      - Skip the playback of the channel type (i.e. SIP, IAX, etc) when\n"
+"                             speaking the selected channel name.\n"
+"    v([value])             - Adjust the initial volume in the range from -4 to 4. A\n"
+"                             negative value refers to a quieter setting.\n"
+"    w                      - Enable 'whisper' mode, so the spying channel can talk to\n"
+"                             the spied-on channel.\n"
+"    W                      - Enable 'private whisper' mode, so the spying channel can\n"
+"                             talk to the spied-on channel but cannot listen to that\n"
+"                             channel.\n"
+"    o                      - Only listen to audio coming from this channel.\n"
+"    X                      - Allow the user to exit ChanSpy to a valid single digit\n"
+"                             numeric extension in the current context or the context\n"
+"                             specified by the SPY_EXIT_CONTEXT channel variable. The\n"
+"                             name of the last channel that was spied on will be stored\n"
+"                             in the SPY_CHANNEL variable.\n"
 ;
 
 enum {
@@ -143,6 +170,9 @@
 	OPTION_READONLY  = (1 << 7),    /* Don't mix the two channels */
 	OPTION_EXIT      = (1 << 8),    /* Exit to a valid single digit extension */
 	OPTION_ENFORCED  = (1 << 9),    /* Enforced mode */
+	OPTION_NOTECH    = (1 << 10),   /* Skip technology name playback */
+	OPTION_BARGE     = (1 << 11),   /* Barge mode (whisper to both channels) */
+	OPTION_NAME      = (1 << 12),   /* Say the name of the person on whom we will spy */
 } chanspy_opt_flags;
 
 enum {
@@ -150,12 +180,14 @@
 	OPT_ARG_GROUP,
 	OPT_ARG_RECORD,
 	OPT_ARG_ENFORCED,
+	OPT_ARG_NAME,
 	OPT_ARG_ARRAY_SIZE,
 } chanspy_opt_args;
 
 AST_APP_OPTIONS(spy_opts, {
 	AST_APP_OPTION('q', OPTION_QUIET),
 	AST_APP_OPTION('b', OPTION_BRIDGED),
+	AST_APP_OPTION('B', OPTION_BARGE),
 	AST_APP_OPTION('w', OPTION_WHISPER),
 	AST_APP_OPTION('W', OPTION_PRIVATE),
 	AST_APP_OPTION_ARG('v', OPTION_VOLUME, OPT_ARG_VOLUME),
@@ -164,6 +196,8 @@
 	AST_APP_OPTION_ARG('e', OPTION_ENFORCED, OPT_ARG_ENFORCED),
 	AST_APP_OPTION('o', OPTION_READONLY),
 	AST_APP_OPTION('X', OPTION_EXIT),
+	AST_APP_OPTION('s', OPTION_NOTECH),
+	AST_APP_OPTION_ARG('n', OPTION_NAME, OPT_ARG_NAME),
 });
 
 
@@ -171,6 +205,7 @@
 	/* spy data */
 	struct ast_audiohook spy_audiohook;
 	struct ast_audiohook whisper_audiohook;
+	struct ast_audiohook bridge_whisper_audiohook;
 	int fd;
 	int volfactor;
 };
@@ -224,7 +259,7 @@
 	.generate = spy_generate,
 };
 
-static int start_spying(struct ast_channel *chan, const char *spychan_name, struct ast_audiohook *audiohook) 
+static int start_spying(struct ast_channel *chan, const char *spychan_name, struct ast_audiohook *audiohook)
 {
 	int res = 0;
 	struct ast_channel *peer = NULL;
@@ -233,12 +268,9 @@
 
 	res = ast_audiohook_attach(chan, audiohook);
 
-	if (!res && ast_test_flag(chan, AST_FLAG_NBRIDGE) && (peer = ast_bridged_channel(chan))) {
-		ast_channel_unlock(chan);
+	if (!res && ast_test_flag(chan, AST_FLAG_NBRIDGE) && (peer = ast_bridged_channel(chan))) { 
 		ast_softhangup(peer, AST_SOFTHANGUP_UNBRIDGE);
-	} else
-		ast_channel_unlock(chan);
-
+	}
 	return res;
 }
 
@@ -287,16 +319,23 @@
 
 	ast_audiohook_init(&csth.spy_audiohook, AST_AUDIOHOOK_TYPE_SPY, "ChanSpy");
 
-	if (start_spying(spyee, spyer_name, &csth.spy_audiohook)) { /* Unlocks spyee */
+	if (start_spying(spyee, spyer_name, &csth.spy_audiohook)) {
 		ast_audiohook_destroy(&csth.spy_audiohook);
+		ast_channel_unlock(spyee);
 		return 0;
 	}
 
-	if (ast_test_flag(flags, OPTION_WHISPER)) {
+	if (ast_test_flag(flags, OPTION_BARGE)) {
+  		ast_audiohook_init(&csth.whisper_audiohook, AST_AUDIOHOOK_TYPE_WHISPER, "ChanSpy");
+		ast_audiohook_init(&csth.bridge_whisper_audiohook, AST_AUDIOHOOK_TYPE_WHISPER, "Chanspy");
+  		start_spying(spyee, spyer_name, &csth.whisper_audiohook); /* Unlocks spyee */
+		start_spying(ast_bridged_channel(spyee), spyer_name, &csth.bridge_whisper_audiohook);
+	} else if (ast_test_flag(flags, OPTION_WHISPER)) {
 		ast_audiohook_init(&csth.whisper_audiohook, AST_AUDIOHOOK_TYPE_WHISPER, "ChanSpy");
 		start_spying(spyee, spyer_name, &csth.whisper_audiohook); /* Unlocks spyee */
-	}
-
+  	}
+
+	ast_channel_unlock(spyee);
 	spyee = NULL;
 
 	csth.volfactor = *volfactor;
@@ -333,7 +372,16 @@
 			break;
 		}
 
-		if (ast_test_flag(flags, OPTION_WHISPER) && f->frametype == AST_FRAME_VOICE) {
+		if (ast_test_flag(flags, OPTION_BARGE) && f->frametype == AST_FRAME_VOICE) {
+			ast_audiohook_lock(&csth.whisper_audiohook);
+			ast_audiohook_lock(&csth.bridge_whisper_audiohook);
+			ast_audiohook_write_frame(&csth.whisper_audiohook, AST_AUDIOHOOK_DIRECTION_WRITE, f);
+			ast_audiohook_write_frame(&csth.bridge_whisper_audiohook, AST_AUDIOHOOK_DIRECTION_WRITE, f);
+			ast_audiohook_unlock(&csth.whisper_audiohook);
+			ast_audiohook_unlock(&csth.bridge_whisper_audiohook);
+			ast_frfree(f);
+			continue;
+		} else if (ast_test_flag(flags, OPTION_WHISPER) && f->frametype == AST_FRAME_VOICE) {
 			ast_audiohook_lock(&csth.whisper_audiohook);
 			ast_audiohook_write_frame(&csth.whisper_audiohook, AST_AUDIOHOOK_DIRECTION_WRITE, f);
 			ast_audiohook_unlock(&csth.whisper_audiohook);
@@ -395,7 +443,16 @@
 	else
 		ast_deactivate_generator(chan);
 
-	if (ast_test_flag(flags, OPTION_WHISPER)) {
+	if (ast_test_flag(flags, OPTION_BARGE)) {
+		ast_audiohook_lock(&csth.whisper_audiohook);
+		ast_audiohook_detach(&csth.whisper_audiohook);
+		ast_audiohook_unlock(&csth.whisper_audiohook);
+		ast_audiohook_destroy(&csth.whisper_audiohook);
+		ast_audiohook_lock(&csth.bridge_whisper_audiohook);
+		ast_audiohook_detach(&csth.bridge_whisper_audiohook);
+		ast_audiohook_unlock(&csth.bridge_whisper_audiohook);
+		ast_audiohook_destroy(&csth.bridge_whisper_audiohook);
+	} else if (ast_test_flag(flags, OPTION_WHISPER)) {
 		ast_audiohook_lock(&csth.whisper_audiohook);
 		ast_audiohook_detach(&csth.whisper_audiohook);
 		ast_audiohook_unlock(&csth.whisper_audiohook);
@@ -496,35 +553,35 @@
 	const struct ast_channel *last, const char *spec,
 	const char *exten, const char *context, struct chanspy_ds *chanspy_ds)
 {
-	struct ast_channel *this;
+	struct ast_channel *next;
 
 redo:
 	if (!ast_strlen_zero(spec))
-		this = ast_walk_channel_by_name_prefix_locked(last, spec, strlen(spec));
-
+		next = ast_walk_channel_by_name_prefix_locked(last, spec, strlen(spec));
 	else if (!ast_strlen_zero(exten))
-		this = ast_walk_channel_by_exten_locked(last, exten, context);
+		next = ast_walk_channel_by_exten_locked(last, exten, context);
 	else
-		this = ast_channel_walk_locked(last);
-
-	if (!this)
+		next = ast_channel_walk_locked(last);
+
+	if (!next)
 		return NULL;
 
-	if (!strncmp(this->name, "Zap/pseudo", 10)) {
-		ast_channel_unlock(this);
+	if (!strncmp(next->name, "Zap/pseudo", 10)) {
+		ast_channel_unlock(next);
 		goto redo;
-	} else if (this == chan) {
-		last = this;
-		ast_channel_unlock(this);
+	} else if (next == chan) {
+		last = next;
+		ast_channel_unlock(next);
 		goto redo;
 	}
 

[... 30668 lines stripped ...]



More information about the asterisk-commits mailing list