[asterisk-commits] mjordan: branch mjordan/cdrs-of-doom r388664 - in /team/mjordan/cdrs-of-doom:...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon May 13 17:23:38 CDT 2013
Author: mjordan
Date: Mon May 13 17:23:26 2013
New Revision: 388664
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=388664
Log:
Merge and resolve conflicts
Added:
team/mjordan/cdrs-of-doom/bridges/bridge_native_rtp.c
- copied unchanged from r388604, team/group/bridge_construction/bridges/bridge_native_rtp.c
team/mjordan/cdrs-of-doom/configs/res_parking.conf.sample
- copied unchanged from r388604, team/group/bridge_construction/configs/res_parking.conf.sample
team/mjordan/cdrs-of-doom/include/asterisk/core_local.h
- copied unchanged from r388604, team/group/bridge_construction/include/asterisk/core_local.h
team/mjordan/cdrs-of-doom/include/asterisk/core_unreal.h
- copied unchanged from r388604, team/group/bridge_construction/include/asterisk/core_unreal.h
team/mjordan/cdrs-of-doom/include/asterisk/endpoints.h
- copied unchanged from r388604, team/group/bridge_construction/include/asterisk/endpoints.h
team/mjordan/cdrs-of-doom/include/asterisk/parking.h
- copied unchanged from r388604, team/group/bridge_construction/include/asterisk/parking.h
team/mjordan/cdrs-of-doom/include/asterisk/stasis_endpoints.h
- copied unchanged from r388604, team/group/bridge_construction/include/asterisk/stasis_endpoints.h
team/mjordan/cdrs-of-doom/include/asterisk/stasis_test.h
- copied unchanged from r388604, team/group/bridge_construction/include/asterisk/stasis_test.h
team/mjordan/cdrs-of-doom/main/core_local.c
- copied unchanged from r388604, team/group/bridge_construction/main/core_local.c
team/mjordan/cdrs-of-doom/main/core_unreal.c
- copied unchanged from r388604, team/group/bridge_construction/main/core_unreal.c
team/mjordan/cdrs-of-doom/main/endpoints.c
- copied unchanged from r388604, team/group/bridge_construction/main/endpoints.c
team/mjordan/cdrs-of-doom/main/parking.c
- copied unchanged from r388604, team/group/bridge_construction/main/parking.c
team/mjordan/cdrs-of-doom/main/stasis_endpoints.c
- copied unchanged from r388604, team/group/bridge_construction/main/stasis_endpoints.c
team/mjordan/cdrs-of-doom/res/parking/ (props changed)
- copied from r388604, team/group/bridge_construction/res/parking/
team/mjordan/cdrs-of-doom/res/parking/parking_applications.c
- copied unchanged from r388604, team/group/bridge_construction/res/parking/parking_applications.c
team/mjordan/cdrs-of-doom/res/parking/parking_bridge.c
- copied unchanged from r388604, team/group/bridge_construction/res/parking/parking_bridge.c
team/mjordan/cdrs-of-doom/res/parking/parking_bridge_features.c
- copied unchanged from r388604, team/group/bridge_construction/res/parking/parking_bridge_features.c
team/mjordan/cdrs-of-doom/res/parking/parking_controller.c
- copied unchanged from r388604, team/group/bridge_construction/res/parking/parking_controller.c
team/mjordan/cdrs-of-doom/res/parking/parking_manager.c
- copied unchanged from r388604, team/group/bridge_construction/res/parking/parking_manager.c
team/mjordan/cdrs-of-doom/res/parking/parking_ui.c
- copied unchanged from r388604, team/group/bridge_construction/res/parking/parking_ui.c
team/mjordan/cdrs-of-doom/res/parking/res_parking.h
- copied unchanged from r388604, team/group/bridge_construction/res/parking/res_parking.h
team/mjordan/cdrs-of-doom/res/res_parking.c
- copied unchanged from r388604, team/group/bridge_construction/res/res_parking.c
team/mjordan/cdrs-of-doom/res/res_stasis_test.c
- copied unchanged from r388604, team/group/bridge_construction/res/res_stasis_test.c
team/mjordan/cdrs-of-doom/res/res_stasis_test.exports.in
- copied unchanged from r388604, team/group/bridge_construction/res/res_stasis_test.exports.in
team/mjordan/cdrs-of-doom/tests/test_endpoints.c
- copied unchanged from r388604, team/group/bridge_construction/tests/test_endpoints.c
team/mjordan/cdrs-of-doom/tests/test_stasis_endpoints.c
- copied unchanged from r388604, team/group/bridge_construction/tests/test_stasis_endpoints.c
Removed:
team/mjordan/cdrs-of-doom/channels/chan_local.c
Modified:
team/mjordan/cdrs-of-doom/ (props changed)
team/mjordan/cdrs-of-doom/CHANGES
team/mjordan/cdrs-of-doom/addons/chan_ooh323.c
team/mjordan/cdrs-of-doom/apps/app_bridgewait.c
team/mjordan/cdrs-of-doom/apps/app_chanspy.c
team/mjordan/cdrs-of-doom/apps/app_confbridge.c
team/mjordan/cdrs-of-doom/apps/app_dial.c
team/mjordan/cdrs-of-doom/apps/app_directory.c
team/mjordan/cdrs-of-doom/apps/app_followme.c
team/mjordan/cdrs-of-doom/apps/app_meetme.c
team/mjordan/cdrs-of-doom/apps/app_mixmonitor.c
team/mjordan/cdrs-of-doom/apps/app_queue.c
team/mjordan/cdrs-of-doom/apps/app_stack.c
team/mjordan/cdrs-of-doom/apps/app_stasis.c
team/mjordan/cdrs-of-doom/apps/app_userevent.c
team/mjordan/cdrs-of-doom/bridges/bridge_builtin_features.c
team/mjordan/cdrs-of-doom/bridges/bridge_holding.c
team/mjordan/cdrs-of-doom/bridges/bridge_simple.c
team/mjordan/cdrs-of-doom/bridges/bridge_softmix.c
team/mjordan/cdrs-of-doom/build_tools/cflags.xml
team/mjordan/cdrs-of-doom/build_tools/post_process_documentation.py
team/mjordan/cdrs-of-doom/channels/chan_agent.c
team/mjordan/cdrs-of-doom/channels/chan_dahdi.c
team/mjordan/cdrs-of-doom/channels/chan_gulp.c
team/mjordan/cdrs-of-doom/channels/chan_h323.c
team/mjordan/cdrs-of-doom/channels/chan_iax2.c
team/mjordan/cdrs-of-doom/channels/chan_jingle.c
team/mjordan/cdrs-of-doom/channels/chan_mgcp.c
team/mjordan/cdrs-of-doom/channels/chan_motif.c
team/mjordan/cdrs-of-doom/channels/chan_sip.c
team/mjordan/cdrs-of-doom/channels/chan_skinny.c
team/mjordan/cdrs-of-doom/channels/chan_unistim.c
team/mjordan/cdrs-of-doom/channels/misdn/isdn_msg_parser.c
team/mjordan/cdrs-of-doom/channels/sig_analog.c
team/mjordan/cdrs-of-doom/channels/sip/include/sip.h
team/mjordan/cdrs-of-doom/funcs/func_global.c
team/mjordan/cdrs-of-doom/include/asterisk.h
team/mjordan/cdrs-of-doom/include/asterisk/_private.h
team/mjordan/cdrs-of-doom/include/asterisk/acl.h
team/mjordan/cdrs-of-doom/include/asterisk/astobj2.h
team/mjordan/cdrs-of-doom/include/asterisk/bridging.h
team/mjordan/cdrs-of-doom/include/asterisk/bridging_features.h
team/mjordan/cdrs-of-doom/include/asterisk/bridging_technology.h
team/mjordan/cdrs-of-doom/include/asterisk/ccss.h
team/mjordan/cdrs-of-doom/include/asterisk/channel.h
team/mjordan/cdrs-of-doom/include/asterisk/config_options.h
team/mjordan/cdrs-of-doom/include/asterisk/event_defs.h
team/mjordan/cdrs-of-doom/include/asterisk/framehook.h
team/mjordan/cdrs-of-doom/include/asterisk/inline_api.h
team/mjordan/cdrs-of-doom/include/asterisk/json.h
team/mjordan/cdrs-of-doom/include/asterisk/lock.h
team/mjordan/cdrs-of-doom/include/asterisk/rtp_engine.h
team/mjordan/cdrs-of-doom/include/asterisk/sorcery.h
team/mjordan/cdrs-of-doom/include/asterisk/stasis.h
team/mjordan/cdrs-of-doom/include/asterisk/stasis_app.h
team/mjordan/cdrs-of-doom/include/asterisk/stasis_bridging.h
team/mjordan/cdrs-of-doom/include/asterisk/stasis_channels.h
team/mjordan/cdrs-of-doom/main/asterisk.c
team/mjordan/cdrs-of-doom/main/astobj2.c
team/mjordan/cdrs-of-doom/main/bridging.c
team/mjordan/cdrs-of-doom/main/bridging_basic.c
team/mjordan/cdrs-of-doom/main/bridging_roles.c
team/mjordan/cdrs-of-doom/main/channel.c
team/mjordan/cdrs-of-doom/main/channel_internal_api.c
team/mjordan/cdrs-of-doom/main/config_options.c
team/mjordan/cdrs-of-doom/main/enum.c
team/mjordan/cdrs-of-doom/main/event.c
team/mjordan/cdrs-of-doom/main/features.c
team/mjordan/cdrs-of-doom/main/json.c
team/mjordan/cdrs-of-doom/main/loader.c
team/mjordan/cdrs-of-doom/main/manager.c
team/mjordan/cdrs-of-doom/main/manager_bridging.c
team/mjordan/cdrs-of-doom/main/manager_channels.c
team/mjordan/cdrs-of-doom/main/named_acl.c
team/mjordan/cdrs-of-doom/main/pbx.c
team/mjordan/cdrs-of-doom/main/rtp_engine.c
team/mjordan/cdrs-of-doom/main/sorcery.c
team/mjordan/cdrs-of-doom/main/srv.c
team/mjordan/cdrs-of-doom/main/stasis_bridging.c
team/mjordan/cdrs-of-doom/main/stasis_cache.c
team/mjordan/cdrs-of-doom/main/stasis_channels.c
team/mjordan/cdrs-of-doom/main/utils.c
team/mjordan/cdrs-of-doom/pbx/pbx_dundi.c
team/mjordan/cdrs-of-doom/res/Makefile
team/mjordan/cdrs-of-doom/res/res_config_odbc.c
team/mjordan/cdrs-of-doom/res/res_config_pgsql.c
team/mjordan/cdrs-of-doom/res/res_rtp_asterisk.c
team/mjordan/cdrs-of-doom/res/res_sip_sdp_rtp.c
team/mjordan/cdrs-of-doom/res/res_sorcery_astdb.c
team/mjordan/cdrs-of-doom/res/res_stasis.c
team/mjordan/cdrs-of-doom/res/res_stasis_http.c
team/mjordan/cdrs-of-doom/res/res_stasis_http_asterisk.c
team/mjordan/cdrs-of-doom/res/res_stasis_http_bridges.c
team/mjordan/cdrs-of-doom/res/res_stasis_http_channels.c
team/mjordan/cdrs-of-doom/res/res_stasis_http_endpoints.c
team/mjordan/cdrs-of-doom/res/res_stasis_http_events.c
team/mjordan/cdrs-of-doom/res/res_stasis_http_playback.c
team/mjordan/cdrs-of-doom/res/res_stasis_http_recordings.c
team/mjordan/cdrs-of-doom/res/res_stasis_http_sounds.c
team/mjordan/cdrs-of-doom/res/res_stasis_websocket.c
team/mjordan/cdrs-of-doom/res/res_stun_monitor.c
team/mjordan/cdrs-of-doom/tests/test_res_stasis.c
team/mjordan/cdrs-of-doom/tests/test_sorcery.c
team/mjordan/cdrs-of-doom/tests/test_stasis_channels.c
team/mjordan/cdrs-of-doom/utils/ (props changed)
team/mjordan/cdrs-of-doom/utils/Makefile
Propchange: team/mjordan/cdrs-of-doom/
------------------------------------------------------------------------------
automerge = *
Propchange: team/mjordan/cdrs-of-doom/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.
Propchange: team/mjordan/cdrs-of-doom/
------------------------------------------------------------------------------
--- cdrs-of-doom-integrated (original)
+++ cdrs-of-doom-integrated Mon May 13 17:23:26 2013
@@ -1,1 +1,1 @@
-/team/group/bridge_construction:1-387051
+/team/group/bridge_construction:1-388648
Modified: team/mjordan/cdrs-of-doom/CHANGES
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/cdrs-of-doom/CHANGES?view=diff&rev=388664&r1=388663&r2=388664
==============================================================================
--- team/mjordan/cdrs-of-doom/CHANGES (original)
+++ team/mjordan/cdrs-of-doom/CHANGES Mon May 13 17:23:26 2013
@@ -92,6 +92,11 @@
------------------
* This application is deprecated in favor of the CHANNEL function.
+UserEvent
+------------------
+ * UserEvent will now handle duplicate keys by overwriting the previous value
+ assigned to the key. UserEvent invocations will also be distributed to any
+ interested res_stasis applications.
Core
------------------
@@ -138,6 +143,19 @@
* The AMI event 'UserEvent' from app_userevent now contains the channel state
fields. The channel state fields will come before the body fields.
+ * The AMI events 'ParkedCall', 'ParkedCallTimeOut', 'ParkedCallGiveUp', and
+ 'UnParkedCall' have changed significantly in the new res_parking module.
+ First, channel snapshot data is included for both the parker and the parkee
+ in lieu of the "From" and "Channel" fields. They follow standard channel
+ snapshot format but each field is suffixed with 'Parker' or 'Parkee'
+ depending on which side it applies to. The 'Exten' field is replaced with
+ 'ParkingSpace' since the registration of extensions as for parking spaces
+ is no longer mandatory.
+
+ * The AMI event 'Parkinglot' (response to 'Parkinglots' command) in a similar
+ fashion has changed the field names 'StartExten' and 'StopExten' to
+ 'StartSpace' and 'StopSpace' respectively.
+
* The deprecated use of | (pipe) as a separator in the channelvars setting in
manager.conf has been removed.
@@ -156,6 +174,8 @@
definition of CDR behavior in Asterisk 12, please read the specification
on the Asterisk wiki (wiki.asterisk.org).
+ * chan_local moved into the system core and is no longer a loadable module.
+
* CDRs will now be created between all participants in a bridge. For each
pair of channels in a bridge, a CDR is created to represent the path of
communication between those two endpoints. This lets an end user choose who
@@ -179,8 +199,8 @@
* Add support for automixmonitor to the BRIDGE_FEATURES channel variable.
- * PARKINGSLOT and PARKEDLOT channel variables will now be set for a parked
- channel even when comebactoorigin=yes
+ * Parking has been pulled from core and placed into a separate module called
+ res_parking. See Parking changes below for more details.
* You can now have the settings for a channel updated using the FEATURE()
and FEATUREMAP() functions inherited to child channels by setting
@@ -194,6 +214,43 @@
* Added the 'queue_log_realtime_use_gmt' option to have timestamps in GMT
for realtime queue log entries.
+
+Parking
+-------------------
+ * Parking is now implemented as a module instead of as core functionality.
+ The preferred way to configure parking is now through res_parking.conf while
+ configuration through features.conf is not currently supported.
+
+ * Parked calls are now placed in bridges. This is a largely architectural change,
+ but it could have some implications in allowing for new parked call retrieval
+ methods and the contents of parking lots will be visible though certain bridge
+ commands.
+
+ * The order of arguments for the new parking application are different from the
+ old one to be more intuitive. Timeout and return context/exten/priority are now
+ implemented as options. parking_lot_name is now the first parameter. See the
+ application documentation for Park for more in-depth information.
+
+ * Extensions are no longer automatically created in the dialplan to park calls,
+ pickup parked calls, etc by default.
+
+ * adsipark is no longer supported under the new parking model
+
+ * The PARKINGSLOT channel variable has been deprecated in favor of PARKING_SPACE
+ to match the naming scheme of the new system.
+
+ * PARKING_SPACE and PARKEDLOT channel variables will now be set for a parked
+ channel even when comebactoorigin=yes
+
+ * New CLI command 'parking show' allows you to inspect the currently in use
+ parking lots. 'parking show <parkinglot>' will also show the parked calls
+ in that specific parking lot.
+
+ * The CLI command 'parkedcalls' is now deprecated in favor of
+ 'parking show <parkinglot>'.
+
+ * The AMI command 'ParkedCalls' will now accept a 'ParkingLot' argument which
+ can be used to get a list of parked calls only for a specific parking lot.
Realtime
------------------
Modified: team/mjordan/cdrs-of-doom/addons/chan_ooh323.c
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/cdrs-of-doom/addons/chan_ooh323.c?view=diff&rev=388664&r1=388663&r2=388664
==============================================================================
--- team/mjordan/cdrs-of-doom/addons/chan_ooh323.c (original)
+++ team/mjordan/cdrs-of-doom/addons/chan_ooh323.c Mon May 13 17:23:26 2013
@@ -117,7 +117,6 @@
.fixup = ooh323_fixup,
.send_html = 0,
.queryoption = ooh323_queryoption,
- .bridge = ast_rtp_instance_bridge, /* XXX chan unlocked ? */
.early_bridge = ast_rtp_instance_early_bridge,
.func_channel_read = function_ooh323_read,
.func_channel_write = function_ooh323_write,
Modified: team/mjordan/cdrs-of-doom/apps/app_bridgewait.c
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/cdrs-of-doom/apps/app_bridgewait.c?view=diff&rev=388664&r1=388663&r2=388664
==============================================================================
--- team/mjordan/cdrs-of-doom/apps/app_bridgewait.c (original)
+++ team/mjordan/cdrs-of-doom/apps/app_bridgewait.c Mon May 13 17:23:26 2013
@@ -28,6 +28,7 @@
*/
/*** MODULEINFO
+ <depend>bridge_holding</depend>
<support_level>core</support_level>
***/
@@ -197,7 +198,7 @@
if (!holding_bridge) {
holding_bridge = ast_bridge_base_new(AST_BRIDGE_CAPABILITY_HOLDING,
AST_BRIDGE_FLAG_MERGE_INHIBIT_TO | AST_BRIDGE_FLAG_MERGE_INHIBIT_FROM
- | AST_BRIDGE_FLAG_SWAP_INHIBIT_FROM);
+ | AST_BRIDGE_FLAG_SWAP_INHIBIT_FROM | AST_BRIDGE_FLAG_TRANSFER_PROHIBITED);
}
ast_mutex_unlock(&bridgewait_lock);
if (!holding_bridge) {
Modified: team/mjordan/cdrs-of-doom/apps/app_chanspy.c
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/cdrs-of-doom/apps/app_chanspy.c?view=diff&rev=388664&r1=388663&r2=388664
==============================================================================
--- team/mjordan/cdrs-of-doom/apps/app_chanspy.c (original)
+++ team/mjordan/cdrs-of-doom/apps/app_chanspy.c Mon May 13 17:23:26 2013
@@ -482,15 +482,18 @@
static int start_spying(struct ast_autochan *autochan, const char *spychan_name, struct ast_audiohook *audiohook)
{
int res = 0;
- struct ast_channel *peer = NULL;
ast_log(LOG_NOTICE, "Attaching %s to %s\n", spychan_name, ast_channel_name(autochan->chan));
ast_set_flag(audiohook, AST_AUDIOHOOK_TRIGGER_SYNC | AST_AUDIOHOOK_SMALL_QUEUE);
res = ast_audiohook_attach(autochan->chan, audiohook);
- if (!res && ast_test_flag(ast_channel_flags(autochan->chan), AST_FLAG_NBRIDGE) && (peer = ast_bridged_channel(autochan->chan))) {
- ast_softhangup(peer, AST_SOFTHANGUP_UNBRIDGE);
+ if (!res) {
+ ast_channel_lock(autochan->chan);
+ if (ast_channel_is_bridged(autochan->chan)) {
+ ast_softhangup_nolock(autochan->chan, AST_SOFTHANGUP_UNBRIDGE);
+ }
+ ast_channel_unlock(autochan->chan);
}
return res;
}
Modified: team/mjordan/cdrs-of-doom/apps/app_confbridge.c
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/cdrs-of-doom/apps/app_confbridge.c?view=diff&rev=388664&r1=388663&r2=388664
==============================================================================
--- team/mjordan/cdrs-of-doom/apps/app_confbridge.c (original)
+++ team/mjordan/cdrs-of-doom/apps/app_confbridge.c Mon May 13 17:23:26 2013
@@ -1323,7 +1323,7 @@
/* Create an actual bridge that will do the audio mixing */
conference->bridge = ast_bridge_base_new(AST_BRIDGE_CAPABILITY_MULTIMIX,
- AST_BRIDGE_FLAG_MASQUERADE_ONLY);
+ AST_BRIDGE_FLAG_MASQUERADE_ONLY | AST_BRIDGE_FLAG_TRANSFER_BRIDGE_ONLY);
if (!conference->bridge) {
ao2_ref(conference, -1);
conference = NULL;
Modified: team/mjordan/cdrs-of-doom/apps/app_dial.c
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/cdrs-of-doom/apps/app_dial.c?view=diff&rev=388664&r1=388663&r2=388664
==============================================================================
--- team/mjordan/cdrs-of-doom/apps/app_dial.c (original)
+++ team/mjordan/cdrs-of-doom/apps/app_dial.c Mon May 13 17:23:26 2013
@@ -26,7 +26,6 @@
*/
/*** MODULEINFO
- <depend>chan_local</depend>
<support_level>core</support_level>
***/
Modified: team/mjordan/cdrs-of-doom/apps/app_directory.c
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/cdrs-of-doom/apps/app_directory.c?view=diff&rev=388664&r1=388663&r2=388664
==============================================================================
--- team/mjordan/cdrs-of-doom/apps/app_directory.c (original)
+++ team/mjordan/cdrs-of-doom/apps/app_directory.c Mon May 13 17:23:26 2013
@@ -440,7 +440,7 @@
static struct ast_config *realtime_directory(char *context)
{
struct ast_config *cfg;
- struct ast_config *rtdata;
+ struct ast_config *rtdata = NULL;
struct ast_category *cat;
struct ast_variable *var;
char *mailbox;
@@ -475,7 +475,7 @@
rtdata = ast_load_realtime_multientry("voicemail", "mailbox LIKE", "%", "context", "default", SENTINEL);
context = "default";
}
- } else {
+ } else if (!ast_strlen_zero(context)) {
rtdata = ast_load_realtime_multientry("voicemail", "mailbox LIKE", "%", "context", context, SENTINEL);
}
Modified: team/mjordan/cdrs-of-doom/apps/app_followme.c
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/cdrs-of-doom/apps/app_followme.c?view=diff&rev=388664&r1=388663&r2=388664
==============================================================================
--- team/mjordan/cdrs-of-doom/apps/app_followme.c (original)
+++ team/mjordan/cdrs-of-doom/apps/app_followme.c Mon May 13 17:23:26 2013
@@ -36,7 +36,6 @@
*/
/*** MODULEINFO
- <depend>chan_local</depend>
<support_level>core</support_level>
***/
Modified: team/mjordan/cdrs-of-doom/apps/app_meetme.c
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/cdrs-of-doom/apps/app_meetme.c?view=diff&rev=388664&r1=388663&r2=388664
==============================================================================
--- team/mjordan/cdrs-of-doom/apps/app_meetme.c (original)
+++ team/mjordan/cdrs-of-doom/apps/app_meetme.c Mon May 13 17:23:26 2013
@@ -6447,8 +6447,8 @@
struct sla_station *station;
struct sla_trunk *trunk;
- if (!AST_LIST_EMPTY(&sla.event_q) || !AST_LIST_EMPTY(&sla.ringing_trunks)
- || !AST_LIST_EMPTY(&sla.ringing_stations)) {
+ if (!AST_LIST_EMPTY(&sla.event_q) || !AST_LIST_EMPTY(&sla.ringing_trunks)
+ || !AST_LIST_EMPTY(&sla.ringing_stations) || !AST_LIST_EMPTY(&sla.failed_stations)) {
return;
}
@@ -6464,8 +6464,9 @@
AST_RWLIST_RDLOCK(&sla_trunks);
AST_RWLIST_TRAVERSE(&sla_trunks, trunk, entry) {
- if (trunk->ref_count)
+ if (trunk->ref_count || trunk->chan || trunk->active_stations || trunk->hold_stations) {
break;
+ }
}
AST_RWLIST_UNLOCK(&sla_trunks);
if (trunk) {
@@ -6718,7 +6719,7 @@
return 0;
}
- AST_RWLIST_RDLOCK(&sla_stations);
+ AST_RWLIST_WRLOCK(&sla_stations);
station = sla_find_station(station_name);
if (station)
ast_atomic_fetchadd_int((int *) &station->ref_count, 1);
@@ -6930,7 +6931,7 @@
}
}
- AST_RWLIST_RDLOCK(&sla_trunks);
+ AST_RWLIST_WRLOCK(&sla_trunks);
trunk = sla_find_trunk(args.trunk_name);
if (trunk)
ast_atomic_fetchadd_int((int *) &trunk->ref_count, 1);
Modified: team/mjordan/cdrs-of-doom/apps/app_mixmonitor.c
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/cdrs-of-doom/apps/app_mixmonitor.c?view=diff&rev=388664&r1=388663&r2=388664
==============================================================================
--- team/mjordan/cdrs-of-doom/apps/app_mixmonitor.c (original)
+++ team/mjordan/cdrs-of-doom/apps/app_mixmonitor.c Mon May 13 17:23:26 2013
@@ -411,7 +411,6 @@
static int startmon(struct ast_channel *chan, struct ast_audiohook *audiohook)
{
- struct ast_channel *peer = NULL;
int res = 0;
if (!chan)
@@ -419,8 +418,13 @@
ast_audiohook_attach(chan, audiohook);
- if (!res && ast_test_flag(ast_channel_flags(chan), AST_FLAG_NBRIDGE) && (peer = ast_bridged_channel(chan)))
- ast_softhangup(peer, AST_SOFTHANGUP_UNBRIDGE);
+ if (!res) {
+ ast_channel_lock(chan);
+ if (ast_channel_is_bridged(chan)) {
+ ast_softhangup_nolock(chan, AST_SOFTHANGUP_UNBRIDGE);
+ }
+ ast_channel_unlock(chan);
+ }
return res;
}
Modified: team/mjordan/cdrs-of-doom/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/cdrs-of-doom/apps/app_queue.c?view=diff&rev=388664&r1=388663&r2=388664
==============================================================================
--- team/mjordan/cdrs-of-doom/apps/app_queue.c (original)
+++ team/mjordan/cdrs-of-doom/apps/app_queue.c Mon May 13 17:23:26 2013
@@ -5247,7 +5247,7 @@
}
/* if the calling channel has AST_CAUSE_ANSWERED_ELSEWHERE set, make sure this is inherited.
- (this is mainly to support chan_local)
+ (this is mainly to support unreal/local channels)
*/
if (ast_channel_hangupcause(qe->chan) == AST_CAUSE_ANSWERED_ELSEWHERE) {
qe->cancel_answered_elsewhere = 1;
@@ -9845,6 +9845,31 @@
if (reload_handler(0, &mask, NULL))
return AST_MODULE_LOAD_DECLINE;
+ ast_realtime_require_field("queue_members", "paused", RQ_INTEGER1, 1, "uniqueid", RQ_UINTEGER2, 5, SENTINEL);
+
+ /*
+ * This section is used to determine which name for 'ringinuse' to use in realtime members
+ * Necessary for supporting older setups.
+ */
+ member_config = ast_load_realtime_multientry("queue_members", "interface LIKE", "%", "queue_name LIKE", "%", SENTINEL);
+ if (!member_config) {
+ realtime_ringinuse_field = "ringinuse";
+ } else {
+ const char *config_val;
+ if ((config_val = ast_variable_retrieve(member_config, NULL, "ringinuse"))) {
+ ast_log(LOG_NOTICE, "ringinuse field entries found in queue_members table. Using 'ringinuse'\n");
+ realtime_ringinuse_field = "ringinuse";
+ } else if ((config_val = ast_variable_retrieve(member_config, NULL, "ignorebusy"))) {
+ ast_log(LOG_NOTICE, "ignorebusy field found in queue_members table with no ringinuse field. Using 'ignorebusy'\n");
+ realtime_ringinuse_field = "ignorebusy";
+ } else {
+ ast_log(LOG_NOTICE, "No entries were found for ringinuse/ignorebusy in queue_members table. Using 'ringinuse'\n");
+ realtime_ringinuse_field = "ringinuse";
+ }
+ }
+
+ ast_config_destroy(member_config);
+
if (queue_persistent_members)
reload_queue_members();
@@ -9884,31 +9909,6 @@
ast_extension_state_add(NULL, NULL, extension_state_cb, NULL);
- ast_realtime_require_field("queue_members", "paused", RQ_INTEGER1, 1, "uniqueid", RQ_UINTEGER2, 5, SENTINEL);
-
- /*
- * This section is used to determine which name for 'ringinuse' to use in realtime members
- * Necessary for supporting older setups.
- */
- member_config = ast_load_realtime_multientry("queue_members", "interface LIKE", "%", "queue_name LIKE", "%", SENTINEL);
- if (!member_config) {
- realtime_ringinuse_field = "ringinuse";
- } else {
- const char *config_val;
- if ((config_val = ast_variable_retrieve(member_config, NULL, "ringinuse"))) {
- ast_log(LOG_NOTICE, "ringinuse field entries found in queue_members table. Using 'ringinuse'\n");
- realtime_ringinuse_field = "ringinuse";
- } else if ((config_val = ast_variable_retrieve(member_config, NULL, "ignorebusy"))) {
- ast_log(LOG_NOTICE, "ignorebusy field found in queue_members table with no ringinuse field. Using 'ignorebusy'\n");
- realtime_ringinuse_field = "ignorebusy";
- } else {
- ast_log(LOG_NOTICE, "No entries were found for ringinuse/ignorebusy in queue_members table. Using 'ringinuse'\n");
- realtime_ringinuse_field = "ringinuse";
- }
- }
-
- ast_config_destroy(member_config);
-
return res ? AST_MODULE_LOAD_DECLINE : 0;
}
Modified: team/mjordan/cdrs-of-doom/apps/app_stack.c
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/cdrs-of-doom/apps/app_stack.c?view=diff&rev=388664&r1=388663&r2=388664
==============================================================================
--- team/mjordan/cdrs-of-doom/apps/app_stack.c (original)
+++ team/mjordan/cdrs-of-doom/apps/app_stack.c Mon May 13 17:23:26 2013
@@ -40,6 +40,7 @@
#include "asterisk/manager.h"
#include "asterisk/channel.h"
#include "asterisk/agi.h"
+#include "asterisk/stasis_channels.h"
/*** DOCUMENTATION
<application name="Gosub" language="en_US">
@@ -202,7 +203,32 @@
<para>Cause the channel to execute the specified dialplan subroutine,
returning to the dialplan with execution of a Return().</para>
</description>
+ <see-also>
+ <ref type="application">GoSub</ref>
+ </see-also>
</agi>
+ <managerEvent language="en_US" name="VarSet">
+ <managerEventInstance class="EVENT_FLAG_DIALPLAN">
+ <synopsis>Raised when a variable local to the gosub stack frame is set due to a subroutine call.</synopsis>
+ <syntax>
+ <xi:include xpointer="xpointer(/docs/managerEvent[@name='Newchannel']/managerEventInstance/syntax/parameter)" />
+ <parameter name="Variable">
+ <para>The LOCAL variable being set.</para>
+ <note><para>The variable name will always be enclosed with
+ <literal>LOCAL()</literal></para></note>
+ </parameter>
+ <parameter name="Value">
+ <para>The new value of the variable.</para>
+ </parameter>
+ </syntax>
+ <see-also>
+ <ref type="application">GoSub</ref>
+ <ref type="agi">gosub</ref>
+ <ref type="function">LOCAL</ref>
+ <ref type="function">LOCAL_PEEK</ref>
+ </see-also>
+ </managerEventInstance>
+ </managerEvent>
***/
static const char app_gosub[] = "Gosub";
@@ -235,6 +261,8 @@
{
struct ast_var_t *variables;
int found = 0;
+ int len;
+ RAII_VAR(char *, local_buffer, NULL, ast_free);
/* Does this variable already exist? */
AST_LIST_TRAVERSE(&frame->varshead, variables, entries) {
@@ -252,20 +280,13 @@
pbx_builtin_setvar_helper(chan, var, value);
}
- /*** DOCUMENTATION
- <managerEventInstance>
- <synopsis>Raised when a LOCAL channel variable is set due to a subroutine call.</synopsis>
- <see-also>
- <ref type="application">GoSub</ref>
- </see-also>
- </managerEventInstance>
- ***/
- manager_event(EVENT_FLAG_DIALPLAN, "VarSet",
- "Channel: %s\r\n"
- "Variable: LOCAL(%s)\r\n"
- "Value: %s\r\n"
- "Uniqueid: %s\r\n",
- ast_channel_name(chan), var, value, ast_channel_uniqueid(chan));
+ len = 8 + strlen(var); /* LOCAL() + var */
+ local_buffer = ast_malloc(len);
+ if (!local_buffer) {
+ return 0;
+ }
+ sprintf(local_buffer, "LOCAL(%s)", var);
+ ast_channel_publish_varset(chan, local_buffer, value);
return 0;
}
Modified: team/mjordan/cdrs-of-doom/apps/app_stasis.c
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/cdrs-of-doom/apps/app_stasis.c?view=diff&rev=388664&r1=388663&r2=388664
==============================================================================
--- team/mjordan/cdrs-of-doom/apps/app_stasis.c (original)
+++ team/mjordan/cdrs-of-doom/apps/app_stasis.c Mon May 13 17:23:26 2013
@@ -93,6 +93,7 @@
{
int r = 0;
+ stasis_app_ref();
r |= ast_register_application_xml(stasis, app_exec);
return r;
}
@@ -100,12 +101,15 @@
static int unload_module(void)
{
int r = 0;
-
r |= ast_unregister_application(stasis);
+ stasis_app_unref();
return r;
}
-AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS,
- "Stasis dialplan application",
- .load = load_module,
- .unload = unload_module);
+AST_MODULE_INFO(ASTERISK_GPL_KEY,
+ AST_MODFLAG_DEFAULT,
+ "Stasis dialplan application",
+ .load = load_module,
+ .unload = unload_module,
+ .nonoptreq = "res_stasis",
+ );
Modified: team/mjordan/cdrs-of-doom/apps/app_userevent.c
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/cdrs-of-doom/apps/app_userevent.c?view=diff&rev=388664&r1=388663&r2=388664
==============================================================================
--- team/mjordan/cdrs-of-doom/apps/app_userevent.c (original)
+++ team/mjordan/cdrs-of-doom/apps/app_userevent.c Mon May 13 17:23:26 2013
@@ -39,23 +39,28 @@
/*** DOCUMENTATION
<application name="UserEvent" language="en_US">
<synopsis>
- Send an arbitrary event to the manager interface.
+ Send an arbitrary user-defined event to parties interested in a channel (AMI users and relevant res_stasis applications).
</synopsis>
<syntax>
<parameter name="eventname" required="true" />
<parameter name="body" />
</syntax>
<description>
- <para>Sends an arbitrary event to the manager interface, with an optional
+ <para>Sends an arbitrary event to interested parties, with an optional
<replaceable>body</replaceable> representing additional arguments. The
<replaceable>body</replaceable> may be specified as
- a <literal>,</literal> delimited list of headers. Each additional
- argument will be placed on a new line in the event. The format of the
- event will be:</para>
+ a <literal>,</literal> delimited list of key:value pairs.</para>
+ <para>For AMI, each additional argument will be placed on a new line in
+ the event and the format of the event will be:</para>
<para> Event: UserEvent</para>
<para> UserEvent: <specified event name></para>
<para> [body]</para>
- <para>If no <replaceable>body</replaceable> is specified, only Event and UserEvent headers will be present.</para>
+ <para>If no <replaceable>body</replaceable> is specified, only Event and
+ UserEvent headers will be present.</para>
+ <para>For res_stasis applications, the event will be provided as a JSON
+ blob with additional arguments appearing as keys in the object and the
+ <replaceable>eventname</replaceable> under the
+ <literal>eventname</literal> key.</para>
</description>
</application>
***/
@@ -70,7 +75,6 @@
AST_APP_ARG(eventname);
AST_APP_ARG(extra)[100];
);
- RAII_VAR(struct ast_str *, body, ast_str_create(16), ast_free);
RAII_VAR(struct ast_json *, blob, NULL, ast_json_unref);
RAII_VAR(struct stasis_message *, msg, NULL, ao2_cleanup);
@@ -79,29 +83,41 @@
return -1;
}
- if (!body) {
- ast_log(LOG_WARNING, "Unable to allocate buffer\n");
- return -1;
- }
-
parse = ast_strdupa(data);
AST_STANDARD_APP_ARGS(args, parse);
- for (x = 0; x < args.argc - 1; x++) {
- ast_str_append(&body, 0, "%s\r\n", args.extra[x]);
- }
-
- blob = ast_json_pack("{s: s, s: s, s: s}",
+ blob = ast_json_pack("{s: s, s: s}",
"type", "userevent",
- "eventname", args.eventname,
- "body", ast_str_buffer(body));
+ "eventname", args.eventname);
if (!blob) {
- ast_log(LOG_WARNING, "Unable to create message buffer\n");
return -1;
}
- msg = ast_channel_blob_create(chan, blob);
+ for (x = 0; x < args.argc - 1; x++) {
+ char *key, *value = args.extra[x];
+ struct ast_json *json_value;
+
+ key = strsep(&value, ":");
+ if (!value) {
+ /* no ':' in string? */
+ continue;
+ }
+
+ value = ast_strip(value);
+ json_value = ast_json_string_create(value);
+ if (!json_value) {
+ return -1;
+ }
+
+ /* ref stolen by ast_json_object_set */
+ if (ast_json_object_set(blob, key, json_value)) {
+ return -1;
+ }
+ }
+
+ msg = ast_channel_blob_create(
+ chan, ast_channel_user_event_type(), blob);
if (!msg) {
return -1;
}
Modified: team/mjordan/cdrs-of-doom/bridges/bridge_builtin_features.c
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/cdrs-of-doom/bridges/bridge_builtin_features.c?view=diff&rev=388664&r1=388663&r2=388664
==============================================================================
--- team/mjordan/cdrs-of-doom/bridges/bridge_builtin_features.c (original)
+++ team/mjordan/cdrs-of-doom/bridges/bridge_builtin_features.c Mon May 13 17:23:26 2013
@@ -48,6 +48,7 @@
#include "asterisk/app.h"
#include "asterisk/astobj2.h"
#include "asterisk/pbx.h"
+#include "asterisk/parking.h"
/*!
* \brief Helper function that presents dialtone and grabs extension
@@ -102,14 +103,9 @@
int cause;
/* Fill the variable with the extension and context we want to call */
-/* BUGBUG if local channel optimization is using masquerades then this needs /n so the destination keeps its DTMF features.
- * Or use /n to keep the peer channel stable until after the atxfer completes and remove the /n from the channel.
- *
- * Local channel optimization currently is disabled because I don't set the chan->bridge pointers.
- */
snprintf(destination, sizeof(destination), "%s@%s", exten, context);
- /* Now we request that chan_local prepare to call the destination */
+ /* Now we request a local channel to prepare to call the destination */
chan = ast_request("Local", ast_channel_nativeformats(caller), caller, destination,
&cause);
if (!chan) {
@@ -170,6 +166,7 @@
struct ast_channel *chan = NULL;
struct ast_bridge_features_blind_transfer *blind_transfer = hook_pvt;
const char *context;
+ struct ast_exten *park_exten;
/* BUGBUG the peer needs to be put on hold for the transfer. */
ast_channel_lock(bridge_channel->chan);
@@ -179,6 +176,16 @@
/* Grab the extension to transfer to */
if (grab_transfer(bridge_channel->chan, exten, sizeof(exten), context)) {
+ return 0;
+ }
+
+ /* Parking blind transfer override - phase this out for something more general purpose in the future. */
+ park_exten = ast_get_parking_exten(exten, bridge_channel->chan, context);
+ if (park_exten) {
+ /* We are transfering the transferee to a parking lot. */
+ if (ast_park_blind_xfer(bridge, bridge_channel, park_exten)) {
+ ast_log(LOG_ERROR, "%s attempted to transfer to park application and failed.\n", ast_channel_name(bridge_channel->chan));
+ };
return 0;
}
@@ -308,8 +315,7 @@
}
/* Create a bridge to use to talk to the person we are calling */
- attended_bridge = ast_bridge_base_new(
- AST_BRIDGE_CAPABILITY_NATIVE | AST_BRIDGE_CAPABILITY_1TO1MIX,
+ attended_bridge = ast_bridge_base_new(AST_BRIDGE_CAPABILITY_1TO1MIX,
AST_BRIDGE_FLAG_DISSOLVE_HANGUP);
if (!attended_bridge) {
ast_bridge_features_cleanup(&caller_features);
@@ -349,10 +355,13 @@
* to fully support existing functionality. There will be one
* and only one ast_bridge_channel structure per channel.
*/
- /* Point the channel back to the original bridge_channel. */
+ /* Point the channel back to the original bridge and bridge_channel. */
+ ast_bridge_channel_lock(bridge_channel);
ast_channel_lock(bridge_channel->chan);
ast_channel_internal_bridge_channel_set(bridge_channel->chan, bridge_channel);
+ ast_channel_internal_bridge_set(bridge_channel->chan, bridge_channel->bridge);
ast_channel_unlock(bridge_channel->chan);
+ ast_bridge_channel_unlock(bridge_channel);
/* Wait for peer thread to exit bridge and die. */
if (!ast_autoservice_start(bridge_channel->chan)) {
Modified: team/mjordan/cdrs-of-doom/bridges/bridge_holding.c
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/cdrs-of-doom/bridges/bridge_holding.c?view=diff&rev=388664&r1=388663&r2=388664
==============================================================================
--- team/mjordan/cdrs-of-doom/bridges/bridge_holding.c (original)
+++ team/mjordan/cdrs-of-doom/bridges/bridge_holding.c Mon May 13 17:23:26 2013
@@ -283,7 +283,7 @@
static struct ast_bridge_technology holding_bridge = {
.name = "holding_bridge",
.capabilities = AST_BRIDGE_CAPABILITY_HOLDING,
- .preference = AST_BRIDGE_PREFERENCE_MEDIUM,
+ .preference = AST_BRIDGE_PREFERENCE_BASE_HOLDING,
.write = holding_bridge_write,
.join = holding_bridge_join,
.leave = holding_bridge_leave,
Modified: team/mjordan/cdrs-of-doom/bridges/bridge_simple.c
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/cdrs-of-doom/bridges/bridge_simple.c?view=diff&rev=388664&r1=388663&r2=388664
==============================================================================
--- team/mjordan/cdrs-of-doom/bridges/bridge_simple.c (original)
+++ team/mjordan/cdrs-of-doom/bridges/bridge_simple.c Mon May 13 17:23:26 2013
@@ -85,7 +85,7 @@
static struct ast_bridge_technology simple_bridge = {
.name = "simple_bridge",
.capabilities = AST_BRIDGE_CAPABILITY_1TO1MIX,
- .preference = AST_BRIDGE_PREFERENCE_MEDIUM,
+ .preference = AST_BRIDGE_PREFERENCE_BASE_1TO1MIX,
.join = simple_bridge_join,
.write = simple_bridge_write,
};
Modified: team/mjordan/cdrs-of-doom/bridges/bridge_softmix.c
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/cdrs-of-doom/bridges/bridge_softmix.c?view=diff&rev=388664&r1=388663&r2=388664
==============================================================================
--- team/mjordan/cdrs-of-doom/bridges/bridge_softmix.c (original)
+++ team/mjordan/cdrs-of-doom/bridges/bridge_softmix.c Mon May 13 17:23:26 2013
@@ -1099,7 +1099,7 @@
static struct ast_bridge_technology softmix_bridge = {
.name = "softmix",
.capabilities = AST_BRIDGE_CAPABILITY_MULTIMIX,
- .preference = AST_BRIDGE_PREFERENCE_LOW,
+ .preference = AST_BRIDGE_PREFERENCE_BASE_MULTIMIX,
.create = softmix_bridge_create,
.destroy = softmix_bridge_destroy,
.join = softmix_bridge_join,
[... 13274 lines stripped ...]
More information about the asterisk-commits
mailing list