[asterisk-commits] kmoore: branch kmoore/bridge_construction-cel_bridging r389453 - in /team/kmo...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue May 21 17:28:07 CDT 2013


Author: kmoore
Date: Tue May 21 17:28:01 2013
New Revision: 389453

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=389453
Log:
Multiple revisions 389332-389333,389338,389341,389361,389372,389385,389410,389424,389432,389448

........
  r389332 | kmoore | 2013-05-20 17:07:42 -0500 (Mon, 20 May 2013) | 1 line
  
  Something missed in the rework, make sure we use the right type
........
  r389333 | kmoore | 2013-05-20 17:09:03 -0500 (Mon, 20 May 2013) | 1 line
  
  Constification
........
  r389338 | kmoore | 2013-05-21 07:50:47 -0500 (Tue, 21 May 2013) | 1 line
  
  Make sure that remove is properly searching by key
........
  r389341 | kmoore | 2013-05-21 08:54:29 -0500 (Tue, 21 May 2013) | 1 line
  
  Fix a bug where the dialstatus wasn't saved correctly
........
  r389361 | root | 2013-05-21 10:18:56 -0500 (Tue, 21 May 2013) | 8 lines
  
  Fixed some extra field assertion when the event WebSocket is connected
  ........
  
  Merged revisions 389343 from file:///srv/subversion/repos/asterisk/trunk
  ........
  
  Merged revisions 389356 from file:///srv/subversion/repos/asterisk/team/group/bridge_construction
........
  r389372 | root | 2013-05-21 12:17:36 -0500 (Tue, 21 May 2013) | 42 lines
  
  Multiple revisions 389369-389371
  
  ........
    r389369 | rmudgett | 2013-05-21 11:40:24 -0500 (Tue, 21 May 2013) | 4 lines
    
    Eliminate most calls to ast_channel_internal_bridged_channel().
    
    Review: https://reviewboard.asterisk.org/r/2558/
  ........
    r389370 | rmudgett | 2013-05-21 11:53:55 -0500 (Tue, 21 May 2013) | 24 lines
    
    Make ConfBridge use its own unreal announcer channel driver and delete chan_bridge.
    
    * Made the ConfBridge recorder channel driver type name and channel name
    consistent.  Before the channel driver type was ConfBridgeRec and the
    created channel name was ConfBridgeRecorder/conf-%s-uid-%d.  Now it is
    CBRec and CBRec/conf-%s-uid-%d respectively.
    
    * Replaced ConfBridge usage of chan_bridge with its own announcer channel.
    
    * Deleted chan_bridge since it was created just for ConfBridge and it no
    longer uses it.
    
    * The CBRec and CBAnn drivers set the recorder and announcer bridge
    channel roles respectively and are marked as IMMOVABLE to bridge merges
    and channel moves.
    
    * Extracted the CBRec and CBAnn ConfBridge special channel drivers into
    their own files for ConfBridge.
    
    (issue ASTERISK-21271)
    Reporter: Matt Jordan
    
    Review: https://reviewboard.asterisk.org/r/2551/
  ........
    r389371 | rmudgett | 2013-05-21 12:17:12 -0500 (Tue, 21 May 2013) | 1 line
    
    Add some BUGBUG comments for channels needing native bridging work.
  ........
  
  Merged revisions 389369-389371 from file:///srv/subversion/repos/asterisk/team/group/bridge_construction
........
  r389385 | root | 2013-05-21 13:19:58 -0500 (Tue, 21 May 2013) | 16 lines
  
  Merge in the bridge_construction branch to make the system use the Bridging API.
  
  Breaks many things until they can be reworked.  A partial list:
  chan_agent
  chan_dahdi, chan_misdn, chan_iax2 native bridging
  app_queue
  COLP updates
  DTMF attended transfers
  Protocol attended transfers
  ........
  
  Merged revisions 389378 from file:///srv/subversion/repos/asterisk/trunk
  ........
  
  Merged revisions 389379 from file:///srv/subversion/repos/asterisk/team/group/bridge_construction
........
  r389410 | root | 2013-05-21 14:18:47 -0500 (Tue, 21 May 2013) | 26 lines
  
  Multiple revisions 389403,389405
  
  ........
    r389403 | rmudgett | 2013-05-21 13:50:54 -0500 (Tue, 21 May 2013) | 1 line
    
    Complete reversion of a backed out change.
  ........
    r389405 | root | 2013-05-21 14:17:20 -0500 (Tue, 21 May 2013) | 14 lines
    
    Raise the ConfBridgeMute/Unmute events when a CLI or AMI action triggers the change
    
    New in 12 are the ConfBridgeMute/Unmute events, which are triggered when a user
    changes their mute/unmute state. This was typically triggered when a user hit a
    DTMF key that triggered the mute/unmute menu handler. Forgotten in this is when an
    AMI action or CLI command triggers the mute/unmute. This patch now raises the
    events in those situations as well.
    
    (closes issue ASTERISK-21802)
    Reported by: Birger "WIMPy" Harzenetter
    ........
    
    Merged revisions 389402 from file:///srv/subversion/repos/asterisk/trunk
  ........
  
  Merged revisions 389403,389405 from file:///srv/subversion/repos/asterisk/team/group/bridge_construction
........
  r389424 | kmoore | 2013-05-21 15:31:43 -0500 (Tue, 21 May 2013) | 1 line
  
  Get CEL core converted over to the config framework, still needs some tweaks from mjordan's CDR rework
........
  r389432 | root | 2013-05-21 16:18:48 -0500 (Tue, 21 May 2013) | 11 lines
  
  Conditional out more app_queue logging that needs to be reworked.
  
  Fixes crash because app_queue was unconditionally freeing a datastore that
  was still on a channel.
  ........
  
  Merged revisions 389426 from file:///srv/subversion/repos/asterisk/trunk
  ........
  
  Merged revisions 389427 from file:///srv/subversion/repos/asterisk/team/group/bridge_construction
........
  r389448 | kmoore | 2013-05-21 16:39:06 -0500 (Tue, 21 May 2013) | 1 line
  
  Pull in config tweak from the CDR patch and refactor accordingly
........

Merged revisions 389332-389333,389338,389341,389361,389372,389385,389410,389424,389432,389448 from http://svn.asterisk.org/svn/asterisk/team/kmoore/bridge_construction-cel_channels

Added:
    team/kmoore/bridge_construction-cel_bridging/apps/confbridge/conf_chan_announce.c
      - copied unchanged from r389448, team/kmoore/bridge_construction-cel_channels/apps/confbridge/conf_chan_announce.c
    team/kmoore/bridge_construction-cel_bridging/apps/confbridge/conf_chan_record.c
      - copied unchanged from r389448, team/kmoore/bridge_construction-cel_channels/apps/confbridge/conf_chan_record.c
Removed:
    team/kmoore/bridge_construction-cel_bridging/channels/chan_bridge.c
Modified:
    team/kmoore/bridge_construction-cel_bridging/   (props changed)
    team/kmoore/bridge_construction-cel_bridging/CHANGES
    team/kmoore/bridge_construction-cel_bridging/apps/app_confbridge.c
    team/kmoore/bridge_construction-cel_bridging/apps/app_dumpchan.c
    team/kmoore/bridge_construction-cel_bridging/apps/app_queue.c
    team/kmoore/bridge_construction-cel_bridging/apps/app_userevent.c
    team/kmoore/bridge_construction-cel_bridging/apps/confbridge/confbridge_manager.c
    team/kmoore/bridge_construction-cel_bridging/apps/confbridge/include/confbridge.h
    team/kmoore/bridge_construction-cel_bridging/channels/chan_agent.c
    team/kmoore/bridge_construction-cel_bridging/channels/chan_dahdi.c
    team/kmoore/bridge_construction-cel_bridging/channels/chan_iax2.c
    team/kmoore/bridge_construction-cel_bridging/channels/chan_misdn.c
    team/kmoore/bridge_construction-cel_bridging/channels/chan_unistim.c
    team/kmoore/bridge_construction-cel_bridging/channels/chan_vpb.cc
    team/kmoore/bridge_construction-cel_bridging/include/asterisk/channel.h
    team/kmoore/bridge_construction-cel_bridging/include/asterisk/config_options.h
    team/kmoore/bridge_construction-cel_bridging/include/asterisk/strings.h
    team/kmoore/bridge_construction-cel_bridging/main/cel.c
    team/kmoore/bridge_construction-cel_bridging/main/channel.c
    team/kmoore/bridge_construction-cel_bridging/main/cli.c
    team/kmoore/bridge_construction-cel_bridging/main/config_options.c
    team/kmoore/bridge_construction-cel_bridging/main/features.c
    team/kmoore/bridge_construction-cel_bridging/main/manager.c
    team/kmoore/bridge_construction-cel_bridging/main/stasis_channels.c

Propchange: team/kmoore/bridge_construction-cel_bridging/
------------------------------------------------------------------------------
--- bc-cel_bridging-integrated (original)
+++ bc-cel_bridging-integrated Tue May 21 17:28:01 2013
@@ -1,1 +1,1 @@
-/team/kmoore/bridge_construction-cel_channels:1-389330
+/team/kmoore/bridge_construction-cel_channels:1-389451

Propchange: team/kmoore/bridge_construction-cel_bridging/
------------------------------------------------------------------------------
--- bridge_construction-integrated (original)
+++ bridge_construction-integrated Tue May 21 17:28:01 2013
@@ -1,1 +1,1 @@
-/trunk:1-389309
+/trunk:1-389426

Modified: team/kmoore/bridge_construction-cel_bridging/CHANGES
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/bridge_construction-cel_bridging/CHANGES?view=diff&rev=389453&r1=389452&r2=389453
==============================================================================
--- team/kmoore/bridge_construction-cel_bridging/CHANGES (original)
+++ team/kmoore/bridge_construction-cel_bridging/CHANGES Tue May 21 17:28:01 2013
@@ -71,6 +71,10 @@
    ChanVariable: bar=baz. When multiple channels are present in a single AMI
    event, the various ChanVariable fields will contain a suffix that specifies
    which channel they correspond to.
+
+ * The AMI 'Status' response event to the AMI Status action replaces the
+   BridgedChannel and BridgedUniqueid headers with the BridgeID header to
+   indicate what bridge the channel is currently in.
 
 Channel Drivers
 ------------------

Modified: team/kmoore/bridge_construction-cel_bridging/apps/app_confbridge.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/bridge_construction-cel_bridging/apps/app_confbridge.c?view=diff&rev=389453&r1=389452&r2=389453
==============================================================================
--- team/kmoore/bridge_construction-cel_bridging/apps/app_confbridge.c (original)
+++ team/kmoore/bridge_construction-cel_bridging/apps/app_confbridge.c Tue May 21 17:28:01 2013
@@ -306,7 +306,7 @@
 };
 
 /*! \brief Container to hold all conference bridges in progress */
-static struct ao2_container *conference_bridges;
+struct ao2_container *conference_bridges;
 
 static void leave_conference(struct confbridge_user *user);
 static int play_sound_number(struct confbridge_conference *conference, int say_number);
@@ -488,44 +488,6 @@
 	send_conf_stasis(conference, chan, "confbridge_unmute", NULL, 1);
 }
 
-
-static struct ast_frame *rec_read(struct ast_channel *ast)
-{
-	return &ast_null_frame;
-}
-static int rec_write(struct ast_channel *ast, struct ast_frame *f)
-{
-	return 0;
-}
-static struct ast_channel *rec_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *data, int *cause);
-static struct ast_channel_tech record_tech = {
-	.type = "ConfBridgeRec",
-	.description = "Conference Bridge Recording Channel",
-	.requester = rec_request,
-	.read = rec_read,
-	.write = rec_write,
-};
-static struct ast_channel *rec_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *data, int *cause)
-{
-	struct ast_channel *tmp;
-	struct ast_format fmt;
-	const char *conf_name = data;
-	if (!(tmp = ast_channel_alloc(1, AST_STATE_UP, 0, 0, "", "", "", NULL, 0,
-		"ConfBridgeRecorder/conf-%s-uid-%d",
-		conf_name,
-		(int) ast_random()))) {
-		return NULL;
-	}
-	ast_format_set(&fmt, AST_FORMAT_SLINEAR, 0);
-	ast_channel_tech_set(tmp, &record_tech);
-	ast_format_cap_add_all(ast_channel_nativeformats(tmp));
-	ast_format_copy(ast_channel_writeformat(tmp), &fmt);
-	ast_format_copy(ast_channel_rawwriteformat(tmp), &fmt);
-	ast_format_copy(ast_channel_readformat(tmp), &fmt);
-	ast_format_copy(ast_channel_rawreadformat(tmp), &fmt);
-	return tmp;
-}
-
 static void set_rec_filename(struct confbridge_conference *conference, struct ast_str **filename, int is_new)
 {
 	char *rec_file = conference->b_profile.rec_file;
@@ -596,6 +558,7 @@
 		ao2_ref(conference, -1);
 		return NULL;
 	}
+	ast_set_flag(&features.feature_flags, AST_BRIDGE_CHANNEL_FLAG_IMMOVABLE);
 
 	/* XXX If we get an EXIT right here, START will essentially be a no-op */
 	while (conference->record_state != CONF_RECORD_EXIT) {
@@ -689,8 +652,7 @@
 static int conf_start_record(struct confbridge_conference *conference)
 {
 	struct ast_format_cap *cap;
-	struct ast_format tmpfmt;
-	int cause;
+	struct ast_format format;
 
 	if (conference->record_state != CONF_RECORD_STOP) {
 		return -1;
@@ -701,18 +663,19 @@
 		return -1;
 	}
 
-	if (!(cap = ast_format_cap_alloc_nolock())) {
+	cap = ast_format_cap_alloc_nolock();
+	if (!cap) {
 		return -1;
 	}
 
-	ast_format_cap_add(cap, ast_format_set(&tmpfmt, AST_FORMAT_SLINEAR, 0));
-
-	if (!(conference->record_chan = ast_request("ConfBridgeRec", cap, NULL, conference->name, &cause))) {
-		cap = ast_format_cap_destroy(cap);
+	ast_format_cap_add(cap, ast_format_set(&format, AST_FORMAT_SLINEAR, 0));
+
+	conference->record_chan = ast_request("CBRec", cap, NULL,
+		conference->name, NULL);
+	cap = ast_format_cap_destroy(cap);
+	if (!conference->record_chan) {
 		return -1;
 	}
-
-	cap = ast_format_cap_destroy(cap);
 
 	conference->record_state = CONF_RECORD_START;
 	ast_mutex_lock(&conference->record_lock);
@@ -923,10 +886,7 @@
 	ast_debug(1, "Destroying conference bridge '%s'\n", conference->name);
 
 	if (conference->playback_chan) {
-		struct ast_channel *underlying_channel = ast_channel_tech(conference->playback_chan)->bridged_channel(conference->playback_chan, NULL);
-		if (underlying_channel) {
-			ast_hangup(underlying_channel);
-		}
+		conf_announce_channel_depart(conference->playback_chan);
 		ast_hangup(conference->playback_chan);
 		conference->playback_chan = NULL;
 	}
@@ -1360,74 +1320,59 @@
 
 /*!
  * \internal
- * \brief allocates playback chan on a channel
+ * \brief Allocate playback channel for a conference.
  * \pre expects conference to be locked before calling this function
  */
 static int alloc_playback_chan(struct confbridge_conference *conference)
 {
-	int cause;
 	struct ast_format_cap *cap;
-	struct ast_format tmpfmt;
-
-	if (conference->playback_chan) {
-		return 0;
-	}
-	if (!(cap = ast_format_cap_alloc_nolock())) {
+	struct ast_format format;
+
+	cap = ast_format_cap_alloc_nolock();
+	if (!cap) {
 		return -1;
 	}
-	ast_format_cap_add(cap, ast_format_set(&tmpfmt, AST_FORMAT_SLINEAR, 0));
-	if (!(conference->playback_chan = ast_request("Bridge", cap, NULL, "", &cause))) {
-		cap = ast_format_cap_destroy(cap);
+	ast_format_cap_add(cap, ast_format_set(&format, AST_FORMAT_SLINEAR, 0));
+	conference->playback_chan = ast_request("CBAnn", cap, NULL,
+		conference->name, NULL);
+	cap = ast_format_cap_destroy(cap);
+	if (!conference->playback_chan) {
 		return -1;
 	}
-	cap = ast_format_cap_destroy(cap);
-
-	ast_channel_internal_bridge_set(conference->playback_chan, conference->bridge);
-
-	if (ast_call(conference->playback_chan, "", 0)) {
-		ast_hangup(conference->playback_chan);
-		conference->playback_chan = NULL;
-		return -1;
-	}
-
-	ast_debug(1, "Created a playback channel to conference bridge '%s'\n", conference->name);
+
+	ast_debug(1, "Created announcer channel '%s' to conference bridge '%s'\n",
+		ast_channel_name(conference->playback_chan), conference->name);
 	return 0;
 }
 
 static int play_sound_helper(struct confbridge_conference *conference, const char *filename, int say_number)
 {
-	struct ast_channel *underlying_channel;
-
 	/* Do not waste resources trying to play files that do not exist */
 	if (!ast_strlen_zero(filename) && !sound_file_exists(filename)) {
 		return 0;
 	}
 
 	ast_mutex_lock(&conference->playback_lock);
-	if (!(conference->playback_chan)) {
-		if (alloc_playback_chan(conference)) {
-			ast_mutex_unlock(&conference->playback_lock);
-			return -1;
-		}
-		underlying_channel = ast_channel_tech(conference->playback_chan)->bridged_channel(conference->playback_chan, NULL);
-	} else {
-		/* Channel was already available so we just need to add it back into the bridge */
-		underlying_channel = ast_channel_tech(conference->playback_chan)->bridged_channel(conference->playback_chan, NULL);
-		if (ast_bridge_impart(conference->bridge, underlying_channel, NULL, NULL, 0)) {
-			ast_mutex_unlock(&conference->playback_lock);
-			return -1;
-		}
+	if (!conference->playback_chan && alloc_playback_chan(conference)) {
+		ast_mutex_unlock(&conference->playback_lock);
+		return -1;
+	}
+	if (conf_announce_channel_push(conference->playback_chan)) {
+		ast_mutex_unlock(&conference->playback_lock);
+		return -1;
 	}
 
 	/* The channel is all under our control, in goes the prompt */
 	if (!ast_strlen_zero(filename)) {
 		ast_stream_and_wait(conference->playback_chan, filename, "");
 	} else if (say_number >= 0) {
-		ast_say_number(conference->playback_chan, say_number, "", ast_channel_language(conference->playback_chan), NULL);
-	}
-
-	ast_debug(1, "Departing underlying channel '%s' from bridge '%p'\n", ast_channel_name(underlying_channel), conference->bridge);
-	ast_bridge_depart(underlying_channel);
+		ast_say_number(conference->playback_chan, say_number, "",
+			ast_channel_language(conference->playback_chan), NULL);
+	}
+
+	ast_debug(1, "Departing announcer channel '%s' from conference bridge '%s'\n",
+		ast_channel_name(conference->playback_chan), conference->name);
+	conf_announce_channel_depart(conference->playback_chan);
 
 	ast_mutex_unlock(&conference->playback_lock);
 
@@ -2387,7 +2332,13 @@
 	}
 	if (user) {
 		user->features.mute = mute;
-		ast_test_suite_event_notify("CONF_MUTE", "Message: participant %s %s\r\nConference: %s\r\nChannel: %s", ast_channel_name(user->chan), user->features.mute ? "muted" : "unmuted", conference->b_profile.name, ast_channel_name(user->chan));
+		ast_channel_lock(user->chan);
+		if (user->features.mute) {
+			send_mute_event(user->chan, conference);
+		} else {
+			send_unmute_event(user->chan, conference);
+		}
+		ast_channel_unlock(user->chan);
 	} else {
 		res = -2;;
 	}
@@ -3102,6 +3053,46 @@
 	conference->waitingusers--;
 }
 
+/*!
+ * \internal
+ * \brief Unregister a ConfBridge channel technology.
+ * \since 12.0.0
+ *
+ * \param tech What to unregister.
+ *
+ * \return Nothing
+ */
+static void unregister_channel_tech(struct ast_channel_tech *tech)
+{
+	ast_channel_unregister(tech);
+	tech->capabilities = ast_format_cap_destroy(tech->capabilities);
+}
+
+/*!
+ * \internal
+ * \brief Register a ConfBridge channel technology.
+ * \since 12.0.0
+ *
+ * \param tech What to register.
+ *
+ * \retval 0 on success.
+ * \retval -1 on error.
+ */
+static int register_channel_tech(struct ast_channel_tech *tech)
+{
+	tech->capabilities = ast_format_cap_alloc();
+	if (!tech->capabilities) {
+		return -1;
+	}
+	ast_format_cap_add_all(tech->capabilities);
+	if (ast_channel_register(tech)) {
+		ast_log(LOG_ERROR, "Unable to register channel technology %s(%s).\n",
+			tech->type, tech->description);
+		return -1;
+	}
+	return 0;
+}
+
 /*! \brief Called when module is being unloaded */
 static int unload_module(void)
 {
@@ -3132,8 +3123,8 @@
 
 	conf_destroy_config();
 
-	ast_channel_unregister(&record_tech);
-	record_tech.capabilities = ast_format_cap_destroy(record_tech.capabilities);
+	unregister_channel_tech(conf_announce_get_tech());
+	unregister_channel_tech(conf_record_get_tech());
 
 	return 0;
 }
@@ -3157,13 +3148,8 @@
 		return AST_MODULE_LOAD_DECLINE;
 	}
 
-	if (!(record_tech.capabilities = ast_format_cap_alloc())) {
-		unload_module();
-		return AST_MODULE_LOAD_FAILURE;
-	}
-	ast_format_cap_add_all(record_tech.capabilities);
-	if (ast_channel_register(&record_tech)) {
-		ast_log(LOG_ERROR, "Unable to register ConfBridge recorder.\n");
+	if (register_channel_tech(conf_record_get_tech())
+		|| register_channel_tech(conf_announce_get_tech())) {
 		unload_module();
 		return AST_MODULE_LOAD_FAILURE;
 	}

Modified: team/kmoore/bridge_construction-cel_bridging/apps/app_dumpchan.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/bridge_construction-cel_bridging/apps/app_dumpchan.c?view=diff&rev=389453&r1=389452&r2=389453
==============================================================================
--- team/kmoore/bridge_construction-cel_bridging/apps/app_dumpchan.c (original)
+++ team/kmoore/bridge_construction-cel_bridging/apps/app_dumpchan.c Tue May 21 17:28:01 2013
@@ -41,6 +41,7 @@
 #include "asterisk/channel.h"
 #include "asterisk/app.h"
 #include "asterisk/translate.h"
+#include "asterisk/bridging.h"
 
 /*** DOCUMENTATION
 	<application name="DumpChan" language="en_US">
@@ -77,6 +78,7 @@
 	char pgrp[256];
 	struct ast_str *write_transpath = ast_str_alloca(256);
 	struct ast_str *read_transpath = ast_str_alloca(256);
+	struct ast_bridge *bridge;
 
 	now = ast_tvnow();
 	memset(buf, 0, size);
@@ -90,6 +92,9 @@
 		sec = elapsed_seconds % 60;
 	}
 
+	ast_channel_lock(c);
+	bridge = ast_channel_get_bridge(c);
+	ast_channel_unlock(c);
 	snprintf(buf,size,
 		"Name=               %s\n"
 		"Type=               %s\n"
@@ -117,8 +122,7 @@
 		"Framesout=          %d %s\n"
 		"TimetoHangup=       %ld\n"
 		"ElapsedTime=        %dh%dm%ds\n"
-		"DirectBridge=       %s\n"
-		"IndirectBridge=     %s\n"
+		"BridgeID=           %s\n"
 		"Context=            %s\n"
 		"Extension=          %s\n"
 		"Priority=           %d\n"
@@ -158,8 +162,7 @@
 		hour,
 		min,
 		sec,
-		ast_channel_internal_bridged_channel(c) ? ast_channel_name(ast_channel_internal_bridged_channel(c)) : "<none>",
-		ast_bridged_channel(c) ? ast_channel_name(ast_bridged_channel(c)) : "<none>", 
+		bridge ? bridge->uniqueid : "(Not bridged)",
 		ast_channel_context(c),
 		ast_channel_exten(c),
 		ast_channel_priority(c),
@@ -169,6 +172,7 @@
 		ast_channel_data(c) ? S_OR(ast_channel_data(c), "(Empty)") : "(None)",
 		(ast_test_flag(ast_channel_flags(c), AST_FLAG_BLOCKING) ? ast_channel_blockproc(c) : "(Not Blocking)"));
 
+	ao2_cleanup(bridge);
 	return 0;
 }
 

Modified: team/kmoore/bridge_construction-cel_bridging/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/bridge_construction-cel_bridging/apps/app_queue.c?view=diff&rev=389453&r1=389452&r2=389453
==============================================================================
--- team/kmoore/bridge_construction-cel_bridging/apps/app_queue.c (original)
+++ team/kmoore/bridge_construction-cel_bridging/apps/app_queue.c Tue May 21 17:28:01 2013
@@ -1317,7 +1317,9 @@
 static struct member *interface_exists(struct call_queue *q, const char *interface);
 static int set_member_paused(const char *queuename, const char *interface, const char *reason, int paused);
 
+#if 0	// BUGBUG
 static void queue_transfer_fixup(void *data, struct ast_channel *old_chan, struct ast_channel *new_chan);
+#endif	// BUGBUG
 
 static struct member *find_member_by_queuename_and_interface(const char *queuename, const char *interface);
 /*! \brief sets the QUEUESTATUS channel variable */
@@ -4781,6 +4783,7 @@
 	return res;
 }
 
+#if 0	// BUGBUG
 /*!
  * \brief update the queue status
  * \retval Always 0
@@ -4825,6 +4828,7 @@
 	ao2_unlock(q);
 	return 0;
 }
+#endif	// BUGBUG
 
 /*! \brief Calculate the metric of each member in the outgoing callattempts
  *
@@ -4979,19 +4983,24 @@
 }
 #endif	// BUGBUG
 
+#if 0	// BUGBUG
 struct queue_transfer_ds {
 	struct queue_ent *qe;
 	struct member *member;
 	time_t starttime;
 	int callcompletedinsl;
 };
-
+#endif	// BUGBUG
+
+#if 0	// BUGBUG
 static void queue_transfer_destroy(void *data)
 {
 	struct queue_transfer_ds *qtds = data;
 	ast_free(qtds);
 }
-
+#endif	// BUGBUG
+
+#if 0	// BUGBUG
 /*! \brief a datastore used to help correctly log attended transfers of queue callers
  */
 static const struct ast_datastore_info queue_transfer_info = {
@@ -4999,7 +5008,9 @@
 	.chan_fixup = queue_transfer_fixup,
 	.destroy = queue_transfer_destroy,
 };
-
+#endif	// BUGBUG
+
+#if 0	// BUGBUG
 /*! \brief Log an attended transfer when a queue caller channel is masqueraded
  *
  * When a caller is masqueraded, we want to log a transfer. Fixup time is the closest we can come to when
@@ -5031,6 +5042,7 @@
 		ast_log(LOG_WARNING, "Can't find the queue_transfer datastore.\n");
 	}
 }
+#endif	// BUGBUG
 
 #if 0	// BUGBUG
 /*! \brief mechanism to tell if a queue caller was atxferred by a queue member.
@@ -5047,6 +5059,7 @@
 }
 #endif	// BUGBUG
 
+#if 0	// BUGBUG
 /*! \brief create a datastore for storing relevant info to log attended transfers in the queue_log
  */
 static struct ast_datastore *setup_transfer_datastore(struct queue_ent *qe, struct member *member, time_t starttime, int callcompletedinsl)
@@ -5077,6 +5090,7 @@
 	ast_channel_unlock(qe->chan);
 	return ds;
 }
+#endif	// BUGBUG
 
 struct queue_end_bridge {
 	struct call_queue *q;
@@ -5181,7 +5195,9 @@
 	int x=0;
 	char *announce = NULL;
 	char digit = 0;
+#if 0	// BUGBUG
 	time_t callstart;
+#endif	// BUGBUG
 	time_t now = time(NULL);
 	struct ast_bridge_config bridge_config;
 	char nondataquality = 1;
@@ -5199,9 +5215,14 @@
 	char vars[2048];
 	int forwardsallowed = 1;
 	int block_connected_line = 0;
+#if 0	// BUGBUG
 	int callcompletedinsl;
+#endif	// BUGBUG
 	struct ao2_iterator memi;
-	struct ast_datastore *datastore, *transfer_ds;
+	struct ast_datastore *datastore;
+#if 0	// BUGBUG
+	struct ast_datastore *transfer_ds;
+#endif	// BUGBUG
 	struct queue_end_bridge *queue_end_bridge = NULL;
 
 	ast_channel_lock(qe->chan);
@@ -5481,7 +5502,9 @@
 		time(&now);
 		recalc_holdtime(qe, (now - qe->start));
 		ao2_lock(qe->parent);
+#if 0	// BUGBUG
 		callcompletedinsl = ((now - qe->start) <= qe->parent->servicelevel);
+#endif	// BUGBUG
 		ao2_unlock(qe->parent);
 		member = lpeer->member;
 		/* Increment the refcount for this member, since we're going to be using it for awhile in here. */
@@ -5902,8 +5925,10 @@
 			queue_t_ref(qe->parent, "For bridge_config reference");
 		}
 
+#if 0	// BUGBUG
 		time(&callstart);
 		transfer_ds = setup_transfer_datastore(qe, member, callstart, callcompletedinsl);
+#endif	// BUGBUG
 		bridge = ast_bridge_call(qe->chan, peer, &bridge_config);
 
 /* BUGBUG need to do this queue logging a different way because we cannot reference peer anymore.  Likely needs to be made a subscriber of stasis transfer events. */
@@ -5942,11 +5967,11 @@
 			/* We already logged the TRANSFER on the queue_log, but we still need to send the AgentComplete event */
 			send_agent_complete(qe, queuename, peer, member, callstart, vars, sizeof(vars), TRANSFER);
 		}
-#endif	// BUGBUG
 
 		if (transfer_ds) {
 			ast_datastore_free(transfer_ds);
 		}
+#endif	// BUGBUG
 
 		res = bridge ? bridge : 1;
 		ao2_ref(member, -1);

Modified: team/kmoore/bridge_construction-cel_bridging/apps/app_userevent.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/bridge_construction-cel_bridging/apps/app_userevent.c?view=diff&rev=389453&r1=389452&r2=389453
==============================================================================
--- team/kmoore/bridge_construction-cel_bridging/apps/app_userevent.c (original)
+++ team/kmoore/bridge_construction-cel_bridging/apps/app_userevent.c Tue May 21 17:28:01 2013
@@ -87,8 +87,7 @@
 
 	AST_STANDARD_APP_ARGS(args, parse);
 
-	blob = ast_json_pack("{s: s, s: s}",
-			     "type", "userevent",
+	blob = ast_json_pack("{s: s}",
 			     "eventname", args.eventname);
 	if (!blob) {
 		return -1;

Modified: team/kmoore/bridge_construction-cel_bridging/apps/confbridge/confbridge_manager.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/bridge_construction-cel_bridging/apps/confbridge/confbridge_manager.c?view=diff&rev=389453&r1=389452&r2=389453
==============================================================================
--- team/kmoore/bridge_construction-cel_bridging/apps/confbridge/confbridge_manager.c (original)
+++ team/kmoore/bridge_construction-cel_bridging/apps/confbridge/confbridge_manager.c Tue May 21 17:28:01 2013
@@ -161,7 +161,6 @@
 			</see-also>
 		</managerEventInstance>
 	</managerEvent>
-
 	<managerEvent language="en_US" name="ConfbridgeTalking">
 		<managerEventInstance class="EVENT_FLAG_CALL">
 			<synopsis>Raised when a confbridge participant unmutes.</synopsis>

Modified: team/kmoore/bridge_construction-cel_bridging/apps/confbridge/include/confbridge.h
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/bridge_construction-cel_bridging/apps/confbridge/include/confbridge.h?view=diff&rev=389453&r1=389452&r2=389453
==============================================================================
--- team/kmoore/bridge_construction-cel_bridging/apps/confbridge/include/confbridge.h (original)
+++ team/kmoore/bridge_construction-cel_bridging/apps/confbridge/include/confbridge.h Tue May 21 17:28:01 2013
@@ -222,6 +222,8 @@
 	AST_LIST_HEAD_NOLOCK(, confbridge_user) waiting_list;             /*!< List of users waiting to join the conference bridge */
 };
 
+extern struct ao2_container *conference_bridges;
+
 struct post_join_action {
 	int (*func)(struct confbridge_user *user);
 	AST_LIST_ENTRY(post_join_action) list;
@@ -484,4 +486,41 @@
  * \brief unregister stasis message routers to handle manager events for confbridge messages
  */
 void manager_confbridge_shutdown(void);
+
+/*!
+ * \brief Get ConfBridge record channel technology struct.
+ * \since 12.0.0
+ *
+ * \return ConfBridge record channel technology.
+ */
+struct ast_channel_tech *conf_record_get_tech(void);
+
+/*!
+ * \brief Get ConfBridge announce channel technology struct.
+ * \since 12.0.0
+ *
+ * \return ConfBridge announce channel technology.
+ */
+struct ast_channel_tech *conf_announce_get_tech(void);
+
+/*!
+ * \brief Remove the announcer channel from the conference.
+ * \since 12.0.0
+ *
+ * \param chan Either channel in the announcer channel pair.
+ *
+ * \return Nothing
+ */
+void conf_announce_channel_depart(struct ast_channel *chan);
+
+/*!
+ * \brief Push the announcer channel into the conference.
+ * \since 12.0.0
+ *
+ * \param ast Either channel in the announcer channel pair.
+ *
+ * \retval 0 on success.
+ * \retval -1 on error.
+ */
+int conf_announce_channel_push(struct ast_channel *ast);
 #endif

Modified: team/kmoore/bridge_construction-cel_bridging/channels/chan_agent.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/bridge_construction-cel_bridging/channels/chan_agent.c?view=diff&rev=389453&r1=389452&r2=389453
==============================================================================
--- team/kmoore/bridge_construction-cel_bridging/channels/chan_agent.c (original)
+++ team/kmoore/bridge_construction-cel_bridging/channels/chan_agent.c Tue May 21 17:28:01 2013
@@ -345,6 +345,7 @@
 static struct ast_channel* agent_get_base_channel(struct ast_channel *chan);
 static int agent_logoff(const char *agent, int soft);
 
+/* BUGBUG This channel driver is totally hosed until it is rewritten. */
 /*! \brief Channel interface description for PBX integration */
 static struct ast_channel_tech agent_tech = {
 	.type = "Agent",

Modified: team/kmoore/bridge_construction-cel_bridging/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/bridge_construction-cel_bridging/channels/chan_dahdi.c?view=diff&rev=389453&r1=389452&r2=389453
==============================================================================
--- team/kmoore/bridge_construction-cel_bridging/channels/chan_dahdi.c (original)
+++ team/kmoore/bridge_construction-cel_bridging/channels/chan_dahdi.c Tue May 21 17:28:01 2013
@@ -1553,6 +1553,7 @@
 static int dahdi_devicestate(const char *data);
 static int dahdi_cc_callback(struct ast_channel *inbound, const char *dest, ast_cc_callback_fn callback);
 
+/* BUGBUG The DAHDI channel driver needs its own native bridge technology. */
 static struct ast_channel_tech dahdi_tech = {
 	.type = "DAHDI",
 	.description = tdesc,

Modified: team/kmoore/bridge_construction-cel_bridging/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/bridge_construction-cel_bridging/channels/chan_iax2.c?view=diff&rev=389453&r1=389452&r2=389453
==============================================================================
--- team/kmoore/bridge_construction-cel_bridging/channels/chan_iax2.c (original)
+++ team/kmoore/bridge_construction-cel_bridging/channels/chan_iax2.c Tue May 21 17:28:01 2013
@@ -1259,6 +1259,7 @@
 static void network_change_stasis_cb(void *data, struct stasis_subscription *sub, struct stasis_topic *topic, struct stasis_message *message);
 static void acl_change_stasis_cb(void *data, struct stasis_subscription *sub, struct stasis_topic *topic, struct stasis_message *message);
 
+/* BUGBUG The IAX2 channel driver needs its own native bridge technology. */
 static struct ast_channel_tech iax2_tech = {
 	.type = "IAX2",
 	.description = tdesc,

Modified: team/kmoore/bridge_construction-cel_bridging/channels/chan_misdn.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/bridge_construction-cel_bridging/channels/chan_misdn.c?view=diff&rev=389453&r1=389452&r2=389453
==============================================================================
--- team/kmoore/bridge_construction-cel_bridging/channels/chan_misdn.c (original)
+++ team/kmoore/bridge_construction-cel_bridging/channels/chan_misdn.c Tue May 21 17:28:01 2013
@@ -8091,6 +8091,7 @@
 	return 0;
 }
 
+/* BUGBUG The mISDN channel driver needs its own native bridge technology. (More like just never give it one.) */
 static struct ast_channel_tech misdn_tech = {
 	.type = misdn_type,
 	.description = "Channel driver for mISDN Support (Bri/Pri)",

Modified: team/kmoore/bridge_construction-cel_bridging/channels/chan_unistim.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/bridge_construction-cel_bridging/channels/chan_unistim.c?view=diff&rev=389453&r1=389452&r2=389453
==============================================================================
--- team/kmoore/bridge_construction-cel_bridging/channels/chan_unistim.c (original)
+++ team/kmoore/bridge_construction-cel_bridging/channels/chan_unistim.c Tue May 21 17:28:01 2013
@@ -5825,7 +5825,6 @@
 	struct unistim_line *line;
 	struct unistim_subchannel *sub;
 	struct unistimsession *s;
-	struct ast_channel *tmp;
 
 	switch (cmd) {
 	case CLI_INIT:
@@ -5869,14 +5868,9 @@
 			if (!sub) {
 				continue;
 			}
-			if (!sub->owner) {
-				tmp = (void *) -42;
-			} else {
-				tmp = ast_channel_internal_bridged_channel(sub->owner);
-			}
 			ast_cli(a->fd,
-					"-->subtype=%s chan=%p rtp=%p bridge=%p line=%p alreadygone=%d softkey=%d\n",
-					subtype_tostr(sub->subtype), sub->owner, sub->rtp, tmp, sub->parent,
+					"-->subtype=%s chan=%p rtp=%p line=%p alreadygone=%d softkey=%d\n",
+					subtype_tostr(sub->subtype), sub->owner, sub->rtp, sub->parent,
 					sub->alreadygone, sub->softkey);
 		}
 		AST_LIST_UNLOCK(&device->subs);

Modified: team/kmoore/bridge_construction-cel_bridging/channels/chan_vpb.cc
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/bridge_construction-cel_bridging/channels/chan_vpb.cc?view=diff&rev=389453&r1=389452&r2=389453
==============================================================================
--- team/kmoore/bridge_construction-cel_bridging/channels/chan_vpb.cc (original)
+++ team/kmoore/bridge_construction-cel_bridging/channels/chan_vpb.cc Tue May 21 17:28:01 2013
@@ -2267,13 +2267,7 @@
 			else 
 				bridgerec = 0;
 		} else {
-			ast_verb(5, "%s: chanreads: No native bridge.\n", p->dev);
-			if (ast_channel_internal_bridged_channel(p->owner)) {
-				ast_verb(5, "%s: chanreads: Got Asterisk bridge with [%s].\n", p->dev, ast_channel_name(ast_channel_internal_bridged_channel(p->owner)));
-				bridgerec = 1;
-			} else {
-				bridgerec = 0;
-			}
+			bridgerec = ast_channel_is_bridged(p->owner) ? 1 : 0;
 		}
 
 /*		if ((p->owner->_state != AST_STATE_UP) || !bridgerec) */

Modified: team/kmoore/bridge_construction-cel_bridging/include/asterisk/channel.h
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/bridge_construction-cel_bridging/include/asterisk/channel.h?view=diff&rev=389453&r1=389452&r2=389453
==============================================================================
--- team/kmoore/bridge_construction-cel_bridging/include/asterisk/channel.h (original)
+++ team/kmoore/bridge_construction-cel_bridging/include/asterisk/channel.h Tue May 21 17:28:01 2013
@@ -643,6 +643,7 @@
 	/*! \brief Handle an exception, reading a frame */
 	struct ast_frame * (* const exception)(struct ast_channel *chan);
 
+/* BUGBUG this tech callback is to be removed. */
 	/*! \brief Bridge two channels of the same type together */
 	enum ast_bridge_result (* const bridge)(struct ast_channel *c0, struct ast_channel *c1, int flags,
 						struct ast_frame **fo, struct ast_channel **rc, int timeoutms);
@@ -671,6 +672,7 @@
 	/*! \brief Write a text frame, in standard format */
 	int (* const write_text)(struct ast_channel *chan, struct ast_frame *frame);
 
+/* BUGBUG this tech callback is to be removed. */
 	/*! \brief Find bridged channel */
 	struct ast_channel *(* const bridged_channel)(struct ast_channel *chan, struct ast_channel *bridge);
 
@@ -686,6 +688,7 @@
 	 */
 	int (* func_channel_write)(struct ast_channel *chan, const char *function, char *data, const char *value);
 
+/* BUGBUG this tech callback is to be removed. */
 	/*! \brief Retrieve base channel (agent and local) */
 	struct ast_channel* (* get_base_channel)(struct ast_channel *chan);
 

Modified: team/kmoore/bridge_construction-cel_bridging/include/asterisk/config_options.h
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/bridge_construction-cel_bridging/include/asterisk/config_options.h?view=diff&rev=389453&r1=389452&r2=389453
==============================================================================
--- team/kmoore/bridge_construction-cel_bridging/include/asterisk/config_options.h (original)
+++ team/kmoore/bridge_construction-cel_bridging/include/asterisk/config_options.h Tue May 21 17:28:01 2013
@@ -146,10 +146,11 @@
 
 /*! \brief The representation of a single configuration file to be processed */
 struct aco_file {
-	const char *filename; /*!< \brief The filename to be processed */
-	const char *alias;    /*!< \brief An alias filename to be tried if 'filename' cannot be found */
-	const char **preload; /*!< \brief A null-terminated oredered array of categories to be loaded first */
-	struct aco_type *types[]; /*!< The list of types for this config. Required. Use a sentinel! */
+	const char *filename;       /*!< The filename to be processed */
+	const char *alias;          /*!< An alias filename to be tried if 'filename' cannot be found */
+	const char **preload;       /*!< A null-terminated ordered array of categories to be loaded first */
+	const char *skip_category;  /*!< A regular expression of categories to skip in the file. Use when a file is processed by multiple modules */
+	struct aco_type *types[];   /*!< The list of types for this config. Required. Use a sentinel! */
 };
 
 struct aco_info {

Modified: team/kmoore/bridge_construction-cel_bridging/include/asterisk/strings.h
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/bridge_construction-cel_bridging/include/asterisk/strings.h?view=diff&rev=389453&r1=389452&r2=389453
==============================================================================
--- team/kmoore/bridge_construction-cel_bridging/include/asterisk/strings.h (original)
+++ team/kmoore/bridge_construction-cel_bridging/include/asterisk/strings.h Tue May 21 17:28:01 2013
@@ -29,7 +29,6 @@
 
 #include "asterisk/utils.h"
 #include "asterisk/threadstorage.h"
-#include "asterisk/astobj2.h"
 
 #if defined(DEBUG_OPAQUE)
 #define __AST_STR_USED used2
@@ -1068,7 +1067,6 @@
 	return abs(hash);
 }
 
-
 /*!
  * \brief Convert a string to all lower-case
  *

Modified: team/kmoore/bridge_construction-cel_bridging/main/cel.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/bridge_construction-cel_bridging/main/cel.c?view=diff&rev=389453&r1=389452&r2=389453
==============================================================================
--- team/kmoore/bridge_construction-cel_bridging/main/cel.c (original)
+++ team/kmoore/bridge_construction-cel_bridging/main/cel.c Tue May 21 17:28:01 2013
@@ -53,6 +53,7 @@
 #include "asterisk/linkedlists.h"
 #include "asterisk/utils.h"

[... 1198 lines stripped ...]



More information about the asterisk-commits mailing list