[svn-commits] murf: branch murf/newcdr r61762 - in /team/murf/newcdr: ./ apps/ channels/ ch...

svn-commits at lists.digium.com svn-commits at lists.digium.com
Mon Apr 23 10:15:08 MST 2007


Author: murf
Date: Mon Apr 23 12:15:06 2007
New Revision: 61762

URL: http://svn.digium.com/view/asterisk?view=rev&rev=61762
Log:
OK, now up to date again

Added:
    team/murf/newcdr/apps/app_minivm.c
      - copied unchanged from r61760, trunk/apps/app_minivm.c
    team/murf/newcdr/configs/extensions_minivm.conf.sample
      - copied unchanged from r61760, trunk/configs/extensions_minivm.conf.sample
    team/murf/newcdr/configs/minivm.conf.sample
      - copied unchanged from r61760, trunk/configs/minivm.conf.sample
    team/murf/newcdr/main/minimime/   (props changed)
      - copied from r61760, trunk/main/minimime/
    team/murf/newcdr/main/minimime/Make.conf
      - copied unchanged from r61760, trunk/main/minimime/Make.conf
    team/murf/newcdr/main/minimime/Makefile
      - copied unchanged from r61760, trunk/main/minimime/Makefile
    team/murf/newcdr/main/minimime/mimeparser.h
      - copied unchanged from r61760, trunk/main/minimime/mimeparser.h
    team/murf/newcdr/main/minimime/mimeparser.l
      - copied unchanged from r61760, trunk/main/minimime/mimeparser.l
    team/murf/newcdr/main/minimime/mimeparser.tab.c
      - copied unchanged from r61760, trunk/main/minimime/mimeparser.tab.c
    team/murf/newcdr/main/minimime/mimeparser.tab.h
      - copied unchanged from r61760, trunk/main/minimime/mimeparser.tab.h
    team/murf/newcdr/main/minimime/mimeparser.y
      - copied unchanged from r61760, trunk/main/minimime/mimeparser.y
    team/murf/newcdr/main/minimime/mimeparser.yy.c
      - copied unchanged from r61760, trunk/main/minimime/mimeparser.yy.c
    team/murf/newcdr/main/minimime/minimime.c
      - copied unchanged from r61760, trunk/main/minimime/minimime.c
    team/murf/newcdr/main/minimime/mm.h
      - copied unchanged from r61760, trunk/main/minimime/mm.h
    team/murf/newcdr/main/minimime/mm_base64.c
      - copied unchanged from r61760, trunk/main/minimime/mm_base64.c
    team/murf/newcdr/main/minimime/mm_codecs.c
      - copied unchanged from r61760, trunk/main/minimime/mm_codecs.c
    team/murf/newcdr/main/minimime/mm_contenttype.c
      - copied unchanged from r61760, trunk/main/minimime/mm_contenttype.c
    team/murf/newcdr/main/minimime/mm_context.c
      - copied unchanged from r61760, trunk/main/minimime/mm_context.c
    team/murf/newcdr/main/minimime/mm_envelope.c
      - copied unchanged from r61760, trunk/main/minimime/mm_envelope.c
    team/murf/newcdr/main/minimime/mm_error.c
      - copied unchanged from r61760, trunk/main/minimime/mm_error.c
    team/murf/newcdr/main/minimime/mm_header.c
      - copied unchanged from r61760, trunk/main/minimime/mm_header.c
    team/murf/newcdr/main/minimime/mm_init.c
      - copied unchanged from r61760, trunk/main/minimime/mm_init.c
    team/murf/newcdr/main/minimime/mm_internal.h
      - copied unchanged from r61760, trunk/main/minimime/mm_internal.h
    team/murf/newcdr/main/minimime/mm_mem.c
      - copied unchanged from r61760, trunk/main/minimime/mm_mem.c
    team/murf/newcdr/main/minimime/mm_mem.h
      - copied unchanged from r61760, trunk/main/minimime/mm_mem.h
    team/murf/newcdr/main/minimime/mm_mimepart.c
      - copied unchanged from r61760, trunk/main/minimime/mm_mimepart.c
    team/murf/newcdr/main/minimime/mm_mimeutil.c
      - copied unchanged from r61760, trunk/main/minimime/mm_mimeutil.c
    team/murf/newcdr/main/minimime/mm_param.c
      - copied unchanged from r61760, trunk/main/minimime/mm_param.c
    team/murf/newcdr/main/minimime/mm_parse.c
      - copied unchanged from r61760, trunk/main/minimime/mm_parse.c
    team/murf/newcdr/main/minimime/mm_queue.h
      - copied unchanged from r61760, trunk/main/minimime/mm_queue.h
    team/murf/newcdr/main/minimime/mm_util.c
      - copied unchanged from r61760, trunk/main/minimime/mm_util.c
    team/murf/newcdr/main/minimime/mm_util.h
      - copied unchanged from r61760, trunk/main/minimime/mm_util.h
    team/murf/newcdr/main/minimime/mm_warnings.c
      - copied unchanged from r61760, trunk/main/minimime/mm_warnings.c
    team/murf/newcdr/main/minimime/strlcat.c
      - copied unchanged from r61760, trunk/main/minimime/strlcat.c
    team/murf/newcdr/main/minimime/strlcpy.c
      - copied unchanged from r61760, trunk/main/minimime/strlcpy.c
    team/murf/newcdr/main/minimime/sys/
      - copied from r61760, trunk/main/minimime/sys/
    team/murf/newcdr/main/minimime/sys/mm_queue.h
      - copied unchanged from r61760, trunk/main/minimime/sys/mm_queue.h
    team/murf/newcdr/main/minimime/test.sh
      - copied unchanged from r61760, trunk/main/minimime/test.sh
    team/murf/newcdr/main/minimime/tests/
      - copied from r61760, trunk/main/minimime/tests/
    team/murf/newcdr/main/minimime/tests/Makefile
      - copied unchanged from r61760, trunk/main/minimime/tests/Makefile
    team/murf/newcdr/main/minimime/tests/create.c
      - copied unchanged from r61760, trunk/main/minimime/tests/create.c
    team/murf/newcdr/main/minimime/tests/messages/
      - copied from r61760, trunk/main/minimime/tests/messages/
    team/murf/newcdr/main/minimime/tests/messages/test1.txt
      - copied unchanged from r61760, trunk/main/minimime/tests/messages/test1.txt
    team/murf/newcdr/main/minimime/tests/messages/test2.txt
      - copied unchanged from r61760, trunk/main/minimime/tests/messages/test2.txt
    team/murf/newcdr/main/minimime/tests/messages/test3.txt
      - copied unchanged from r61760, trunk/main/minimime/tests/messages/test3.txt
    team/murf/newcdr/main/minimime/tests/messages/test4.txt
      - copied unchanged from r61760, trunk/main/minimime/tests/messages/test4.txt
    team/murf/newcdr/main/minimime/tests/messages/test5.txt
      - copied unchanged from r61760, trunk/main/minimime/tests/messages/test5.txt
    team/murf/newcdr/main/minimime/tests/messages/test6.txt
      - copied unchanged from r61760, trunk/main/minimime/tests/messages/test6.txt
    team/murf/newcdr/main/minimime/tests/messages/test7.txt
      - copied unchanged from r61760, trunk/main/minimime/tests/messages/test7.txt
    team/murf/newcdr/main/minimime/tests/parse.c
      - copied unchanged from r61760, trunk/main/minimime/tests/parse.c
Modified:
    team/murf/newcdr/   (props changed)
    team/murf/newcdr/CHANGES
    team/murf/newcdr/Makefile
    team/murf/newcdr/Makefile.moddir_rules
    team/murf/newcdr/UPGRADE.txt
    team/murf/newcdr/acinclude.m4
    team/murf/newcdr/apps/app_cdr.c
    team/murf/newcdr/apps/app_dial.c
    team/murf/newcdr/apps/app_directory.c
    team/murf/newcdr/apps/app_macro.c
    team/murf/newcdr/apps/app_meetme.c
    team/murf/newcdr/apps/app_queue.c
    team/murf/newcdr/apps/app_speech_utils.c
    team/murf/newcdr/apps/app_voicemail.c
    team/murf/newcdr/channels/chan_agent.c
    team/murf/newcdr/channels/chan_alsa.c
    team/murf/newcdr/channels/chan_features.c
    team/murf/newcdr/channels/chan_gtalk.c
    team/murf/newcdr/channels/chan_h323.c
    team/murf/newcdr/channels/chan_iax2.c
    team/murf/newcdr/channels/chan_jingle.c
    team/murf/newcdr/channels/chan_local.c
    team/murf/newcdr/channels/chan_mgcp.c
    team/murf/newcdr/channels/chan_misdn.c
    team/murf/newcdr/channels/chan_nbs.c
    team/murf/newcdr/channels/chan_oss.c
    team/murf/newcdr/channels/chan_phone.c
    team/murf/newcdr/channels/chan_sip.c
    team/murf/newcdr/channels/chan_skinny.c
    team/murf/newcdr/channels/chan_vpb.cc
    team/murf/newcdr/channels/chan_zap.c
    team/murf/newcdr/channels/iax2-parser.c
    team/murf/newcdr/channels/iax2-parser.h
    team/murf/newcdr/channels/iax2.h
    team/murf/newcdr/channels/misdn/chan_misdn_config.h
    team/murf/newcdr/channels/misdn/isdn_lib.c
    team/murf/newcdr/channels/misdn/isdn_lib.h
    team/murf/newcdr/channels/misdn_config.c
    team/murf/newcdr/codecs/codec_zap.c
    team/murf/newcdr/configs/cdr.conf.sample
    team/murf/newcdr/configs/cdr_custom.conf.sample
    team/murf/newcdr/configs/http.conf.sample
    team/murf/newcdr/configs/manager.conf.sample
    team/murf/newcdr/configure
    team/murf/newcdr/configure.ac
    team/murf/newcdr/doc/asterisk-conf.tex
    team/murf/newcdr/doc/rtp-packetization.txt
    team/murf/newcdr/formats/format_wav.c
    team/murf/newcdr/funcs/func_callerid.c
    team/murf/newcdr/funcs/func_cdr.c
    team/murf/newcdr/funcs/func_channel.c
    team/murf/newcdr/funcs/func_devstate.c
    team/murf/newcdr/funcs/func_groupcount.c
    team/murf/newcdr/funcs/func_timeout.c
    team/murf/newcdr/include/asterisk.h
    team/murf/newcdr/include/asterisk/autoconfig.h.in
    team/murf/newcdr/include/asterisk/channel.h
    team/murf/newcdr/include/asterisk/compat.h
    team/murf/newcdr/include/asterisk/config.h
    team/murf/newcdr/include/asterisk/dial.h
    team/murf/newcdr/include/asterisk/manager.h
    team/murf/newcdr/include/asterisk/options.h
    team/murf/newcdr/include/asterisk/rtp.h
    team/murf/newcdr/include/asterisk/speech.h
    team/murf/newcdr/main/Makefile
    team/murf/newcdr/main/app.c
    team/murf/newcdr/main/asterisk.c
    team/murf/newcdr/main/callerid.c
    team/murf/newcdr/main/cdr.c
    team/murf/newcdr/main/channel.c
    team/murf/newcdr/main/config.c
    team/murf/newcdr/main/dial.c
    team/murf/newcdr/main/file.c
    team/murf/newcdr/main/http.c
    team/murf/newcdr/main/loader.c
    team/murf/newcdr/main/logger.c
    team/murf/newcdr/main/manager.c
    team/murf/newcdr/main/netsock.c
    team/murf/newcdr/main/pbx.c
    team/murf/newcdr/main/rtp.c
    team/murf/newcdr/main/say.c
    team/murf/newcdr/main/strcompat.c
    team/murf/newcdr/pbx/pbx_ael.c
    team/murf/newcdr/res/res_features.c
    team/murf/newcdr/res/res_jabber.c
    team/murf/newcdr/res/res_speech.c
    team/murf/newcdr/sounds/Makefile

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

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

Propchange: team/murf/newcdr/
------------------------------------------------------------------------------
    svnmerge-blocked = /branches/1.4:61042,61044

Propchange: team/murf/newcdr/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Apr 23 12:15:06 2007
@@ -1,1 +1,1 @@
-/trunk:1-59553
+/trunk:1-61761

Modified: team/murf/newcdr/CHANGES
URL: http://svn.digium.com/view/asterisk/team/murf/newcdr/CHANGES?view=diff&rev=61762&r1=61761&r2=61762
==============================================================================
--- team/murf/newcdr/CHANGES (original)
+++ team/murf/newcdr/CHANGES Mon Apr 23 12:15:06 2007
@@ -1,6 +1,81 @@
 -------------------------------------------------------------------------------
 --- Functionality changes since Asterisk 1.4-beta was branched ----------------
 -------------------------------------------------------------------------------
+
+AMI - The manager (TCP/TLS/HTTP)
+--------------------------------
+  * 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.
+  * enable https support for builtin web server.
+     See configs/http.conf.sample for details.
+  * Added a new action, GetConfigJSON, which can return the contents of an
+     Asterisk configuration file in JSON format.  This is intended to help
+     improve the performance of AJAX applications using the manager interface
+     over HTTP.
+  * SIP and IAX manager events now use "ChannelType" in all cases where we 
+     indicate channel driver. Previously, we used a mixture of "Channel"
+     and "ChannelDriver" headers.
+  * Added a "Bridge" action which allows you to bridge any two channels that
+     are currently active on the system.
+
+Dialplan functions
+------------------
+  * Added the DEVSTATE() dialplan function which allows retrieving any device
+    state in the dialplan, as well as creating custom device states that are
+    controllable from the dialplan.
+  * Extend CALLERID() function with "pres" and "ton" parameters to
+     fetch string representation of calling number presentation indicator
+     and numeric representation of type of calling number value.
+  * MailboxExists converted to dialplan function
+
+CLI Changes
+-----------
+  * New CLI command "core show settings"
+  * Added 'core show channels count' CLI command.
+
+SIP changes
+-----------
+  * The default SIP useragent= identifier now includes the Asterisk version
+  * A new option, match_auth_username in sip.conf changes the matching of incoming requests.
+     If set, and the incoming request carries authentication info,
+     the username to match in the users list is taken from the Digest header
+     rather than from the From: field. This feature is considered experimental.
+  * The "musiconhold" and "musicclass" settings in sip.conf are now removed,
+     since they where replaced by "mohsuggest" and "mohinterpret" in version 1.4
+  * The "localmask" setting was removed in version 1.2 and the reminder about it
+     being removed is now also removed.
+  * A new option "busy-level" for setting a level of calls where asterisk reports
+     a device as busy, to separate it from call-limit
+  * A new realtime family called "sipregs" is now supported to store SIP registration
+     data. If this family is defined, "sippeers" will be used for configuration and
+     "sipregs" for registrations. If it's not defined, "sippeers" will be used for
+     registration data, as before.
+  * The SIPPEER function have new options for port address, call and pickup groups
+  * Added support for T.140 realtime text in SIP/RTP
+
+IAX2 changes
+------------
+  * Added the trunkmaxsize configuration option to chan_iax2.
+  * Added the srvlookup option to iax.conf
+  * Added support for OSP.  The token is set and retrieved through the CHANNEL()
+     dialplan function.
+
+DUNDi changes
+-------------
+  * Added the ability to specify arguments to the Dial application when using
+     the DUNDi switch in the dialplan.
+  * Added the ability to set weights for responses dynamically.  This can be
+     done using a global variable or a dialplan function.  Using the SHELL()
+     function would allow you to have an external script set the weight for
+     each response.
+
+Voicemail Changes
+-----------------
+  * Added the ability to customize which sound files are used for some of the
+     prompts within the Voicemail application by changing them in voicemail.conf
+  * Added the ability for the "voicemail show users" CLI command to show users
+    configured by the dynamic realtime configuration method.
 
 Miscellaneous 
 -------------
@@ -53,11 +128,9 @@
   * 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 the trunkmaxsize configuration option to chan_iax2.
   * 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 the srvlookup option to iax.conf
   * Added 'E' and 'V' commands to ExternalIVR.
   * Added 'DBDel' and 'DBDelTree' manager commands.
   * Added 'o' and 'X' options to Chanspy.
@@ -66,66 +139,5 @@
   * Added zap show version CLI command to chan_zap.
   * Added a new CDR module, cdr_sqlite3_custom.
   * Added a new realtime configuration module, res_config_sqlite
-
-AMI - The manager (TCP/TLS/HTTP)
---------------------------------
-  * 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.
-  * enable https support for builtin web server.
-     See configs/http.conf.sample for details.
-  * Added a new action, GetConfigJSON, which can return the contents of an
-    Asterisk configuration file in JSON format.  This is intended to help
-    improve the performance of AJAX applications using the manager interface
-    over HTTP.
-
-Dialplan functions
-------------------
-  * Added the DEVSTATE() dialplan function which allows retrieving any device
-    state in the dialplan, as well as creating custom device states that are
-    controllable from the dialplan.
-  * Extend CALLERID() function with "pres" and "ton" parameters to
-     fetch string representation of calling number presentation indicator
-     and numeric representation of type of calling number value.
-  * MailboxExists converted to dialplan function
-
-CLI Changes
------------
-  * New CLI command "core show settings"
-  * Added 'core show channels count' CLI command.
-
-SIP changes
------------
-  * The default SIP useragent= identifier now includes the Asterisk version
-  * A new option, match_auth_username in sip.conf changes the matching of incoming requests.
-     If set, and the incoming request carries authentication info,
-     the username to match in the users list is taken from the Digest header
-     rather than from the From: field. This feature is considered experimental.
-  * The "musiconhold" and "musicclass" settings in sip.conf are now removed,
-     since they where replaced by "mohsuggest" and "mohinterpret" in version 1.4
-  * The "localmask" setting was removed in version 1.2 and the reminder about it
-     being removed is now also removed.
-  * A new option "busy-level" for setting a level of calls where asterisk reports
-     a device as busy, to separate it from call-limit
-  * A new realtime family called "sipregs" is now supported to store SIP registration
-     data. If this family is defined, "sippeers" will be used for configuration and
-     "sipregs" for registrations. If it's not defined, "sippeers" will be used for
-     registration data, as before.
-  * The SIPPEER function have new options for port address, call and pickup groups
-  * Added support for T.140 realtime text in SIP/RTP
-
-DUNDi changes
--------------
-  * Added the ability to specify arguments to the Dial application when using
-     the DUNDi switch in the dialplan.
-  * Added the ability to set weights for responses dynamically.  This can be
-     done using a global variable or a dialplan function.  Using the SHELL()
-     function would allow you to have an external script set the weight for
-     each response.
-
-Voicemail Changes
------------------
-  * Added the ability to customize which sound files are used for some of the
-     prompts within the Voicemail application by changing them in voicemail.conf
-  * Added the ability for the "voicemail show users" CLI command to show users
-    configured by the dynamic realtime configuration method.
+  * Added a new dialplan application, Bridge, which allows you to bridge the
+    calling channel to any other active channel on the system.

Modified: team/murf/newcdr/Makefile
URL: http://svn.digium.com/view/asterisk/team/murf/newcdr/Makefile?view=diff&rev=61762&r1=61761&r2=61762
==============================================================================
--- team/murf/newcdr/Makefile (original)
+++ team/murf/newcdr/Makefile Mon Apr 23 12:15:06 2007
@@ -714,4 +714,4 @@
 	@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)
+.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/newcdr/Makefile.moddir_rules
URL: http://svn.digium.com/view/asterisk/team/murf/newcdr/Makefile.moddir_rules?view=diff&rev=61762&r1=61761&r2=61762
==============================================================================
--- team/murf/newcdr/Makefile.moddir_rules (original)
+++ team/murf/newcdr/Makefile.moddir_rules Mon Apr 23 12:15:06 2007
@@ -12,7 +12,9 @@
 #
 
 ifneq ($(findstring MALLOC_DEBUG,$(MENUSELECT_CFLAGS)),)
+ ifeq ($(findstring astmm.h,$(ASTCFLAGS)),)
   ASTCFLAGS+=-include $(ASTTOPDIR)/include/asterisk/astmm.h
+ endif
 endif
 
 ifeq ($(findstring LOADABLE_MODULES,$(MENUSELECT_CFLAGS)),)

Modified: team/murf/newcdr/UPGRADE.txt
URL: http://svn.digium.com/view/asterisk/team/murf/newcdr/UPGRADE.txt?view=diff&rev=61762&r1=61761&r2=61762
==============================================================================
--- team/murf/newcdr/UPGRADE.txt (original)
+++ team/murf/newcdr/UPGRADE.txt Mon Apr 23 12:15:06 2007
@@ -42,3 +42,11 @@
 * The cdr_sqlite module has been marked as deprecated in favor of
   cdr_sqlite3_custom.  It will potentially be removed from the tree
   after Asterisk 1.6 is released.
+
+Formats:
+
+* format_wav: The GAIN preprocessor definition and source code that used it
+  is removed.  This change was made in response to user complaints of
+  choppiness or the clipping of loud signal peaks.  To increasing the volume
+  of voicemail messages, use the 'volgain' option in voicemail.conf
+

Modified: team/murf/newcdr/acinclude.m4
URL: http://svn.digium.com/view/asterisk/team/murf/newcdr/acinclude.m4?view=diff&rev=61762&r1=61761&r2=61762
==============================================================================
--- team/murf/newcdr/acinclude.m4 (original)
+++ team/murf/newcdr/acinclude.m4 Mon Apr 23 12:15:06 2007
@@ -568,7 +568,7 @@
 fi
 if test "x$ac_cv_func_fork_works" = xcross; then
   case $host in
-    *-*-amigaos* | *-*-msdosdjgpp* | *-*-uclinux* )
+    *-*-amigaos* | *-*-msdosdjgpp* | *-*-uclinux* | *-*-linux-uclibc* )
       # Override, as these systems have only a dummy fork() stub
       ac_cv_func_fork_works=no
       ;;

Modified: team/murf/newcdr/apps/app_cdr.c
URL: http://svn.digium.com/view/asterisk/team/murf/newcdr/apps/app_cdr.c?view=diff&rev=61762&r1=61761&r2=61762
==============================================================================
--- team/murf/newcdr/apps/app_cdr.c (original)
+++ team/murf/newcdr/apps/app_cdr.c Mon Apr 23 12:15:06 2007
@@ -51,8 +51,7 @@
 	u = ast_module_user_add(chan);
 
 	if (chan->cdr) {
-		ast_cdr_free(chan->cdr);
-		chan->cdr = NULL;
+		ast_set_flag(chan->cdr, AST_CDR_FLAG_POST_DISABLED);
 	}
 
 	ast_module_user_remove(u);

Modified: team/murf/newcdr/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/murf/newcdr/apps/app_dial.c?view=diff&rev=61762&r1=61761&r2=61762
==============================================================================
--- team/murf/newcdr/apps/app_dial.c (original)
+++ team/murf/newcdr/apps/app_dial.c Mon Apr 23 12:15:06 2007
@@ -92,7 +92,10 @@
 "ends the call.\n"
 "  The optional URL will be sent to the called party if the channel supports it.\n"
 "  If the OUTBOUND_GROUP variable is set, all peer channels created by this\n"
-"application will be put into that group (as in Set(GROUP()=...).\n\n"
+"application will be put into that group (as in Set(GROUP()=...).\n"
+"  If the OUTBOUND_GROUP_ONCE variable is set, all peer channels created by this\n"
+"application will be put into that group (as in Set(GROUP()=...). Unlike OUTBOUND_GROUP,\n"
+"however, the variable will be unset after use.\n\n"
 "  Options:\n"
 "    A(x) - Play an announcement to the called party, using 'x' as the file.\n"
 "    C    - Reset the CDR for this call.\n"
@@ -238,7 +241,7 @@
 	OPT_CALLEE_PARK =	(1 << 25),
 	OPT_CALLER_PARK =	(1 << 26),
 	OPT_IGNORE_FORWARDING = (1 << 27),
-} dial_exec_option_flags;
+};
 
 #define DIAL_STILLGOING			(1 << 30)
 #define DIAL_NOFORWARDHTML		(1 << 31)
@@ -255,7 +258,7 @@
 	OPT_ARG_OPERMODE,
 	/* note: this entry _MUST_ be the last one in the enum */
 	OPT_ARG_ARRAY_SIZE,
-} dial_exec_option_args;
+};
 
 AST_APP_OPTIONS(dial_exec_options, {
 	AST_APP_OPTION_ARG('A', OPT_ANNOUNCE, OPT_ARG_ANNOUNCE),
@@ -459,10 +462,12 @@
 		} else {
 			/* Setup parameters */
 			c = o->chan = ast_request(tech, in->nativeformats, stuff, &cause);
-			if (!c)
+			if (c) {
+				if (single)
+					ast_channel_make_compatible(o->chan, in);
+				ast_channel_inherit_variables(in, o->chan);
+			} else
 				ast_log(LOG_NOTICE, "Unable to create local channel for call forward to '%s/%s' (cause = %d)\n", tech, stuff, cause);
-			else
-				ast_channel_inherit_variables(in, o->chan);
 		}
 	} else {
 		if (option_verbose > 2)
@@ -1272,10 +1277,15 @@
 
 	if (continue_exec)
 		*continue_exec = 0;
-
+	
 	/* If a channel group has been specified, get it for use when we create peer channels */
-	outbound_group = pbx_builtin_getvar_helper(chan, "OUTBOUND_GROUP");
-
+	if ((outbound_group = pbx_builtin_getvar_helper(chan, "OUTBOUND_GROUP_ONCE"))) {
+		outbound_group = ast_strdupa(outbound_group);
+		pbx_builtin_setvar_helper(chan, "OUTBOUND_GROUP_ONCE", NULL);
+	} else {
+		outbound_group = pbx_builtin_getvar_helper(chan, "OUTBOUND_GROUP");
+	}
+	    
 	ast_copy_flags(peerflags, &opts, OPT_DTMF_EXIT | OPT_GO_ON | OPT_ORIGINAL_CLID | OPT_CALLER_HANGUP | OPT_IGNORE_FORWARDING);
 	/* loop through the list of dial destinations */
 	rest = args.peers;

Modified: team/murf/newcdr/apps/app_directory.c
URL: http://svn.digium.com/view/asterisk/team/murf/newcdr/apps/app_directory.c?view=diff&rev=61762&r1=61761&r2=61762
==============================================================================
--- team/murf/newcdr/apps/app_directory.c (original)
+++ team/murf/newcdr/apps/app_directory.c Mon Apr 23 12:15:06 2007
@@ -460,7 +460,7 @@
 							pos = strrchr(pos, ' ') + 1;
 						conv = convert(pos);
 						if (conv) {
-							if (!strcmp(conv, ext)) {
+							if (!strncmp(conv, ext, strlen(ext))) {
 								/* Match! */
 								found++;
 								free(conv);

Modified: team/murf/newcdr/apps/app_macro.c
URL: http://svn.digium.com/view/asterisk/team/murf/newcdr/apps/app_macro.c?view=diff&rev=61762&r1=61761&r2=61762
==============================================================================
--- team/murf/newcdr/apps/app_macro.c (original)
+++ team/murf/newcdr/apps/app_macro.c Mon Apr 23 12:15:06 2007
@@ -106,10 +106,44 @@
 static char *exit_synopsis = "Exit From Macro";
 
 
+static struct ast_exten *find_matching_priority(struct ast_context *c, const char *exten, int priority, const char *callerid)
+{
+	struct ast_exten *e;
+	struct ast_include *i;
+	struct ast_context *c2;
+
+	for (e=ast_walk_context_extensions(c, NULL); e; e=ast_walk_context_extensions(c, e)) {
+		if (ast_extension_match(ast_get_extension_name(e), exten)) {
+			int needmatch = ast_get_extension_matchcid(e);
+			if ((needmatch && ast_extension_match(ast_get_extension_cidmatch(e), callerid)) ||
+				(!needmatch)) {
+				/* This is the matching extension we want */
+				struct ast_exten *p;
+				for (p=ast_walk_extension_priorities(e, NULL); p; p=ast_walk_extension_priorities(e, p)) {
+					if (priority != ast_get_extension_priority(p))
+						continue;
+					return p;
+				}
+			}
+		}
+	}
+
+	/* No match; run through includes */
+	for (i=ast_walk_context_includes(c, NULL); i; i=ast_walk_context_includes(c, i)) {
+		for (c2=ast_walk_contexts(NULL); c2; c2=ast_walk_contexts(c2)) {
+			if (!strcmp(ast_get_context_name(c2), ast_get_include_name(i))) {
+				e = find_matching_priority(c2, exten, priority, callerid);
+				if (e)
+					return e;
+			}
+		}
+	}
+	return NULL;
+}
+
 static int _macro_exec(struct ast_channel *chan, void *data, int exclusive)
 {
 	const char *s;
-
 	char *tmp;
 	char *cur, *rest;
 	char *macro;
@@ -119,7 +153,7 @@
 	int argc, x;
 	int res=0;
 	char oldexten[256]="";
-	int oldpriority;
+	int oldpriority, gosub_level = 0;
 	char pc[80], depthc[12];
 	char oldcontext[AST_MAX_CONTEXT] = "";
 	const char *inhangupc;
@@ -133,6 +167,9 @@
 	char *save_macro_offset;
 	struct ast_module_user *u;
  
+	struct ast_context *c;
+	struct ast_exten *e;
+
 	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "Macro() requires arguments. See \"show application macro\" for help.\n");
 		return -1;
@@ -243,8 +280,17 @@
 	autoloopflag = ast_test_flag(chan, AST_FLAG_IN_AUTOLOOP);
 	ast_set_flag(chan, AST_FLAG_IN_AUTOLOOP);
 	while(ast_exists_extension(chan, chan->context, chan->exten, chan->priority, chan->cid.cid_num)) {
+		/* What application will execute? */
+		for (c = ast_walk_contexts(NULL), e = NULL; c; c = ast_walk_contexts(c)) {
+			if (!strcmp(ast_get_context_name(c), chan->context)) {
+				e = find_matching_priority(c, chan->exten, chan->priority, chan->cid.cid_num);
+				break;
+			}
+		}
+
 		/* Reset the macro depth, if it was changed in the last iteration */
 		pbx_builtin_setvar_helper(chan, "MACRO_DEPTH", depthc);
+
 		if ((res = ast_spawn_extension(chan, chan->context, chan->exten, chan->priority, chan->cid.cid_num))) {
 			/* Something bad happened, or a hangup has been requested. */
 			if (((res >= '0') && (res <= '9')) || ((res >= 'A') && (res <= 'F')) ||
@@ -274,11 +320,70 @@
 				goto out;
 			}
 		}
-		if (strcasecmp(chan->context, fullmacro)) {
+
+		ast_log(LOG_DEBUG, "Executed application: %s\n", ast_get_extension_app(e));
+
+		if (e && !strcasecmp(ast_get_extension_app(e), "GOSUB")) {
+			gosub_level++;
+			ast_log(LOG_DEBUG, "Incrementing gosub_level\n");
+		} else if (e && !strcasecmp(ast_get_extension_app(e), "GOSUBIF")) {
+			const char *tmp = ast_get_extension_app_data(e);
+			char tmp2[1024] = "", *cond, *app, *app2 = tmp2;
+			pbx_substitute_variables_helper(chan, tmp, tmp2, sizeof(tmp2) - 1);
+			cond = strsep(&app2, "?");
+			app = strsep(&app2, ":");
+			if (pbx_checkcondition(cond)) {
+				if (!ast_strlen_zero(app)) {
+					gosub_level++;
+					ast_log(LOG_DEBUG, "Incrementing gosub_level\n");
+				}
+			} else {
+				if (!ast_strlen_zero(app2)) {
+					gosub_level++;
+					ast_log(LOG_DEBUG, "Incrementing gosub_level\n");
+				}
+			}
+		} else if (e && !strcasecmp(ast_get_extension_app(e), "RETURN")) {
+			gosub_level--;
+			ast_log(LOG_DEBUG, "Decrementing gosub_level\n");
+		} else if (e && !strcasecmp(ast_get_extension_app(e), "STACKPOP")) {
+			gosub_level--;
+			ast_log(LOG_DEBUG, "Decrementing gosub_level\n");
+		} else if (e && !strncasecmp(ast_get_extension_app(e), "EXEC", 4)) {
+			/* Must evaluate args to find actual app */
+			const char *tmp = ast_get_extension_app_data(e);
+			char tmp2[1024] = "", *tmp3 = NULL;
+			pbx_substitute_variables_helper(chan, tmp, tmp2, sizeof(tmp2) - 1);
+			if (!strcasecmp(ast_get_extension_app(e), "EXECIF")) {
+				tmp3 = strchr(tmp2, '|');
+				if (tmp3)
+					*tmp3++ = '\0';
+				if (!pbx_checkcondition(tmp2))
+					tmp3 = NULL;
+			} else
+				tmp3 = tmp2;
+
+			if (tmp3)
+				ast_log(LOG_DEBUG, "Last app: %s\n", tmp3);
+
+			if (tmp3 && !strncasecmp(tmp3, "GOSUB", 5)) {
+				gosub_level++;
+				ast_log(LOG_DEBUG, "Incrementing gosub_level\n");
+			} else if (tmp3 && !strncasecmp(tmp3, "RETURN", 6)) {
+				gosub_level--;
+				ast_log(LOG_DEBUG, "Decrementing gosub_level\n");
+			} else if (tmp3 && !strncasecmp(tmp3, "STACKPOP", 8)) {
+				gosub_level--;
+				ast_log(LOG_DEBUG, "Decrementing gosub_level\n");
+			}
+		}
+
+		if (gosub_level == 0 && strcasecmp(chan->context, fullmacro)) {
 			if (option_verbose > 1)
 				ast_verbose(VERBOSE_PREFIX_2 "Channel '%s' jumping out of macro '%s'\n", chan->name, macro);
 			break;
 		}
+
 		/* don't stop executing extensions when we're in "h" */
 		if (chan->_softhangup && !inhangup) {
 			if (option_debug)

Modified: team/murf/newcdr/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/murf/newcdr/apps/app_meetme.c?view=diff&rev=61762&r1=61761&r2=61762
==============================================================================
--- team/murf/newcdr/apps/app_meetme.c (original)
+++ team/murf/newcdr/apps/app_meetme.c Mon Apr 23 12:15:06 2007
@@ -426,6 +426,9 @@
 	/*! This option uses the values in the sla_hold_access enum and sets the
 	 * access control type for hold on this trunk. */
 	unsigned int hold_access:1;
+	/*! Whether this trunk is currently on hold, meaning that once a station
+	 *  connects to it, the trunk channel needs to have UNHOLD indicated to it. */
+	unsigned int on_hold:1;
 };
 
 struct sla_trunk_ref {
@@ -3141,12 +3144,14 @@
 			continue;
 
 		if ( (trunk_ref->trunk->barge_disabled 
-			&& trunk_ref->state != SLA_TRUNK_STATE_IDLE) ||
+			&& trunk_ref->state == SLA_TRUNK_STATE_UP) ||
 			(trunk_ref->trunk->hold_stations 
 			&& trunk_ref->trunk->hold_access == SLA_HOLD_PRIVATE
 			&& trunk_ref->state != SLA_TRUNK_STATE_ONHOLD_BYME) ||
-			sla_check_station_hold_access(trunk_ref->trunk, station) )
+			sla_check_station_hold_access(trunk_ref->trunk, station) ) 
+		{
 			trunk_ref = NULL;
+		}
 
 		break;
 	}
@@ -3235,9 +3240,10 @@
 	}
 	trunk_ref->chan = NULL;
 	if (ast_atomic_dec_and_test((int *) &trunk_ref->trunk->active_stations) &&
-		!trunk_ref->trunk->hold_stations) {
+		trunk_ref->state != SLA_TRUNK_STATE_ONHOLD_BYME) {
 		strncat(conf_name, "|K", sizeof(conf_name) - strlen(conf_name) - 1);
 		admin_exec(NULL, conf_name);
+		trunk_ref->trunk->hold_stations = 0;
 		sla_change_trunk_state(trunk_ref->trunk, SLA_TRUNK_STATE_IDLE, ALL_TRUNK_REFS, NULL);
 	}
 
@@ -3691,7 +3697,14 @@
 		event->station->name, event->trunk_ref->trunk->name);
 	sla_change_trunk_state(event->trunk_ref->trunk, SLA_TRUNK_STATE_ONHOLD, 
 		INACTIVE_TRUNK_REFS, event->trunk_ref);
-	
+
+	if (event->trunk_ref->trunk->active_stations == 1) {
+		/* The station putting it on hold is the only one on the call, so start
+		 * Music on hold to the trunk. */
+		event->trunk_ref->trunk->on_hold = 1;
+		ast_indicate(event->trunk_ref->trunk->chan, AST_CONTROL_HOLD);
+	}
+
 	ast_softhangup(event->trunk_ref->chan, AST_CAUSE_NORMAL);
 	event->trunk_ref->chan = NULL;
 }
@@ -4049,7 +4062,11 @@
 		conf = NULL;
 	}
 
+	/* If the trunk is going away, it is definitely now IDLE. */
+	sla_change_trunk_state(trunk_ref->trunk, SLA_TRUNK_STATE_IDLE, ALL_TRUNK_REFS, NULL);
+
 	trunk_ref->trunk->chan = NULL;
+	trunk_ref->trunk->on_hold = 0;
 
 	ast_dial_join(dial);
 	ast_dial_destroy(dial);
@@ -4171,7 +4188,13 @@
 		}
 	}
 
-	ast_atomic_fetchadd_int((int *) &trunk_ref->trunk->active_stations, 1);
+	if (ast_atomic_fetchadd_int((int *) &trunk_ref->trunk->active_stations, 1) == 0 &&
+		trunk_ref->trunk->on_hold) {
+		trunk_ref->trunk->on_hold = 0;
+		ast_indicate(trunk_ref->trunk->chan, AST_CONTROL_UNHOLD);
+		sla_change_trunk_state(trunk_ref->trunk, SLA_TRUNK_STATE_UP, ALL_TRUNK_REFS, NULL);
+	}
+
 	snprintf(conf_name, sizeof(conf_name), "SLA_%s", trunk_ref->trunk->name);
 	ast_set_flag(&conf_flags, 
 		CONFFLAG_QUIET | CONFFLAG_MARKEDEXIT | CONFFLAG_PASS_DTMF | CONFFLAG_SLA_STATION);
@@ -4184,9 +4207,10 @@
 	}
 	trunk_ref->chan = NULL;
 	if (ast_atomic_dec_and_test((int *) &trunk_ref->trunk->active_stations) &&
-		!trunk_ref->trunk->hold_stations) {
+		trunk_ref->state != SLA_TRUNK_STATE_ONHOLD_BYME) {
 		strncat(conf_name, "|K", sizeof(conf_name) - strlen(conf_name) - 1);
 		admin_exec(NULL, conf_name);
+		trunk_ref->trunk->hold_stations = 0;
 		sla_change_trunk_state(trunk_ref->trunk, SLA_TRUNK_STATE_IDLE, ALL_TRUNK_REFS, NULL);
 	}
 	
@@ -4273,6 +4297,7 @@
 	dispose_conf(conf);
 	conf = NULL;
 	trunk->chan = NULL;
+	trunk->on_hold = 0;
 
 	pbx_builtin_setvar_helper(chan, "SLATRUNK_STATUS", "SUCCESS");
 

Modified: team/murf/newcdr/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/murf/newcdr/apps/app_queue.c?view=diff&rev=61762&r1=61761&r2=61762
==============================================================================
--- team/murf/newcdr/apps/app_queue.c (original)
+++ team/murf/newcdr/apps/app_queue.c Mon Apr 23 12:15:06 2007
@@ -2122,7 +2122,7 @@
 				ast_frfree(f);
 				return NULL;
 			}
-			if ((f->frametype == AST_FRAME_DTMF) && (f->subclass != '*') && valid_exit(qe, f->subclass)) {
+			if ((f->frametype == AST_FRAME_DTMF) && valid_exit(qe, f->subclass)) {
 				if (option_verbose > 3)
 					ast_verbose(VERBOSE_PREFIX_3 "User pressed digit: %c\n", f->subclass);
 				*to = 0;
@@ -2668,7 +2668,7 @@
 				}
 
 				if (mixmonapp) {
-					if (!ast_strlen_zero(monitor_exec) && !ast_strlen_zero(monitor_options))
+					if (!ast_strlen_zero(monitor_exec))
 						snprintf(mixmonargs, sizeof(mixmonargs)-1, "%s|b%s|%s", tmpid2, monitor_options, monitor_exec);
 					else
 						snprintf(mixmonargs, sizeof(mixmonargs)-1, "%s|b%s", tmpid2, monitor_options);
@@ -2785,7 +2785,7 @@
 				(long) (time(NULL) - callstart));
 			send_agent_complete(qe, queuename, peer, member, callstart, vars, sizeof(vars), TRANSFER);
 		} else if (qe->chan->_softhangup) {
-			ast_queue_log(queuename, qe->chan->uniqueid, peer->name, "COMPLETECALLER", "%ld|%ld|%d",
+			ast_queue_log(queuename, qe->chan->uniqueid, member->membername, "COMPLETECALLER", "%ld|%ld|%d",
 				(long) (callstart - qe->start), (long) (time(NULL) - callstart), qe->opos);
 			send_agent_complete(qe, queuename, peer, member, callstart, vars, sizeof(vars), CALLER);
 		} else {

Modified: team/murf/newcdr/apps/app_speech_utils.c
URL: http://svn.digium.com/view/asterisk/team/murf/newcdr/apps/app_speech_utils.c?view=diff&rev=61762&r1=61761&r2=61762
==============================================================================
--- team/murf/newcdr/apps/app_speech_utils.c (original)
+++ team/murf/newcdr/apps/app_speech_utils.c Mon Apr 23 12:15:06 2007
@@ -126,19 +126,31 @@
 	return speech;
 }
 
-/* Helper function to find a specific speech recognition result by number */
-static struct ast_speech_result *find_result(struct ast_speech_result *results, int num)
-{
-	struct ast_speech_result *result = NULL;
-	int i = 0;
-
-	result = results;
-	while (result) {
-		if (i == num)
+/* Helper function to find a specific speech recognition result by number and nbest alternative */
+static struct ast_speech_result *find_result(struct ast_speech_result *results, char *result_num)
+{
+	struct ast_speech_result *result = results;
+	char *tmp = NULL;
+	int nbest_num = 0, wanted_num = 0, i = 0;
+
+	if (!result)
+		return NULL;
+
+	if ((tmp = strchr(result_num, '/'))) {
+		*tmp++ = '\0';
+		nbest_num = atoi(result_num);
+		wanted_num = atoi(tmp);
+	} else {
+		wanted_num = atoi(result_num);
+	}
+
+	do {
+		if (result->nbest_num != nbest_num)
+			continue;
+		if (i == wanted_num)
 			break;
 		i++;
-		result = result->next;
-	}
+	} while ((result = result->next));
 
 	return result;
 }
@@ -151,7 +163,7 @@
 	struct ast_speech *speech = find_speech(chan);
 	char tmp[128] = "";
 
-	if (data == NULL || speech == NULL || !(result = find_result(speech->results, atoi(data))))
+	if (data == NULL || speech == NULL || !(result = find_result(speech->results, data)))
 		return -1;
 	
 	snprintf(tmp, sizeof(tmp), "%d", result->score);
@@ -164,7 +176,7 @@
 static struct ast_custom_function speech_score_function = {
         .name = "SPEECH_SCORE",
         .synopsis = "Gets the confidence score of a result.",
-        .syntax = "SPEECH_SCORE(result number)",
+        .syntax = "SPEECH_SCORE([nbest number/]result number)",
         .desc =
         "Gets the confidence score of a result.\n",
         .read = speech_score,
@@ -178,7 +190,7 @@
         struct ast_speech_result *result = NULL;
         struct ast_speech *speech = find_speech(chan);
 
-	if (data == NULL || speech == NULL || !(result = find_result(speech->results, atoi(data))))
+	if (data == NULL || speech == NULL || !(result = find_result(speech->results, data)))
                 return -1;
 
 	if (result->text != NULL)
@@ -190,7 +202,7 @@
 static struct ast_custom_function speech_text_function = {
         .name = "SPEECH_TEXT",
         .synopsis = "Gets the recognized text of a result.",

[... 18166 lines stripped ...]


More information about the svn-commits mailing list