[svn-commits] dlee: branch dlee/stasis-cache-split r395671 - in /team/dlee/stasis-cache-spl...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Jul 29 10:46:38 CDT 2013


Author: dlee
Date: Mon Jul 29 10:46:34 2013
New Revision: 395671

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=395671
Log:
Merged revisions 394278-395367 from http://svn.asterisk.org/svn/asterisk/trunk

Added:
    team/dlee/stasis-cache-split/apps/app_agent_pool.c
      - copied unchanged from r395367, trunk/apps/app_agent_pool.c
    team/dlee/stasis-cache-split/channels/chan_bridge_media.c
      - copied unchanged from r395367, trunk/channels/chan_bridge_media.c
    team/dlee/stasis-cache-split/channels/chan_dahdi.h
      - copied unchanged from r395367, trunk/channels/chan_dahdi.h
    team/dlee/stasis-cache-split/channels/dahdi/
      - copied from r395367, trunk/channels/dahdi/
    team/dlee/stasis-cache-split/configs/safe_asterisk.conf.sample
      - copied unchanged from r395367, trunk/configs/safe_asterisk.conf.sample
    team/dlee/stasis-cache-split/include/asterisk/bridging_after.h
      - copied unchanged from r395367, trunk/include/asterisk/bridging_after.h
    team/dlee/stasis-cache-split/include/asterisk/bridging_channel.h
      - copied unchanged from r395367, trunk/include/asterisk/bridging_channel.h
    team/dlee/stasis-cache-split/include/asterisk/bridging_channel_internal.h
      - copied unchanged from r395367, trunk/include/asterisk/bridging_channel_internal.h
    team/dlee/stasis-cache-split/include/asterisk/bridging_internal.h
      - copied unchanged from r395367, trunk/include/asterisk/bridging_internal.h
    team/dlee/stasis-cache-split/main/bridging_after.c
      - copied unchanged from r395367, trunk/main/bridging_after.c
    team/dlee/stasis-cache-split/main/bridging_channel.c
      - copied unchanged from r395367, trunk/main/bridging_channel.c
    team/dlee/stasis-cache-split/res/res_sip/config_global.c
      - copied unchanged from r395367, trunk/res/res_sip/config_global.c
    team/dlee/stasis-cache-split/res/res_sip/config_system.c
      - copied unchanged from r395367, trunk/res/res_sip/config_system.c
    team/dlee/stasis-cache-split/res/res_sip/sip_global_headers.c
      - copied unchanged from r395367, trunk/res/res_sip/sip_global_headers.c
Removed:
    team/dlee/stasis-cache-split/channels/chan_agent.c
Modified:
    team/dlee/stasis-cache-split/   (props changed)
    team/dlee/stasis-cache-split/CHANGES
    team/dlee/stasis-cache-split/Makefile
    team/dlee/stasis-cache-split/UPGRADE.txt
    team/dlee/stasis-cache-split/addons/chan_mobile.c
    team/dlee/stasis-cache-split/apps/app_bridgewait.c
    team/dlee/stasis-cache-split/apps/app_celgenuserevent.c
    team/dlee/stasis-cache-split/apps/app_confbridge.c
    team/dlee/stasis-cache-split/apps/app_dial.c
    team/dlee/stasis-cache-split/apps/app_directed_pickup.c
    team/dlee/stasis-cache-split/apps/app_meetme.c
    team/dlee/stasis-cache-split/apps/app_queue.c
    team/dlee/stasis-cache-split/apps/app_voicemail.c
    team/dlee/stasis-cache-split/apps/confbridge/conf_chan_announce.c
    team/dlee/stasis-cache-split/apps/confbridge/conf_chan_record.c
    team/dlee/stasis-cache-split/apps/confbridge/confbridge_manager.c
    team/dlee/stasis-cache-split/bridges/bridge_builtin_features.c
    team/dlee/stasis-cache-split/bridges/bridge_builtin_interval_features.c
    team/dlee/stasis-cache-split/bridges/bridge_holding.c
    team/dlee/stasis-cache-split/bridges/bridge_native_rtp.c
    team/dlee/stasis-cache-split/bridges/bridge_simple.c
    team/dlee/stasis-cache-split/bridges/bridge_softmix.c
    team/dlee/stasis-cache-split/channels/Makefile
    team/dlee/stasis-cache-split/channels/chan_dahdi.c
    team/dlee/stasis-cache-split/channels/chan_gulp.c
    team/dlee/stasis-cache-split/channels/chan_mgcp.c
    team/dlee/stasis-cache-split/channels/chan_sip.c
    team/dlee/stasis-cache-split/channels/iax2/parser.c
    team/dlee/stasis-cache-split/channels/sig_analog.c
    team/dlee/stasis-cache-split/configs/agents.conf.sample
    team/dlee/stasis-cache-split/configs/iax.conf.sample
    team/dlee/stasis-cache-split/configs/indications.conf.sample
    team/dlee/stasis-cache-split/configs/queues.conf.sample
    team/dlee/stasis-cache-split/contrib/realtime/postgresql/realtime.sql
    team/dlee/stasis-cache-split/contrib/scripts/install_prereq
    team/dlee/stasis-cache-split/contrib/scripts/safe_asterisk
    team/dlee/stasis-cache-split/funcs/func_channel.c
    team/dlee/stasis-cache-split/funcs/func_strings.c
    team/dlee/stasis-cache-split/include/asterisk/astobj2.h
    team/dlee/stasis-cache-split/include/asterisk/audiohook.h
    team/dlee/stasis-cache-split/include/asterisk/bridging.h
    team/dlee/stasis-cache-split/include/asterisk/bridging_basic.h
    team/dlee/stasis-cache-split/include/asterisk/bridging_features.h
    team/dlee/stasis-cache-split/include/asterisk/bridging_roles.h
    team/dlee/stasis-cache-split/include/asterisk/bridging_technology.h
    team/dlee/stasis-cache-split/include/asterisk/cel.h
    team/dlee/stasis-cache-split/include/asterisk/channel.h
    team/dlee/stasis-cache-split/include/asterisk/config_options.h
    team/dlee/stasis-cache-split/include/asterisk/core_unreal.h
    team/dlee/stasis-cache-split/include/asterisk/features.h
    team/dlee/stasis-cache-split/include/asterisk/features_config.h
    team/dlee/stasis-cache-split/include/asterisk/logger.h
    team/dlee/stasis-cache-split/include/asterisk/res_sip.h
    team/dlee/stasis-cache-split/include/asterisk/res_sip_session.h
    team/dlee/stasis-cache-split/include/asterisk/stasis_app.h
    team/dlee/stasis-cache-split/include/asterisk/stasis_app_playback.h
    team/dlee/stasis-cache-split/include/asterisk/stasis_bridging.h
    team/dlee/stasis-cache-split/include/asterisk/stasis_channels.h
    team/dlee/stasis-cache-split/include/asterisk/stasis_message_router.h
    team/dlee/stasis-cache-split/include/asterisk/stasis_system.h
    team/dlee/stasis-cache-split/main/asterisk.c
    team/dlee/stasis-cache-split/main/asterisk.exports.in
    team/dlee/stasis-cache-split/main/audiohook.c
    team/dlee/stasis-cache-split/main/bridging.c
    team/dlee/stasis-cache-split/main/bridging_basic.c
    team/dlee/stasis-cache-split/main/bridging_roles.c
    team/dlee/stasis-cache-split/main/ccss.c
    team/dlee/stasis-cache-split/main/cdr.c
    team/dlee/stasis-cache-split/main/cel.c
    team/dlee/stasis-cache-split/main/channel.c
    team/dlee/stasis-cache-split/main/core_unreal.c
    team/dlee/stasis-cache-split/main/dial.c
    team/dlee/stasis-cache-split/main/dns.c
    team/dlee/stasis-cache-split/main/features.c
    team/dlee/stasis-cache-split/main/features_config.c
    team/dlee/stasis-cache-split/main/http.c
    team/dlee/stasis-cache-split/main/manager.c
    team/dlee/stasis-cache-split/main/manager_bridging.c
    team/dlee/stasis-cache-split/main/manager_channels.c
    team/dlee/stasis-cache-split/main/pbx.c
    team/dlee/stasis-cache-split/main/stasis_bridging.c
    team/dlee/stasis-cache-split/main/stasis_cache.c
    team/dlee/stasis-cache-split/main/stasis_channels.c
    team/dlee/stasis-cache-split/main/stasis_message_router.c
    team/dlee/stasis-cache-split/main/stasis_system.c
    team/dlee/stasis-cache-split/main/utils.c
    team/dlee/stasis-cache-split/res/parking/parking_bridge.c
    team/dlee/stasis-cache-split/res/parking/parking_bridge_features.c
    team/dlee/stasis-cache-split/res/parking/parking_manager.c
    team/dlee/stasis-cache-split/res/res_agi.c
    team/dlee/stasis-cache-split/res/res_http_websocket.c
    team/dlee/stasis-cache-split/res/res_mutestream.c
    team/dlee/stasis-cache-split/res/res_sip.c
    team/dlee/stasis-cache-split/res/res_sip.exports.in
    team/dlee/stasis-cache-split/res/res_sip/config_transport.c
    team/dlee/stasis-cache-split/res/res_sip/include/res_sip_private.h
    team/dlee/stasis-cache-split/res/res_sip/sip_configuration.c
    team/dlee/stasis-cache-split/res/res_sip/sip_distributor.c
    team/dlee/stasis-cache-split/res/res_sip/sip_options.c
    team/dlee/stasis-cache-split/res/res_sip_caller_id.c
    team/dlee/stasis-cache-split/res/res_sip_mwi.c
    team/dlee/stasis-cache-split/res/res_sip_one_touch_record_info.c
    team/dlee/stasis-cache-split/res/res_sip_pubsub.c
    team/dlee/stasis-cache-split/res/res_sip_refer.c
    team/dlee/stasis-cache-split/res/res_sip_sdp_rtp.c
    team/dlee/stasis-cache-split/res/res_sip_session.c
    team/dlee/stasis-cache-split/res/res_sip_session.exports.in
    team/dlee/stasis-cache-split/res/res_stasis.c
    team/dlee/stasis-cache-split/res/res_stasis_http.c
    team/dlee/stasis-cache-split/res/res_stasis_http_asterisk.c
    team/dlee/stasis-cache-split/res/res_stasis_http_bridges.c
    team/dlee/stasis-cache-split/res/res_stasis_http_channels.c
    team/dlee/stasis-cache-split/res/res_stasis_http_endpoints.c
    team/dlee/stasis-cache-split/res/res_stasis_http_playback.c
    team/dlee/stasis-cache-split/res/res_stasis_http_recordings.c
    team/dlee/stasis-cache-split/res/res_stasis_http_sounds.c
    team/dlee/stasis-cache-split/res/res_stasis_playback.c
    team/dlee/stasis-cache-split/res/stasis/app.c
    team/dlee/stasis-cache-split/res/stasis/app.h
    team/dlee/stasis-cache-split/res/stasis/control.c
    team/dlee/stasis-cache-split/res/stasis_http/ari_model_validators.c
    team/dlee/stasis-cache-split/res/stasis_http/ari_model_validators.h
    team/dlee/stasis-cache-split/res/stasis_http/ari_websockets.c
    team/dlee/stasis-cache-split/res/stasis_http/resource_bridges.c
    team/dlee/stasis-cache-split/res/stasis_http/resource_bridges.h
    team/dlee/stasis-cache-split/res/stasis_http/resource_channels.c
    team/dlee/stasis-cache-split/res/stasis_http/resource_channels.h
    team/dlee/stasis-cache-split/rest-api-templates/res_stasis_http_resource.c.mustache
    team/dlee/stasis-cache-split/rest-api/api-docs/bridges.json
    team/dlee/stasis-cache-split/rest-api/api-docs/channels.json
    team/dlee/stasis-cache-split/rest-api/api-docs/playback.json
    team/dlee/stasis-cache-split/rest-api/api-docs/recordings.json
    team/dlee/stasis-cache-split/tests/test_app.c
    team/dlee/stasis-cache-split/tests/test_cdr.c
    team/dlee/stasis-cache-split/tests/test_cel.c
    team/dlee/stasis-cache-split/tests/test_stasis.c
    team/dlee/stasis-cache-split/tests/test_stasis_endpoints.c
    team/dlee/stasis-cache-split/tests/test_voicemail_api.c

Propchange: team/dlee/stasis-cache-split/
------------------------------------------------------------------------------
--- branch-11-blocked (original)
+++ branch-11-blocked Mon Jul 29 10:46:34 2013
@@ -1,1 +1,1 @@
-/branches/11:373240,375247,375702,385356
+/branches/11:373240,375247,375702,385356,395020

Propchange: team/dlee/stasis-cache-split/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.

Propchange: team/dlee/stasis-cache-split/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Jul 29 10:46:34 2013
@@ -1,1 +1,1 @@
-/trunk:1-394263
+/trunk:1-395367

Modified: team/dlee/stasis-cache-split/CHANGES
URL: http://svnview.digium.com/svn/asterisk/team/dlee/stasis-cache-split/CHANGES?view=diff&rev=395671&r1=395670&r2=395671
==============================================================================
--- team/dlee/stasis-cache-split/CHANGES (original)
+++ team/dlee/stasis-cache-split/CHANGES Mon Jul 29 10:46:34 2013
@@ -14,10 +14,23 @@
 Applications
 ------------------
 
+AgentLogin
+------------------
+ * The application no longer does agent authentication.  The dialplan needs to
+   perform this function before running AgentLogin.  If the agent is already
+   logged in, dialplan will continue with the AGENT_STATUS channel variable
+   set to ALREADY_LOGGED_IN.
+
 AgentMonitorOutgoing
 ------------------
- * The 'c' option has been removed. It is not possible to modify the name of a
-   channel involved in a CDR.
+ * Application removed.  It was a holdover from when AgentCallbackLogin was
+   removed.
+
+ConfBridge
+------------------
+ * All participants in a bridge can now be kicked out of a conference room
+   by specifying the channel parameter as 'all' in the ConfBridge kick CLI
+   command, i.e., "confbridge kick <conference> all"
 
 ForkCDR
 ------------------
@@ -260,8 +273,8 @@
    of "CallerID" and "ConnectedID" to avoid confusion with similarly named
    parameters in the channel snapshot.
 
- * The "Agentlogin" and "Agentlogoff" events have been renamed "AgentLogin" and
-   "AgentLogoff" respectively.
+ * The AMI events "Agentlogin" and "Agentlogoff" have been renamed
+   "AgentLogin" and "AgentLogoff" respectively.
 
  * The "Channel" key used in the "AlarmClear", "Alarm", and "DNDState" has been
    renamed "DAHDIChannel" since it does not convey an Asterisk channel name.
@@ -281,6 +294,10 @@
    the Local channel. This affects the LocalBridge, LocalOptimizationBegin,
    and LocalOptimizationEnd events.
 
+ * The option 'allowmultiplelogin' can now be set or overriden in a particular
+   account. When set in the general context, it will act as the default
+   setting for defined accounts.
+
 AGI (Asterisk Gateway Interface)
 ------------------
  * The manager event AGIExec has been split into AGIExecStart and AGIExecEnd.
@@ -306,6 +323,27 @@
  * When a CDR is dispatched, user defined CDR variables from both parties are
    included in the resulting CDR. If both parties have the same variable, only
    the Party A value is provided.
+
+CEL (Channel Event Logging)
+------------------
+ * The 'extra' field of all CEL events that use it now consists of a JSON blob
+   with key/value pairs which are defined in the Asterisk 12 CEL documentation.
+
+ * AST_CEL_BLINDTRANSFER events now report the transferee bridge unique
+   identifier, extension, and context in a JSON blob as the extra string
+   instead of the transferee channel name as the peer.
+
+ * AST_CEL_ATTENDEDTRANSFER events now report the peer as NULL and additional
+   information in the 'extra' string as a JSON blob. For transfers that occur
+   between two bridged channels, the 'extra' JSON blob contains the primary
+   bridge unique identifier, the secondary channel name, and the secondary
+   bridge unique identifier. For transfers that occur between a bridged channel
+   and a channel running an app, the 'extra' JSON blob contains the primary
+   bridge unique identifier, the secondary channel name, and the app name.
+
+ * AST_CEL_LOCAL_OPTIMIZE events have been added to convey local channel
+   optimizations with the record occurring for the semi-one channel and
+   the semi-two channel name in the peer field.
 
 Features
 -------------------
@@ -453,6 +491,21 @@
    and pretending otherwise helps no one.
  * The AGENTUPDATECDR channel variable has also been removed, for the same
    reason as the updatecdr option.
+ * The driver is no longer a Data retrieval API data provider for the
+   AMI DataGet action.
+ * The endcall and enddtmf configuration options are removed.  Use the
+   dialplan function CHANNEL(dtmf-features) to set DTMF features on the agent
+   channel before calling AgentLogin.
+ * chan_agent is removed and replaced with AgentLogin and AgentRequest dialplan
+   applications.  Agents are connected with callers using the new AgentRequest
+   dialplan application.  The Agents:<agent-id> device state is available to
+   monitor the status of an agent.  See agents.conf.sample for valid
+   configuration options.
+
+chan_bridge
+------------------
+ * chan_bridge is removed and its functionality is incorporated into ConfBridge
+   itself.
 
 chan_local
 ------------------
@@ -527,6 +580,18 @@
    If no resources exist or all are unavailable the device state is considered
    to be unavailable.
 
+
+Scripts
+------------------
+
+safe_asterisk
+------------------
+ * The safe_asterisk script will now install over previously installations.
+   In previous versions of Asterisk, once installed a 'make install' would
+   skip over safe_asterisk if it was already installed.
+ * Certain options in safe_asterisk can now be configured from the
+   safe_asterisk.conf file. A sample version of this is located in the
+   configs/ folder.
 
 ------------------------------------------------------------------------------
 --- Functionality changes from Asterisk 10 to Asterisk 11 --------------------

Modified: team/dlee/stasis-cache-split/Makefile
URL: http://svnview.digium.com/svn/asterisk/team/dlee/stasis-cache-split/Makefile?view=diff&rev=395671&r1=395670&r2=395671
==============================================================================
--- team/dlee/stasis-cache-split/Makefile (original)
+++ team/dlee/stasis-cache-split/Makefile Mon Jul 29 10:46:34 2013
@@ -558,8 +558,8 @@
 bininstall: _all installdirs $(SUBDIRS_INSTALL) main-bininstall
 	$(INSTALL) -m 755 contrib/scripts/astgenkey "$(DESTDIR)$(ASTSBINDIR)/"
 	$(INSTALL) -m 755 contrib/scripts/autosupport "$(DESTDIR)$(ASTSBINDIR)/"
-	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)|;s|__ASTERISK_LOG_DIR__|$(ASTLOGDIR)|;' > contrib/scripts/safe.tmp ; \
+	if [ ! -f /sbin/launchd ]; then \
+		cat contrib/scripts/safe_asterisk | sed 's|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;s|__ASTERISK_VARRUN_DIR__|$(ASTVARRUNDIR)|;s|__ASTERISK_LOG_DIR__|$(ASTLOGDIR)|;s|__ASTERISK_ETC_DIR__|$(ASTETCDIR)|;' > contrib/scripts/safe.tmp ; \
 		$(INSTALL) -m 755 contrib/scripts/safe.tmp "$(DESTDIR)$(ASTSBINDIR)/safe_asterisk" ; \
 		rm -f contrib/scripts/safe.tmp ; \
 	fi

Modified: team/dlee/stasis-cache-split/UPGRADE.txt
URL: http://svnview.digium.com/svn/asterisk/team/dlee/stasis-cache-split/UPGRADE.txt?view=diff&rev=395671&r1=395670&r2=395671
==============================================================================
--- team/dlee/stasis-cache-split/UPGRADE.txt (original)
+++ team/dlee/stasis-cache-split/UPGRADE.txt Mon Jul 29 10:46:34 2013
@@ -22,8 +22,8 @@
 ===========================================================
 
 AgentMonitorOutgoing
- - The 'c' option has been removed. It is not possible to modify the name of a
-   channel involved in a CDR.
+ - Application removed.  It was a holdover from when AgentCallbackLogin was
+   removed.
 
 NoCDR:
  - This application is deprecated. Please use the CDR_PROP function instead.
@@ -140,6 +140,15 @@
    and pretending otherwise helps no one.
  - The AGENTUPDATECDR channel variable has also been removed, for the same
    reason as the updatecdr option.
+ - chan_agent is removed and replaced with AgentLogin and AgentRequest dialplan
+   applications.  Agents are connected with callers using the new AgentRequest
+   dialplan application.  The Agents:<agent-id> device state is available to
+   monitor the status of an agent.  See agents.conf.sample for valid
+   configuration options.
+
+chan_bridge
+ - chan_bridge is removed and its functionality is incorporated into ConfBridge
+   itself.
 
 chan_dahdi:
  - Analog port dialing and deferred DTMF dialing for PRI now distinguishes

Modified: team/dlee/stasis-cache-split/addons/chan_mobile.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/stasis-cache-split/addons/chan_mobile.c?view=diff&rev=395671&r1=395670&r2=395671
==============================================================================
--- team/dlee/stasis-cache-split/addons/chan_mobile.c (original)
+++ team/dlee/stasis-cache-split/addons/chan_mobile.c Mon Jul 29 10:46:34 2013
@@ -1339,9 +1339,7 @@
 
 static int mbl_ast_hangup(struct mbl_pvt *pvt)
 {
-	if (pvt->owner) {
-		ast_hangup(pvt->owner);
-	}
+	ast_hangup(pvt->owner);
 	return 0;
 }
 

Modified: team/dlee/stasis-cache-split/apps/app_bridgewait.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/stasis-cache-split/apps/app_bridgewait.c?view=diff&rev=395671&r1=395670&r2=395671
==============================================================================
--- team/dlee/stasis-cache-split/apps/app_bridgewait.c (original)
+++ team/dlee/stasis-cache-split/apps/app_bridgewait.c Mon Jul 29 10:46:34 2013
@@ -54,26 +54,44 @@
 			Put a call into the holding bridge.
 		</synopsis>
 		<syntax>
+			<parameter name="role" required="false">
+				<para>Defines the channel's purpose for entering the holding bridge. Values are case sensitive.
+				</para>
+				<enumlist>
+					<enum name="participant">
+						<para>The channel will enter the holding bridge to be placed on hold
+						until it is removed from the bridge for some reason. (default)</para>
+					</enum>
+					<enum name="announcer">
+						<para>The channel will enter the holding bridge to make announcements
+						to channels that are currently in the holding bridge. While an
+						announcer is present, holding for the participants will be
+						suspended.</para>
+					</enum>
+				</enumlist>
+			</parameter>
 			<parameter name="options">
 				<optionlist>
-					<option name="A">
-						<para>The channel will join the holding bridge as an
-						announcer</para>
+					<option name="m">
+						<argument name="class" required="true" />
+						<para>The specified MOH class will be used/suggested for
+						music on hold operations. This option will only be useful for
+						entertainment modes that use it (m and h).</para>
 					</option>
-					<option name="m">
-						<argument name="class" required="false" />
-						<para>Play music on hold to the entering channel while it is
-						on hold. If the <emphasis>class</emphasis> is included, then
-						that class of music on hold will take priority over the
-						channel default.</para>
-					</option>
-					<option name="r">
-						<para>Play a ringing tone to the entering channel while it is
-						on hold.</para>
+					<option name="e">
+						<para>Which entertainment mechanism should be used while on hold
+						in the holding bridge. Only the first letter is read.</para>
+						<enumlist>
+							<enum name="m"><para>Play music on hold (default)</para></enum>
+							<enum name="r"><para>Ring without pause</para></enum>
+							<enum name="s"><para>Generate silent audio</para></enum>
+							<enum name="h"><para>Put the channel on hold</para></enum>
+							<enum name="n"><para>No entertainment</para></enum>
+						</enumlist>
 					</option>
 					<option name="S">
 						<argument name="duration" required="true" />
-						<para>Automatically end the hold and return to the PBX after
+						<para>Automatically exit the bridge and return to the PBX after
 						<emphasis>duration</emphasis> seconds.</para>
 					</option>
 				</optionlist>
@@ -87,12 +105,8 @@
 	</application>
  ***/
 /* BUGBUG Add bridge name/id parameter to specify which holding bridge to join (required) */
-/* BUGBUG Add h(moh-class) option to put channel on hold using AST_CONTROL_HOLD/AST_CONTROL_UNHOLD while in bridge */
-/* BUGBUG Add s option to send silence media frames to channel while in bridge (uses a silence generator) */
-/* BUGBUG Add n option to send no media to channel while in bridge (Channel should not be answered yet) */
 /* BUGBUG The channel may or may not be answered with the r option. */
 /* BUGBUG You should not place an announcer into a holding bridge with unanswered channels. */
-/* BUGBUG Not supplying any option flags will assume the m option with the default music class. */
 
 static char *app = "BridgeWait";
 static struct ast_bridge *holding_bridge;
@@ -100,22 +114,21 @@
 AST_MUTEX_DEFINE_STATIC(bridgewait_lock);
 
 enum bridgewait_flags {
-	MUXFLAG_PLAYMOH = (1 << 0),
-	MUXFLAG_RINGING = (1 << 1),
+	MUXFLAG_MOHCLASS = (1 << 0),
+	MUXFLAG_ENTERTAINMENT = (1 << 1),
 	MUXFLAG_TIMEOUT = (1 << 2),
-	MUXFLAG_ANNOUNCER = (1 << 3),
 };
 
 enum bridgewait_args {
+	OPT_ARG_ENTERTAINMENT,
 	OPT_ARG_MOHCLASS,
 	OPT_ARG_TIMEOUT,
 	OPT_ARG_ARRAY_SIZE, /* Always the last element of the enum */
 };
 
 AST_APP_OPTIONS(bridgewait_opts, {
-	AST_APP_OPTION('A', MUXFLAG_ANNOUNCER),
-	AST_APP_OPTION('r', MUXFLAG_RINGING),
-	AST_APP_OPTION_ARG('m', MUXFLAG_PLAYMOH, OPT_ARG_MOHCLASS),
+	AST_APP_OPTION_ARG('e', MUXFLAG_ENTERTAINMENT, OPT_ARG_ENTERTAINMENT),
+	AST_APP_OPTION_ARG('m', MUXFLAG_MOHCLASS, OPT_ARG_MOHCLASS),
 	AST_APP_OPTION_ARG('S', MUXFLAG_TIMEOUT, OPT_ARG_TIMEOUT),
 });
 
@@ -147,18 +160,38 @@
 	return 0;
 }
 
-static void apply_option_moh(struct ast_channel *chan, char *class_arg)
-{
-	ast_channel_set_bridge_role_option(chan, "holding_participant", "idle_mode", "musiconhold");
-	ast_channel_set_bridge_role_option(chan, "holding_participant", "moh_class", class_arg);
-}
-
-static void apply_option_ringing(struct ast_channel *chan)
-{
-	ast_channel_set_bridge_role_option(chan, "holding_participant", "idle_mode", "ringing");
-}
-
-static int process_options(struct ast_channel *chan, struct ast_flags *flags, char **opts, struct ast_bridge_features *features)
+static int apply_option_moh(struct ast_channel *chan, const char *class_arg)
+{
+	return ast_channel_set_bridge_role_option(chan, "holding_participant", "moh_class", class_arg);
+}
+
+static int apply_option_entertainment(struct ast_channel *chan, const char *entertainment_arg)
+{
+	char entertainment = entertainment_arg[0];
+	switch (entertainment) {
+	case 'm':
+		return ast_channel_set_bridge_role_option(chan, "holding_participant", "idle_mode", "musiconhold");
+	case 'r':
+		return ast_channel_set_bridge_role_option(chan, "holding_participant", "idle_mode", "ringing");
+	case 's':
+		return ast_channel_set_bridge_role_option(chan, "holding_participant", "idle_mode", "silence");
+	case 'h':
+		return ast_channel_set_bridge_role_option(chan, "holding_participant", "idle_mode", "hold");
+	case 'n':
+		return ast_channel_set_bridge_role_option(chan, "holding_participant", "idle_mode", "none");
+	default:
+		ast_log(LOG_ERROR, "Invalid argument for BridgeWait entertainment '%s'\n", entertainment_arg);
+		return -1;
+	}
+}
+
+enum wait_bridge_roles {
+	ROLE_PARTICIPANT = 0,
+	ROLE_ANNOUNCER,
+	ROLE_INVALID,
+};
+
+static int process_options(struct ast_channel *chan, struct ast_flags *flags, char **opts, struct ast_bridge_features *features, enum wait_bridge_roles role)
 {
 	if (ast_test_flag(flags, MUXFLAG_TIMEOUT)) {
 		if (apply_option_timeout(features, opts[OPT_ARG_TIMEOUT])) {
@@ -166,21 +199,47 @@
 		}
 	}
 
-	if (ast_test_flag(flags, MUXFLAG_ANNOUNCER)) {
-		/* Announcer specific stuff */
-		ast_channel_add_bridge_role(chan, "announcer");
+	switch (role) {
+	case ROLE_PARTICIPANT:
+		if (ast_channel_add_bridge_role(chan, "holding_participant")) {
+			return -1;
+		}
+
+		if (ast_test_flag(flags, MUXFLAG_MOHCLASS)) {
+			if (apply_option_moh(chan, opts[OPT_ARG_MOHCLASS])) {
+				return -1;
+			}
+		}
+
+		if (ast_test_flag(flags, MUXFLAG_ENTERTAINMENT)) {
+			if (apply_option_entertainment(chan, opts[OPT_ARG_ENTERTAINMENT])) {
+				return -1;
+			}
+		}
+
+		break;
+	case ROLE_ANNOUNCER:
+		if (ast_channel_add_bridge_role(chan, "announcer")) {
+			return -1;
+		}
+		break;
+	case ROLE_INVALID:
+		ast_assert(0);
+		return -1;
+	}
+
+	return 0;
+}
+
+static enum wait_bridge_roles validate_role(const char *role)
+{
+	if (!strcmp(role, "participant")) {
+		return ROLE_PARTICIPANT;
+	} else if (!strcmp(role, "announcer")) {
+		return ROLE_ANNOUNCER;
 	} else {
-		/* Non Announcer specific stuff */
-		ast_channel_add_bridge_role(chan, "holding_participant");
-
-		if (ast_test_flag(flags, MUXFLAG_PLAYMOH)) {
-			apply_option_moh(chan, opts[OPT_ARG_MOHCLASS]);
-		} else if (ast_test_flag(flags, MUXFLAG_RINGING)) {
-			apply_option_ringing(chan);
-		}
-	}
-
-	return 0;
+		return ROLE_INVALID;
+	}
 }
 
 static int bridgewait_exec(struct ast_channel *chan, const char *data)
@@ -188,8 +247,11 @@
 	struct ast_bridge_features chan_features;
 	struct ast_flags flags = { 0 };
 	char *parse;
+	enum wait_bridge_roles role = ROLE_PARTICIPANT;
+	char *opts[OPT_ARG_ARRAY_SIZE] = { NULL, };
 
 	AST_DECLARE_APP_ARGS(args,
+		AST_APP_ARG(role);
 		AST_APP_ARG(options);
 		AST_APP_ARG(other);		/* Any remaining unused arguments */
 	);
@@ -209,18 +271,26 @@
 	parse = ast_strdupa(data);
 	AST_STANDARD_APP_ARGS(args, parse);
 
+	if (!ast_strlen_zero(args.role)) {
+		role = validate_role(args.role);
+		if (role == ROLE_INVALID) {
+			ast_log(LOG_ERROR, "Requested waiting bridge role '%s' is invalid.\n", args.role);
+			return -1;
+		}
+	}
+
 	if (ast_bridge_features_init(&chan_features)) {
 		ast_bridge_features_cleanup(&chan_features);
 		return -1;
 	}
 
 	if (args.options) {
-		char *opts[OPT_ARG_ARRAY_SIZE] = { NULL, };
 		ast_app_parse_options(bridgewait_opts, &flags, opts, args.options);
-		if (process_options(chan, &flags, opts, &chan_features)) {
-			ast_bridge_features_cleanup(&chan_features);
-			return -1;
-		}
+	}
+
+	if (process_options(chan, &flags, opts, &chan_features, role)) {
+		ast_bridge_features_cleanup(&chan_features);
+		return -1;
 	}
 
 	ast_bridge_join(holding_bridge, chan, NULL, &chan_features, NULL, 0);

Modified: team/dlee/stasis-cache-split/apps/app_celgenuserevent.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/stasis-cache-split/apps/app_celgenuserevent.c?view=diff&rev=395671&r1=395670&r2=395671
==============================================================================
--- team/dlee/stasis-cache-split/apps/app_celgenuserevent.c (original)
+++ team/dlee/stasis-cache-split/apps/app_celgenuserevent.c Mon Jul 29 10:46:34 2013
@@ -75,9 +75,9 @@
 	parse = ast_strdupa(data);
 	AST_STANDARD_APP_ARGS(args, parse);
 
-	blob = ast_json_pack("{s: s, s: s}",
+	blob = ast_json_pack("{s: s, s: {s: s}}",
 		"event", args.event,
-		"extra", args.extra);
+		"extra", "extra", args.extra);
 	if (!blob) {
 		return res;
 	}

Modified: team/dlee/stasis-cache-split/apps/app_confbridge.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/stasis-cache-split/apps/app_confbridge.c?view=diff&rev=395671&r1=395670&r2=395671
==============================================================================
--- team/dlee/stasis-cache-split/apps/app_confbridge.c (original)
+++ team/dlee/stasis-cache-split/apps/app_confbridge.c Mon Jul 29 10:46:34 2013
@@ -1402,25 +1402,26 @@
 	ast_free(pvt_data);
 }
 
-static void conf_handle_talker_cb(struct ast_bridge_channel *bridge_channel, void *pvt_data, int talking)
+static int conf_handle_talker_cb(struct ast_bridge_channel *bridge_channel, void *pvt_data, int talking)
 {
 	const char *conf_name = pvt_data;
 	struct confbridge_conference *conference = ao2_find(conference_bridges, conf_name, OBJ_KEY);
 	struct ast_json *talking_extras;
 
 	if (!conference) {
-		return;
+		/* Remove the hook since the conference does not exist. */
+		return -1;
 	}
 
 	talking_extras = ast_json_pack("{s: s}",
-					 "talking_status", talking ? "on" : "off");
-
+		"talking_status", talking ? "on" : "off");
 	if (!talking_extras) {
-		return;
+		return 0;
 	}
 
 	send_conf_stasis(conference, bridge_channel->chan, confbridge_talking_type(), talking_extras, 0);
 	ast_json_unref(talking_extras);
+	return 0;
 }
 
 static int conf_get_pin(struct ast_channel *chan, struct confbridge_user *user)
@@ -1599,14 +1600,17 @@
 	/* Set a talker indicate call back if talking detection is requested */
 	if (ast_test_flag(&user.u_profile, USER_OPT_TALKER_DETECT)) {
 		char *conf_name = ast_strdup(args.conf_name); /* this is freed during feature cleanup */
-		if (!(conf_name)) {
+
+		if (!conf_name) {
 			res = -1; /* invalid PIN */
 			goto confbridge_cleanup;
 		}
-		ast_bridge_features_set_talk_detector(&user.features,
-			conf_handle_talker_cb,
-			conf_handle_talker_destructor,
-			conf_name);
+		if (ast_bridge_talk_detector_hook(&user.features, conf_handle_talker_cb,
+			conf_name, conf_handle_talker_destructor, AST_BRIDGE_HOOK_REMOVE_ON_PULL)) {
+			ast_free(conf_name);
+			res = -1;
+			goto confbridge_cleanup;
+		}
 	}
 
 	/* Look for a conference bridge matching the provided name */
@@ -2069,6 +2073,7 @@
 
 static int kick_conference_participant(struct confbridge_conference *conference, const char *channel)
 {
+	int res = -1;
 	struct confbridge_user *user = NULL;
 
 	SCOPED_AO2LOCK(bridge_lock, conference);
@@ -2077,6 +2082,10 @@
 			user->kicked = 1;
 			ast_bridge_remove(conference->bridge, user->chan);
 			return 0;
+		} else if (!strcasecmp("all", channel)) {
+			user->kicked = 1;
+			ast_bridge_remove(conference->bridge, user->chan);
+			res = 0;
 		}
 	}
 	AST_LIST_TRAVERSE(&conference->waiting_list, user, list) {
@@ -2084,10 +2093,14 @@
 			user->kicked = 1;
 			ast_bridge_remove(conference->bridge, user->chan);
 			return 0;
-		}
-	}
-
-	return -1;
+		} else if (!strcasecmp("all", channel)) {
+			user->kicked = 1;
+			ast_bridge_remove(conference->bridge, user->chan);
+			res = 0;
+		}
+	}
+
+	return res;
 }
 
 static char *complete_confbridge_name(const char *line, const char *word, int pos, int state)

Modified: team/dlee/stasis-cache-split/apps/app_dial.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/stasis-cache-split/apps/app_dial.c?view=diff&rev=395671&r1=395670&r2=395671
==============================================================================
--- team/dlee/stasis-cache-split/apps/app_dial.c (original)
+++ team/dlee/stasis-cache-split/apps/app_dial.c Mon Jul 29 10:46:34 2013
@@ -60,7 +60,6 @@
 #include "asterisk/stringfields.h"
 #include "asterisk/global_datastores.h"
 #include "asterisk/dsp.h"
-#include "asterisk/cel.h"
 #include "asterisk/aoc.h"
 #include "asterisk/ccss.h"
 #include "asterisk/indications.h"
@@ -68,6 +67,7 @@
 #include "asterisk/dial.h"
 #include "asterisk/stasis_channels.h"
 #include "asterisk/bridging.h"
+#include "asterisk/bridging_after.h"
 #include "asterisk/features_config.h"
 
 /*** DOCUMENTATION
@@ -202,7 +202,7 @@
 					<argument name="exten" required="false" />
 					<argument name="priority" required="true" />
 					<para>If the call is answered, transfer the calling party to
-					the specified <replaceable>priority</replaceable> and the called party to the specified 
+					the specified <replaceable>priority</replaceable> and the called party to the specified
 					<replaceable>priority</replaceable> plus one.</para>
 					<note>
 						<para>You cannot use any additional action post answer options in conjunction with this option.</para>
@@ -291,7 +291,7 @@
 					<argument name="arg" multiple="true">
 						<para>Macro arguments</para>
 					</argument>
-					<para>Execute the specified <replaceable>macro</replaceable> for the <emphasis>called</emphasis> channel 
+					<para>Execute the specified <replaceable>macro</replaceable> for the <emphasis>called</emphasis> channel
 					before connecting to the calling channel. Arguments can be specified to the Macro
 					using <literal>^</literal> as a delimiter. The macro can set the variable
 					<variable>MACRO_RESULT</variable> to specify the following actions after the macro is
@@ -333,7 +333,7 @@
 						<para>With <replaceable>delete</replaceable> set to <literal>1</literal>, the introduction will
 						always be deleted.</para>
 					</argument>
-					<para>This option is a modifier for the call screening/privacy mode. (See the 
+					<para>This option is a modifier for the call screening/privacy mode. (See the
 					<literal>p</literal> and <literal>P</literal> options.) It specifies
 					that no introductions are to be saved in the <directory>priv-callerintros</directory>
 					directory.</para>
@@ -354,7 +354,7 @@
 					<argument name="mode">
 						<para>With <replaceable>mode</replaceable> either not specified or set to <literal>1</literal>,
 						the originator hanging up will cause the phone to ring back immediately.</para>
-						<para>With <replaceable>mode</replaceable> set to <literal>2</literal>, when the operator 
+						<para>With <replaceable>mode</replaceable> set to <literal>2</literal>, when the operator
 						flashes the trunk, it will ring their phone back.</para>
 					</argument>
 					<para>Enables <emphasis>operator services</emphasis> mode.  This option only
@@ -1072,7 +1072,7 @@
 			/* If we are calling a single channel, and not providing ringback or music, */
 			/* then, make them compatible for in-band tone purpose */
 			if (ast_channel_make_compatible(outgoing->chan, in) < 0) {
-				/* If these channels can not be made compatible, 
+				/* If these channels can not be made compatible,
 				 * there is no point in continuing.  The bridge
 				 * will just fail if it gets that far.
 				 */
@@ -1766,7 +1766,7 @@
 
 		/*! \page DialPrivacy Dial Privacy scripts
 		 * \par priv-callee-options script:
-		 * \li Dial 1 if you wish this caller to reach you directly in the future, 
+		 * \li Dial 1 if you wish this caller to reach you directly in the future,
 		 * 	and immediately connect to their incoming call.
 		 * \li Dial 2 if you wish to send this caller to voicemail now and forevermore.
 		 * \li Dial 3 to send this caller to the torture menus, now and forevermore.
@@ -1892,7 +1892,7 @@
 	} else if (ast_test_flag64(opts, OPT_SCREEN_NOCALLERID) && strncmp(pa->privcid, "NOCALLERID", 10) == 0) {
 		ast_verb(3, "CallerID blank; N option set; Screening should happen; dbval is %d\n", pa->privdb_val);
 	}
-	
+
 	if (pa->privdb_val == AST_PRIVACY_DENY) {
 		ast_verb(3, "Privacy DB reports PRIVACY_DENY for this callerid. Dial reports unavailable\n");
 		ast_copy_string(pa->status, "NOANSWER", sizeof(pa->status));
@@ -2022,14 +2022,14 @@
 		ast_channel_lock(chan);
 		context = ast_strdupa(ast_channel_context(chan));
 		ast_channel_unlock(chan);
-		ast_after_bridge_set_h(peer, context);
+		ast_bridge_set_after_h(peer, context);
 	} else if (ast_test_flag64(opts, OPT_CALLEE_GO_ON)) {
 		ast_channel_lock(chan);
 		context = ast_strdupa(ast_channel_context(chan));
 		extension = ast_strdupa(ast_channel_exten(chan));
 		priority = ast_channel_priority(chan);
 		ast_channel_unlock(chan);
-		ast_after_bridge_set_go_on(peer, context, extension, priority,
+		ast_bridge_set_after_go_on(peer, context, extension, priority,
 			opt_args[OPT_ARG_CALLEE_GO_ON]);
 	}
 }
@@ -2445,7 +2445,7 @@
 			/* We are on the only destination. */
 			ast_rtp_instance_early_bridge_make_compatible(tc, chan);
 		}
-		
+
 		/* Inherit specially named variables from parent channel */
 		ast_channel_inherit_variables(chan, tc);
 		ast_channel_datastore_inherit(chan, tc);
@@ -2699,7 +2699,7 @@
 		/* If appropriate, log that we have a destination channel and set the answer time */
 		if (ast_channel_name(peer))
 			pbx_builtin_setvar_helper(chan, "DIALEDPEERNAME", ast_channel_name(peer));
-		
+
 		ast_channel_lock(peer);
 		number = pbx_builtin_getvar_helper(peer, "DIALEDPEERNUMBER");
 		if (ast_strlen_zero(number)) {
@@ -2968,7 +2968,7 @@
 				ast_channel_hangupcause_set(chan, ast_channel_hangupcause(peer));
 			}
 			setup_peer_after_bridge_goto(chan, peer, &opts, opt_args);
-			if (ast_after_bridge_goto_setup(peer)
+			if (ast_bridge_setup_after_goto(peer)
 				|| ast_pbx_start(peer)) {
 				ast_autoservice_chan_hangup_peer(chan, peer);
 			}
@@ -2998,7 +2998,7 @@
 			config.end_bridge_callback = end_bridge_callback;
 			config.end_bridge_callback_data = chan;
 			config.end_bridge_callback_data_fixup = end_bridge_callback_data_fixup;
-			
+
 			if (moh) {
 				moh = 0;
 				ast_moh_stop(chan);

Modified: team/dlee/stasis-cache-split/apps/app_directed_pickup.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/stasis-cache-split/apps/app_directed_pickup.c?view=diff&rev=395671&r1=395670&r2=395671
==============================================================================
--- team/dlee/stasis-cache-split/apps/app_directed_pickup.c (original)
+++ team/dlee/stasis-cache-split/apps/app_directed_pickup.c Mon Jul 29 10:46:34 2013
@@ -46,7 +46,6 @@
 #include "asterisk/features.h"
 #include "asterisk/manager.h"
 #include "asterisk/callerid.h"
-#include "asterisk/cel.h"
 
 #define PICKUPMARK "PICKUPMARK"
 

Modified: team/dlee/stasis-cache-split/apps/app_meetme.c

[... 23840 lines stripped ...]



More information about the svn-commits mailing list