[asterisk-commits] dlee: branch dlee/endpoints r387290 - in /team/dlee/endpoints: ./ channels/ i...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed May 1 23:53:26 CDT 2013


Author: dlee
Date: Wed May  1 23:53:23 2013
New Revision: 387290

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=387290
Log:
Merged revisions 386928-387261 from http://svn.asterisk.org/svn/asterisk/trunk

Modified:
    team/dlee/endpoints/   (props changed)
    team/dlee/endpoints/channels/chan_dahdi.c
    team/dlee/endpoints/channels/chan_gulp.c
    team/dlee/endpoints/channels/chan_iax2.c
    team/dlee/endpoints/channels/chan_local.c
    team/dlee/endpoints/channels/chan_mgcp.c
    team/dlee/endpoints/channels/chan_sip.c
    team/dlee/endpoints/channels/chan_skinny.c
    team/dlee/endpoints/channels/chan_unistim.c
    team/dlee/endpoints/channels/sig_analog.c
    team/dlee/endpoints/include/asterisk/acl.h
    team/dlee/endpoints/include/asterisk/event_defs.h
    team/dlee/endpoints/include/asterisk/json.h
    team/dlee/endpoints/include/asterisk/utils.h
    team/dlee/endpoints/main/event.c
    team/dlee/endpoints/main/features.c
    team/dlee/endpoints/main/json.c
    team/dlee/endpoints/main/loader.c
    team/dlee/endpoints/main/manager.c
    team/dlee/endpoints/main/named_acl.c
    team/dlee/endpoints/res/res_rtp_asterisk.c
    team/dlee/endpoints/res/res_stasis_http.c
    team/dlee/endpoints/tests/test_stasis_http.c

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

Propchange: team/dlee/endpoints/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed May  1 23:53:23 2013
@@ -1,1 +1,1 @@
-/trunk:1-386924
+/trunk:1-387289

Modified: team/dlee/endpoints/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/endpoints/channels/chan_dahdi.c?view=diff&rev=387290&r1=387289&r2=387290
==============================================================================
--- team/dlee/endpoints/channels/chan_dahdi.c (original)
+++ team/dlee/endpoints/channels/chan_dahdi.c Wed May  1 23:53:23 2013
@@ -6547,8 +6547,7 @@
 				p->owner = p->subs[SUB_REAL].owner;
 				if (ast_channel_state(p->owner) != AST_STATE_UP)
 					p->subs[SUB_REAL].needanswer = 1;
-				if (ast_bridged_channel(p->subs[SUB_REAL].owner))
-					ast_queue_control(p->subs[SUB_REAL].owner, AST_CONTROL_UNHOLD);
+				ast_queue_control(p->subs[SUB_REAL].owner, AST_CONTROL_UNHOLD);
 			} else if (p->subs[SUB_THREEWAY].dfd > -1) {
 				swap_subs(p, SUB_THREEWAY, SUB_REAL);
 				unalloc_sub(p, SUB_THREEWAY);
@@ -6569,7 +6568,7 @@
 			if (p->subs[SUB_CALLWAIT].inthreeway) {
 				/* This is actually part of a three way, placed on hold.  Place the third part
 				   on music on hold now */
-				if (p->subs[SUB_THREEWAY].owner && ast_bridged_channel(p->subs[SUB_THREEWAY].owner)) {
+				if (p->subs[SUB_THREEWAY].owner) {
 					ast_queue_control_data(p->subs[SUB_THREEWAY].owner, AST_CONTROL_HOLD,
 						S_OR(p->mohsuggest, NULL),
 						!ast_strlen_zero(p->mohsuggest) ? strlen(p->mohsuggest) + 1 : 0);
@@ -6584,7 +6583,7 @@
 			if (p->subs[SUB_CALLWAIT].inthreeway) {
 				/* The other party of the three way call is currently in a call-wait state.
 				   Start music on hold for them, and take the main guy out of the third call */
-				if (p->subs[SUB_CALLWAIT].owner && ast_bridged_channel(p->subs[SUB_CALLWAIT].owner)) {
+				if (p->subs[SUB_CALLWAIT].owner) {
 					ast_queue_control_data(p->subs[SUB_CALLWAIT].owner, AST_CONTROL_HOLD,
 						S_OR(p->mohsuggest, NULL),
 						!ast_strlen_zero(p->mohsuggest) ? strlen(p->mohsuggest) + 1 : 0);
@@ -7838,11 +7837,10 @@
 	   together (but then, why would we want to?) */
 	if (ast_bridged_channel(p->subs[SUB_REAL].owner)) {
 		/* The three-way person we're about to transfer to could still be in MOH, so
-		   stop if now if appropriate */
-		if (ast_bridged_channel(p->subs[SUB_THREEWAY].owner))
-			ast_queue_control(p->subs[SUB_THREEWAY].owner, AST_CONTROL_UNHOLD);
+		   stop it now */
+		ast_queue_control(p->subs[SUB_THREEWAY].owner, AST_CONTROL_UNHOLD);
 		if (ast_channel_state(p->subs[SUB_REAL].owner) == AST_STATE_RINGING) {
-			ast_indicate(ast_bridged_channel(p->subs[SUB_REAL].owner), AST_CONTROL_RINGING);
+			ast_queue_control(p->subs[SUB_REAL].owner, AST_CONTROL_RINGING);
 		}
 		if (ast_channel_state(p->subs[SUB_THREEWAY].owner) == AST_STATE_RING) {
 			tone_zone_play_tone(p->subs[SUB_THREEWAY].dfd, DAHDI_TONE_RINGTONE);
@@ -7858,7 +7856,7 @@
 	} else if (ast_bridged_channel(p->subs[SUB_THREEWAY].owner)) {
 		ast_queue_control(p->subs[SUB_REAL].owner, AST_CONTROL_UNHOLD);
 		if (ast_channel_state(p->subs[SUB_THREEWAY].owner) == AST_STATE_RINGING) {
-			ast_indicate(ast_bridged_channel(p->subs[SUB_THREEWAY].owner), AST_CONTROL_RINGING);
+			ast_queue_control(p->subs[SUB_THREEWAY].owner, AST_CONTROL_RINGING);
 		}
 		if (ast_channel_state(p->subs[SUB_REAL].owner) == AST_STATE_RING) {
 			tone_zone_play_tone(p->subs[SUB_REAL].dfd, DAHDI_TONE_RINGTONE);
@@ -8524,8 +8522,7 @@
 				/* Make sure it stops ringing */
 				dahdi_set_hook(p->subs[idx].dfd, DAHDI_OFFHOOK);
 				/* Okay -- probably call waiting*/
-				if (ast_bridged_channel(p->owner))
-					ast_queue_control(p->owner, AST_CONTROL_UNHOLD);
+				ast_queue_control(p->owner, AST_CONTROL_UNHOLD);
 				p->subs[idx].needunhold = 1;
 				break;
 			case AST_STATE_RESERVED:
@@ -8679,17 +8676,15 @@
 				p->cidcwexpire = 0;
 				p->cid_suppress_expire = 0;
 				/* Start music on hold if appropriate */
-				if (!p->subs[SUB_CALLWAIT].inthreeway && ast_bridged_channel(p->subs[SUB_CALLWAIT].owner)) {
+				if (!p->subs[SUB_CALLWAIT].inthreeway) {
 					ast_queue_control_data(p->subs[SUB_CALLWAIT].owner, AST_CONTROL_HOLD,
 						S_OR(p->mohsuggest, NULL),
 						!ast_strlen_zero(p->mohsuggest) ? strlen(p->mohsuggest) + 1 : 0);
 				}
 				p->subs[SUB_CALLWAIT].needhold = 1;
-				if (ast_bridged_channel(p->subs[SUB_REAL].owner)) {
-					ast_queue_control_data(p->subs[SUB_REAL].owner, AST_CONTROL_HOLD,
-						S_OR(p->mohsuggest, NULL),
-						!ast_strlen_zero(p->mohsuggest) ? strlen(p->mohsuggest) + 1 : 0);
-				}
+				ast_queue_control_data(p->subs[SUB_REAL].owner, AST_CONTROL_HOLD,
+					S_OR(p->mohsuggest, NULL),
+					!ast_strlen_zero(p->mohsuggest) ? strlen(p->mohsuggest) + 1 : 0);
 				p->subs[SUB_REAL].needunhold = 1;
 			} else if (!p->subs[SUB_THREEWAY].owner) {
 				if (!p->threewaycalling) {
@@ -8766,12 +8761,10 @@
 					} else {
 						ast_verb(3, "Started three way call on channel %d\n", p->channel);
 
-						/* Start music on hold if appropriate */
-						if (ast_bridged_channel(p->subs[SUB_THREEWAY].owner)) {
-							ast_queue_control_data(p->subs[SUB_THREEWAY].owner, AST_CONTROL_HOLD,
-								S_OR(p->mohsuggest, NULL),
-								!ast_strlen_zero(p->mohsuggest) ? strlen(p->mohsuggest) + 1 : 0);
-						}
+						/* Start music on hold */
+						ast_queue_control_data(p->subs[SUB_THREEWAY].owner, AST_CONTROL_HOLD,
+							S_OR(p->mohsuggest, NULL),
+							!ast_strlen_zero(p->mohsuggest) ? strlen(p->mohsuggest) + 1 : 0);
 						p->subs[SUB_THREEWAY].needhold = 1;
 					}
 					ast_callid_threadstorage_auto_clean(callid, callid_created);
@@ -8808,7 +8801,7 @@
 							swap_subs(p, SUB_THREEWAY, SUB_REAL);
 							otherindex = SUB_REAL;
 						}
-						if (p->subs[otherindex].owner && ast_bridged_channel(p->subs[otherindex].owner))
+						if (p->subs[otherindex].owner)
 							ast_queue_control(p->subs[otherindex].owner, AST_CONTROL_UNHOLD);
 						p->subs[otherindex].needunhold = 1;
 						p->owner = p->subs[SUB_REAL].owner;
@@ -8817,7 +8810,7 @@
 						swap_subs(p, SUB_THREEWAY, SUB_REAL);
 						ast_channel_softhangup_internal_flag_add(p->subs[SUB_THREEWAY].owner, AST_SOFTHANGUP_DEV);
 						p->owner = p->subs[SUB_REAL].owner;
-						if (p->subs[SUB_REAL].owner && ast_bridged_channel(p->subs[SUB_REAL].owner))
+						if (p->subs[SUB_REAL].owner)
 							ast_queue_control(p->subs[SUB_REAL].owner, AST_CONTROL_UNHOLD);
 						p->subs[SUB_REAL].needunhold = 1;
 						dahdi_enable_ec(p);
@@ -9011,7 +9004,7 @@
 			(res != DAHDI_EVENT_HOOKCOMPLETE)) {
 			ast_debug(1, "Restoring owner of channel %d on event %d\n", p->channel, res);
 			p->owner = p->subs[SUB_REAL].owner;
-			if (p->owner && ast_bridged_channel(p->owner))
+			if (p->owner)
 				ast_queue_control(p->owner, AST_CONTROL_UNHOLD);
 			p->subs[SUB_REAL].needunhold = 1;
 		}
@@ -9056,8 +9049,7 @@
 				p->callwaitingrepeat = 0;
 				p->cidcwexpire = 0;
 				p->cid_suppress_expire = 0;
-				if (ast_bridged_channel(p->owner))
-					ast_queue_control(p->owner, AST_CONTROL_UNHOLD);
+				ast_queue_control(p->owner, AST_CONTROL_UNHOLD);
 				p->subs[SUB_REAL].needunhold = 1;
 			} else
 				ast_log(LOG_WARNING, "Absorbed on hook, but nobody is left!?!?\n");
@@ -9605,15 +9597,15 @@
 		return -1;
 	}
 	if (p->dialing) {
-		ast_debug(1, "Dropping frame since I'm still dialing on %s...\n",ast_channel_name(ast));
+		ast_debug(5, "Dropping frame since I'm still dialing on %s...\n",ast_channel_name(ast));
 		return 0;
 	}
 	if (!p->owner) {
-		ast_debug(1, "Dropping frame since there is no active owner on %s...\n",ast_channel_name(ast));
+		ast_debug(5, "Dropping frame since there is no active owner on %s...\n",ast_channel_name(ast));
 		return 0;
 	}
 	if (p->cidspill) {
-		ast_debug(1, "Dropping frame since I've still got a callerid spill on %s...\n",
+		ast_debug(5, "Dropping frame since I've still got a callerid spill on %s...\n",
 			ast_channel_name(ast));
 		return 0;
 	}
@@ -10694,8 +10686,7 @@
 					swap_subs(p, SUB_REAL, SUB_THREEWAY);
 					unalloc_sub(p, SUB_THREEWAY);
 					p->owner = p->subs[SUB_REAL].owner;
-					if (ast_bridged_channel(p->subs[SUB_REAL].owner))
-						ast_queue_control(p->subs[SUB_REAL].owner, AST_CONTROL_UNHOLD);
+					ast_queue_control(p->subs[SUB_REAL].owner, AST_CONTROL_UNHOLD);
 					ast_hangup(chan);
 					goto quit;
 				} else {

Modified: team/dlee/endpoints/channels/chan_gulp.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/endpoints/channels/chan_gulp.c?view=diff&rev=387290&r1=387289&r2=387290
==============================================================================
--- team/dlee/endpoints/channels/chan_gulp.c (original)
+++ team/dlee/endpoints/channels/chan_gulp.c Wed May  1 23:53:23 2013
@@ -785,7 +785,7 @@
 		if (ind_data) {
 			res = ast_sip_push_task(session->serializer, indicate, ind_data);
 			if (res) {
-				ast_log(LOG_NOTICE, "Cannot send response code %d to endpoint %s. Could queue task properly\n",
+				ast_log(LOG_NOTICE, "Cannot send response code %d to endpoint %s. Could not queue task properly\n",
 						response_code, ast_sorcery_object_get_id(session->endpoint));
 				ao2_cleanup(ind_data);
 			}

Modified: team/dlee/endpoints/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/endpoints/channels/chan_iax2.c?view=diff&rev=387290&r1=387289&r2=387290
==============================================================================
--- team/dlee/endpoints/channels/chan_iax2.c (original)
+++ team/dlee/endpoints/channels/chan_iax2.c Wed May  1 23:53:23 2013
@@ -284,7 +284,7 @@
 static char regcontext[AST_MAX_CONTEXT] = "";
 
 static struct ast_event_sub *network_change_event_subscription; /*!< subscription id for network change events */
-static struct ast_event_sub *acl_change_event_subscription; /*!< subscription id for ACL change events */
+static struct stasis_subscription *acl_change_sub; /*!< subscription id for ACL change events */
 static int network_change_event_sched_id = -1;
 
 static int maxauthreq = 3;
@@ -1255,7 +1255,7 @@
 static int replace_callno(const void *obj);
 static void sched_delay_remove(struct sockaddr_in *sin, callno_entry entry);
 static void network_change_event_cb(const struct ast_event *, void *);
-static void acl_change_event_cb(const struct ast_event *, void *);
+static void acl_change_stasis_cb(void *data, struct stasis_subscription *sub, struct stasis_topic *topic, struct stasis_message *message);
 
 static struct ast_channel_tech iax2_tech = {
 	.type = "IAX2",
@@ -1338,18 +1338,18 @@
 	}
 }
 
-static void acl_change_event_subscribe(void)
-{
-	if (!acl_change_event_subscription) {
-		acl_change_event_subscription = ast_event_subscribe(AST_EVENT_ACL_CHANGE,
-			acl_change_event_cb, "IAX2 ACL Change", NULL, AST_EVENT_IE_END);
-	}
-}
-
-static void acl_change_event_unsubscribe(void)
-{
-	if (acl_change_event_subscription) {
-		acl_change_event_subscription = ast_event_unsubscribe(acl_change_event_subscription);
+static void acl_change_stasis_subscribe(void)
+{
+	if (!acl_change_sub) {
+		acl_change_sub = stasis_subscribe(ast_acl_topic(),
+			acl_change_stasis_cb, NULL);
+	}
+}
+
+static void acl_change_stasis_unsubscribe(void)
+{
+	if (acl_change_sub) {
+		acl_change_sub = stasis_unsubscribe(acl_change_sub);
 	}
 }
 
@@ -1375,8 +1375,13 @@
 
 }
 
-static void acl_change_event_cb(const struct ast_event *event, void *userdata)
-{
+static void acl_change_stasis_cb(void *data, struct stasis_subscription *sub,
+	struct stasis_topic *topic, struct stasis_message *message)
+{
+	if (stasis_message_type(message) != ast_named_acl_change_type()) {
+		return;
+	}
+
 	ast_log(LOG_NOTICE, "Reloading chan_iax2 in response to ACL change event.\n");
 	reload_config(1);
 }
@@ -10421,21 +10426,21 @@
 
 					ast_set_flag64(iaxs[fr->callno], IAX_QUELCH);
 					if (ies.musiconhold) {
+						const char *moh_suggest;
+
 						iax2_lock_owner(fr->callno);
 						if (!iaxs[fr->callno] || !iaxs[fr->callno]->owner) {
 							break;
 						}
-						if (ast_bridged_channel(iaxs[fr->callno]->owner)) {
-							const char *moh_suggest = iaxs[fr->callno]->mohsuggest;
-
-							/*
-							 * We already hold the owner lock so we do not
-							 * need to check iaxs[fr->callno] after it returns.
-							 */
-							iax2_queue_control_data(fr->callno, AST_CONTROL_HOLD, 
-								S_OR(moh_suggest, NULL),
-								!ast_strlen_zero(moh_suggest) ? strlen(moh_suggest) + 1 : 0);
-						}
+
+						/*
+						 * We already hold the owner lock so we do not
+						 * need to check iaxs[fr->callno] after it returns.
+						 */
+						moh_suggest = iaxs[fr->callno]->mohsuggest;
+						iax2_queue_control_data(fr->callno, AST_CONTROL_HOLD,
+							S_OR(moh_suggest, NULL),
+							!ast_strlen_zero(moh_suggest) ? strlen(moh_suggest) + 1 : 0);
 						ast_channel_unlock(iaxs[fr->callno]->owner);
 					}
 				}
@@ -10460,13 +10465,12 @@
 					if (!iaxs[fr->callno]->owner) {
 						break;
 					}
-					if (ast_bridged_channel(iaxs[fr->callno]->owner)) {
-						/*
-						 * We already hold the owner lock so we do not
-						 * need to check iaxs[fr->callno] after it returns.
-						 */
-						iax2_queue_control_data(fr->callno, AST_CONTROL_UNHOLD, NULL, 0);
-					}
+
+					/*
+					 * We already hold the owner lock so we do not
+					 * need to check iaxs[fr->callno] after it returns.
+					 */
+					iax2_queue_control_data(fr->callno, AST_CONTROL_UNHOLD, NULL, 0);
 					ast_channel_unlock(iaxs[fr->callno]->owner);
 				}
 				break;
@@ -12700,7 +12704,7 @@
 	}
 
 	if (subscribe_acl_change) {
-		acl_change_event_subscribe();
+		acl_change_stasis_subscribe();
 	}
 
 	return peer;
@@ -12972,7 +12976,7 @@
 	}
 
 	if (subscribe_acl_change) {
-		acl_change_event_subscribe();
+		acl_change_stasis_subscribe();
 	}
 
 	return user;
@@ -14284,7 +14288,7 @@
 	int x;
 
 	network_change_event_unsubscribe();
-	acl_change_event_unsubscribe();
+	acl_change_stasis_unsubscribe();
 
 	ast_manager_unregister("IAXpeers");
 	ast_manager_unregister("IAXpeerlist");

Modified: team/dlee/endpoints/channels/chan_local.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/endpoints/channels/chan_local.c?view=diff&rev=387290&r1=387289&r2=387290
==============================================================================
--- team/dlee/endpoints/channels/chan_local.c (original)
+++ team/dlee/endpoints/channels/chan_local.c Wed May  1 23:53:23 2013
@@ -21,7 +21,7 @@
  * \author Mark Spencer <markster at digium.com>
  *
  * \brief Local Proxy Channel
- * 
+ *
  * \ingroup channel_drivers
  */
 
@@ -77,11 +77,6 @@
 static const char tdesc[] = "Local Proxy Channel Driver";
 
 #define IS_OUTBOUND(a,b) (a == b->chan ? 1 : 0)
-
-/* right now we are treating the locals astobj2 container as a
- * list.  If there is ever a reason to make this more efficient
- * increasing the bucket size would help. */
-static const int BUCKET_SIZE = 1;
 
 static struct ao2_container *locals;
 
@@ -136,21 +131,21 @@
 	.setoption = local_setoption,
 };
 
-/*! \brief the local pvt structure for all channels
-
-	The local channel pvt has two ast_chan objects - the "owner" and the "next channel", the outbound channel
-
-	ast_chan owner -> local_pvt -> ast_chan chan -> yet-another-pvt-depending-on-channel-type
-
-*/
+/*!
+ * \brief the local pvt structure for all channels
+ *
+ * The local channel pvt has two ast_chan objects - the "owner" and the "next channel", the outbound channel
+ *
+ * ast_chan owner -> local_pvt -> ast_chan chan -> yet-another-pvt-depending-on-channel-type
+ */
 struct local_pvt {
+	struct ast_channel *owner;      /*!< Master Channel - Bridging happens here */
+	struct ast_channel *chan;       /*!< Outbound channel - PBX is run here */
+	struct ast_format_cap *reqcap;  /*!< Requested format capabilities */
+	struct ast_jb_conf jb_conf;     /*!< jitterbuffer configuration for this local channel */
 	unsigned int flags;             /*!< Private flags */
 	char context[AST_MAX_CONTEXT];  /*!< Context to call */
 	char exten[AST_MAX_EXTENSION];  /*!< Extension to call */
-	struct ast_format_cap *reqcap;  /*!< Requested format capabilities */
-	struct ast_jb_conf jb_conf;     /*!< jitterbuffer configuration for this local channel */
-	struct ast_channel *owner;      /*!< Master Channel - Bridging happens here */
-	struct ast_channel *chan;       /*!< Outbound channel - PBX is run here */
 };
 
 #define LOCAL_ALREADY_MASQED  (1 << 0) /*!< Already masqueraded */
@@ -218,7 +213,7 @@
 }
 
 /* Called with ast locked */
-static int local_setoption(struct ast_channel *ast, int option, void * data, int datalen)
+static int local_setoption(struct ast_channel *ast, int option, void *data, int datalen)
 {
 	int res = 0;
 	struct local_pvt *p;
@@ -296,7 +291,7 @@
 	if (!context) {
 		ast_log(LOG_WARNING,
 			"Someone used Local/%s somewhere without a @context. This is bad.\n", data);
-		return AST_DEVICE_INVALID;	
+		return AST_DEVICE_INVALID;
 	}
 	*context++ = '\0';
 
@@ -409,7 +404,8 @@
 	return res;
 }
 
-/*! \brief queue a frame on a to either the p->owner or p->chan
+/*!
+ * \brief queue a frame onto either the p->owner or p->chan
  *
  * \note the local_pvt MUST have it's ref count bumped before entering this function and
  * decremented after this function is called.  This is a side effect of the deadlock
@@ -424,7 +420,6 @@
 
 	/* Recalculate outbound channel */
 	other = isoutbound ? p->owner : p->chan;
-
 	if (!other) {
 		return 0;
 	}
@@ -472,6 +467,7 @@
 	if (isoutbound) {
 		/* Pass along answer since somebody answered us */
 		struct ast_frame answer = { AST_FRAME_CONTROL, { AST_CONTROL_ANSWER } };
+
 		res = local_queue_frame(p, isoutbound, &answer, ast, 1);
 	} else {
 		ast_log(LOG_WARNING, "Huh?  Local is being asked to answer?\n");
@@ -685,7 +681,9 @@
 	}
 
 	/* Do not let a masquerade cause a Local channel to be bridged to itself! */
-	if (!ast_check_hangup(newchan) && ((p->owner && ast_channel_internal_bridged_channel(p->owner) == p->chan) || (p->chan && ast_channel_internal_bridged_channel(p->chan) == p->owner))) {
+	if (!ast_check_hangup(newchan)
+		&& ((p->owner && ast_channel_internal_bridged_channel(p->owner) == p->chan)
+			|| (p->chan && ast_channel_internal_bridged_channel(p->chan) == p->owner))) {
 		ast_log(LOG_WARNING, "You can not bridge a Local channel to itself!\n");
 		ao2_unlock(p);
 		ast_queue_hangup(newchan);
@@ -717,6 +715,7 @@
 	} else if (condition == AST_CONTROL_CONNECTED_LINE || condition == AST_CONTROL_REDIRECTING) {
 		struct ast_channel *this_channel;
 		struct ast_channel *the_other_channel;
+
 		/* A connected line update frame may only contain a partial amount of data, such
 		 * as just a source, or just a ton, and not the full amount of information. However,
 		 * the collected information is all stored in the outgoing channel's connectedline
@@ -735,6 +734,7 @@
 		}
 		if (the_other_channel) {
 			unsigned char frame_data[1024];
+
 			if (condition == AST_CONTROL_CONNECTED_LINE) {
 				if (isoutbound) {
 					ast_connected_line_copy_to_caller(ast_channel_caller(the_other_channel), ast_channel_connected(this_channel));
@@ -763,10 +763,10 @@
 			f.datalen = datalen;
 			res = local_queue_frame(p, isoutbound, &f, ast, 1);
 
-			if (!res && (condition == AST_CONTROL_T38_PARAMETERS) &&
-			    (datalen == sizeof(struct ast_control_t38_parameters))) {
+			if (!res && condition == AST_CONTROL_T38_PARAMETERS
+				&& datalen == sizeof(struct ast_control_t38_parameters)) {
 				const struct ast_control_t38_parameters *parameters = data;
-				
+
 				if (parameters->request_response == AST_T38_REQUEST_PARMS) {
 					res = AST_T38_REQUEST_PARMS;
 				}
@@ -967,7 +967,7 @@
 		S_COR(ast_channel_caller(owner)->id.number.valid, ast_channel_caller(owner)->id.number.str, NULL))) {
 		ast_log(LOG_NOTICE, "No such extension/context %s@%s while calling Local channel\n", exten, context);
 		res = -1;
-		chan = ast_channel_unref(chan); /* we already unlocked it, so clear it hear so the cleanup label won't touch it. */
+		chan = ast_channel_unref(chan); /* we already unlocked it, so clear it here so the cleanup label won't touch it. */
 		goto return_cleanup;
 	}
 
@@ -997,20 +997,22 @@
 		</managerEventInstance>
 	***/
 	manager_event(EVENT_FLAG_CALL, "LocalBridge",
-		      "Channel1: %s\r\n"
-		      "Channel2: %s\r\n"
-		      "Uniqueid1: %s\r\n"
-		      "Uniqueid2: %s\r\n"
-		      "Context: %s\r\n"
-		      "Exten: %s\r\n"
-		      "LocalOptimization: %s\r\n",
-			ast_channel_name(p->owner), ast_channel_name(p->chan), ast_channel_uniqueid(p->owner), ast_channel_uniqueid(p->chan),
-			p->context, p->exten,
-			ast_test_flag(p, LOCAL_NO_OPTIMIZATION) ? "Yes" : "No");
+		"Channel1: %s\r\n"
+		"Channel2: %s\r\n"
+		"Uniqueid1: %s\r\n"
+		"Uniqueid2: %s\r\n"
+		"Context: %s\r\n"
+		"Exten: %s\r\n"
+		"LocalOptimization: %s\r\n",
+		ast_channel_name(p->owner), ast_channel_name(p->chan),
+		ast_channel_uniqueid(p->owner), ast_channel_uniqueid(p->chan),
+		p->context, p->exten,
+		ast_test_flag(p, LOCAL_NO_OPTIMIZATION) ? "Yes" : "No");
 
 
 	/* Start switch on sub channel */
-	if (!(res = ast_pbx_start(chan))) {
+	res = ast_pbx_start(chan);
+	if (!res) {
 		ao2_lock(p);
 		ast_set_flag(p, LOCAL_LAUNCHED_PBX);
 		ao2_unlock(p);
@@ -1103,7 +1105,6 @@
 	if (!p->owner && !p->chan) {
 		ao2_unlock(p);
 
-		/* Remove from list */
 		ao2_unlink(locals, p);
 		ao2_ref(p, -1);
 		p = NULL;
@@ -1188,8 +1189,7 @@
 			if (ast_test_flag(tmp, LOCAL_NO_OPTIMIZATION))
 				ast_set_flag(&tmp->jb_conf, AST_JB_ENABLED);
 			else {
-				ast_log(LOG_ERROR, "You must use the 'n' option for chan_local "
-					"to use the 'j' option to enable the jitterbuffer\n");
+				ast_log(LOG_ERROR, "You must use the 'n' option with the 'j' option to enable the jitter buffer\n");
 			}
 		}
 		if (strchr(opts, 'b')) {
@@ -1208,7 +1208,6 @@
 	ast_copy_string(tmp->context, c ? c : "default", sizeof(tmp->context));
 	ast_copy_string(tmp->exten, parse, sizeof(tmp->exten));
 
-	/* Add to list */
 	ao2_link(locals, tmp);
 
 	return tmp; /* this is returned with a ref */
@@ -1217,75 +1216,64 @@
 /*! \brief Start new local channel */
 static struct ast_channel *local_new(struct local_pvt *p, int state, const char *linkedid, struct ast_callid *callid)
 {
-	struct ast_channel *tmp = NULL, *tmp2 = NULL;
+	struct ast_channel *owner;
+	struct ast_channel *chan;
 	struct ast_format fmt;
 	int generated_seqno = ast_atomic_fetchadd_int((int *)&name_sequence, +1);
-	const char *t;
-	int ama;
-
-	/* Allocate two new Asterisk channels */
-	/* safe accountcode */
-	if (p->owner && ast_channel_accountcode(p->owner))
-		t = ast_channel_accountcode(p->owner);
-	else
-		t = "";
-
-	if (p->owner)
-		ama = ast_channel_amaflags(p->owner);
-	else
-		ama = 0;
-
-	/* Make sure that the ;2 channel gets the same linkedid as ;1. You can't pass linkedid to both
-	 * allocations since if linkedid isn't set, then each channel will generate its own linkedid. */
-	if (!(tmp = ast_channel_alloc(1, state, 0, 0, t, p->exten, p->context, linkedid, ama, "Local/%s@%s-%08x;1", p->exten, p->context, generated_seqno))
-		|| !(tmp2 = ast_channel_alloc(1, AST_STATE_RING, 0, 0, t, p->exten, p->context, ast_channel_linkedid(tmp), ama, "Local/%s@%s-%08x;2", p->exten, p->context, generated_seqno))) {
-		if (tmp) {
-			tmp = ast_channel_release(tmp);
+
+	/*
+	 * Allocate two new Asterisk channels
+	 *
+	 * Make sure that the ;2 channel gets the same linkedid as ;1.
+	 * You can't pass linkedid to both allocations since if linkedid
+	 * isn't set, then each channel will generate its own linkedid.
+	 */
+	if (!(owner = ast_channel_alloc(1, state, NULL, NULL, NULL,
+			p->exten, p->context, linkedid, 0,
+			"Local/%s@%s-%08x;1", p->exten, p->context, generated_seqno))
+		|| !(chan = ast_channel_alloc(1, AST_STATE_RING, NULL, NULL, NULL,
+			p->exten, p->context, ast_channel_linkedid(owner), 0,
+			"Local/%s@%s-%08x;2", p->exten, p->context, generated_seqno))) {
+		if (owner) {
+			owner = ast_channel_release(owner);
 		}
 		ast_log(LOG_WARNING, "Unable to allocate channel structure(s)\n");
 		return NULL;
 	}
 
 	if (callid) {
-		ast_channel_callid_set(tmp, callid);
-		ast_channel_callid_set(tmp2, callid);
-	}
-
-	ast_channel_tech_set(tmp, &local_tech);
-	ast_channel_tech_set(tmp2, &local_tech);
-
-	ast_format_cap_copy(ast_channel_nativeformats(tmp), p->reqcap);
-	ast_format_cap_copy(ast_channel_nativeformats(tmp2), p->reqcap);
+		ast_channel_callid_set(owner, callid);
+		ast_channel_callid_set(chan, callid);
+	}
+
+	ast_channel_tech_set(owner, &local_tech);
+	ast_channel_tech_set(chan, &local_tech);
+	ast_channel_tech_pvt_set(owner, p);
+	ast_channel_tech_pvt_set(chan, p);
+
+	ast_format_cap_copy(ast_channel_nativeformats(owner), p->reqcap);
+	ast_format_cap_copy(ast_channel_nativeformats(chan), p->reqcap);
 
 	/* Determine our read/write format and set it on each channel */
 	ast_best_codec(p->reqcap, &fmt);
-	ast_format_copy(ast_channel_writeformat(tmp), &fmt);
-	ast_format_copy(ast_channel_writeformat(tmp2), &fmt);
-	ast_format_copy(ast_channel_rawwriteformat(tmp), &fmt);
-	ast_format_copy(ast_channel_rawwriteformat(tmp2), &fmt);
-	ast_format_copy(ast_channel_readformat(tmp), &fmt);
-	ast_format_copy(ast_channel_readformat(tmp2), &fmt);
-	ast_format_copy(ast_channel_rawreadformat(tmp), &fmt);
-	ast_format_copy(ast_channel_rawreadformat(tmp2), &fmt);
-
-	ast_channel_tech_pvt_set(tmp, p);
-	ast_channel_tech_pvt_set(tmp2, p);
-
-	ast_set_flag(ast_channel_flags(tmp), AST_FLAG_DISABLE_DEVSTATE_CACHE);
-	ast_set_flag(ast_channel_flags(tmp2), AST_FLAG_DISABLE_DEVSTATE_CACHE);
-
-	p->owner = tmp;
-	p->chan = tmp2;
-
-	ast_channel_context_set(tmp, p->context);
-	ast_channel_context_set(tmp2, p->context);
-	ast_channel_exten_set(tmp2, p->exten);
-	ast_channel_priority_set(tmp, 1);
-	ast_channel_priority_set(tmp2, 1);
-
-	ast_jb_configure(tmp, &p->jb_conf);
-
-	return tmp;
+	ast_format_copy(ast_channel_writeformat(owner), &fmt);
+	ast_format_copy(ast_channel_writeformat(chan), &fmt);
+	ast_format_copy(ast_channel_rawwriteformat(owner), &fmt);
+	ast_format_copy(ast_channel_rawwriteformat(chan), &fmt);
+	ast_format_copy(ast_channel_readformat(owner), &fmt);
+	ast_format_copy(ast_channel_readformat(chan), &fmt);
+	ast_format_copy(ast_channel_rawreadformat(owner), &fmt);
+	ast_format_copy(ast_channel_rawreadformat(chan), &fmt);
+
+	ast_set_flag(ast_channel_flags(owner), AST_FLAG_DISABLE_DEVSTATE_CACHE);
+	ast_set_flag(ast_channel_flags(chan), AST_FLAG_DISABLE_DEVSTATE_CACHE);
+
+	p->owner = owner;
+	p->chan = chan;
+
+	ast_jb_configure(owner, &p->jb_conf);
+
+	return owner;
 }
 
 /*! \brief Part of PBX interface */
@@ -1366,43 +1354,31 @@
 static int manager_optimize_away(struct mansession *s, const struct message *m)
 {
 	const char *channel;
-	struct local_pvt *p, *tmp = NULL;
-	struct ast_channel *c;
-	int found = 0;
-	struct ao2_iterator it;
+	struct local_pvt *p;
+	struct local_pvt *found;
+	struct ast_channel *chan;
 
 	channel = astman_get_header(m, "Channel");
-
 	if (ast_strlen_zero(channel)) {
 		astman_send_error(s, m, "'Channel' not specified.");
 		return 0;
 	}
 
-	c = ast_channel_get_by_name(channel);
-	if (!c) {
+	chan = ast_channel_get_by_name(channel);
+	if (!chan) {
 		astman_send_error(s, m, "Channel does not exist.");
 		return 0;
 	}
 
-	p = ast_channel_tech_pvt(c);
-	ast_channel_unref(c);
-	c = NULL;
-
-	it = ao2_iterator_init(locals, 0);
-	while ((tmp = ao2_iterator_next(&it))) {
-		if (tmp == p) {
-			ao2_lock(tmp);
-			found = 1;
-			ast_clear_flag(tmp, LOCAL_NO_OPTIMIZATION);
-			ao2_unlock(tmp);
-			ao2_ref(tmp, -1);
-			break;
-		}
-		ao2_ref(tmp, -1);
-	}
-	ao2_iterator_destroy(&it);
-
+	p = ast_channel_tech_pvt(chan);
+	ast_channel_unref(chan);
+
+	found = p ? ao2_find(locals, p, 0) : NULL;
 	if (found) {
+		ao2_lock(found);
+		ast_clear_flag(found, LOCAL_NO_OPTIMIZATION);
+		ao2_unlock(found);
+		ao2_ref(found, -1);
 		astman_send_ack(s, m, "Queued channel to be optimized away");
 	} else {
 		astman_send_error(s, m, "Unable to find channel");
@@ -1425,7 +1401,8 @@
 	}
 	ast_format_cap_add_all(local_tech.capabilities);
 
-	if (!(locals = ao2_container_alloc(BUCKET_SIZE, NULL, locals_cmp_cb))) {
+	locals = ao2_container_alloc_list(AO2_ALLOC_OPT_LOCK_MUTEX, 0, NULL, locals_cmp_cb);
+	if (!locals) {
 		ast_format_cap_destroy(local_tech.capabilities);
 		return AST_MODULE_LOAD_FAILURE;
 	}

Modified: team/dlee/endpoints/channels/chan_mgcp.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/endpoints/channels/chan_mgcp.c?view=diff&rev=387290&r1=387289&r2=387290
==============================================================================
--- team/dlee/endpoints/channels/chan_mgcp.c (original)
+++ team/dlee/endpoints/channels/chan_mgcp.c Wed May  1 23:53:23 2013
@@ -3226,11 +3226,10 @@
 	   together (but then, why would we want to?) */
 	if (ast_bridged_channel(p->sub->owner)) {
 		/* The three-way person we're about to transfer to could still be in MOH, so
-		   stop if now if appropriate */
-		if (ast_bridged_channel(p->sub->next->owner))
-			ast_queue_control(p->sub->next->owner, AST_CONTROL_UNHOLD);
+		   stop it now */
+		ast_queue_control(p->sub->next->owner, AST_CONTROL_UNHOLD);
 		if (ast_channel_state(p->sub->owner) == AST_STATE_RINGING) {
-			ast_indicate(ast_bridged_channel(p->sub->next->owner), AST_CONTROL_RINGING);
+			ast_queue_control(p->sub->next->owner, AST_CONTROL_RINGING);
 		}
 		if (ast_channel_masquerade(p->sub->next->owner, ast_bridged_channel(p->sub->owner))) {
 			ast_log(LOG_WARNING, "Unable to masquerade %s as %s\n",
@@ -3241,7 +3240,7 @@
 		unalloc_sub(p->sub->next);
 	} else if (ast_bridged_channel(p->sub->next->owner)) {
 		if (ast_channel_state(p->sub->owner) == AST_STATE_RINGING) {
-			ast_indicate(ast_bridged_channel(p->sub->next->owner), AST_CONTROL_RINGING);
+			ast_queue_control(p->sub->next->owner, AST_CONTROL_RINGING);
 		}
 		ast_queue_control(p->sub->next->owner, AST_CONTROL_UNHOLD);
 		if (ast_channel_masquerade(p->sub->owner, ast_bridged_channel(p->sub->next->owner))) {
@@ -3277,8 +3276,7 @@
 	if (sub->outgoing) {
 		/* Answered */
 		if (sub->owner) {
-			if (ast_bridged_channel(sub->owner))
-				ast_queue_control(sub->owner, AST_CONTROL_UNHOLD);
+			ast_queue_control(sub->owner, AST_CONTROL_UNHOLD);
 			sub->cxmode = MGCP_CX_SENDRECV;
 			if (!sub->rtp) {
 				start_rtp(sub);
@@ -3334,8 +3332,7 @@
 				ast_log(LOG_WARNING, "On hook, but already have owner on %s@%s\n", p->name, p->parent->name);
 				ast_log(LOG_WARNING, "If we're onhook why are we here trying to handle a hd or hf?\n");
 			}
-			if (ast_bridged_channel(sub->owner))
-				ast_queue_control(sub->owner, AST_CONTROL_UNHOLD);
+			ast_queue_control(sub->owner, AST_CONTROL_UNHOLD);
 			sub->cxmode = MGCP_CX_SENDRECV;
 			if (!sub->rtp) {
 				start_rtp(sub);
@@ -3452,20 +3449,19 @@
 					sub->cxmode = MGCP_CX_MUTE;
 					ast_verb(3, "MGCP Muting %d on %s@%s\n", sub->id, p->name, p->parent->name);
 					transmit_modify_request(sub);
-					if (sub->owner && ast_bridged_channel(sub->owner))
+					if (sub->owner)
 						ast_queue_control(sub->owner, AST_CONTROL_HOLD);
 					sub->next->cxmode = MGCP_CX_RECVONLY;
 					handle_hd_hf(sub->next, ev);
 				} else if (sub->owner && sub->next->owner) {
 					/* We've got two active calls lets decide whether or not to conference or just flip flop */
 					if ((!sub->outgoing) && (!sub->next->outgoing)) {
-						/* We made both calls lets conferenct */
+						/* We made both calls lets conference */
 						ast_verb(3, "MGCP Conferencing %d and %d on %s@%s\n",
 								sub->id, sub->next->id, p->name, p->parent->name);
 						sub->cxmode = MGCP_CX_CONF;
 						sub->next->cxmode = MGCP_CX_CONF;
-						if (ast_bridged_channel(sub->next->owner))
-							ast_queue_control(sub->next->owner, AST_CONTROL_UNHOLD);
+						ast_queue_control(sub->next->owner, AST_CONTROL_UNHOLD);
 						transmit_modify_request(sub);
 						transmit_modify_request(sub->next);
 					} else {
@@ -3477,11 +3473,9 @@
 						sub->cxmode = MGCP_CX_MUTE;
 						ast_verb(3, "MGCP Muting %d on %s@%s\n", sub->id, p->name, p->parent->name);
 						transmit_modify_request(sub);
-						if (ast_bridged_channel(sub->owner))
-							ast_queue_control(sub->owner, AST_CONTROL_HOLD);
-
-						if (ast_bridged_channel(sub->next->owner))
-							ast_queue_control(sub->next->owner, AST_CONTROL_HOLD);
+
+						ast_queue_control(sub->owner, AST_CONTROL_HOLD);
+						ast_queue_control(sub->next->owner, AST_CONTROL_HOLD);
 
 						handle_hd_hf(sub->next, ev);
 					}
@@ -3496,8 +3490,7 @@
 						/* XXX - What do we do now? */
 						return -1;
 					}
-					if (ast_bridged_channel(p->sub->owner))
-						ast_queue_control(p->sub->owner, AST_CONTROL_UNHOLD);
+					ast_queue_control(p->sub->owner, AST_CONTROL_UNHOLD);
 					p->sub->cxmode = MGCP_CX_SENDRECV;
 					transmit_modify_request(p->sub);
 				}

Modified: team/dlee/endpoints/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/endpoints/channels/chan_sip.c?view=diff&rev=387290&r1=387289&r2=387290
==============================================================================
--- team/dlee/endpoints/channels/chan_sip.c (original)
+++ team/dlee/endpoints/channels/chan_sip.c Wed May  1 23:53:23 2013
@@ -385,7 +385,7 @@
 			<para>Since there are several headers (such as Via) which can occur multiple
 			times, SIP_HEADER takes an optional second argument to specify which header with
 			that name to retrieve. Headers start at offset <literal>1</literal>.</para>
-			<para>Please observe that contents of the SDP (an attachment to the 
+			<para>Please observe that contents of the SDP (an attachment to the
 			SIP request) can't be accessed with this function.</para>
 		</description>
 	</function>
@@ -845,7 +845,7 @@
 static int global_t38_maxdatagram;                /*!< global T.38 FaxMaxDatagram override */
 
 static struct ast_event_sub *network_change_event_subscription; /*!< subscription id for network change events */
-static struct ast_event_sub *acl_change_event_subscription; /*!< subscription id for named ACL system change events */
+static struct stasis_subscription *acl_change_sub; /*!< subscription id for named ACL system change events */
 static int network_change_event_sched_id = -1;
 
 static char used_context[AST_MAX_CONTEXT];        /*!< name of automatically created context for unloading */
@@ -1118,6 +1118,8 @@
 	} while (0)
 
 struct ao2_container *sip_monitor_instances;
+
+struct show_peers_context;
 
 /*---------------------------- Forward declarations of functions in chan_sip.c */
 /* Note: This is added to help splitting up chan_sip.c into several files
@@ -1286,7 +1288,7 @@
 static void sip_peer_hold(struct sip_pvt *p, int hold);
 static void mwi_event_cb(void *, struct stasis_subscription *, struct stasis_topic *, struct stasis_message *);
 static void network_change_event_cb(const struct ast_event *, void *);
-static void acl_change_event_cb(const struct ast_event *event, void *userdata);
+static void acl_change_stasis_cb(void *data, struct stasis_subscription *sub, struct stasis_topic *topic, struct stasis_message *message);
 static void sip_keepalive_all_peers(void);
 
 /*--- Applications, functions, CLI and manager command helpers */
@@ -1296,6 +1298,7 @@
 static int peer_status(struct sip_peer *peer, char *status, int statuslen);
 static char *sip_show_sched(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a);
 static char * _sip_show_peers(int fd, int *total, struct mansession *s, const struct message *m, int argc, const char *argv[]);
+static struct sip_peer *_sip_show_peers_one(int fd, struct mansession *s, struct show_peers_context *cont, struct sip_peer *peer);
 static char *sip_show_peers(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a);
 static char *sip_show_objects(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a);
 static void  print_group(int fd, ast_group_t group, int crlf);
@@ -1581,7 +1584,7 @@
 };
 
 /* -------- End of declarations of structures, constants and forward declarations of functions
-   Below starts actual code 
+   Below starts actual code
    ------------------------
 */
 
@@ -2735,7 +2738,7 @@
 	size_t datalen = ast_str_strlen(req->data);
 	char buf[1024] = "";
 	int timeout = -1;
- 
+
  	/* Read in headers one line at a time */
 	while (datalen < 4 || strncmp(REQ_OFFSET_TO_STR(req, data->used - 4), "\r\n\r\n", 4)) {
  		if (!tcptls_session->client && !authenticated) {
@@ -2844,7 +2847,7 @@
 			}
 			content_length -= strlen(buf);
 			ast_str_append(&req->data, 0, "%s", buf);
-		
+
 			datalen = ast_str_strlen(req->data);
 			if (datalen > SIP_MAX_PACKET_SIZE) {
 				ast_log(LOG_WARNING, "Rejecting TLS packet from '%s' because way too large: %zu\n",
@@ -3065,7 +3068,7 @@
 			ast_str_append(&req->data, 0, "%s", ast_str_buffer(tcptls_session->overflow_buf));
 			ast_str_reset(tcptls_session->overflow_buf);
 		}
-		
+
 		datalen = ast_str_strlen(req->data);
 		if (datalen > SIP_MAX_PACKET_SIZE) {
 			ast_log(LOG_WARNING, "Rejecting TCP packet from '%s' because way too large: %zu\n",
@@ -3196,7 +3199,7 @@
 			}
 		}
 
-		/* 
+		/*
 		 * handle the socket event, check for both reads from the socket fd or TCP overflow buffer,
 		 * and writes from alert_pipe fd.
 		 */
@@ -3494,7 +3497,7 @@
 	AST_SCHED_DEL_UNREF(sched, dialog->waitid, dialog_unref(dialog, "when you delete the waitid sched, you should dec the refcount for the stored dialog ptr"));
 
 	AST_SCHED_DEL_UNREF(sched, dialog->initid, dialog_unref(dialog, "when you delete the initid sched, you should dec the refcount for the stored dialog ptr"));
-	
+
 	if (dialog->autokillid > -1) {
 		AST_SCHED_DEL_UNREF(sched, dialog->autokillid, dialog_unref(dialog, "when you delete the autokillid sched, you should dec the refcount for the stored dialog ptr"));
 	}
@@ -3715,7 +3718,7 @@
 static int find_sip_method(const char *msg)
 {
 	int i, res = 0;
-	
+
 	if (ast_strlen_zero(msg)) {
 		return 0;
 	}
@@ -5626,7 +5629,7 @@
  * Checks the "sipregs" realtime family from extconfig.conf if it's configured.
  * This returns a pointer to a peer and because we use build_peer, we can rest
  * assured that the refcount is bumped.
- * 
+ *
  * \note This is never called with both newpeername and addr at the same time.
  * If you do, be prepared to get a peer with a different name than newpeername.
  */
@@ -6288,7 +6291,7 @@
 		 * an A record lookup should be used instead of SRV.
 		 */
 		if (!hostport.port && sip_cfg.srvlookup) {

[... 2458 lines stripped ...]



More information about the asterisk-commits mailing list