[svn-commits] branch oej/test-this-branch r32972 - in /team/oej/test-this-branch: ./ apps/ ...

svn-commits at lists.digium.com svn-commits at lists.digium.com
Thu Jun 8 00:58:52 MST 2006


Author: oej
Date: Thu Jun  8 02:58:51 2006
New Revision: 32972

URL: http://svn.digium.com/view/asterisk?rev=32972&view=rev
Log:
Update

Added:
    team/oej/test-this-branch/doc/callfiles.txt
      - copied unchanged from r31613, trunk/doc/callfiles.txt
    team/oej/test-this-branch/fixedjitterbuf.c
      - copied unchanged from r31613, trunk/fixedjitterbuf.c
    team/oej/test-this-branch/fixedjitterbuf.h
      - copied unchanged from r31613, trunk/fixedjitterbuf.h
    team/oej/test-this-branch/funcs/func_global.c
      - copied unchanged from r31613, trunk/funcs/func_global.c
Modified:
    team/oej/test-this-branch/   (props changed)
    team/oej/test-this-branch/.cleancount
    team/oej/test-this-branch/CREDITS
    team/oej/test-this-branch/Makefile
    team/oej/test-this-branch/README.test-this-branch
    team/oej/test-this-branch/UPGRADE.txt
    team/oej/test-this-branch/abstract_jb.c
    team/oej/test-this-branch/apps/app_alarmreceiver.c
    team/oej/test-this-branch/apps/app_db.c
    team/oej/test-this-branch/apps/app_dial.c
    team/oej/test-this-branch/apps/app_directory.c
    team/oej/test-this-branch/apps/app_disa.c
    team/oej/test-this-branch/apps/app_echo.c
    team/oej/test-this-branch/apps/app_lookupblacklist.c
    team/oej/test-this-branch/apps/app_lookupcidname.c
    team/oej/test-this-branch/apps/app_meetme.c
    team/oej/test-this-branch/apps/app_playback.c
    team/oej/test-this-branch/apps/app_queue.c
    team/oej/test-this-branch/apps/app_rpt.c
    team/oej/test-this-branch/apps/app_setcallerid.c
    team/oej/test-this-branch/apps/app_setcdruserfield.c
    team/oej/test-this-branch/apps/app_settransfercapability.c
    team/oej/test-this-branch/apps/app_speech_utils.c
    team/oej/test-this-branch/apps/app_stack.c
    team/oej/test-this-branch/asterisk.8
    team/oej/test-this-branch/asterisk.c
    team/oej/test-this-branch/build_tools/menuselect.c
    team/oej/test-this-branch/build_tools/menuselect.h
    team/oej/test-this-branch/build_tools/menuselect_curses.c
    team/oej/test-this-branch/cdr/cdr_radius.c
    team/oej/test-this-branch/channel.c
    team/oej/test-this-branch/channels/chan_alsa.c
    team/oej/test-this-branch/channels/chan_h323.c
    team/oej/test-this-branch/channels/chan_iax2.c
    team/oej/test-this-branch/channels/chan_jingle.c
    team/oej/test-this-branch/channels/chan_mgcp.c
    team/oej/test-this-branch/channels/chan_misdn.c
    team/oej/test-this-branch/channels/chan_oss.c
    team/oej/test-this-branch/channels/chan_sip.c
    team/oej/test-this-branch/channels/chan_skinny.c
    team/oej/test-this-branch/channels/chan_zap.c
    team/oej/test-this-branch/channels/h323/h323.conf.sample
    team/oej/test-this-branch/channels/misdn/chan_misdn_config.h
    team/oej/test-this-branch/channels/misdn/ie.c
    team/oej/test-this-branch/channels/misdn/isdn_lib.c
    team/oej/test-this-branch/channels/misdn/isdn_lib.h
    team/oej/test-this-branch/channels/misdn/isdn_msg_parser.c
    team/oej/test-this-branch/channels/misdn_config.c
    team/oej/test-this-branch/cli.c
    team/oej/test-this-branch/codecs/codec_a_mu.c
    team/oej/test-this-branch/codecs/codec_ulaw.c
    team/oej/test-this-branch/codecs/gsm/Makefile
    team/oej/test-this-branch/configs/alsa.conf.sample
    team/oej/test-this-branch/configs/extensions.conf.sample
    team/oej/test-this-branch/configs/features.conf.sample
    team/oej/test-this-branch/configs/jabber.conf.sample
    team/oej/test-this-branch/configs/mgcp.conf.sample
    team/oej/test-this-branch/configs/misdn.conf.sample
    team/oej/test-this-branch/configs/oss.conf.sample
    team/oej/test-this-branch/configs/sip.conf.sample
    team/oej/test-this-branch/configs/skinny.conf.sample
    team/oej/test-this-branch/configs/voicemail.conf.sample
    team/oej/test-this-branch/configs/zapata.conf.sample
    team/oej/test-this-branch/configure
    team/oej/test-this-branch/configure.ac
    team/oej/test-this-branch/doc/asterisk-conf.txt
    team/oej/test-this-branch/doc/channelvariables.txt
    team/oej/test-this-branch/doc/speechrec.txt
    team/oej/test-this-branch/frame.c
    team/oej/test-this-branch/funcs/func_channel.c
    team/oej/test-this-branch/funcs/func_db.c
    team/oej/test-this-branch/funcs/func_odbc.c
    team/oej/test-this-branch/include/asterisk/abstract_jb.h
    team/oej/test-this-branch/include/asterisk/app.h
    team/oej/test-this-branch/include/asterisk/channel.h
    team/oej/test-this-branch/include/asterisk/frame.h
    team/oej/test-this-branch/include/asterisk/jabber.h
    team/oej/test-this-branch/include/asterisk/linkedlists.h
    team/oej/test-this-branch/include/asterisk/lock.h
    team/oej/test-this-branch/include/asterisk/logger.h
    team/oej/test-this-branch/include/asterisk/options.h
    team/oej/test-this-branch/include/asterisk/utils.h
    team/oej/test-this-branch/logger.c
    team/oej/test-this-branch/makeopts.in
    team/oej/test-this-branch/pbx.c
    team/oej/test-this-branch/pbx/Makefile
    team/oej/test-this-branch/pbx/pbx_spool.c
    team/oej/test-this-branch/res/res_agi.c
    team/oej/test-this-branch/res/res_features.c
    team/oej/test-this-branch/res/res_jabber.c
    team/oej/test-this-branch/res/res_musiconhold.c
    team/oej/test-this-branch/rtp.c
    team/oej/test-this-branch/sample.call
    team/oej/test-this-branch/sounds.txt
    team/oej/test-this-branch/translate.c
    team/oej/test-this-branch/utils.c
    team/oej/test-this-branch/utils/Makefile

Propchange: team/oej/test-this-branch/
------------------------------------------------------------------------------
    automerge = http://edvina.net/training/

Propchange: team/oej/test-this-branch/
------------------------------------------------------------------------------
Binary property 'branch-1.2-blocked' - no diff available.

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

Propchange: team/oej/test-this-branch/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Jun  8 02:58:51 2006
@@ -1,1 +1,1 @@
-/trunk:1-29643
+/trunk:1-31635

Modified: team/oej/test-this-branch/.cleancount
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/.cleancount?rev=32972&r1=32971&r2=32972&view=diff
==============================================================================
--- team/oej/test-this-branch/.cleancount (original)
+++ team/oej/test-this-branch/.cleancount Thu Jun  8 02:58:51 2006
@@ -1,1 +1,1 @@
-17
+19

Modified: team/oej/test-this-branch/CREDITS
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/CREDITS?rev=32972&r1=32971&r2=32972&view=diff
==============================================================================
--- team/oej/test-this-branch/CREDITS (original)
+++ team/oej/test-this-branch/CREDITS Thu Jun  8 02:58:51 2006
@@ -30,55 +30,93 @@
 === MISCELLANEOUS PATCHES ===
 Jim Dixon - Zapata Telephony and app_rpt
 	http://www.zapatatelephony.org/app_rpt.html
+
 Russell Bryant - Asterisk 1.0 maintainer and misc. enhancements
 	russelb at clemson.edu
+
 Anthony Minessale II - Countless big and small fixes, and relentless forward push
 	anthmct at yahoo.com              http://www.asterlink.com
+
 James Golovich - Innumerable contributions
 	You can find him and asterisk-perl at http://asterisk.gnuinter.net
+
 Andre Bierwirth - Extension hints and status
+
 Oliver Daudey - ISDN4Linux fixes
+
 Pauline Middelink - ISDN4Linux patches and some general patches.
 	She can be found at http://www.polyware.nl/~middelink/En/
+
 Jean-Denis Girard - Various contributions from the South Pacific Islands
 	jd-girard at esoft.pf             http://www.esoft.pf
+
 William Jordan / Vonage - MySQL enhancements to Voicemail
 	wjordan at vonage.com
+
 Jac Kersing - Various fixes
+
 Steven Critchfield - Seek and Trunc functions for playback and recording
 	critch at basesys.com
+
 Jefferson Noxon - app_lookupcidname, app_db, and various other contributions
+
 Klaus-Peter Junghanns - in-band DTMF on SIP and MGCP
+
 Ross Finlayson - Dynamic RTP payload support
+
 Mahmut Fettahlioglu - Audio recording, music-on-hold changes, alaw file
 	format, and various fixes. Can be contacted at mahmut at oa.com.au
+
 James Dennis - Cisco SIP compatibility patches to work with SIP service
 	providers. Can be contacted at asterisk at jdennis.net
+
 Tilghman Lesher - ast_localtime(); ast_say_date_with_format(); 
 	GotoIfTime, Random, SayUnixTime, HasNewVoicemail applications;
 	CUT, SORT, EVAL, CURL, FIELDQTY, STRFTIME, QUEUEAGENT* functions;
 	and other innumerable bug fixes. http://asterisk.drunkcoder.com/
+
 Jayson Vantuyl - Manager protocol changes, various other bugs.
 	jvantuyl at computingedge.net
+
 Thorsten Lockert - OpenBSD, FreeBSD ports, making MacOS X port run on 10.3,
 	dialplan include verification, route lookup on OpenBSD, SNMP agent
 	support (res_snmp), various other bugs. tholo at sigmasoft.com
+
 Brian West - ODBC support and Bug Marshaling  
+
 Josh Roberson - chan_zap reload support, Advanced Voicemail Features, other misc. patches,
 	and Bug Marshalling. - josh at asteriasgi.com, http://www.asteriasgi.com
+
 William Waites - syslog support, SIP NAT traversal for SIP-UA. ww at styx.org
+
 Rich Murphey - Porting to FreeBSD, NetBSD, OpenBSD, and Darwin.
 	rich at whiteoaklabs.com  http://whiteoaklabs.com
+
 Simon Lockhart - Porting to Solaris (based on work of Logan ???)	
 	simon at slimey.org
+
 Olle E. Johansson - SIP RFC compliance, documentation and testing, testing, testing
 	oej at edvina.net, http://edvina.net
+
 Steve Kann - new jitter buffer for IAX2
 	stevek at stevek.com
+
 Constantine Filin - major contributions to the Asterisk Realtime Architecture
+
 Steve Murphy - privacy support, $[ ] parser upgrade, AEL2 parser upgrade
+
 Claude Patry - bug fixes, feature enhancements, and bug marshalling
 	cpatry at gmail.com
+
+Miroslav Nachev, miro at space-comm.com COSMOS Software Enterprises, Ltd.
+	- for Variable for No Answer Timeout for Attended Transfer
+
+Slav Klenov & Vanheuverzwijn Joachim - development of the generic jitterbuffer
+	Securax Ltd. info at securax.be
+
+Roy Sigurd Karlsbakk - providing funding for generic jitterbuffer development
+	roy at karlsbakk.net, Briiz Telecom AS
+
 
 === OTHER CONTRIBUTIONS ===
 John Todd - Monkey sounds and associated teletorture prompt

Modified: team/oej/test-this-branch/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/Makefile?rev=32972&r1=32971&r2=32972&view=diff
==============================================================================
--- team/oej/test-this-branch/Makefile (original)
+++ team/oej/test-this-branch/Makefile Thu Jun  8 02:58:51 2006
@@ -98,14 +98,18 @@
 else
   ASTETCDIR=$(sysconfdir)/asterisk
   ASTLIBDIR=$(libdir)/asterisk
-  ASTVARLIBDIR=$(localstatedir)/lib/asterisk
-  ASTSPOOLDIR=$(localstatedir)/spool/asterisk
-  ASTLOGDIR=$(localstatedir)/log/asterisk
   ASTHEADERDIR=$(includedir)/asterisk
   ASTBINDIR=$(bindir)
   ASTSBINDIR=$(sbindir)
+  ASTSPOOLDIR=$(localstatedir)/spool/asterisk
+  ASTLOGDIR=$(localstatedir)/log/asterisk
   ASTVARRUNDIR=$(localstatedir)/run
   ASTMANDIR=$(mandir)
+ifeq ($(OSARCH),FreeBSD)
+  ASTVARLIBDIR=$(prefix)/share/asterisk
+else
+  ASTVARLIBDIR=$(localstatedir)/lib/asterisk
+endif
 endif
 ASTDATADIR?=$(ASTVARLIBDIR)
 
@@ -285,9 +289,9 @@
 	cdr.o tdd.o acl.o rtp.o udptl.o manager.o ssl_addon.o asterisk.o \
 	dsp.o chanvars.o indications.o autoservice.o db.o privacy.o \
 	astmm.o enum.o srv.o dns.o aescrypt.o aestab.o aeskey.o \
-	utils.o plc.o jitterbuf.o scx_jitterbuf.o abstract_jb.o dnsmgr.o devicestate.o \
+	utils.o plc.o jitterbuf.o  dnsmgr.o devicestate.o \
 	netsock.o slinfactory.o ast_expr2.o ast_expr2f.o \
-	cryptostub.o sha1.o http.o
+	cryptostub.o sha1.o http.o fixedjitterbuf.o abstract_jb.o
 
 # we need to link in the objects statically, not as a library, because
 # otherwise modules will not have them available if none of the static
@@ -380,7 +384,7 @@
 	@echo " +               make install                +"  
 	@echo " +-------------------------------------------+"  
 
-all: cleantest defaults.h config.status menuselect.makeopts depend asterisk subdirs
+all: cleantest config.status menuselect.makeopts depend asterisk subdirs
 
 config.status: configure
 	@CFLAGS="" ./configure
@@ -978,6 +982,7 @@
 cleantest:
 	@if cmp -s .cleancount .lastclean ; then echo ; else \
 		$(MAKE) clean; cp -f .cleancount .lastclean;\
+		$(MAKE) defaults.h;\
 	fi
 
 _uninstall:

Modified: team/oej/test-this-branch/README.test-this-branch
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/README.test-this-branch?rev=32972&r1=32971&r2=32972&view=diff
==============================================================================
--- team/oej/test-this-branch/README.test-this-branch (original)
+++ team/oej/test-this-branch/README.test-this-branch Thu Jun  8 02:58:51 2006
@@ -22,19 +22,14 @@
 ----------------------
 This branch includes the following branches
 - sipdiversion: Additional support for the Diversion: header
-- jitterbuffer: Jitterbuffer for RTP in chan_sip (#3854, Securax/ZOA)
 - peermatch: New peer matching algorithm (#6612, oej)
-- rtcp: Improved support for RTCP (#2863, folsson/John Martin)
 - dialplan-ami-events: Report dialplan reload in manager (#5741, oej)
 - sipregister: A new registration architecture (rizzo, oej #5834)
 - multiparking: Multiple parking lots (#6113)
-- cdr_radius: CDR support for Radius (#6639, phsultan). See doc/cdrdriver.txt
 - amieventhook-561 rev 11712: Support for manager event hooks (#5161, anthm)
 - metermaids: Subscription support for parking lots (#5779)
 - filenamelen: Some code changes for file name lengths (oej)
 - t38passthrough: Support for Fax passthrough in SIP (#5090, Steve Underwood)
-- findme_followme: Followme application (#5574, bweschke)
-  Missing sound files, config file template
 - SSL for AMI: Secured manager connections (#6812, jtodd)
   See README file in doc/ and manager.conf.sample
 
@@ -46,7 +41,6 @@
 - IFMODULE dialplan function (oej, #6671)
 - LDAP realtime driver (mguesdon, #5768)
   See doc/rt_ldap.txt!
-- PostgreSQL realtime driver (mguesdoon, #5637)
 - Mute logging in remote console (mavetju, #6524)
 - TOUPPER and TOLOWER ASCII functions (powerkill, #6668)
   (With some changes)
@@ -71,8 +65,11 @@
 - Manager playDTMF command (squinky, #6682) 
   (Note: I changed the name in this version...)
 - Meetme list concise cli command (moy, #6212)
-
-Coming here soon:
+- jitterbuffer: Jitterbuffer for RTP in chan_sip (#3854, Securax/ZOA)
+- rtcp: Improved support for RTCP (#2863, folsson/John Martin)
+- PostgreSQL realtime driver (mguesdoon, #5637)
+- findme_followme: Followme application (#5574, bweschke)
+- cdr_radius: CDR support for Radius (#6639, phsultan). See doc/cdrdriver.txt
 - siptransfer: Improved SIP transfer support (branch)
 
 Temporarily disabled:

Modified: team/oej/test-this-branch/UPGRADE.txt
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/UPGRADE.txt?rev=32972&r1=32971&r2=32972&view=diff
==============================================================================
--- team/oej/test-this-branch/UPGRADE.txt (original)
+++ team/oej/test-this-branch/UPGRADE.txt Thu Jun  8 02:58:51 2006
@@ -14,30 +14,46 @@
 be present, etc.
 
 You must run the configure script before Asterisk will build, although it will
-attempt to automatically run it for you with no options specified; for most users,
-that will result in a similar build to what they would have had before the
-configure script was added to the build process (except for having to run 'make'
-again after the configure script is run). Note that the configure script does NOT
-need to be re-run just to rebuild Asterisk; you only need to re-run it when your
-system configuration changes or you wish to build Asterisk with different options.
+attempt to automatically run it for you with no options specified; for most
+users, that will result in a similar build to what they would have had before
+the configure script was added to the build process (except for having to run
+'make' again after the configure script is run). Note that the configure script
+does NOT need to be re-run just to rebuild Asterisk; you only need to re-run it
+when your system configuration changes or you wish to build Asterisk with 
+different options.
 
 Build Process (module selection):
 
 The Asterisk source tree now includes a basic module selection and build option
 selection tool called 'menuselect'. Run 'make menuselect' to make your choices.
 In this tool, you can disable building of modules that you don't care about,
-turn on/off global options for the build and see which modules will not (and cannot)
-be built because your system does not have the required external dependencies
-installed.
-
-(TODO: document where 'global' and 'per-user' menuselect input files should go
-and what they need to contain)
+turn on/off global options for the build and see which modules will not 
+(and cannot) be built because your system does not have the required external
+dependencies installed.
+
+The resulting file from menuselect is called 'menuselect.makeopts'. Note that
+the resulting menuselect.makeopts file generally contains which modules *not*
+to build. The modules listed in this file indicate which modules have unmet
+dependencies, a present conflict, or have been disabled by the user in the
+menuselect interface. Compiler Flags can also be set in the menuselect
+interface.  In this case, the resulting file contains which CFLAGS are in use,
+not which ones are not in use.
+
+If you would like to save your choices and have them applied against all
+builds, the file can be copied to '~/.asterisk.makeopts' or 
+'/etc/asterisk.makeopts'.
 
 PBX Core:
 
 * The (very old and undocumented) ability to use BYEXTENSION for dialing
   instead of ${EXTEN} has been removed.
-
+  
+* Builtin (res_features) transfer functionality attempts to use the context
+  defined in TRANSFER_CONTEXT variable of the transferer channel first. If
+  not set, it uses the transferee variable. If not set in any channel, it will 
+  attempt to use the last non macro context. If not possible, it will default
+  to the current context.
+ 
 Command Line Interface:
 
 * 'show channels concise', designed to be used by applications that will parse
@@ -58,6 +74,12 @@
   and GetGroupMatchCount were all deprecated in version 1.2, and therefore have
   been removed in this version.  You should use the equivalent dialplan
   function in places where you have previously used one of these applications.
+
+* The application SetGlobalVar has been deprecated.  You should replace uses
+  of this application with the following combination of Set and GLOBAL():
+  Set(GLOBAL(name)=value).  You may also access global variables exclusively by
+  using the GLOBAL() dialplan function, instead of relying on variable
+  interpolation falling back to globals when no channel variable is set.
 
 * The application SetVar has been renamed to Set.  The syntax SetVar was marked
   deprecated in version 1.2 and is no longer recognized in this version.
@@ -97,6 +119,17 @@
   record conversations queue members are having with queue callers. Please
   see configs/queues.conf.sample for more information on this option.
 
+* The app_queue application strategy called 'roundrobin' has been deprecated
+  for this release. Users are encouraged to use 'rrmemory' instead, since it
+  provides more 'true' round-robin call delivery. For the Asterisk 1.6 release,
+  'rrmemory' will be renamed 'roundrobin'.
+
+* app_meetme: The 'm' option (monitor) is renamed to 'l' (listen only), and
+  the 'm' option now provides the functionality of "initially muted". 
+  In practice, most existing dialplans using the 'm' flag should not notice
+  any difference, unless the keypad menu is enabled, allowing the user 
+  to unmute themsleves.
+
 * ast_play_and_record would attempt to cancel the recording if a DTMF
   '0' was received.  This behavior was not documented in most of the
   applications that used ast_play_and_record and the return codes from
@@ -113,6 +146,24 @@
   This addresses the deficiency of not being able to count the number of
   messages in folders other than INBOX and Old.
 
+* The exit behavior of the AGI applications has changed. Previously, when
+  a connection to an AGI server failed, the application would cause the channel
+  to immediately stop dialplan execution and hangup. Now, the only time that
+  the AGI applications will cause the channel to stop dialplan execution is
+  when the channel itself requests hangup. The AGI applications now set an
+  AGISTATUS variable which will allow you to find out whether running the AGI
+  was successful or not.
+
+  Previously, there was no way to handle the case where Asterisk was unable to
+  locally execute an AGI script for some reason. In this case, dialplan
+  execution will continue as it did before, but the AGISTATUS variable will be
+  set to "FAILURE".
+
+  A locally executed AGI script can now exit with a non-zero exit code and this
+  failure will be detected by Asterisk. If an AGI script exits with a non-zero
+  exit code, the AGISTATUS variable will be set to "FAILURE" as opposed to
+  "SUCCESS".
+
 Manager:
 
 * After executing the 'status' manager action, the "Status" manager events
@@ -132,6 +183,12 @@
   headers are not automatically sent, unless you specify them as separate
   arguments.  Please see the application help for the new syntax.
 
+* app_meetme: Mute and Unmute events are now reported via the Manager API.
+  Native Manager API commands MeetMeMute and MeetMeUnmute are provided, which
+  are easier to use than "Action Command:". The MeetMeStopTalking event has
+  also been deprecated in favor of the already existing MeetmeTalking event
+  with a "Status" of "on" or "off" added.
+
 Variables:
 
 * The builtin variables ${CALLERID}, ${CALLERIDNAME}, ${CALLERIDNUM},
@@ -146,6 +203,9 @@
 * OSP applications exports several new variables, ${OSPINHANDLE},
   ${OSPOUTHANDLE}, ${OSPINTOKEN}, ${OSPOUTTOKEN}, ${OSPCALLING},
   ${OSPINTIMELIMIT}, and ${OSPOUTTIMELIMIT}
+  
+* Builtin transfer functionality sets the variable ${TRANSFERERNAME} in the new
+  created channel. This variables holds the channel name of the transferer.
 
 Functions:
 
@@ -157,13 +217,17 @@
   modules.conf file then you will need to explicitly load the modules that
   contain the functions you want to use.
 
-* The ENUMLOOKUP() function with the 'c' option (for counting the number of records),
-  but the lookup fails to match any records, the returned value will now be "0" instead of blank.
+* The ENUMLOOKUP() function with the 'c' option (for counting the number of 
+  records), but the lookup fails to match any records, the returned value will 
+  now be "0" instead of blank.
 
 * The REALTIME() function is now available in version 1.4 and app_realtime has
   been deprecated in favor of the new function. app_realtime will be removed
   completely with the version 1.6 release so please take the time between
   releases to make any necessary changes
+
+* The QUEUEAGENTCOUNT() function has been deprecated in favor of
+  QUEUE_MEMBER_COUNT().
 
 The IAX2 channel:
 
@@ -176,7 +240,8 @@
 
 The SIP channel:
 
-* The "incominglimit" setting is replaced by the "call-limit" setting in sip.conf.
+* The "incominglimit" setting is replaced by the "call-limit" setting in 
+  sip.conf.
 * The matching on incoming calls is now done on peer From: user names after matching 
   user names and before matching peers by IP address.
 
@@ -186,13 +251,17 @@
 
 The Zap channel:
 
-* Support for MFC/R2 has been removed, as it has not been functional for some time
-  and it has no maintainer.
+* Support for MFC/R2 has been removed, as it has not been functional for some
+  time and it has no maintainer.
 
 Installation:
 
-* On BSD systems, the installation directories have changed to more "FreeBSDish" directories. On startup, Asterisk will look for the main configuration in /usr/local/etc/asterisk/asterisk.conf
-If you have an old installation, you might want to remove the binaries and move the configuration files to the new locations. The following directories are now default:
+* On BSD systems, the installation directories have changed to more "FreeBSDish"
+  directories. On startup, Asterisk will look for the main configuration in 
+  /usr/local/etc/asterisk/asterisk.conf
+  If you have an old installation, you might want to remove the binaries and 
+  move the configuration files to the new locations. The following directories 
+  are now default:
 	ASTLIBDIR	/usr/local/lib/asterisk
 	ASTVARLIBDIR	/usr/local/share/asterisk
 	ASTETCDIR	/usr/local/etc/asterisk
@@ -201,8 +270,8 @@
 
 Sounds:
 
-* The phonetic sounds directory has been removed from the asterisk-sounds package
-  because they are now included directly in Asterisk.  However, it is important to
-  note that the phonetic sounds that existed in asterisk-sounds used a different
-  naming convention than the sounds in Asterisk.  For example, instead of alpha.gsm
-  and bravo.gsm, Asterisk has a_p.gsm and b_p.gsm.
+* The phonetic sounds directory has been removed from the asterisk-sounds
+  package because they are now included directly in Asterisk.  However, it is
+  important to note that the phonetic sounds that existed in asterisk-sounds 
+  used a different naming convention than the sounds in Asterisk.  For example,
+  instead of alpha.gsm and bravo.gsm, Asterisk has a_p.gsm and b_p.gsm.

Modified: team/oej/test-this-branch/abstract_jb.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/abstract_jb.c?rev=32972&r1=32971&r2=32972&view=diff
==============================================================================
--- team/oej/test-this-branch/abstract_jb.c (original)
+++ team/oej/test-this-branch/abstract_jb.c Thu Jun  8 02:58:51 2006
@@ -41,18 +41,16 @@
 #include "asterisk/options.h"
 #include "asterisk/utils.h"
 
-#ifdef AST_JB
-
 #include "asterisk/abstract_jb.h"
-#include "scx_jitterbuf.h"
+#include "fixedjitterbuf.h"
 #include "jitterbuf.h"
 
-
-/* Internal jb flags */
-#define JB_USE (1 << 0)
-#define JB_TIMEBASE_INITIALIZED (1 << 1)
-#define JB_CREATED (1 << 2)
-
+/*! Internal jb flags */
+enum {
+	JB_USE =                  (1 << 0),
+	JB_TIMEBASE_INITIALIZED = (1 << 1),
+	JB_CREATED =              (1 << 2)
+};
 
 /* Hooks for the abstract jb implementation */
 
@@ -91,85 +89,79 @@
 };
 
 /* Implementation functions */
-/* scx */
-static void * jb_create_scx(struct ast_jb_conf *general_config, long resynch_threshold);
-static void jb_destroy_scx(void *jb);
-static int jb_put_first_scx(void *jb, struct ast_frame *fin, long now);
-static int jb_put_scx(void *jb, struct ast_frame *fin, long now);
-static int jb_get_scx(void *jb, struct ast_frame **fout, long now, long interpl);
-static long jb_next_scx(void *jb);
-static int jb_remove_scx(void *jb, struct ast_frame **fout);
-static void jb_force_resynch_scx(void *jb);
-/* stevek */
-static void * jb_create_stevek(struct ast_jb_conf *general_config, long resynch_threshold);
-static void jb_destroy_stevek(void *jb);
-static int jb_put_first_stevek(void *jb, struct ast_frame *fin, long now);
-static int jb_put_stevek(void *jb, struct ast_frame *fin, long now);
-static int jb_get_stevek(void *jb, struct ast_frame **fout, long now, long interpl);
-static long jb_next_stevek(void *jb);
-static int jb_remove_stevek(void *jb, struct ast_frame **fout);
-static void jb_force_resynch_stevek(void *jb);
+/* fixed */
+static void * jb_create_fixed(struct ast_jb_conf *general_config, long resynch_threshold);
+static void jb_destroy_fixed(void *jb);
+static int jb_put_first_fixed(void *jb, struct ast_frame *fin, long now);
+static int jb_put_fixed(void *jb, struct ast_frame *fin, long now);
+static int jb_get_fixed(void *jb, struct ast_frame **fout, long now, long interpl);
+static long jb_next_fixed(void *jb);
+static int jb_remove_fixed(void *jb, struct ast_frame **fout);
+static void jb_force_resynch_fixed(void *jb);
+/* adaptive */
+static void * jb_create_adaptive(struct ast_jb_conf *general_config, long resynch_threshold);
+static void jb_destroy_adaptive(void *jb);
+static int jb_put_first_adaptive(void *jb, struct ast_frame *fin, long now);
+static int jb_put_adaptive(void *jb, struct ast_frame *fin, long now);
+static int jb_get_adaptive(void *jb, struct ast_frame **fout, long now, long interpl);
+static long jb_next_adaptive(void *jb);
+static int jb_remove_adaptive(void *jb, struct ast_frame **fout);
+static void jb_force_resynch_adaptive(void *jb);
 
 /* Available jb implementations */
 static struct ast_jb_impl avail_impl[] = 
 {
 	{
 		.name = "fixed",
-		.create = jb_create_scx,
-		.destroy = jb_destroy_scx,
-		.put_first = jb_put_first_scx,
-		.put = jb_put_scx,
-		.get = jb_get_scx,
-		.next = jb_next_scx,
-		.remove = jb_remove_scx,
-		.force_resync = jb_force_resynch_scx
+		.create = jb_create_fixed,
+		.destroy = jb_destroy_fixed,
+		.put_first = jb_put_first_fixed,
+		.put = jb_put_fixed,
+		.get = jb_get_fixed,
+		.next = jb_next_fixed,
+		.remove = jb_remove_fixed,
+		.force_resync = jb_force_resynch_fixed
 	},
 	{
 		.name = "adaptive",
-		.create = jb_create_stevek,
-		.destroy = jb_destroy_stevek,
-		.put_first = jb_put_first_stevek,
-		.put = jb_put_stevek,
-		.get = jb_get_stevek,
-		.next = jb_next_stevek,
-		.remove = jb_remove_stevek,
-		.force_resync = jb_force_resynch_stevek
+		.create = jb_create_adaptive,
+		.destroy = jb_destroy_adaptive,
+		.put_first = jb_put_first_adaptive,
+		.put = jb_put_adaptive,
+		.get = jb_get_adaptive,
+		.next = jb_next_adaptive,
+		.remove = jb_remove_adaptive,
+		.force_resync = jb_force_resynch_adaptive
 	}
 };
 
 static int default_impl = 0;
 
 
-/* Abstract return codes */
-#define JB_IMPL_OK 0
-#define JB_IMPL_DROP 1
-#define JB_IMPL_INTERP 2
-#define JB_IMPL_NOFRAME 3
+/*! Abstract return codes */
+enum {
+	JB_IMPL_OK,
+	JB_IMPL_DROP,
+	JB_IMPL_INTERP,
+	JB_IMPL_NOFRAME
+};
 
 /* Translations between impl and abstract return codes */
-static int scx_to_abstract_code[] =
+static int fixed_to_abstract_code[] =
 	{JB_IMPL_OK, JB_IMPL_DROP, JB_IMPL_INTERP, JB_IMPL_NOFRAME};
-static int stevek_to_abstract_code[] =
+static int adaptive_to_abstract_code[] =
 	{JB_IMPL_OK, JB_IMPL_NOFRAME, JB_IMPL_NOFRAME, JB_IMPL_INTERP, JB_IMPL_DROP, JB_IMPL_OK};
 
 /* JB_GET actions (used only for the frames log) */
 static char *jb_get_actions[] = {"Delivered", "Dropped", "Interpolated", "No"};
 
-/*! \brief Macros for JB logs */
-/*#define jb_verbose(...) ast_verbose(VERBOSE_PREFIX_3 " ***[JB LOG]*** " __VA_ARGS__)*/
-#define jb_verbose(...) if(1){\
-	char tmp[192];\
-	char msg[128];\
-	snprintf(msg, sizeof(msg), VERBOSE_PREFIX_3 "***[JB LOG]*** " __VA_ARGS__);\
-	ast_verbose("%s\n", term_color(tmp, msg, COLOR_BRGREEN, 0, sizeof(tmp)));}
-
 /*! \brief Macros for the frame log files */
-#define jb_framelog(...) \
-if(jb->logfile) \
-{ \
-	fprintf(jb->logfile, __VA_ARGS__); \
-	fflush(jb->logfile); \
-} \
+#define jb_framelog(...) do { \
+	if (jb->logfile) { \
+		fprintf(jb->logfile, __VA_ARGS__); \
+		fflush(jb->logfile); \
+	} \
+} while (0)
 
 
 /* Internal utility functions */
@@ -191,20 +183,19 @@
 	
 	jb->impl = &avail_impl[default_impl];
 	
-	if(*jbconf->impl == '\0')
+	if (ast_strlen_zero(jbconf->impl))
 		return;
 		
-	for(i=0; i<avail_impl_count; i++) {
+	for (i = 0; i < avail_impl_count; i++) {
 		test_impl = &avail_impl[i];
-		if(strcmp(jbconf->impl, test_impl->name) == 0) {
+		if (!strcasecmp(jbconf->impl, test_impl->name)) {
 			jb->impl = test_impl;
 			return;
 		}
 	}
 }
 
-
-void ast_jb_do_usecheck(struct ast_channel *c0, struct ast_channel *c1)
+int ast_jb_do_usecheck(struct ast_channel *c0, struct ast_channel *c1)
 {
 	struct ast_jb *jb0 = &c0->jb;
 	struct ast_jb *jb1 = &c1->jb;
@@ -222,11 +213,13 @@
 	int c1_force_jb = ast_test_flag(conf1, AST_JB_FORCED);
 	int c1_jb_timebase_initialized = ast_test_flag(jb1, JB_TIMEBASE_INITIALIZED);
 	int c1_jb_created = ast_test_flag(jb1, JB_CREATED);
-	
-	if(((!c0_wants_jitter && c1_creates_jitter) || c0_force_jb) && c0_jb_enabled) {
+	int inuse = 0;
+
+	/* Determine whether audio going to c0 needs a jitter buffer */
+	if (((!c0_wants_jitter && c1_creates_jitter) || (c0_force_jb && c1_creates_jitter)) && c0_jb_enabled) {
 		ast_set_flag(jb0, JB_USE);
-		if(!c0_jb_timebase_initialized) {
-			if(c1_jb_timebase_initialized) {
+		if (!c0_jb_timebase_initialized) {
+			if (c1_jb_timebase_initialized) {
 				memcpy(&jb0->timebase, &jb1->timebase, sizeof(struct timeval));
 			} else {
 				gettimeofday(&jb0->timebase, NULL);
@@ -234,15 +227,18 @@
 			ast_set_flag(jb0, JB_TIMEBASE_INITIALIZED);
 		}
 		
-		if(!c0_jb_created) {
+		if (!c0_jb_created) {
 			jb_choose_impl(c0);
 		}
-	}
-	
-	if(((!c1_wants_jitter && c0_creates_jitter) || c1_force_jb) && c1_jb_enabled) {
+
+		inuse = 1;
+	}
+	
+	/* Determine whether audio going to c1 needs a jitter buffer */
+	if (((!c1_wants_jitter && c0_creates_jitter) || (c1_force_jb && c0_creates_jitter)) && c1_jb_enabled) {
 		ast_set_flag(jb1, JB_USE);
-		if(!c1_jb_timebase_initialized) {
-			if(c0_jb_timebase_initialized) {
+		if (!c1_jb_timebase_initialized) {
+			if (c0_jb_timebase_initialized) {
 				memcpy(&jb1->timebase, &jb0->timebase, sizeof(struct timeval));
 			} else {
 				gettimeofday(&jb1->timebase, NULL);
@@ -250,12 +246,15 @@
 			ast_set_flag(jb1, JB_TIMEBASE_INITIALIZED);
 		}
 		
-		if(!c1_jb_created) {
+		if (!c1_jb_created) {
 			jb_choose_impl(c1);
 		}
-	}
-}
-
+
+		inuse = 1;
+	}
+
+	return inuse;
+}
 
 int ast_jb_get_when_to_wakeup(struct ast_channel *c0, struct ast_channel *c1, int time_left)
 {
@@ -268,13 +267,13 @@
 	int wait, wait0, wait1;
 	struct timeval tv_now;
 	
-	if(time_left == 0) {
+	if (time_left == 0) {
 		/* No time left - the bridge will be retried */
 		/* TODO: Test disable this */
 		/*return 0;*/
 	}
 	
-	if(time_left < 0) {
+	if (time_left < 0) {
 		time_left = INT_MAX;
 	}
 	
@@ -286,9 +285,9 @@
 	wait = wait0 < wait1 ? wait0 : wait1;
 	wait = wait < time_left ? wait : time_left;
 	
-	if(wait == INT_MAX) {
+	if (wait == INT_MAX) {
 		wait = -1;
-	} else if(wait < 1) {
+	} else if (wait < 1) {
 		/* don't let wait=0, because this can cause the pbx thread to loop without any sleeping at all */
 		wait = 1;
 	}
@@ -305,49 +304,49 @@
 	struct ast_frame *frr;
 	long now = 0;
 	
-	if(!ast_test_flag(jb, JB_USE)) {
+	if (!ast_test_flag(jb, JB_USE))
 		return -1;
-	}
-	
-	if(f->frametype != AST_FRAME_VOICE) {
-		if(f->frametype == AST_FRAME_DTMF && ast_test_flag(jb, JB_CREATED)) {
+
+	if (f->frametype != AST_FRAME_VOICE) {
+		if (f->frametype == AST_FRAME_DTMF && ast_test_flag(jb, JB_CREATED)) {
 			jb_framelog("JB_PUT {now=%ld}: Received DTMF frame. Force resynching jb...\n", now);
 			jbimpl->force_resync(jbobj);
 		}
 		
 		return -1;
 	}
-	
+
 	/* We consider an enabled jitterbuffer should receive frames with valid timing info. */
-	if(!f->has_timing_info || f->len < 2 || f->ts < 0) {
-		ast_log(LOG_WARNING, "Recieved frame with invalid timing info: "
-			"has_timing_info=%d, len=%ld, ts=%ld\n", f->has_timing_info, f->len, f->ts);
+	if (!f->has_timing_info || f->len < 2 || f->ts < 0) {
+		ast_log(LOG_WARNING, "%s recieved frame with invalid timing info: "
+			"has_timing_info=%d, len=%ld, ts=%ld, src=%s\n",
+			chan->name, f->has_timing_info, f->len, f->ts, f->src);
 		return -1;
 	}
-	
-	if(f->mallocd & AST_MALLOCD_HDR) {
+
+	if (f->mallocd & AST_MALLOCD_HDR)
 		frr = ast_frdup(f);
-	} else {
+	else
 		frr = ast_frisolate(f);
-	}
-	if(frr == NULL) {
+
+	if (!frr) {
 		ast_log(LOG_ERROR, "Failed to isolate frame for the jitterbuffer on channel '%s'\n", chan->name);
 		return -1;
 	}
-	
-	if(!ast_test_flag(jb, JB_CREATED)) {
-		if(create_jb(chan, frr)) {
+
+	if (!ast_test_flag(jb, JB_CREATED)) {
+		if (create_jb(chan, frr)) {
 			ast_frfree(frr);
 			/* Disable the jitterbuffer */
 			ast_clear_flag(jb, JB_USE);
 			return -1;
 		}
-		
+
 		ast_set_flag(jb, JB_CREATED);
 		return 0;
 	} else {
 		now = get_now(jb, NULL);
-		if(jbimpl->put(jbobj, frr, now) != JB_IMPL_OK) {
+		if (jbimpl->put(jbobj, frr, now) != JB_IMPL_OK) {
 			jb_framelog("JB_PUT {now=%ld}: Dropped frame with ts=%ld and len=%ld\n", now, frr->ts, frr->len);
 			ast_frfree(frr);
 			/*return -1;*/
@@ -355,11 +354,11 @@
 			   be delivered at all */
 			return 0;
 		}
-		
+
 		jb->next = jbimpl->next(jbobj);
-		
+
 		jb_framelog("JB_PUT {now=%ld}: Queued frame with ts=%ld and len=%ld\n", now, frr->ts, frr->len);
-		
+
 		return 0;
 	}
 }
@@ -374,13 +373,11 @@
 	int c1_use_jb = ast_test_flag(jb1, JB_USE);
 	int c1_jb_is_created = ast_test_flag(jb1, JB_CREATED);
 	
-	if(c0_use_jb && c0_jb_is_created) {
+	if (c0_use_jb && c0_jb_is_created)
 		jb_get_and_deliver(c0);
-	}
-	
-	if(c1_use_jb && c1_jb_is_created) {
+	
+	if (c1_use_jb && c1_jb_is_created)
 		jb_get_and_deliver(c1);
-	}
 }
 
 
@@ -395,12 +392,12 @@
 	
 	now = get_now(jb, NULL);
 	jb->next = jbimpl->next(jbobj);
-	if(now < jb->next) {
+	if (now < jb->next) {
 		jb_framelog("\tJB_GET {now=%ld}: now < next=%ld\n", now, jb->next);
 		return;
 	}
 	
-	while(now >= jb->next) {
+	while (now >= jb->next) {
 		interpolation_len = ast_codec_interp_len(jb->last_format);
 		
 		res = jbimpl->get(jbobj, &f, now, interpolation_len);
@@ -426,7 +423,7 @@
 			f->src  = "JB interpolation";
 			f->data  = NULL;
 			f->delivery = ast_tvadd(jb->timebase, ast_samp2tv(jb->next, 1000));
-			f->offset=AST_FRIENDLY_OFFSET;
+			f->offset = AST_FRIENDLY_OFFSET;
 			/* deliver the interpolated frame */
 			ast_write(chan, f);
 			jb_framelog("\tJB_GET {now=%ld}: Interpolated frame with len=%d\n", now, interpolation_len);
@@ -461,7 +458,7 @@
 	int res;
 
 	jbobj = jb->jbobj = jbimpl->create(jbconf, jbconf->resync_threshold);
-	if(jbobj == NULL) {
+	if (!jbobj) {
 		ast_log(LOG_WARNING, "Failed to create jitterbuffer on channel '%s'\n", chan->name);
 		return -1;
 	}
@@ -470,8 +467,8 @@
 	res = jbimpl->put_first(jbobj, frr, now);
 	
 	/* The result of putting the first frame should not differ from OK. However, its possible
-	   some implementations (i.e. stevek's when resynch_threshold is specified) to drop it. */
-	if(res != JB_IMPL_OK) {
+	   some implementations (i.e. adaptive's when resynch_threshold is specified) to drop it. */
+	if (res != JB_IMPL_OK) {
 		ast_log(LOG_WARNING, "Failed to put first frame in the jitterbuffer on channel '%s'\n", chan->name);
 		/*
 		jbimpl->destroy(jbobj);
@@ -486,45 +483,43 @@
 	jb->last_format = frr->subclass;
 	
 	/* Create a frame log file */
-	if(ast_test_flag(jbconf, AST_JB_LOG)) {
+	if (ast_test_flag(jbconf, AST_JB_LOG)) {
 		snprintf(name2, sizeof(name2), "%s", chan->name);
 		tmp = strchr(name2, '/');
-		if(tmp != NULL) {
+		if (tmp)
 			*tmp = '#';
-		}
+		
 		bridged = ast_bridged_channel(chan);
-		if(bridged == NULL) {
+		if (!bridged) {
 			/* We should always have bridged chan if a jitterbuffer is in use */
 			CRASH;
 		}
 		snprintf(name1, sizeof(name1), "%s", bridged->name);
 		tmp = strchr(name1, '/');
-		if(tmp != NULL) {
+		if (tmp)
 			*tmp = '#';
-		}
+		
 		snprintf(logfile_pathname, sizeof(logfile_pathname),
 			"/tmp/ast_%s_jb_%s--%s.log", jbimpl->name, name1, name2);
 		jb->logfile = fopen(logfile_pathname, "w+b");
 		
-		if(jb->logfile == NULL) {
+		if (!jb->logfile)
 			ast_log(LOG_WARNING, "Failed to create frame log file with pathname '%s'\n", logfile_pathname);
-		}
-		
-		if(res == JB_IMPL_OK) {
+		
+		if (res == JB_IMPL_OK)
 			jb_framelog("JB_PUT_FIRST {now=%ld}: Queued frame with ts=%ld and len=%ld\n",
 				now, frr->ts, frr->len);
-		} else {
+		else
 			jb_framelog("JB_PUT_FIRST {now=%ld}: Dropped frame with ts=%ld and len=%ld\n",
 				now, frr->ts, frr->len);
-		}
-	}
-	

[... 15993 lines stripped ...]


More information about the svn-commits mailing list