[svn-commits] dvossel: branch dvossel/generic_aoc r266239 - in /team/dvossel/generic_aoc: ....

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu May 27 14:38:05 CDT 2010


Author: dvossel
Date: Thu May 27 14:37:59 2010
New Revision: 266239

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=266239
Log:
bringing branch up to date


Modified:
    team/dvossel/generic_aoc/   (props changed)
    team/dvossel/generic_aoc/CHANGES
    team/dvossel/generic_aoc/CREDITS
    team/dvossel/generic_aoc/Makefile
    team/dvossel/generic_aoc/UPGRADE-1.6.txt
    team/dvossel/generic_aoc/UPGRADE.txt
    team/dvossel/generic_aoc/addons/chan_ooh323.c
    team/dvossel/generic_aoc/addons/ooh323c/src/   (props changed)
    team/dvossel/generic_aoc/addons/ooh323c/src/h323/   (props changed)
    team/dvossel/generic_aoc/addons/ooh323c/src/oochannels.c
    team/dvossel/generic_aoc/addons/ooh323c/src/ooh323.c
    team/dvossel/generic_aoc/apps/app_dial.c
    team/dvossel/generic_aoc/apps/app_directed_pickup.c
    team/dvossel/generic_aoc/apps/app_directory.c
    team/dvossel/generic_aoc/apps/app_meetme.c
    team/dvossel/generic_aoc/apps/app_privacy.c
    team/dvossel/generic_aoc/apps/app_queue.c
    team/dvossel/generic_aoc/apps/app_rpt.c
    team/dvossel/generic_aoc/apps/app_senddtmf.c
    team/dvossel/generic_aoc/apps/app_speech_utils.c
    team/dvossel/generic_aoc/apps/app_stack.c
    team/dvossel/generic_aoc/apps/app_voicemail.c
    team/dvossel/generic_aoc/autoconf/ast_c_compile_check.m4
    team/dvossel/generic_aoc/autoconf/ast_c_define_check.m4
    team/dvossel/generic_aoc/autoconf/ast_ext_lib.m4
    team/dvossel/generic_aoc/bootstrap.sh
    team/dvossel/generic_aoc/build_tools/menuselect-deps.in
    team/dvossel/generic_aoc/channels/chan_console.c
    team/dvossel/generic_aoc/channels/chan_dahdi.c
    team/dvossel/generic_aoc/channels/chan_iax2.c
    team/dvossel/generic_aoc/channels/chan_local.c
    team/dvossel/generic_aoc/channels/chan_misdn.c
    team/dvossel/generic_aoc/channels/chan_sip.c
    team/dvossel/generic_aoc/channels/h323/ast_h323.cxx
    team/dvossel/generic_aoc/channels/misdn/chan_misdn_config.h
    team/dvossel/generic_aoc/channels/misdn/isdn_lib.h
    team/dvossel/generic_aoc/channels/misdn_config.c
    team/dvossel/generic_aoc/channels/sig_pri.c
    team/dvossel/generic_aoc/channels/sip/config_parser.c
    team/dvossel/generic_aoc/channels/sip/include/sip.h
    team/dvossel/generic_aoc/configs/calendar.conf.sample
    team/dvossel/generic_aoc/configs/indications.conf.sample
    team/dvossel/generic_aoc/configs/logger.conf.sample
    team/dvossel/generic_aoc/configs/misdn.conf.sample
    team/dvossel/generic_aoc/configs/res_pgsql.conf.sample
    team/dvossel/generic_aoc/configs/sip.conf.sample
    team/dvossel/generic_aoc/configure
    team/dvossel/generic_aoc/configure.ac
    team/dvossel/generic_aoc/contrib/scripts/live_ast
    team/dvossel/generic_aoc/doc/manager_1_1.txt
    team/dvossel/generic_aoc/doc/tex/manager.tex
    team/dvossel/generic_aoc/funcs/func_callerid.c
    team/dvossel/generic_aoc/funcs/func_connectedline.c
    team/dvossel/generic_aoc/funcs/func_odbc.c
    team/dvossel/generic_aoc/funcs/func_redirecting.c
    team/dvossel/generic_aoc/include/asterisk/_private.h
    team/dvossel/generic_aoc/include/asterisk/autoconfig.h.in
    team/dvossel/generic_aoc/include/asterisk/causes.h
    team/dvossel/generic_aoc/include/asterisk/channel.h
    team/dvossel/generic_aoc/include/asterisk/cli.h
    team/dvossel/generic_aoc/include/asterisk/file.h
    team/dvossel/generic_aoc/include/asterisk/frame.h
    team/dvossel/generic_aoc/include/asterisk/options.h
    team/dvossel/generic_aoc/include/asterisk/res_fax.h
    team/dvossel/generic_aoc/main/app.c
    team/dvossel/generic_aoc/main/asterisk.c
    team/dvossel/generic_aoc/main/astobj2.c
    team/dvossel/generic_aoc/main/autoservice.c
    team/dvossel/generic_aoc/main/callerid.c
    team/dvossel/generic_aoc/main/ccss.c
    team/dvossel/generic_aoc/main/channel.c
    team/dvossel/generic_aoc/main/cli.c
    team/dvossel/generic_aoc/main/devicestate.c
    team/dvossel/generic_aoc/main/dial.c
    team/dvossel/generic_aoc/main/dsp.c
    team/dvossel/generic_aoc/main/features.c
    team/dvossel/generic_aoc/main/loader.c
    team/dvossel/generic_aoc/main/logger.c
    team/dvossel/generic_aoc/main/manager.c
    team/dvossel/generic_aoc/main/pbx.c
    team/dvossel/generic_aoc/main/rtp_engine.c
    team/dvossel/generic_aoc/main/stdtime/localtime.c
    team/dvossel/generic_aoc/main/strings.c
    team/dvossel/generic_aoc/main/udptl.c
    team/dvossel/generic_aoc/makeopts.in
    team/dvossel/generic_aoc/pbx/pbx_config.c
    team/dvossel/generic_aoc/pbx/pbx_lua.c
    team/dvossel/generic_aoc/pbx/pbx_spool.c
    team/dvossel/generic_aoc/res/Makefile
    team/dvossel/generic_aoc/res/ael/pval.c
    team/dvossel/generic_aoc/res/res_calendar.c
    team/dvossel/generic_aoc/res/res_calendar_caldav.c
    team/dvossel/generic_aoc/res/res_calendar_exchange.c
    team/dvossel/generic_aoc/res/res_calendar_icalendar.c
    team/dvossel/generic_aoc/res/res_config_pgsql.c
    team/dvossel/generic_aoc/res/res_fax.c
    team/dvossel/generic_aoc/res/res_fax.exports.in
    team/dvossel/generic_aoc/res/res_fax_spandsp.c
    team/dvossel/generic_aoc/res/res_rtp_asterisk.c
    team/dvossel/generic_aoc/sounds/Makefile
    team/dvossel/generic_aoc/tests/test_time.c
    team/dvossel/generic_aoc/utils/extconf.c

Propchange: team/dvossel/generic_aoc/
------------------------------------------------------------------------------
--- aoc_event-integrated (original)
+++ aoc_event-integrated Thu May 27 14:37:59 2010
@@ -1,1 +1,1 @@
-/team/group/CCSS:1-261845
+/team/group/CCSS:1-266201

Propchange: team/dvossel/generic_aoc/
------------------------------------------------------------------------------
Binary property 'branch-1.4-blocked' - no diff available.

Propchange: team/dvossel/generic_aoc/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Propchange: team/dvossel/generic_aoc/
------------------------------------------------------------------------------
--- generic_aoc-integrated (original)
+++ generic_aoc-integrated Thu May 27 14:37:59 2010
@@ -1,1 +1,1 @@
-/team/rmudgett/aoc_event:1-261862
+/team/rmudgett/aoc_event:1-266237

Propchange: team/dvossel/generic_aoc/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu May 27 14:37:59 2010
@@ -1,1 +1,1 @@
-/trunk:1-261824
+/trunk:1-266146

Modified: team/dvossel/generic_aoc/CHANGES
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/generic_aoc/CHANGES?view=diff&rev=266239&r1=266238&r2=266239
==============================================================================
--- team/dvossel/generic_aoc/CHANGES (original)
+++ team/dvossel/generic_aoc/CHANGES Thu May 27 14:37:59 2010
@@ -59,6 +59,8 @@
  * When dialing SIP peers, a new component may be added to the end of the dialstring
    to indicate that a specific remote IP address or host should be used when dialing
    the particular peer. The dialstring format is SIP/peer/exten/host_or_IP.
+ * Added directmediapermit/directmediadeny to limit which peers can send direct media
+   to each other
 
 IAX2 Changes
 -----------
@@ -146,6 +148,7 @@
    user if it exists, otherwise will play the mailbox number.
  * Added custom device states to ConfBridge bridges.  Use 'confbridge:<name>' to
    retrieve state for a particular bridge, where <name> is the conference name
+ * app_directory now allows exiting at any time using the operator or pound key.
 
 Dialplan Functions
 ------------------
@@ -160,15 +163,6 @@
  * CALLERID and CONNECTEDLINE dialplan functions have been extended to
    support ISDN subaddressing.
  * The CHANNEL() function now supports the "name" option.
- * For DAHDI channels, the CHANNEL() dialplan function now
-   supports changing the channel's buffer policy (for the current
-   call only), using this syntax:
-
-   exten => s,n,Set(CHANNEL(buffers)=6,full)
-
-   This would change the channel to the 'full' buffer policy and
-   6 (six) buffers. Possible options for this setting are the same
-   as those in chan_dahdi.conf.
  * For DAHDI channels, the CHANNEL() dialplan function now allows
    the dialplan to request changes in the configuration of the active
    echo canceller on the channel (if any), for the current call only.
@@ -394,8 +388,10 @@
  * A new set of modules were added supporing calendar integration with Asterisk.
    Dialplan functions for reading from and writing to calendars are included,
    as well as the ability to execute dialplan logic upon calendar event notifications.
-   iCalendar, CalDAV, and Exchange Server calendars are supported (Exchange support
-   only tested on Exchange Server 2003 with no support for forms-based authentication).
+   iCalendar, CalDAV, and Exchange Server calendars (via res_calendar_exchange for
+   Exchange Server 2003 with no write or attendee support, and res_calendar_ews for
+   Exchange Server 2007+ with full write and attendee support) are supported (Exchange
+   2003 support does not support forms-based authentication).
 
 Call Completion Supplementary Services for Asterisk
 ---------------------------------------------------
@@ -465,6 +461,8 @@
    files it was built from.
  * New 'manager show settings' command showing the current settings loaded from
    manager.conf. 
+ * Added 'all' keyword to the CLI command "channel request hangup" so that you can send
+   the channel hangup request to all channels.
 
 ------------------------------------------------------------------------------
 --- Functionality changes from Asterisk 1.6.1 to Asterisk 1.6.2  -------------
@@ -534,6 +532,15 @@
 
 Dialplan Functions
 ------------------
+ * For DAHDI channels, the CHANNEL() dialplan function now
+   supports changing the channel's buffer policy (for the current
+   call only), using this syntax:
+
+   exten => s,n,Set(CHANNEL(buffers)=6,full)
+
+   This would change the channel to the 'full' buffer policy and
+   6 (six) buffers. Possible options for this setting are the same
+   as those in chan_dahdi.conf.
  * Added a new dialplan function, CURLOPT, which permits setting various
    options that may be useful with the CURL dialplan function, such as
    cookies, proxies, connection timeouts, passwords, etc.

Modified: team/dvossel/generic_aoc/CREDITS
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/generic_aoc/CREDITS?view=diff&rev=266239&r1=266238&r2=266239
==============================================================================
--- team/dvossel/generic_aoc/CREDITS (original)
+++ team/dvossel/generic_aoc/CREDITS Thu May 27 14:37:59 2010
@@ -204,6 +204,8 @@
 	countless other improvements, fixes, and good ideas.
 	sean(AT)malleable.com
 
+Jan Kaláb - Calendaring support for Exchange Server 2007+ via Exchange Web Services.
+
 === OTHER CONTRIBUTIONS ===
 John Todd - Monkey sounds and associated teletorture prompt
 Michael Jerris - bug marshaling

Modified: team/dvossel/generic_aoc/Makefile
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/generic_aoc/Makefile?view=diff&rev=266239&r1=266238&r2=266239
==============================================================================
--- team/dvossel/generic_aoc/Makefile (original)
+++ team/dvossel/generic_aoc/Makefile Thu May 27 14:37:59 2010
@@ -158,6 +158,9 @@
   ASTVARLIBDIR=$(localstatedir)/lib/asterisk
   ASTDBDIR=$(ASTVARLIBDIR)
 endif
+ifneq ($(findstring darwin,$(OSARCH)),)
+  ASTVARRUNDIR=/Library/Application Support/Asterisk/Run
+endif
   ASTKEYDIR=$(ASTVARLIBDIR)
 endif
 ifeq ($(ASTDATADIR),)
@@ -559,7 +562,7 @@
 	mkdir -p $(DESTDIR)$(ASTSBINDIR)
 	mkdir -p $(DESTDIR)$(ASTETCDIR)
 	mkdir -p $(DESTDIR)$(ASTBINDIR)
-	mkdir -p $(DESTDIR)$(ASTVARRUNDIR)
+	mkdir -p "$(DESTDIR)$(ASTVARRUNDIR)"
 	mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/voicemail
 	mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/dictate
 	mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/system
@@ -572,7 +575,7 @@
 	$(LN) -sf asterisk $(DESTDIR)$(ASTSBINDIR)/rasterisk
 	$(INSTALL) -m 755 contrib/scripts/astgenkey $(DESTDIR)$(ASTSBINDIR)/
 	$(INSTALL) -m 755 contrib/scripts/autosupport $(DESTDIR)$(ASTSBINDIR)/
-	if [ ! -f $(DESTDIR)$(ASTSBINDIR)/safe_asterisk ]; then \
+	if [ ! -f $(DESTDIR)$(ASTSBINDIR)/safe_asterisk -a ! -f /sbin/launchd ]; then \
 		cat contrib/scripts/safe_asterisk | sed 's|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;s|__ASTERISK_VARRUN_DIR__|$(ASTVARRUNDIR)|;' > $(DESTDIR)$(ASTSBINDIR)/safe_asterisk ;\
 		chmod 755 $(DESTDIR)$(ASTSBINDIR)/safe_asterisk;\
 	fi

Modified: team/dvossel/generic_aoc/UPGRADE-1.6.txt
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/generic_aoc/UPGRADE-1.6.txt?view=diff&rev=266239&r1=266238&r2=266239
==============================================================================
--- team/dvossel/generic_aoc/UPGRADE-1.6.txt (original)
+++ team/dvossel/generic_aoc/UPGRADE-1.6.txt Thu May 27 14:37:59 2010
@@ -209,6 +209,12 @@
   The "username" setting still work, but is deprecated and will not work in 
   the next version of Asterisk.
 
+* SIP: The old "insecure" options, deprecated in 1.4, have been removed.
+  "insecure=very" should be changed to "insecure=port,invite"
+  "insecure=yes" should be changed to "insecure=port"
+  Be aware that some telephony providers show the invalid syntax in their
+  sample configurations.
+
 * chan_local.c: the comma delimiter inside the channel name has been changed to a
   semicolon, in order to make the Local channel driver compatible with the comma
   delimiter change in applications.

Modified: team/dvossel/generic_aoc/UPGRADE.txt
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/generic_aoc/UPGRADE.txt?view=diff&rev=266239&r1=266238&r2=266239
==============================================================================
--- team/dvossel/generic_aoc/UPGRADE.txt (original)
+++ team/dvossel/generic_aoc/UPGRADE.txt Thu May 27 14:37:59 2010
@@ -77,6 +77,10 @@
 
 * The Manager event 'iax2 show peers' output has been updated.  It now has a
   similar output of 'sip show peers'.
+
+* VoiceMailMain and VMAuthenticate, if a '*' is entered in the first position
+  of a Mailbox or Password, will, if it exists, jump to the 'a' extension in
+  the current dialplan context.
 
 From 1.6.1 to 1.6.2:
 

Modified: team/dvossel/generic_aoc/addons/chan_ooh323.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/generic_aoc/addons/chan_ooh323.c?view=diff&rev=266239&r1=266238&r2=266239
==============================================================================
--- team/dvossel/generic_aoc/addons/chan_ooh323.c (original)
+++ team/dvossel/generic_aoc/addons/chan_ooh323.c Thu May 27 14:37:59 2010
@@ -1238,11 +1238,13 @@
 	case AST_CONTROL_SRCCHANGE:
 		ast_rtp_instance_change_source(p->rtp);
 		break;
-      case AST_CONTROL_CONNECTED_LINE:
-		if (gH323Debug)
-			ast_log(LOG_DEBUG, "Sending connected line info for %s (%s)\n",
+       	case AST_CONTROL_CONNECTED_LINE:
+		if (!ast_strlen_zero(ast->connected.id.name)) {
+			if (gH323Debug)
+				ast_log(LOG_DEBUG, "Sending connected line info for %s (%s)\n",
 				callToken, ast->connected.id.name);
-		ooSetANI(callToken, ast->connected.id.name);
+			ooSetANI(callToken, ast->connected.id.name);
+		}
 		break;
 
       case AST_CONTROL_T38_PARAMETERS:

Propchange: team/dvossel/generic_aoc/addons/ooh323c/src/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu May 27 14:37:59 2010
@@ -1,0 +1,1 @@
+*.i

Propchange: team/dvossel/generic_aoc/addons/ooh323c/src/h323/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu May 27 14:37:59 2010
@@ -1,0 +1,1 @@
+*.i

Modified: team/dvossel/generic_aoc/addons/ooh323c/src/oochannels.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/generic_aoc/addons/ooh323c/src/oochannels.c?view=diff&rev=266239&r1=266238&r2=266239
==============================================================================
--- team/dvossel/generic_aoc/addons/ooh323c/src/oochannels.c (original)
+++ team/dvossel/generic_aoc/addons/ooh323c/src/oochannels.c Thu May 27 14:37:59 2010
@@ -134,7 +134,7 @@
          call->pH245Channel->sock = channelSocket;
          call->h245SessionState = OO_H245SESSION_ACTIVE;
 
-         OOTRACEINFO3("H245 connection creation succesful (%s, %s)\n",
+         OOTRACEINFO3("H245 connection creation successful (%s, %s)\n",
                       call->callType, call->callToken);
 
          /*Start terminal capability exchange and master slave determination */
@@ -300,7 +300,7 @@
       {
          call->pH225Channel->sock = channelSocket;
 
-         OOTRACEINFO3("H2250 transmiter channel creation - succesful "
+         OOTRACEINFO3("H2250 transmiter channel creation - successful "
                       "(%s, %s)\n", call->callType, call->callToken);
 
          /* If multihomed, get ip from socket */

Modified: team/dvossel/generic_aoc/addons/ooh323c/src/ooh323.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/generic_aoc/addons/ooh323c/src/ooh323.c?view=diff&rev=266239&r1=266238&r2=266239
==============================================================================
--- team/dvossel/generic_aoc/addons/ooh323c/src/ooh323.c (original)
+++ team/dvossel/generic_aoc/addons/ooh323c/src/ooh323.c Thu May 27 14:37:59 2010
@@ -16,6 +16,7 @@
 
 #include "asterisk.h"
 #include "asterisk/lock.h"
+#include "asterisk/time.h"
 #include <time.h>
 
 #include "ootypes.h"

Modified: team/dvossel/generic_aoc/apps/app_dial.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/generic_aoc/apps/app_dial.c?view=diff&rev=266239&r1=266238&r2=266239
==============================================================================
--- team/dvossel/generic_aoc/apps/app_dial.c (original)
+++ team/dvossel/generic_aoc/apps/app_dial.c Thu May 27 14:37:59 2010
@@ -336,6 +336,10 @@
 					<para>Hang up the call <replaceable>x</replaceable> seconds <emphasis>after</emphasis> the called party has
 					answered the call.</para>
 				</option>
+				<option name="s">
+					<argument name="x" required="true" />
+					<para>Force the outgoing callerid tag parameter to be set to the string <replaceable>x</replaceable></para>
+				</option>
 				<option name="t">
 					<para>Allow the called party to transfer the calling party by sending the
 					DTMF sequence defined in <filename>features.conf</filename>. This setting does not perform policy enforcement on
@@ -384,6 +388,21 @@
 						with this option. Also, pbx services are not run on the peer (called) channel,
 						so you will not be able to set timeouts via the TIMEOUT() function in this routine.</para>
 					</note>
+				</option>
+				<option name="u">
+					<argument name = "x" required="true">
+						<para>Force the outgoing callerid presentation indicator parameter to be set
+						to one of the values passed in <replaceable>x</replaceable>:
+						<literal>allowed_not_screened</literal>
+						<literal>allowed_passed_screen</literal>
+						<literal>allowed_failed_screen</literal>
+						<literal>allowed</literal>
+						<literal>prohib_not_screened</literal>
+						<literal>prohib_passed_screen</literal>
+						<literal>prohib_failed_screen</literal>
+						<literal>prohib</literal>
+						<literal>unavailable</literal></para>
+					</argument>
 				</option>
 				<option name="w">
 					<para>Allow the called party to enable recording of the call by sending
@@ -533,11 +552,13 @@
 
 #define DIAL_STILLGOING      (1 << 31)
 #define DIAL_NOFORWARDHTML   ((uint64_t)1 << 32) /* flags are now 64 bits, so keep it up! */
-#define DIAL_NOCONNECTEDLINE ((uint64_t)1 << 33)
+#define DIAL_CALLERID_ABSENT ((uint64_t)1 << 33) /* TRUE if caller id is not available for connected line. */
 #define OPT_CANCEL_ELSEWHERE ((uint64_t)1 << 34)
 #define OPT_PEER_H           ((uint64_t)1 << 35)
 #define OPT_CALLEE_GO_ON     ((uint64_t)1 << 36)
 #define OPT_CANCEL_TIMEOUT   ((uint64_t)1 << 37)
+#define OPT_FORCE_CID_TAG    ((uint64_t)1 << 38)
+#define OPT_FORCE_CID_PRES   ((uint64_t)1 << 39)
 
 enum {
 	OPT_ARG_ANNOUNCE = 0,
@@ -554,6 +575,8 @@
 	OPT_ARG_OPERMODE,
 	OPT_ARG_SCREEN_NOINTRO,
 	OPT_ARG_FORCECLID,
+	OPT_ARG_FORCE_CID_TAG,
+	OPT_ARG_FORCE_CID_PRES,
 	/* note: this entry _MUST_ be the last one in the enum */
 	OPT_ARG_ARRAY_SIZE,
 };
@@ -587,6 +610,8 @@
 	AST_APP_OPTION_ARG('P', OPT_PRIVACY, OPT_ARG_PRIVACY),
 	AST_APP_OPTION_ARG('r', OPT_RINGBACK, OPT_ARG_RINGBACK),
 	AST_APP_OPTION_ARG('S', OPT_DURATION_STOP, OPT_ARG_DURATION_STOP),
+	AST_APP_OPTION_ARG('s', OPT_FORCE_CID_TAG, OPT_ARG_FORCE_CID_TAG),
+	AST_APP_OPTION_ARG('u', OPT_FORCE_CID_PRES, OPT_ARG_FORCE_CID_PRES),
 	AST_APP_OPTION('t', OPT_CALLEE_TRANSFER),
 	AST_APP_OPTION('T', OPT_CALLER_TRANSFER),
 	AST_APP_OPTION_ARG('U', OPT_CALLEE_GOSUB, OPT_ARG_CALLEE_GOSUB),
@@ -610,7 +635,10 @@
 	struct chanlist *next;
 	struct ast_channel *chan;
 	uint64_t flags;
+	/*! Saved connected party info from an AST_CONTROL_CONNECTED_LINE. */
 	struct ast_party_connected_line connected;
+	/*! TRUE if an AST_CONTROL_CONNECTED_LINE update was saved to the connected element. */
+	unsigned int pending_connected_update:1;
 	struct ast_aoc_decoded *aoc_s_rate_list;
 };
 
@@ -636,7 +664,6 @@
 				/* This is for the channel drivers */
 				outgoing->chan->hangupcause = AST_CAUSE_ANSWERED_ELSEWHERE;
 			}
-			ast_party_connected_line_free(&outgoing->connected);
 			ast_hangup(outgoing->chan);
 		}
 		oo = outgoing;
@@ -857,8 +884,20 @@
 			ast_string_field_set(c, accountcode, in->accountcode);
 		}
 		ast_party_connected_line_copy(&c->connected, &original->connected);
-
-		ast_channel_update_redirecting(in, &c->redirecting);
+		/*
+		 * We must unlock c before calling ast_channel_redirecting_macro, because
+		 * we put c into autoservice there. That is pretty much a guaranteed
+		 * deadlock. This is why the handling of c's lock may seem a bit unusual
+		 * here.
+		 */
+		ast_channel_unlock(c);
+		if (ast_channel_redirecting_macro(c, in, &c->redirecting, 1, 0)) {
+			while (ast_channel_trylock(c)) {
+				CHANNEL_DEADLOCK_AVOIDANCE(in);
+			}
+			ast_channel_update_redirecting(in, &c->redirecting);
+			ast_channel_unlock(c);
+		}
 
 		ast_clear_flag64(peerflags, OPT_IGNORE_CONNECTEDLINE);
 		if (ast_test_flag64(peerflags, OPT_CANCEL_TIMEOUT)) {
@@ -866,7 +905,6 @@
 		}
 
 		ast_channel_unlock(in);
-		ast_channel_unlock(c);
 
 		if (ast_call(c, tmpchan, 0)) {
 			ast_log(LOG_NOTICE, "Failed to dial on local channel for call forward to '%s'\n", tmpchan);
@@ -943,7 +981,7 @@
 			ast_channel_make_compatible(outgoing->chan, in);
 		}
 
-		if (!ast_test_flag64(peerflags, OPT_IGNORE_CONNECTEDLINE) && !ast_test_flag64(outgoing, DIAL_NOCONNECTEDLINE)) {
+		if (!ast_test_flag64(peerflags, OPT_IGNORE_CONNECTEDLINE) && !ast_test_flag64(outgoing, DIAL_CALLERID_ABSENT)) {
 			ast_channel_lock(outgoing->chan);
 			ast_connected_line_copy_from_caller(&connected_caller, &outgoing->chan->cid);
 			ast_channel_unlock(outgoing->chan);
@@ -1003,11 +1041,11 @@
 				if (!peer) {
 					ast_verb(3, "%s answered %s\n", c->name, in->name);
 					if (!single && !ast_test_flag64(peerflags, OPT_IGNORE_CONNECTEDLINE)) {
-						if (o->connected.id.number) {
+						if (o->pending_connected_update) {
 							if (ast_channel_connected_line_macro(c, in, &o->connected, 1, 0)) {
 								ast_channel_update_connected_line(in, &o->connected);
 							}
-						} else if (!ast_test_flag64(o, DIAL_NOCONNECTEDLINE)) {
+						} else if (!ast_test_flag64(o, DIAL_CALLERID_ABSENT)) {
 							ast_channel_lock(c);
 							ast_connected_line_copy_from_caller(&connected_caller, &c->cid);
 							ast_channel_unlock(c);
@@ -1073,11 +1111,11 @@
 					if (!peer) {
 						ast_verb(3, "%s answered %s\n", c->name, in->name);
 						if (!single && !ast_test_flag64(peerflags, OPT_IGNORE_CONNECTEDLINE)) {
-							if (o->connected.id.number) {
+							if (o->pending_connected_update) {
 								if (ast_channel_connected_line_macro(c, in, &o->connected, 1, 0)) {
 									ast_channel_update_connected_line(in, &o->connected);
 								}
-							} else if (!ast_test_flag64(o, DIAL_NOCONNECTEDLINE)) {
+							} else if (!ast_test_flag64(o, DIAL_CALLERID_ABSENT)) {
 								ast_channel_lock(c);
 								ast_connected_line_copy_from_caller(&connected_caller, &c->cid);
 								ast_channel_unlock(c);
@@ -1202,6 +1240,7 @@
 						ast_connected_line_parse_data(f->data.ptr, f->datalen, &connected);
 						ast_party_connected_line_set(&o->connected, &connected);
 						ast_party_connected_line_free(&connected);
+						o->pending_connected_update = 1;
 					} else {
 						if (ast_channel_connected_line_macro(c, in, f, 1, 1)) {
 							ast_indicate_data(in, AST_CONTROL_CONNECTED_LINE, f->data.ptr, f->datalen);
@@ -1224,7 +1263,9 @@
 						ast_verb(3, "Redirecting update to %s prevented.\n", in->name);
 					} else {
 						ast_verb(3, "%s redirecting info has changed, passing it to %s\n", c->name, in->name);
-						ast_indicate_data(in, AST_CONTROL_REDIRECTING, f->data.ptr, f->datalen);
+						if (ast_channel_redirecting_macro(c, in, f, 1, 1)) {
+							ast_indicate_data(in, AST_CONTROL_REDIRECTING, f->data.ptr, f->datalen);
+						}
 						pa->sentringing = 0;
 					}
 					break;
@@ -1365,6 +1406,10 @@
 					if (ast_channel_connected_line_macro(in, outgoing->chan, f, 0, 1)) {
 						ast_indicate_data(outgoing->chan, f->subclass.integer, f->data.ptr, f->datalen);
 					}
+				} else if (f->subclass.integer == AST_CONTROL_REDIRECTING) {
+					if (ast_channel_redirecting_macro(in, outgoing->chan, f, 0, 1)) {
+						ast_indicate_data(outgoing->chan, f->subclass.integer, f->data.ptr, f->datalen);
+					}
 				}
 			}
 			ast_frfree(f);
@@ -1732,7 +1777,7 @@
 	struct cause_args num = { chan, 0, 0, 0 };
 	int cause;
 	char numsubst[256];
-	char *cid_num = NULL, *cid_name = NULL;
+	char *cid_num = NULL, *cid_name = NULL, *cid_tag = NULL, *cid_pres = NULL;
 
 	struct ast_bridge_config config = { { 0, } };
 	struct timeval calldurationlimit = { 0, };
@@ -1835,6 +1880,10 @@
 
 	if (ast_test_flag64(&opts, OPT_FORCECLID) && !ast_strlen_zero(opt_args[OPT_ARG_FORCECLID]))
 		ast_callerid_parse(opt_args[OPT_ARG_FORCECLID], &cid_name, &cid_num);
+	if (ast_test_flag64(&opts, OPT_FORCE_CID_TAG) && !ast_strlen_zero(opt_args[OPT_ARG_FORCE_CID_TAG]))
+		cid_tag = ast_strdupa(opt_args[OPT_ARG_FORCE_CID_TAG]);
+	if (ast_test_flag64(&opts, OPT_FORCE_CID_PRES) && !ast_strlen_zero(opt_args[OPT_ARG_FORCE_CID_PRES]))
+		cid_pres = ast_strdupa(opt_args[OPT_ARG_FORCE_CID_PRES]);
 	if (ast_test_flag64(&opts, OPT_RESETCDR) && chan->cdr)
 		ast_cdr_reset(chan->cdr, NULL);
 	if (ast_test_flag64(&opts, OPT_PRIVACY) && ast_strlen_zero(opt_args[OPT_ARG_PRIVACY]))
@@ -1902,14 +1951,13 @@
 
 		ast_channel_lock(chan);
 		datastore = ast_channel_datastore_find(chan, &dialed_interface_info, NULL);
-		/* If the incoming channel has previously had connected line information
-		 * set on it (perhaps through the CONNECTED_LINE dialplan function) then
-		 * seed the calllist's connected line information with this previously
-		 * acquired info
+		/*
+		 * Seed the chanlist's connected line information with previously
+		 * acquired connected line info from the incoming channel.  The
+		 * previously acquired connected line info could have been set
+		 * through the CONNECTED_LINE dialplan function.
 		 */
-		if (chan->connected.id.number) {
-			ast_party_connected_line_copy(&tmp->connected, &chan->connected);
-		}
+		ast_party_connected_line_copy(&tmp->connected, &chan->connected);
 		ast_channel_unlock(chan);
 
 		if (datastore)
@@ -2018,16 +2066,25 @@
 			} else if (!ast_strlen_zero(S_OR(chan->macroexten, chan->exten))) {
 				ast_set_callerid(tc, S_OR(chan->macroexten, chan->exten), NULL, NULL);
 			}
-			ast_set_flag64(tmp, DIAL_NOCONNECTEDLINE);
+			ast_set_flag64(tmp, DIAL_CALLERID_ABSENT);
 		}
 
 		if (ast_test_flag64(peerflags, OPT_FORCECLID) && !ast_strlen_zero(opt_args[OPT_ARG_FORCECLID])) {
 			struct ast_party_connected_line connected;
+			int pres;
 
 			ast_party_connected_line_set_init(&connected, &tmp->chan->connected);
 			connected.id.number = cid_num;
 			connected.id.name = cid_name;
-			connected.id.number_presentation = AST_PRES_ALLOWED_USER_NUMBER_PASSED_SCREEN;
+			connected.id.tag = cid_tag;
+			if (cid_pres) {
+				pres = ast_parse_caller_presentation(cid_pres);
+				if (pres >= 0) {
+					connected.id.number_presentation = pres;
+				}
+			} else {
+				connected.id.number_presentation = AST_PRES_ALLOWED_USER_NUMBER_PASSED_SCREEN;
+			}
 			ast_channel_set_connected_line(tmp->chan, &connected);
 		} else {
 			ast_connected_line_copy_from_caller(&tc->connected, &chan->cid);

Modified: team/dvossel/generic_aoc/apps/app_directed_pickup.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/generic_aoc/apps/app_directed_pickup.c?view=diff&rev=266239&r1=266238&r2=266239
==============================================================================
--- team/dvossel/generic_aoc/apps/app_directed_pickup.c (original)
+++ team/dvossel/generic_aoc/apps/app_directed_pickup.c Thu May 27 14:37:59 2010
@@ -179,9 +179,9 @@
 	char *chkchan;
 	struct pickup_by_name_args pickup_args;
 
-	pickup_args.len = strlen(channame) + 2;
-
-	chkchan = alloca(pickup_args.len);
+	pickup_args.len = strlen(channame) + 1;
+
+	chkchan = alloca(pickup_args.len + 1);
 
 	/* need to append a '-' for the comparison so we check full channel name,
 	 * i.e SIP/hgc- , use a temporary variable so original stays the same for

Modified: team/dvossel/generic_aoc/apps/app_directory.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/generic_aoc/apps/app_directory.c?view=diff&rev=266239&r1=266238&r2=266239
==============================================================================
--- team/dvossel/generic_aoc/apps/app_directory.c (original)
+++ team/dvossel/generic_aoc/apps/app_directory.c Thu May 27 14:37:59 2010
@@ -244,6 +244,19 @@
 	return 0;
 }
 
+static int goto_exten(struct ast_channel *chan, const char *dialcontext, char *ext)
+{
+	if (!ast_goto_if_exists(chan, dialcontext, ext, 1) ||
+		(!ast_strlen_zero(chan->macrocontext) &&
+		!ast_goto_if_exists(chan, chan->macrocontext, ext, 1))) {
+		return 0;
+	} else {
+		ast_log(LOG_WARNING, "Can't find extension '%s' in current context.  "
+			"Not Exiting the Directory!\n", ext);
+		return -1;
+	}
+}
+
 /* play name of mailbox owner.
  * returns:  -1 for bad or missing extension
  *           '1' for selected entry from directory
@@ -324,11 +337,17 @@
 				res = ast_waitfordigit(chan, 3000);
 			ast_stopstream(chan);
 	
-			if (res == '1') { /* Name selected */
+			if (res == '0') { /* operator selected */
+				goto_exten(chan, dialcontext, "o");
+				return '0';
+			} else if (res == '1') { /* Name selected */
 				return select_entry(chan, dialcontext, item, flags) ? -1 : 1;
 			} else if (res == '*') {
 				/* Skip to next match in list */
 				break;
+			} else if (res == '#') {
+				/* Exit reading, continue in dialplan */
+				return res;
 			}
 
 			if (res < 0)
@@ -655,19 +674,6 @@
 			}
 		}
 	} while (reordered);
-}
-
-static int goto_exten(struct ast_channel *chan, const char *dialcontext, char *ext)
-{
-	if (!ast_goto_if_exists(chan, dialcontext, ext, 1) ||
-		(!ast_strlen_zero(chan->macrocontext) &&
-		!ast_goto_if_exists(chan, chan->macrocontext, ext, 1))) {
-		return 0;
-	} else {
-		ast_log(LOG_WARNING, "Can't find extension '%s' in current context.  "
-			"Not Exiting the Directory!\n", ext);
-		return -1;
-	}
 }
 
 static int do_directory(struct ast_channel *chan, struct ast_config *vmcfg, struct ast_config *ucfg, char *context, char *dialcontext, char digit, int digits, struct ast_flags *flags, char *opts[])
@@ -783,6 +789,8 @@
 	dirintro = ast_variable_retrieve(cfg, args.vmcontext, "directoryintro");
 	if (ast_strlen_zero(dirintro))
 		dirintro = ast_variable_retrieve(cfg, "general", "directoryintro");
+	/* the above prompts probably should be modified to include 0 for dialing operator
+	   and # for exiting (continues in dialplan) */
 
 	if (ast_test_flag(&flags, OPT_LISTBYFIRSTNAME) && ast_test_flag(&flags, OPT_LISTBYLASTNAME)) {
 		if (!ast_strlen_zero(opts[OPT_ARG_EITHER])) {

Modified: team/dvossel/generic_aoc/apps/app_meetme.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/generic_aoc/apps/app_meetme.c?view=diff&rev=266239&r1=266238&r2=266239
==============================================================================
--- team/dvossel/generic_aoc/apps/app_meetme.c (original)
+++ team/dvossel/generic_aoc/apps/app_meetme.c Thu May 27 14:37:59 2010
@@ -3471,6 +3471,10 @@
 						ast_mutex_lock(&conf->listenlock);
 						if (!conf->transframe[idx]) {
 							if (conf->origframe) {
+								if (musiconhold && !ast_dsp_silence(dsp, conf->origframe, &confsilence) && confsilence < MEETME_DELAYDETECTTALK) {
+									ast_moh_stop(chan);
+									mohtempstopped = 1;
+								}
 								if (!conf->transpath[idx]) {
 									conf->transpath[idx] = ast_translator_build_path((1 << idx), AST_FORMAT_SLINEAR);
 								}
@@ -3486,11 +3490,6 @@
  							if ((conf->transframe[idx]->frametype != AST_FRAME_NULL) &&
 							    can_write(chan, confflags)) {
 								struct ast_frame *cur;
-								if (musiconhold && !ast_dsp_silence(dsp, conf->transframe[idx], &confsilence) && confsilence < MEETME_DELAYDETECTTALK) {
-									ast_moh_stop(chan);
-									mohtempstopped = 1;
-								}
-
 								/* the translator may have returned a list of frames, so
 								   write each one onto the channel
 								*/

Modified: team/dvossel/generic_aoc/apps/app_privacy.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/generic_aoc/apps/app_privacy.c?view=diff&rev=266239&r1=266238&r2=266239
==============================================================================
--- team/dvossel/generic_aoc/apps/app_privacy.c (original)
+++ team/dvossel/generic_aoc/apps/app_privacy.c Thu May 27 14:37:59 2010
@@ -21,7 +21,7 @@
  * \brief Block all calls without Caller*ID, require phone # to be entered
  *
  * \author Mark Spencer <markster at digium.com>
- * 
+ *
  * \ingroup applications
  */
 
@@ -101,48 +101,55 @@
 	} else {
 		/*Answer the channel if it is not already*/
 		if (chan->_state != AST_STATE_UP) {
-			if ((res = ast_answer(chan)))
+			if ((res = ast_answer(chan))) {
 				return -1;
-		}
-
-		if (!ast_strlen_zero(data)) {
-			parse = ast_strdupa(data);
-			
-			AST_STANDARD_APP_ARGS(args, parse);
-
-			if (args.maxretries) {
-				if (sscanf(args.maxretries, "%30d", &x) == 1)
-					maxretries = x;
-				else
-					ast_log(LOG_WARNING, "Invalid max retries argument\n");
-			}
-			if (args.minlength) {
-				if (sscanf(args.minlength, "%30d", &x) == 1)
-					minlength = x;
-				else
-					ast_log(LOG_WARNING, "Invalid min length argument\n");
-			}
-		}		
+			}
+		}
+
+		parse = ast_strdupa(S_OR(data, ""));
+
+		AST_STANDARD_APP_ARGS(args, parse);
+
+		if (!ast_strlen_zero(args.maxretries)) {
+			if (sscanf(args.maxretries, "%30d", &x) == 1 && x > 0) {
+				maxretries = x;
+			} else {
+				ast_log(LOG_WARNING, "Invalid max retries argument: '%s'\n", args.maxretries);
+			}
+		}
+		if (!ast_strlen_zero(args.minlength)) {
+			if (sscanf(args.minlength, "%30d", &x) == 1 && x > 0) {
+				minlength = x;
+			} else {
+				ast_log(LOG_WARNING, "Invalid min length argument: '%s'\n", args.minlength);
+			}
+		}
 
 		/* Play unidentified call */
 		res = ast_safe_sleep(chan, 1000);
-		if (!res)
+		if (!res) {
 			res = ast_streamfile(chan, "privacy-unident", chan->language);
-		if (!res)
+		}
+		if (!res) {
 			res = ast_waitstream(chan, "");
+		}
 
 		/* Ask for 10 digit number, give 3 attempts */
 		for (retries = 0; retries < maxretries; retries++) {
-			if (!res)
+			if (!res) {
 				res = ast_streamfile(chan, "privacy-prompt", chan->language);
-			if (!res)
+			}
+			if (!res) {
 				res = ast_waitstream(chan, "");
-
-			if (!res ) 
+			}
+
+			if (!res) {
 				res = ast_readstring(chan, phone, sizeof(phone) - 1, /* digit timeout ms */ 3200, /* first digit timeout */ 5000, "#");
-
-			if (res < 0)
+			}
+
+			if (res < 0) {
 				break;
+			}
 
 			/* Make sure we get at least digits */
 			if (strlen(phone) >= minlength ) {
@@ -161,25 +168,27 @@
 				}
 			} else {
 				res = ast_streamfile(chan, "privacy-incorrect", chan->language);
-				if (!res)
+				if (!res) {
 					res = ast_waitstream(chan, "");
-			}
-		}
-		
+				}
+			}
+		}
+
 		/* Got a number, play sounds and send them on their way */
-		if ((retries < maxretries) && res >= 0 ) {
+		if ((retries < maxretries) && res >= 0) {
 			res = ast_streamfile(chan, "privacy-thankyou", chan->language);
-			if (!res)
+			if (!res) {
 				res = ast_waitstream(chan, "");
-
-			ast_set_callerid (chan, phone, "Privacy Manager", NULL); 
+			}
+
+			ast_set_callerid(chan, phone, "Privacy Manager", NULL);
 
 			/* Clear the unavailable presence bit so if it came in on PRI
 			 * the caller id will now be passed out to other channels
 			 */
 			chan->cid.cid_pres &= (AST_PRES_UNAVAILABLE ^ 0xFF);
 
-			ast_verb(3, "Changed Caller*ID to %s, callerpres to %d\n",phone,chan->cid.cid_pres);
+			ast_verb(3, "Changed Caller*ID to '%s', callerpres to %d\n", phone, chan->cid.cid_pres);
 
 			pbx_builtin_setvar_helper(chan, "PRIVACYMGRSTATUS", "SUCCESS");
 		} else {
@@ -192,7 +201,7 @@
 
 static int unload_module(void)
 {
-	return ast_unregister_application (app);
+	return ast_unregister_application(app);
 }
 
 static int load_module(void)

Modified: team/dvossel/generic_aoc/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/generic_aoc/apps/app_queue.c?view=diff&rev=266239&r1=266238&r2=266239
==============================================================================
--- team/dvossel/generic_aoc/apps/app_queue.c (original)
+++ team/dvossel/generic_aoc/apps/app_queue.c Thu May 27 14:37:59 2010
@@ -815,8 +815,12 @@
 	time_t lastcall;
 	struct call_queue *lastqueue;
 	struct member *member;
-	unsigned int update_connectedline:1;
+	/*! Saved connected party info from an AST_CONTROL_CONNECTED_LINE. */
 	struct ast_party_connected_line connected;
+	/*! TRUE if an AST_CONTROL_CONNECTED_LINE update was saved to the connected element. */
+	unsigned int pending_connected_update:1;
+	/*! TRUE if caller id is not available for connected line */
+	unsigned int dial_callerid_absent:1;
 	struct ast_aoc_decoded *aoc_s_rate_list;
 };
 
@@ -2344,6 +2348,10 @@
 		return 0;
 	}
 
+	if (!ast_fileexists(filename, NULL, chan->language)) {
+		return 0;
+	}
+
 	ast_stopstream(chan);
 
 	res = ast_streamfile(chan, filename, chan->language);
@@ -2615,6 +2623,24 @@
 	queue_t_unref(q, "Expire copied reference");
 }
 
+/*!
+ * \internal
+ * \brief Destroy the given callattempt structure and free it.
+ * \since 1.8
+ *
+ * \param doomed callattempt structure to destroy.
+ *
+ * \return Nothing
+ */
+static void callattempt_free(struct callattempt *doomed)
+{
+	if (doomed->member) {
+		ao2_ref(doomed->member, -1);
+	}
+	ast_party_connected_line_free(&doomed->connected);
+	ast_free(doomed);
+}
+
 /*! \brief Hang up a list of outgoing calls */
 static void hangupcalls(struct callattempt *outgoing, struct ast_channel *exception, int cancel_answered_elsewhere)
 {
@@ -2630,10 +2656,8 @@
 		}
 		oo = outgoing;
 		outgoing = outgoing->q_next;
-		if (oo->member)
-			ao2_ref(oo->member, -1);
 		ast_aoc_destroy_decoded(oo->aoc_s_rate_list);
-		ast_free(oo);
+		callattempt_free(oo);
 	}
 }
 
@@ -2873,7 +2897,7 @@
 		} else if (!ast_strlen_zero(S_OR(qe->chan->macroexten, qe->chan->exten))) {
 			ast_set_callerid(tmp->chan, S_OR(qe->chan->macroexten, qe->chan->exten), NULL, NULL); 
 		}
-		tmp->update_connectedline = 0;
+		tmp->dial_callerid_absent = 1;
 	}
 
 	ast_party_redirecting_copy(&tmp->chan->redirecting, &qe->chan->redirecting);
@@ -3191,7 +3215,8 @@
 }
 
 #define AST_MAX_WATCHERS 256
-/*! \brief Wait for a member to answer the call
+/*!
+ * \brief Wait for a member to answer the call
  *

[... 8721 lines stripped ...]



More information about the svn-commits mailing list