[asterisk-commits] murf: branch murf/datastructs r73767 - in /team/murf/datastructs: ./ apps/ bu...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jul 6 17:03:15 CDT 2007


Author: murf
Date: Fri Jul  6 17:03:13 2007
New Revision: 73767

URL: http://svn.digium.com/view/asterisk?view=rev&rev=73767
Log:
Bringing this branch back into sync

Added:
    team/murf/datastructs/doc/tex/
      - copied from r73728, trunk/doc/tex/
    team/murf/datastructs/doc/tex/Makefile
      - copied unchanged from r73728, trunk/doc/tex/Makefile
    team/murf/datastructs/doc/tex/README.txt
      - copied unchanged from r73728, trunk/doc/tex/README.txt
    team/murf/datastructs/doc/tex/ael.tex
      - copied unchanged from r73728, trunk/doc/tex/ael.tex
    team/murf/datastructs/doc/tex/ajam.tex
      - copied unchanged from r73728, trunk/doc/tex/ajam.tex
    team/murf/datastructs/doc/tex/app-sms.tex
      - copied unchanged from r73728, trunk/doc/tex/app-sms.tex
    team/murf/datastructs/doc/tex/asterisk-conf.tex
      - copied unchanged from r73728, trunk/doc/tex/asterisk-conf.tex
    team/murf/datastructs/doc/tex/asterisk.tex
      - copied unchanged from r73728, trunk/doc/tex/asterisk.tex
    team/murf/datastructs/doc/tex/billing.tex
      - copied unchanged from r73728, trunk/doc/tex/billing.tex
    team/murf/datastructs/doc/tex/cdrdriver.tex
      - copied unchanged from r73728, trunk/doc/tex/cdrdriver.tex
    team/murf/datastructs/doc/tex/chaniax.tex
      - copied unchanged from r73728, trunk/doc/tex/chaniax.tex
    team/murf/datastructs/doc/tex/channelvariables.tex
      - copied unchanged from r73728, trunk/doc/tex/channelvariables.tex
    team/murf/datastructs/doc/tex/cliprompt.tex
      - copied unchanged from r73728, trunk/doc/tex/cliprompt.tex
    team/murf/datastructs/doc/tex/configuration.tex
      - copied unchanged from r73728, trunk/doc/tex/configuration.tex
    team/murf/datastructs/doc/tex/dundi.tex
      - copied unchanged from r73728, trunk/doc/tex/dundi.tex
    team/murf/datastructs/doc/tex/enum.tex
      - copied unchanged from r73728, trunk/doc/tex/enum.tex
    team/murf/datastructs/doc/tex/extensions.tex
      - copied unchanged from r73728, trunk/doc/tex/extensions.tex
    team/murf/datastructs/doc/tex/freetds.tex
      - copied unchanged from r73728, trunk/doc/tex/freetds.tex
    team/murf/datastructs/doc/tex/hardware.tex
      - copied unchanged from r73728, trunk/doc/tex/hardware.tex
    team/murf/datastructs/doc/tex/ices.tex
      - copied unchanged from r73728, trunk/doc/tex/ices.tex
    team/murf/datastructs/doc/tex/imapstorage.tex
      - copied unchanged from r73728, trunk/doc/tex/imapstorage.tex
    team/murf/datastructs/doc/tex/jitterbuffer.tex
      - copied unchanged from r73728, trunk/doc/tex/jitterbuffer.tex
    team/murf/datastructs/doc/tex/localchannel.tex
      - copied unchanged from r73728, trunk/doc/tex/localchannel.tex
    team/murf/datastructs/doc/tex/manager.tex
      - copied unchanged from r73728, trunk/doc/tex/manager.tex
    team/murf/datastructs/doc/tex/misdn.tex
      - copied unchanged from r73728, trunk/doc/tex/misdn.tex
    team/murf/datastructs/doc/tex/mp3.tex
      - copied unchanged from r73728, trunk/doc/tex/mp3.tex
    team/murf/datastructs/doc/tex/odbcstorage.tex
      - copied unchanged from r73728, trunk/doc/tex/odbcstorage.tex
    team/murf/datastructs/doc/tex/privacy.tex
      - copied unchanged from r73728, trunk/doc/tex/privacy.tex
    team/murf/datastructs/doc/tex/qos.tex
      - copied unchanged from r73728, trunk/doc/tex/qos.tex
    team/murf/datastructs/doc/tex/queuelog.tex
      - copied unchanged from r73728, trunk/doc/tex/queuelog.tex
    team/murf/datastructs/doc/tex/queues-with-callback-members.tex
      - copied unchanged from r73728, trunk/doc/tex/queues-with-callback-members.tex
    team/murf/datastructs/doc/tex/realtime.tex
      - copied unchanged from r73728, trunk/doc/tex/realtime.tex
    team/murf/datastructs/doc/tex/security.tex
      - copied unchanged from r73728, trunk/doc/tex/security.tex
    team/murf/datastructs/doc/tex/sla.tex
      - copied unchanged from r73728, trunk/doc/tex/sla.tex
Removed:
    team/murf/datastructs/doc/ael.tex
    team/murf/datastructs/doc/ajam.tex
    team/murf/datastructs/doc/app-sms.tex
    team/murf/datastructs/doc/ast_appdocs.tex
    team/murf/datastructs/doc/asterisk-conf.tex
    team/murf/datastructs/doc/asterisk.tex
    team/murf/datastructs/doc/billing.tex
    team/murf/datastructs/doc/cdrdriver.tex
    team/murf/datastructs/doc/chaniax.tex
    team/murf/datastructs/doc/channelvariables.tex
    team/murf/datastructs/doc/cliprompt.tex
    team/murf/datastructs/doc/configuration.tex
    team/murf/datastructs/doc/dundi.tex
    team/murf/datastructs/doc/enum.tex
    team/murf/datastructs/doc/extensions.tex
    team/murf/datastructs/doc/freetds.tex
    team/murf/datastructs/doc/hardware.tex
    team/murf/datastructs/doc/ices.tex
    team/murf/datastructs/doc/imapstorage.tex
    team/murf/datastructs/doc/jitterbuffer.tex
    team/murf/datastructs/doc/localchannel.tex
    team/murf/datastructs/doc/manager.tex
    team/murf/datastructs/doc/misdn.tex
    team/murf/datastructs/doc/mp3.tex
    team/murf/datastructs/doc/odbcstorage.tex
    team/murf/datastructs/doc/privacy.tex
    team/murf/datastructs/doc/qos.tex
    team/murf/datastructs/doc/queuelog.tex
    team/murf/datastructs/doc/queues-with-callback-members.tex
    team/murf/datastructs/doc/realtime.tex
    team/murf/datastructs/doc/security.tex
    team/murf/datastructs/doc/sla.tex
Modified:
    team/murf/datastructs/   (props changed)
    team/murf/datastructs/BUGS
    team/murf/datastructs/CHANGES
    team/murf/datastructs/CREDITS
    team/murf/datastructs/Makefile
    team/murf/datastructs/UPGRADE.txt
    team/murf/datastructs/apps/app_chanspy.c
    team/murf/datastructs/apps/app_dial.c
    team/murf/datastructs/apps/app_meetme.c
    team/murf/datastructs/apps/app_queue.c
    team/murf/datastructs/apps/app_voicemail.c
    team/murf/datastructs/build_tools/prep_tarball
    team/murf/datastructs/channels/   (props changed)
    team/murf/datastructs/channels/Makefile
    team/murf/datastructs/channels/chan_agent.c
    team/murf/datastructs/channels/chan_iax2.c
    team/murf/datastructs/channels/chan_local.c
    team/murf/datastructs/channels/chan_misdn.c
    team/murf/datastructs/channels/chan_sip.c
    team/murf/datastructs/channels/chan_vpb.cc
    team/murf/datastructs/channels/misdn/chan_misdn_config.h
    team/murf/datastructs/channels/misdn/isdn_lib.c
    team/murf/datastructs/channels/misdn_config.c
    team/murf/datastructs/configs/misdn.conf.sample
    team/murf/datastructs/funcs/func_hashtab.c
    team/murf/datastructs/include/asterisk/ast_expr.h
    team/murf/datastructs/main/Makefile
    team/murf/datastructs/main/ast_expr2.c
    team/murf/datastructs/main/ast_expr2.fl
    team/murf/datastructs/main/ast_expr2.h
    team/murf/datastructs/main/ast_expr2.y
    team/murf/datastructs/main/ast_expr2f.c
    team/murf/datastructs/main/channel.c
    team/murf/datastructs/main/manager.c
    team/murf/datastructs/main/minimime/Makefile
    team/murf/datastructs/main/minimime/mimeparser.h
    team/murf/datastructs/main/minimime/mimeparser.l
    team/murf/datastructs/main/minimime/mimeparser.tab.c
    team/murf/datastructs/main/minimime/mimeparser.tab.h
    team/murf/datastructs/main/minimime/mimeparser.y
    team/murf/datastructs/main/minimime/mimeparser.yy.c
    team/murf/datastructs/main/minimime/mm_contenttype.c
    team/murf/datastructs/main/minimime/mm_context.c
    team/murf/datastructs/main/minimime/mm_envelope.c
    team/murf/datastructs/main/minimime/mm_mimepart.c
    team/murf/datastructs/main/minimime/mm_mimeutil.c
    team/murf/datastructs/main/minimime/mm_param.c
    team/murf/datastructs/main/minimime/mm_parse.c
    team/murf/datastructs/main/pbx.c
    team/murf/datastructs/pbx/pbx_ael.c
    team/murf/datastructs/res/res_agi.c
    team/murf/datastructs/res/res_config_odbc.c
    team/murf/datastructs/res/res_features.c
    team/murf/datastructs/res/res_jabber.c
    team/murf/datastructs/res/res_limit.c
    team/murf/datastructs/utils/ael_main.c
    team/murf/datastructs/utils/check_expr.c
    team/murf/datastructs/utils/expr2.testinput

Propchange: team/murf/datastructs/
------------------------------------------------------------------------------
    automerge = ja

Propchange: team/murf/datastructs/
            ('branch-1.2-merged' removed)

Propchange: team/murf/datastructs/
------------------------------------------------------------------------------
Binary property 'branch-1.4-blocked' - no diff available.

Propchange: team/murf/datastructs/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Propchange: team/murf/datastructs/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Jul  6 17:03:13 2007
@@ -1,1 +1,1 @@
-/trunk:1-72898
+/trunk:1-73766

Modified: team/murf/datastructs/BUGS
URL: http://svn.digium.com/view/asterisk/team/murf/datastructs/BUGS?view=diff&rev=73767&r1=73766&r2=73767
==============================================================================
--- team/murf/datastructs/BUGS (original)
+++ team/murf/datastructs/BUGS Fri Jul  6 17:03:13 2007
@@ -7,7 +7,7 @@
 	http://bugs.digium.com
 
 For more information on using the bug tracker, or to 
-learn how you can contribute by acting as a bug marshall
+learn how you can contribute by acting as a bug marshal
 please see:
 
 	http://www.asterisk.org/developers/bug-guidelines

Modified: team/murf/datastructs/CHANGES
URL: http://svn.digium.com/view/asterisk/team/murf/datastructs/CHANGES?view=diff&rev=73767&r1=73766&r2=73767
==============================================================================
--- team/murf/datastructs/CHANGES (original)
+++ team/murf/datastructs/CHANGES Fri Jul  6 17:03:13 2007
@@ -4,6 +4,7 @@
 
 AMI - The manager (TCP/TLS/HTTP)
 --------------------------------
+  * Added TLS support for the manager interface and HTTP server
   * Added the URI redirect option for the built-in HTTP server
   * The output of CallerID in Manager events is now more consistent.
      CallerIDNum is used for number and CallerIDName for name.
@@ -109,6 +110,7 @@
   * Added "tw" language support
   * Added support for storage of greetings using an IMAP server
   * Added ability to customize forward, reverse, stop, and pause keys for message playback
+  * SMDI is now enabled in voicemail using the smdienable option.
 
 Queue changes
 -------------
@@ -141,6 +143,8 @@
   * Added a new application, MeetMeChannelAdmin, which is similar to MeetMeAdmin,
      except it does operations on a channel by name, instead of number in a conference.
      This is a very useful feature in combination with the 'X' option to ChanSpy.
+  * Added 'C' option to Meetme which causes a caller to continue in the dialplan
+     when kicked out.
 
 Music On Hold Changes
 ---------------------
@@ -149,14 +153,8 @@
      listening to music on hold can press this digit to switch to listening
      to this music on hold class.
 
-Miscellaneous 
--------------
-
-  * Added the bindaddr option to gtalk.conf.
-  * Argument support for Gosub application
-  * Ability to set process limits without restarting Asterisk
-  * SS7 support in chan_zap (via libss7 library)
-  * Proper codec support in chan_skinny.
+AEL Changes
+-----------
   * AEL upgraded to use the Gosub with Arguments instead
      of Macro application, to hopefully reduce the problems
      seen with the artificially low stack ceiling that 
@@ -168,17 +166,54 @@
      to be called, as in Dial, queues, etc, are now allowing
      a gosub call in similar fashion.
   * AEL now generates LOCAL(argname) declarations when it
-    Set()'s the each arg name to the value of ${ARG1}, ${ARG2),
-    etc. That makes the arguments local in scope. The user
-    can define their own local variables in macros, now,
-    by saying "local myvar=someval;"  or using Set() in this
-    fashion:  Set(LOCAL(myvar)=someval);  ("local" is now
-    an AEL keyword).
+     Set()'s the each arg name to the value of ${ARG1}, ${ARG2),
+     etc. That makes the arguments local in scope. The user
+     can define their own local variables in macros, now,
+     by saying "local myvar=someval;"  or using Set() in this
+     fashion:  Set(LOCAL(myvar)=someval);  ("local" is now
+     an AEL keyword).
+
+Zaptel channel driver (chan_zap) Changes
+----------------------------------------
+  * SS7 support in chan_zap (via libss7 library)
+  * In India, some carriers transmit CID via dtmf. Some code has been added
+    that will handle some situations. The cidstart=polarity_IN choice has been added for
+    those carriers that transmit CID via dtmf after a polarity change.
+  * CID matching information is now shown when doing 'dialplan show'.
+  * Added zap show version CLI command to chan_zap.
+
+H.323 Changes
+-------------
+  * H323 remote hold notification support added (by NOTIFY message
+     and/or H.450 supplementary service)
+
+Call Features (res_features) Changes
+------------------------------------
+  * Added the parkedcalltransfers option to features.conf
+  * The built-in method for doing attended transfers has been updated to
+     include some new options that allow you to have the transferee sent
+     back to the person that did the transfer if the transfer is not successful.
+     See the options "atxferdropcall", "atxferloopdelay", and "atxfercallbackretries"
+     in features.conf.sample.
+  * Added support for configuring named groups of custom call features in
+     features.conf.  This means that features can be written a single time, and
+     then mapped into groups of features for different key mappings or easier
+     access control.
+
+Language Support Changes
+------------------------
+  * Brazilian Portuguese (pt-BR) in VM, and say.c was added
+  * Added support for the Hungarian language for saying numbers, dates, and times.
+
+Miscellaneous 
+-------------
+  * Added the bindaddr option to gtalk.conf.
+  * Argument support for Gosub application
+  * Ability to set process limits without restarting Asterisk
+  * Proper codec support in chan_skinny.
   * Ability to use libcap to set high ToS bits when non-root
      on Linux. If configure is unable to find libcap then you
      can use --with-cap to specify the path.
-  * H323 remote hold notification support added (by NOTIFY message
-     and/or H.450 supplementary service)
   * Added rotatetimestamp option to logger.conf which will use
      the time to name the logger files instead of sequence number.
   * Added Masquerade manager event for when a masquerade happens between
@@ -191,25 +226,14 @@
      Read() - timeout now can be floating pt.
      WaitForRing() now takes floating pt timeout arg.
      SpeechBackground() -- clarified in the docstrings that the timeout is an integer seconds.
-  * Added 'C' option to Meetme which causes a caller to continue in the dialplan
-     when kicked out.
-  * Brazilian Portuguese (pt-BR) in VM, and say.c was added via patch from cfassoni.
-  * In India, some carriers transmit CID via dtmf. Some code has been added
-    that will handle some situations. The cidstart=polarity_IN choice has been added for
-    those carriers that transmit CID via dtmf after a polarity change.
-  * CID matching information is now shown when doing 'dialplan show'.
   * Added maxfiles option to options section of asterisk.conf which allows you to specify
      what Asterisk should set as the maximum number of open files when it loads.
   * Added the jittertargetextra configuration option.
   * Added G729 passthrough support to chan_phone for Sigma Designs boards.
-  * Added the parkedcalltransfers option to features.conf
   * Added 's' option to Page application.
   * Added 'E' and 'V' commands to ExternalIVR.
   * Added 'DBDel' and 'DBDelTree' manager commands.
   * Added 'o' and 'X' options to Chanspy.
-  * Added the parkedcallreparking option to features.conf
-  * SMDI is now enabled in voicemail using the smdienable option.
-  * Added zap show version CLI command to chan_zap.
   * Added a new CDR module, cdr_sqlite3_custom.
   * The cdr_manager module has a [mappings] feature, like cdr_custom,
     to add fields to the manager event from the CDR variables.
@@ -220,16 +244,6 @@
      configuration files for the IP channel drivers.  The new option is "cos".
      This information is also documented in doc/qos.tex, or the IP Quality of Service
      section of asterisk.pdf.
-  * The built-in method for doing attended transfers has been updated to
-     include some new options that allow you to have the transferee sent
-     back to the person that did the transfer if the transfer is not successful.
-     See the options "atxferdropcall", "atxferloopdelay", and "atxfercallbackretries"
-     in features.conf.sample.
   * The device state functionality in the Local channel driver has been updated
      to indicate INUSE or NOT_INUSE when a Local channel is being used as opposed
      to just UNKNOWN if the extension exists.
-  * Added support for the Hungarian language for saying numbers, dates, and times.
-  * Added support for configuring named groups of custom call features in
-     features.conf.  This means that features can be written a single time, and
-     then mapped into groups of features for different key mappings or easier
-     access control.

Modified: team/murf/datastructs/CREDITS
URL: http://svn.digium.com/view/asterisk/team/murf/datastructs/CREDITS?view=diff&rev=73767&r1=73766&r2=73767
==============================================================================
--- team/murf/datastructs/CREDITS (original)
+++ team/murf/datastructs/CREDITS Fri Jul  6 17:03:13 2007
@@ -135,7 +135,7 @@
 
 Voop AS, Nuvio Inc, Inotel S.A and Foniris Telecom A/S - funding for rewrite of SIP transfers
 
-Philippe Sultan - RADIUS CDR module
+Philippe Sultan - RADIUS CDR module, many fixes to res_jabber and gtalk/jingle channel drivers
 	INRIA, http://www.inria.fr/
 
 John Martin, Aupix - Improved video support in the SIP channel
@@ -156,8 +156,6 @@
 Paul Cadach - Bringing chan_h323 up to date, bug fixes, and more!
 
 Voop AS - Financial support for a lot of work with the SIP driver and the IAX trunk MTU patch
-
-Philippe Sultan, INRIA - many fixes to res_jabber and gtalk/jingle channel drivers
 
 === OTHER CONTRIBUTIONS ===
 John Todd - Monkey sounds and associated teletorture prompt

Modified: team/murf/datastructs/Makefile
URL: http://svn.digium.com/view/asterisk/team/murf/datastructs/Makefile?view=diff&rev=73767&r1=73766&r2=73767
==============================================================================
--- team/murf/datastructs/Makefile (original)
+++ team/murf/datastructs/Makefile Fri Jul  6 17:03:13 2007
@@ -699,22 +699,4 @@
 
 asterisk.pdf: doc/asterisk.pdf
 
-doc/asterisk.pdf: $(wildcard doc/*.tex)
-ifeq ($(findstring rubber,$(RUBBER)),)
-	@echo "**********************************************"
-	@echo "** You must install the \"rubber\" tool      ***"
-	@echo "** to generate the Asterisk reference PDF. ***"
-	@echo "**********************************************"
-else
-	@echo "**********************************************"
-	@echo "** The Asterisk reference PDF will now be  ***"
-	@echo "** generated.  When complete, it will be   ***"
-	@echo "** located at doc/asterisk.pdf.            ***"	
-	@echo "**********************************************"
-	@cp doc/asterisk.tex doc/asterisk.tex.orig
-	@sed -i -e 's/ASTERISKVERSION/$(ASTERISKVERSION)/' doc/asterisk.tex
-	@cd doc && $(RUBBER) --pdf asterisk.tex
-	@mv doc/asterisk.tex.orig doc/asterisk.tex
-endif
-
 .PHONY: menuselect main sounds clean dist-clean distclean all prereqs cleantest uninstall _uninstall uninstall-all dont-optimize $(SUBDIRS_INSTALL) $(SUBDIRS_CLEAN) $(SUBDIRS_UNINSTALL) $(SUBDIRS) $(MOD_SUBDIRS_EMBED_LDSCRIPT) $(MOD_SUBDIRS_EMBED_LDFLAGS) $(MOD_SUBDIRS_EMBED_LIBS) menuselect.makeopts

Modified: team/murf/datastructs/UPGRADE.txt
URL: http://svn.digium.com/view/asterisk/team/murf/datastructs/UPGRADE.txt?view=diff&rev=73767&r1=73766&r2=73767
==============================================================================
--- team/murf/datastructs/UPGRADE.txt (original)
+++ team/murf/datastructs/UPGRADE.txt Fri Jul  6 17:03:13 2007
@@ -24,6 +24,17 @@
   style' layout introduced in Asterisk 1.4 (and used by the automatic
   sound file installer in the Makefile).
 
+* The ast_expr2 stuff has been modified to handle floating-point numbers.
+  Numbers of the format D.D are now acceptable input for the expr parser, 
+  Where D is a string of base-10 digits. All math is now done in "long double",
+  if it is available on your compiler/architecture. This was half-way between
+  a bug-fix (because the MATH func returns fp by default), and an enhancement.
+  Also, for those counting on, or needing, integer operations, a series of
+  'functions' were also added to the expr language, to allow several styles
+  of rounding/truncation, along with a set of common floating point operations,
+  like sin, cos, tan, log, pow, etc. The ability to call external functions
+  like CDR(), etc. was also added, without having to use the ${...} notation.
+ 
 Voicemail:
 
 * The voicemail configuration values 'maxmessage' and 'minmessage' have

Modified: team/murf/datastructs/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/team/murf/datastructs/apps/app_chanspy.c?view=diff&rev=73767&r1=73766&r2=73767
==============================================================================
--- team/murf/datastructs/apps/app_chanspy.c (original)
+++ team/murf/datastructs/apps/app_chanspy.c Fri Jul  6 17:03:13 2007
@@ -425,9 +425,10 @@
 	else
 		ast_deactivate_generator(chan);
 
+	csth.spy.status = CHANSPY_DONE;
+
 	/* If a channel still exists on our spy structure then we need to remove ourselves */
 	if (csth.spy.chan) {
-		csth.spy.status = CHANSPY_DONE;
 		ast_channel_lock(csth.spy.chan);
 		ast_channel_spy_remove(csth.spy.chan, &csth.spy);
 		ast_channel_unlock(csth.spy.chan);

Modified: team/murf/datastructs/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/murf/datastructs/apps/app_dial.c?view=diff&rev=73767&r1=73766&r2=73767
==============================================================================
--- team/murf/datastructs/apps/app_dial.c (original)
+++ team/murf/datastructs/apps/app_dial.c Fri Jul  6 17:03:13 2007
@@ -1846,7 +1846,7 @@
 
 	if ((dialdata = strchr(announce, '|'))) {
 		*dialdata++ = '\0';
-		if ((sleep = atoi(dialdata))) {
+		if (sscanf(dialdata, "%d", &sleep) == 1) {
 			sleep *= 1000;
 		} else {
 			ast_log(LOG_ERROR, "%s requires the numerical argument <sleep>\n",rapp);
@@ -1854,7 +1854,7 @@
 		}
 		if ((dialdata = strchr(dialdata, '|'))) {
 			*dialdata++ = '\0';
-			if (!(loops = atoi(dialdata))) {
+			if (sscanf(dialdata, "%d", &loops) != 1) {
 				ast_log(LOG_ERROR, "%s requires the numerical argument <loops>\n",rapp);
 				goto done;
 			}

Modified: team/murf/datastructs/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/murf/datastructs/apps/app_meetme.c?view=diff&rev=73767&r1=73766&r2=73767
==============================================================================
--- team/murf/datastructs/apps/app_meetme.c (original)
+++ team/murf/datastructs/apps/app_meetme.c Fri Jul  6 17:03:13 2007
@@ -111,8 +111,8 @@
 	CONFFLAG_ADMIN = (1 << 0),
 	/*! If set the user can only receive audio from the conference */
 	CONFFLAG_MONITOR = (1 << 1),
-	/*! If set asterisk will exit conference when '#' is pressed */
-	CONFFLAG_POUNDEXIT = (1 << 2),
+	/*! If set asterisk will exit conference when key defined in p() option is pressed */
+	CONFFLAG_KEYEXIT = (1 << 2),
 	/*! If set asterisk will provide a menu to the user when '*' is pressed */
 	CONFFLAG_STARMENU = (1 << 3),
 	/*! If set the use can only send audio to the conference */
@@ -163,7 +163,8 @@
 
 enum {
 	OPT_ARG_WAITMARKED = 0,
-	OPT_ARG_ARRAY_SIZE = 1,
+	OPT_ARG_EXITKEYS   = 1,
+	OPT_ARG_ARRAY_SIZE = 2,
 };
 
 AST_APP_OPTIONS(meetme_opts, BEGIN_OPTIONS
@@ -182,7 +183,7 @@
 	AST_APP_OPTION('M', CONFFLAG_MOH ),
 	AST_APP_OPTION('m', CONFFLAG_STARTMUTED ),
 	AST_APP_OPTION('P', CONFFLAG_ALWAYSPROMPT ),
-	AST_APP_OPTION('p', CONFFLAG_POUNDEXIT ),
+	AST_APP_OPTION_ARG('p', CONFFLAG_KEYEXIT, OPT_ARG_EXITKEYS ),
 	AST_APP_OPTION('q', CONFFLAG_QUIET ),
 	AST_APP_OPTION('r', CONFFLAG_RECORDCONF ),
 	AST_APP_OPTION('s', CONFFLAG_STARMENU ),
@@ -240,7 +241,10 @@
 "             being muted, meaning (a) No encode is done on transmission and\n"
 "             (b) Received audio that is not registered as talking is omitted\n"
 "             causing no buildup in background noise\n"
-"      'p' -- allow user to exit the conference by pressing '#'\n"
+"      'p[(<keys>)]'\n"
+"          -- allow user to exit the conference by pressing '#' (default)\n"
+"             or any of the defined keys. If keys contain '*' this will override\n"
+"             option 's'. The key used is set to channel variable MEETME_EXIT_KEY.\n"
 "      'P' -- always prompt for the pin even if it is specified\n"
 "      'q' -- quiet mode (don't play enter/leave sounds)\n"
 "      'r' -- Record conference (records as ${MEETME_RECORDINGFILE}\n"
@@ -1419,6 +1423,7 @@
 	ZT_BUFFERINFO bi;
 	char __buf[CONF_SIZE + AST_FRIENDLY_OFFSET];
 	char *buf = __buf + AST_FRIENDLY_OFFSET;
+	char *exitkeys = NULL;
 
 	if (!(user = ast_calloc(1, sizeof(*user))))
 		return ret;
@@ -1430,7 +1435,15 @@
 		(opt_waitmarked_timeout > 0)) {
 		timeout = time(NULL) + opt_waitmarked_timeout;
 	}
-
+	
+	/* Get exit keys */
+	if ((confflags & CONFFLAG_KEYEXIT)) {
+		if (!ast_strlen_zero(optargs[OPT_ARG_EXITKEYS]))
+			exitkeys = ast_strdupa(optargs[OPT_ARG_EXITKEYS]);
+		else
+			exitkeys = ast_strdupa("#"); /* Default */
+	}
+	
 	if (confflags & CONFFLAG_RECORDCONF) {
 		if (!conf->recordingfilename) {
 			conf->recordingfilename = pbx_builtin_getvar_helper(chan, "MEETME_RECORDINGFILE");
@@ -1993,7 +2006,14 @@
 					} else {
 						ast_debug(2, "Exit by single digit did not work in meetme. Extension %s does not exist in context %s\n", tmp, exitcontext);
 					}
-				} else if ((f->frametype == AST_FRAME_DTMF) && (f->subclass == '#') && (confflags & CONFFLAG_POUNDEXIT)) {
+				} else if ((f->frametype == AST_FRAME_DTMF) && (confflags & CONFFLAG_KEYEXIT) && (strchr(exitkeys, f->subclass))) {
+					char exitkey[2];
+
+					exitkey[0] = f->subclass;
+					exitkey[1] = '\0';
+					
+					pbx_builtin_setvar_helper(chan, "MEETME_EXIT_KEY", exitkey);
+						
 					ret = 0;
 					ast_frfree(f);
 					break;

Modified: team/murf/datastructs/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/murf/datastructs/apps/app_queue.c?view=diff&rev=73767&r1=73766&r2=73767
==============================================================================
--- team/murf/datastructs/apps/app_queue.c (original)
+++ team/murf/datastructs/apps/app_queue.c Fri Jul  6 17:03:13 2007
@@ -383,6 +383,7 @@
 	char sound_lessthan[80];            /*!< Sound file: "less-than" (def. queue-lessthan) */
 	char sound_seconds[80];             /*!< Sound file: "seconds." (def. queue-seconds) */
 	char sound_thanks[80];              /*!< Sound file: "Thank you for your patience." (def. queue-thankyou) */
+	char sound_callerannounce[80];      /*!< Sound file: Custom announce for caller, no default */
 	char sound_reporthold[80];          /*!< Sound file: "Hold time" (def. queue-reporthold) */
 	char sound_periodicannounce[MAX_PERIODIC_ANNOUNCEMENTS][80];/*!< Sound files: Custom announce, no default */
 
@@ -631,8 +632,10 @@
 
 	while (!device_state.stop) {
 		ast_mutex_lock(&device_state.lock);
-		ast_cond_wait(&device_state.cond, &device_state.lock);
-		sc = AST_LIST_REMOVE_HEAD(&device_state.state_change_q, entry);
+		if (!(sc = AST_LIST_REMOVE_HEAD(&device_state.state_change_q, entry))) {
+			ast_cond_wait(&device_state.cond, &device_state.lock);
+			sc = AST_LIST_REMOVE_HEAD(&device_state.state_change_q, entry);
+		}
 		ast_mutex_unlock(&device_state.lock);
 
 		/* Check to see if we were woken up to see the request to stop */
@@ -738,6 +741,7 @@
 	q->context[0] = '\0';
 	q->monfmt[0] = '\0';
 	q->periodicannouncefrequency = 0;
+	q->sound_callerannounce[0] = '\0';	/* Default, don't announce the caller that he has been answered */
 	ast_copy_string(q->sound_next, "queue-youarenext", sizeof(q->sound_next));
 	ast_copy_string(q->sound_thereare, "queue-thereare", sizeof(q->sound_thereare));
 	ast_copy_string(q->sound_calls, "queue-callswaiting", sizeof(q->sound_calls));
@@ -893,6 +897,8 @@
 		ast_copy_string(q->sound_lessthan, val, sizeof(q->sound_lessthan));
 	} else if (!strcasecmp(param, "queue-thankyou")) {
 		ast_copy_string(q->sound_thanks, val, sizeof(q->sound_thanks));
+	} else if (!strcasecmp(param, "queue-callerannounce")) {
+		ast_copy_string(q->sound_callerannounce, val, sizeof(q->sound_callerannounce));
 	} else if (!strcasecmp(param, "queue-reporthold")) {
 		ast_copy_string(q->sound_reporthold, val, sizeof(q->sound_reporthold));
 	} else if (!strcasecmp(param, "announce-frequency")) {
@@ -2625,6 +2631,13 @@
 			ast_hangup(peer);
 			return -1;
 		}
+
+		/* Play announcement to the caller telling it's his turn if defined */
+		if (!ast_strlen_zero(qe->parent->sound_callerannounce)) {
+			if (play_file(qe->chan, qe->parent->sound_callerannounce))
+				ast_log(LOG_WARNING, "Announcement file '%s' is unavailable, continuing anyway...\n", qe->parent->sound_callerannounce);
+		}
+
 		/* Begin Monitoring */
 		if (qe->parent->monfmt && *qe->parent->monfmt) {
 			if (!qe->parent->montype) {
@@ -4253,6 +4266,13 @@
 	return ret;
 }
 
+static char *complete_queue_show(const char *line, const char *word, int pos, int state)
+{
+	if (pos == 2)
+		return complete_queue(line, word, pos, state);
+	return NULL;
+}
+
 /*!\brief callback to display queues status in manager
    \addtogroup Group_AMI
  */
@@ -4349,8 +4369,7 @@
 
 		/* List queue properties */
 		if (ast_strlen_zero(queuefilter) || !strcmp(q->name, queuefilter)) {
-			if (q->callscompleted > 0)
-				sl = 100 * ((float) q->callscompletedinsl / (float) q->callscompleted);
+			sl = ((q->callscompleted > 0) ? 100 * ((float)q->callscompletedinsl / (float)q->callscompleted) : 0);
 			astman_append(s, "Event: QueueParams\r\n"
 				"Queue: %s\r\n"
 				"Max: %d\r\n"
@@ -4708,7 +4727,7 @@
 static struct ast_cli_entry cli_queue[] = {
 	{ { "queue", "show", NULL },
 	queue_show, "Show status of a specified queue",
-	queue_show_usage, complete_queue, NULL },
+	queue_show_usage, complete_queue_show, NULL },
 
 	{ { "queue", "add", "member", NULL },
 	handle_queue_add_member, "Add a channel to a specified queue",

Modified: team/murf/datastructs/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/murf/datastructs/apps/app_voicemail.c?view=diff&rev=73767&r1=73766&r2=73767
==============================================================================
--- team/murf/datastructs/apps/app_voicemail.c (original)
+++ team/murf/datastructs/apps/app_voicemail.c Fri Jul  6 17:03:13 2007
@@ -2311,7 +2311,7 @@
 
 	snprintf(fn, sizeof(fn), "%s%s/%s/greet", VM_SPOOL_DIR, context, ext);
 
-	if ((res = create_dirpath(dest, sizeof(dest), context, ext, "greet"))) {
+	if ((res = create_dirpath(dest, sizeof(dest), context, ext, ""))) {
 		ast_log(LOG_WARNING, "Failed to make directory(%s)\n", fn);
 		return -1;
 	}
@@ -3018,7 +3018,6 @@
 	char priority[16];
 	char origtime[16];
 	char dir[PATH_MAX], tmpdir[PATH_MAX];
-	char dest[PATH_MAX];
 	char fn[PATH_MAX];
 	char prefile[PATH_MAX] = "";
 	char tempfile[PATH_MAX] = "";
@@ -3057,14 +3056,12 @@
 	else
 		ast_copy_string(ext_context, vmu->context, sizeof(ext_context));
 	if (ast_test_flag(options, OPT_BUSY_GREETING)) {
-		res = create_dirpath(dest, sizeof(dest), vmu->context, ext, "busy");
 		snprintf(prefile, sizeof(prefile), "%s%s/%s/busy", VM_SPOOL_DIR, vmu->context, ext);
 	} else if (ast_test_flag(options, OPT_UNAVAIL_GREETING)) {
-		res = create_dirpath(dest, sizeof(dest), vmu->context, ext, "unavail");
 		snprintf(prefile, sizeof(prefile), "%s%s/%s/unavail", VM_SPOOL_DIR, vmu->context, ext);
 	}
 	snprintf(tempfile, sizeof(tempfile), "%s%s/%s/temp", VM_SPOOL_DIR, vmu->context, ext);
-	if ((res = create_dirpath(dest, sizeof(dest), vmu->context, ext, "temp"))) {
+	if ((res = create_dirpath(tmpdir, sizeof(tmpdir), vmu->context, ext, "tmp"))) {
 		ast_log(LOG_WARNING, "Failed to make directory (%s)\n", tempfile);
 		return -1;
 	}
@@ -3074,7 +3071,6 @@
 	DISPOSE(tempfile, -1);
 	/* It's easier just to try to make it than to check for its existence */
 	create_dirpath(dir, sizeof(dir), vmu->context, ext, "INBOX");
-	create_dirpath(tmpdir, sizeof(tmpdir), vmu->context, ext, "tmp");
 
 	/* Check current or macro-calling context for special extensions */
 	if (ast_test_flag(vmu, VM_OPERATOR)) {
@@ -3187,8 +3183,24 @@
 			ast_log(LOG_NOTICE,"Can not leave voicemail, unable to count messages\n");
 			return -1;
 		}
-		if((vms = get_vm_state_by_mailbox(ext,0)))  
-			vms->newmessages++; /*still need to increment new message count*/
+		if(!(vms = get_vm_state_by_mailbox(ext,0))) {
+		/*It is possible under certain circumstances that inboxcount did not create a vm_state when it was needed. This is a catchall which will
+		 * rarely be used*/
+			if (!(vms = ast_calloc(1, sizeof(*vms)))) {
+				ast_log(LOG_ERROR, "Couldn't allocate necessary space\n");
+				return -1;
+			}
+			ast_copy_string(vms->imapuser, vmu->imapuser, sizeof(vms->imapuser));
+			ast_copy_string(vms->username, ext, sizeof(vms->username));
+			vms->mailstream = NIL;
+			ast_debug(3, "Copied %s to %s\n", vmu->imapuser, vms->imapuser);
+			vms->updated=1;
+			ast_copy_string(vms->curbox, mbox(0), sizeof(vms->curbox));
+			init_vm_state(vms);
+			vmstate_insert(vms);
+			vms = get_vm_state_by_mailbox(ext,0);
+		}
+		vms->newmessages++;
 		
 		/* here is a big difference! We add one to it later */
 		msgnum = newmsgs + oldmsgs;
@@ -3320,6 +3332,11 @@
 					snprintf(txtfile, sizeof(txtfile), "%s.txt", fn);
 					ast_filerename(tmptxtfile, fn, NULL);
 					rename(tmptxtfile, txtfile);
+
+					/* Properly set permissions on voicemail text descriptor file.
+					   Unfortunately mkstemp() makes this file 0600 on most unix systems. */
+					if (chmod(txtfile, VOICEMAIL_FILE_MODE) < 0)
+						ast_log(LOG_ERROR, "Couldn't set permissions on voicemail text file %s: %s", txtfile, strerror(errno));
 
 					ast_unlock_path(dir);
 					if (ast_check_realtime("voicemail_data")) {
@@ -6378,13 +6395,11 @@
 
 static int vm_tempgreeting(struct ast_channel *chan, struct ast_vm_user *vmu, struct vm_state *vms, char *fmtc, signed char record_gain)
 {
-	int res;
 	int cmd = 0;
 	int retries = 0;
 	int duration = 0;
 	char prefile[PATH_MAX] = "";
 	unsigned char buf[256];
-	char dest[PATH_MAX];
 	int bytes = 0;
 
 	if (ast_adsi_available(chan)) {
@@ -6397,10 +6412,6 @@
 	}
 
 	snprintf(prefile, sizeof(prefile), "%s%s/%s/temp", VM_SPOOL_DIR, vmu->context, vms->username);
-	if ((res = create_dirpath(dest, sizeof(dest), vmu->context, vms->username, "temp"))) {
-		ast_log(LOG_WARNING, "Failed to create directory (%s).\n", prefile);
-		return -1;
-	}
 	while((cmd >= 0) && (cmd != 't')) {
 		if (cmd)
 			retries = 0;
@@ -8635,7 +8646,7 @@
 
 	make_file(vms->fn2, sizeof(vms->fn2), vms->curdir, vms->curmsg);
 	snprintf(filename,sizeof(filename), "%s.txt", vms->fn2);
-	RETRIEVE(vms->curdir, vms->curms, vmu->mailbox, vmu->context);
+	RETRIEVE(vms->curdir, vms->curmsg, vmu->mailbox, vmu->context);
 	msg_cfg = ast_config_load(filename);
 	DISPOSE(vms->curdir, vms->curmsg);
 	if (!msg_cfg) {

Modified: team/murf/datastructs/build_tools/prep_tarball
URL: http://svn.digium.com/view/asterisk/team/murf/datastructs/build_tools/prep_tarball?view=diff&rev=73767&r1=73766&r2=73767
==============================================================================
--- team/murf/datastructs/build_tools/prep_tarball (original)
+++ team/murf/datastructs/build_tools/prep_tarball Fri Jul  6 17:03:13 2007
@@ -9,4 +9,6 @@
 
 make menuselect-tree
 
-cd doc && rubber --pdf asterisk.tex
+VERSION=`cat .version`
+sed -i -e "s/ASTERISKVERSION/${VERSION}/" doc/tex/asterisk.tex
+cd doc/tex && rubber --pdf asterisk.tex

Propchange: team/murf/datastructs/channels/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Fri Jul  6 17:03:13 2007
@@ -3,8 +3,6 @@
 *.so
 *.oo
 gentone
-busy.h
-ringtone.h
 modules.link
 *.eo
 *.eoo

Modified: team/murf/datastructs/channels/Makefile
URL: http://svn.digium.com/view/asterisk/team/murf/datastructs/channels/Makefile?view=diff&rev=73767&r1=73766&r2=73767
==============================================================================
--- team/murf/datastructs/channels/Makefile (original)
+++ team/murf/datastructs/channels/Makefile Fri Jul  6 17:03:13 2007
@@ -60,7 +60,7 @@
 include $(ASTTOPDIR)/Makefile.moddir_rules
 
 clean::
-	rm -f busy.h ringtone.h gentone
+	rm -f gentone
 	$(MAKE) -C misdn clean
 
 ifneq ($(wildcard h323/Makefile.ast),)
@@ -85,17 +85,13 @@
 	$(CMD_PREFIX) $(HOST_CC) $(STATIC_BUILD) -o $@ $(HOST_CFLAGS) $(HOST_LDFLAGS) $^ $(LIBS)
 gentone: LIBS+=-lm
 
-busy.h: gentone
+busy.h:
 	./gentone busy 480 620
 
-ringtone.h: gentone
+ringtone.h:
 	./gentone ringtone 440 480
 
-chan_oss.o: busy.h ringtone.h
-
 $(if $(filter chan_iax2,$(EMBEDDED_MODS)),modules.link,chan_iax2.so): iax2-parser.o iax2-provision.o
-
-chan_alsa.o: busy.h ringtone.h
 
 ifeq ($(OSARCH),linux-gnu)
 chan_h323.so: chan_h323.o h323/libchanh323.a h323/Makefile.ast
@@ -114,3 +110,5 @@
 misdn/isdn_lib.o: ASTCFLAGS+=-Wno-strict-aliasing
 
 $(if $(filter chan_misdn,$(EMBEDDED_MODS)),modules.link,chan_misdn.so): chan_misdn.o misdn_config.o misdn/isdn_lib.o misdn/isdn_msg_parser.o
+
+chan_vpb.oo: ASTCFLAGS:=$(filter-out -Wdeclaration-after-statement,$(ASTCFLAGS))

Modified: team/murf/datastructs/channels/chan_agent.c
URL: http://svn.digium.com/view/asterisk/team/murf/datastructs/channels/chan_agent.c?view=diff&rev=73767&r1=73766&r2=73767
==============================================================================
--- team/murf/datastructs/channels/chan_agent.c (original)
+++ team/murf/datastructs/channels/chan_agent.c Fri Jul  6 17:03:13 2007
@@ -1284,7 +1284,7 @@
 #if 0
 				ast_log(LOG_NOTICE, "Time now: %ld, Time of lastdisc: %ld\n", tv.tv_sec, p->lastdisc.tv_sec);
 #endif
-				if (!p->lastdisc.tv_sec || (tv.tv_sec > p->lastdisc.tv_sec)) {
+				if (!p->lastdisc.tv_sec || (tv.tv_sec >= p->lastdisc.tv_sec)) {
 					p->lastdisc = ast_tv(0, 0);
 					/* Agent must be registered, but not have any active call, and not be in a waiting state */
 					if (!p->owner && p->chan) {

Modified: team/murf/datastructs/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/murf/datastructs/channels/chan_iax2.c?view=diff&rev=73767&r1=73766&r2=73767
==============================================================================
--- team/murf/datastructs/channels/chan_iax2.c (original)
+++ team/murf/datastructs/channels/chan_iax2.c Fri Jul  6 17:03:13 2007
@@ -646,7 +646,7 @@
 	int frames_received;
 };
 
-static AST_LIST_HEAD_STATIC(queue, iax_frame);
+static AST_LIST_HEAD_STATIC(frame_queue, iax_frame);
 
 static AST_LIST_HEAD_STATIC(users, iax2_user);
 
@@ -1901,13 +1901,13 @@
 			ast_queue_hangup(owner);
 		}
 
-		AST_LIST_LOCK(&queue);
-		AST_LIST_TRAVERSE(&queue, cur, list) {
+		AST_LIST_LOCK(&frame_queue);
+		AST_LIST_TRAVERSE(&frame_queue, cur, list) {
 			/* Cancel any pending transmissions */
 			if (cur->callno == pvt->callno) 
 				cur->retries = -1;
 		}
-		AST_LIST_UNLOCK(&queue);
+		AST_LIST_UNLOCK(&frame_queue);
 
 		if (pvt->reg)
 			pvt->reg->callno = 0;
@@ -2017,9 +2017,9 @@
 	/* Do not try again */
 	if (freeme) {
 		/* Don't attempt delivery, just remove it from the queue */
-		AST_LIST_LOCK(&queue);
-		AST_LIST_REMOVE(&queue, f, list);
-		AST_LIST_UNLOCK(&queue);

[... 7608 lines stripped ...]



More information about the asterisk-commits mailing list