[asterisk-commits] bebuild: tag 11.0.0-rc2 r375164 - in /tags/11.0.0-rc2: ./ channels/ include/a...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Oct 17 14:22:52 CDT 2012


Author: bebuild
Date: Wed Oct 17 14:22:46 2012
New Revision: 375164

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=375164
Log:
Updates for Asterisk 11.0.0-rc2

* Updated ChangeLog
* Updated version number
* Removed old summaries
* Merged r375051 (ASTERISK-20531)
* Merged r374792 (ASTERISK-20544)
* Merged r374842 (ASTERISK-20545)
* Merged r374850, r374851, r374877 (ASTERISK-20554)
* Merged r375148 (ASTERISK-20559)


Added:
    tags/11.0.0-rc2/main/sip_api.c
      - copied unchanged from r374842, branches/11/main/sip_api.c
Removed:
    tags/11.0.0-rc2/asterisk-11.0.0-rc1-summary.html
    tags/11.0.0-rc2/asterisk-11.0.0-rc1-summary.txt
    tags/11.0.0-rc2/channels/chan_sip.exports.in
Modified:
    tags/11.0.0-rc2/   (props changed)
    tags/11.0.0-rc2/.version
    tags/11.0.0-rc2/ChangeLog
    tags/11.0.0-rc2/channels/chan_iax2.c
    tags/11.0.0-rc2/channels/chan_motif.c
    tags/11.0.0-rc2/channels/chan_sip.c
    tags/11.0.0-rc2/include/asterisk/sip_api.h
    tags/11.0.0-rc2/main/manager.c
    tags/11.0.0-rc2/main/tcptls.c

Propchange: tags/11.0.0-rc2/
------------------------------------------------------------------------------
Binary property 'branch-10-merged' - no diff available.

Propchange: tags/11.0.0-rc2/
------------------------------------------------------------------------------
    svn:mergeinfo = /branches/11:374792,374842,374850-374851,374877,375051,375148

Modified: tags/11.0.0-rc2/.version
URL: http://svnview.digium.com/svn/asterisk/tags/11.0.0-rc2/.version?view=diff&rev=375164&r1=375163&r2=375164
==============================================================================
--- tags/11.0.0-rc2/.version (original)
+++ tags/11.0.0-rc2/.version Wed Oct 17 14:22:46 2012
@@ -1,1 +1,1 @@
-11.0.0-rc1
+11.0.0-rc2

Modified: tags/11.0.0-rc2/ChangeLog
URL: http://svnview.digium.com/svn/asterisk/tags/11.0.0-rc2/ChangeLog?view=diff&rev=375164&r1=375163&r2=375164
==============================================================================
--- tags/11.0.0-rc2/ChangeLog (original)
+++ tags/11.0.0-rc2/ChangeLog Wed Oct 17 14:22:46 2012
@@ -1,3 +1,73 @@
+2012-10-17  Asterisk Development Team <asteriskteam at digium.com>
+
+	* Asterisk 11.0.0-rc2 Released.
+
+	* [r374792] Fix segfault regression from r370681
+
+	  Due to usage of ast_hook_send_action, AMI action handling code should
+	  be able to handle a NULL mansession->session.  This would cause a
+	  crash	on NULL dereference if action_originate was called from
+	  ast_hook_send_action.
+
+  	  (closes issue ASTERISK-20544)
+
+	* [r374842] Don't make chan_sip export global symbols.
+
+	  During testing, it was discovered that having chan_sip export global
+	  symbols was problematic.
+
+	  The biggest problem was that load order was affected.
+	  Trying to use realtime could be problematic since in
+	  all likelihood the necessary realtime driver(s) would
+	  not be loaded before chan_sip.
+
+	  In addition, it was found that it was impossible to
+	  use the Digium Phone Module for Asterisk since it
+	  must be loaded before chan_sip since it must hook
+	  into chan_sip's configuration parsing.
+
+	  The solution is to use a virtual table in the same
+	  manner that other modules in Asterisk do, like
+	  app_voicemail.
+
+	  (closes issue ASTERISK-20545)
+	  Reported by: kmoore
+
+	* [r374850] Fix an issue where outgoing calls would fail to establish
+	  audio due to ICE negotiation failures.
+
+	  This change removes the requirement for ufrag and pwd in the transport
+	  stanza and also makes us the controlling agent.
+
+	  (closes issue ASTERISK-20554)
+	  Reported by: mmichelson
+
+	* [r374851] Remove code that should not have gotten in (r374850)
+
+	  (issue ASTERISK-20554)
+
+	* [r374877] Fix a bug where audio on Google Voice would not work due to
+	  ignoring candidates.
+
+	  Instead of ignoring parts of the message that are not known just
+	  ignore the ones we know may be present and that would cause a problem.
+
+	* [r375148] Ensure Asterisk fails TCP/TLS SIP calls when certificate
+	  checking fails
+
+	  When placing a call to a TCP/TLS SIP endpoint whose certificate is not
+	  signed by a configured CA certificate, Asterisk would issue a warning
+	  and continue to process the call as if there was not an issue with the
+	  certificate.  Asterisk now properly fails the call if the certificate
+	  fails verification or if the certificate does not exist when
+	  certificate checking is enabled (the default behavior).
+
+	  (closes issue ASTERISK-20559)
+	  Review: https://reviewboard.asterisk.org/r/2163/
+
+	* [r375051] Remove a log message that was left in accidentally from
+	  call-id logging development.
+
 2012-10-08  Asterisk Development Team <asteriskteam at digium.com>
 
 	* Asterisk 11.0.0-rc1 Released.

Modified: tags/11.0.0-rc2/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/tags/11.0.0-rc2/channels/chan_iax2.c?view=diff&rev=375164&r1=375163&r2=375164
==============================================================================
--- tags/11.0.0-rc2/channels/chan_iax2.c (original)
+++ tags/11.0.0-rc2/channels/chan_iax2.c Wed Oct 17 14:22:46 2012
@@ -1092,7 +1092,6 @@
 	struct ast_callid *callid = ast_create_callid();
 	char buffer[AST_CALLID_BUFFER_LENGTH];
 	ast_callid_strnprint(buffer, sizeof(buffer), callid);
-	ast_log(LOG_NOTICE, "iax_pvt_callid_new created and set %s\n", buffer);
 	iax_pvt_callid_set(callno, callid);
 	ast_callid_unref(callid);
 }

Modified: tags/11.0.0-rc2/channels/chan_motif.c
URL: http://svnview.digium.com/svn/asterisk/tags/11.0.0-rc2/channels/chan_motif.c?view=diff&rev=375164&r1=375163&r2=375164
==============================================================================
--- tags/11.0.0-rc2/channels/chan_motif.c (original)
+++ tags/11.0.0-rc2/channels/chan_motif.c Wed Oct 17 14:22:46 2012
@@ -1729,6 +1729,7 @@
 	struct jingle_session *session;
 	struct ast_channel *chan;
 	enum jingle_transport transport = JINGLE_TRANSPORT_NONE;
+	struct ast_rtp_engine_ice *ice;
 	AST_DECLARE_APP_ARGS(args,
 			     AST_APP_ARG(name);
 			     AST_APP_ARG(target);
@@ -1832,6 +1833,15 @@
 		jingle_enable_video(session);
 	}
 
+	/* As this is outgoing set ourselves as controlling */
+	if (session->rtp && (ice = ast_rtp_instance_get_ice(session->rtp))) {
+		ice->ice_lite(session->rtp);
+	}
+
+	if (session->vrtp && (ice = ast_rtp_instance_get_ice(session->vrtp))) {
+		ice->ice_lite(session->vrtp);
+	}
+
 	/* We purposely don't decrement the session here as there is a reference on the channel */
 	ao2_link(endpoint->state->sessions, session);
 
@@ -1939,13 +1949,9 @@
 		return -1;
 	}
 
-	if (ast_strlen_zero(ufrag) || ast_strlen_zero(pwd)) {
-		jingle_queue_hangup_with_cause(session, AST_CAUSE_PROTOCOL_ERROR);
-		ast_log(LOG_ERROR, "Invalid ICE-UDP transport information received on session '%s', ufrag or pwd not present\n", session->sid);
-		return -1;
-	}
-
-	ice->set_authentication(rtp, ufrag, pwd);
+	if (!ast_strlen_zero(ufrag) && !ast_strlen_zero(pwd)) {
+		ice->set_authentication(rtp, ufrag, pwd);
+	}
 
 	for (candidate = iks_child(transport); candidate; candidate = iks_next(candidate)) {
 		char *component = iks_find_attrib(candidate, "component"), *foundation = iks_find_attrib(candidate, "foundation");
@@ -2102,7 +2108,8 @@
 		struct ast_rtp_instance *rtp = NULL;
 		iks *description, *transport;
 
-		if (strcmp(iks_name(content), "content")) {
+		/* Ignore specific parts if they are known not to be useful */
+		if (!strcmp(iks_name(content), "conference-info")) {
 			continue;
 		}
 

Modified: tags/11.0.0-rc2/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/tags/11.0.0-rc2/channels/chan_sip.c?view=diff&rev=375164&r1=375163&r2=375164
==============================================================================
--- tags/11.0.0-rc2/channels/chan_sip.c (original)
+++ tags/11.0.0-rc2/channels/chan_sip.c Wed Oct 17 14:22:46 2012
@@ -7287,7 +7287,8 @@
 	return 0;
 }
 
-int ast_sipinfo_send(
+
+static int sipinfo_send(
 		struct ast_channel *chan,
 		struct ast_variable *headers,
 		const char *content_type,
@@ -33162,12 +33163,22 @@
 	AST_DATA_ENTRY("asterisk/channel/sip/peers", &peers_data_provider),
 };
 
+static const struct ast_sip_api_tech chan_sip_api_provider = {
+	.version = AST_SIP_API_VERSION,
+	.name = "chan_sip",
+	.sipinfo_send = sipinfo_send,
+};
+
 /*! \brief PBX load module - initialization */
 static int load_module(void)
 {
 	ast_verbose("SIP channel loading...\n");
 
 	if (!(sip_tech.capabilities = ast_format_cap_alloc())) {
+		return AST_MODULE_LOAD_FAILURE;
+	}
+
+	if (ast_sip_api_provider_register(&chan_sip_api_provider)) {
 		return AST_MODULE_LOAD_FAILURE;
 	}
 
@@ -33332,6 +33343,8 @@
 	struct ao2_iterator i;
 	int wait_count;
 
+	ast_sip_api_provider_unregister();
+
 	ast_websocket_remove_protocol("sip", sip_websocket_callback);
 
 	network_change_event_unsubscribe();
@@ -33507,7 +33520,7 @@
 	return 0;
 }
 
-AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS | AST_MODFLAG_LOAD_ORDER, "Session Initiation Protocol (SIP)",
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "Session Initiation Protocol (SIP)",
 		.load = load_module,
 		.unload = unload_module,
 		.reload = reload,

Modified: tags/11.0.0-rc2/include/asterisk/sip_api.h
URL: http://svnview.digium.com/svn/asterisk/tags/11.0.0-rc2/include/asterisk/sip_api.h?view=diff&rev=375164&r1=375163&r2=375164
==============================================================================
--- tags/11.0.0-rc2/include/asterisk/sip_api.h (original)
+++ tags/11.0.0-rc2/include/asterisk/sip_api.h Wed Oct 17 14:22:46 2012
@@ -26,6 +26,16 @@
 #include "asterisk/optional_api.h"
 #include "asterisk/config.h"
 
+#define AST_SIP_API_VERSION 1
+
+struct ast_sip_api_tech {
+	const int version;
+	const char *name;
+	int (*sipinfo_send)(struct ast_channel *chan,
+			struct ast_variable *headers, const char *content_type,
+			const char *content, const char *useragent_filter);
+};
+
 /*!
  * \brief Send a customized SIP INFO request
  *
@@ -44,6 +54,23 @@
 		const char *content,
 		const char *useragent_filter);
 
+/*!
+ * \brief Register a SIP API provider
+ *
+ * This will fail if a provider has already registered or if the
+ * provider is using an incorrect version.
+ *
+ * \param provider The provider to register
+ * \retval 0 Success
+ * \retval -1 Failure
+ */
+int ast_sip_api_provider_register(const struct ast_sip_api_tech *provider);
+
+/*!
+ * \brief Unregister a SIP API provider
+ */
+void ast_sip_api_provider_unregister(void);
+
 #if defined(__cplusplus) || defined(c_plusplus)
 }
 #endif

Modified: tags/11.0.0-rc2/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/tags/11.0.0-rc2/main/manager.c?view=diff&rev=375164&r1=375163&r2=375164
==============================================================================
--- tags/11.0.0-rc2/main/manager.c (original)
+++ tags/11.0.0-rc2/main/manager.c Wed Oct 17 14:22:46 2012
@@ -4369,7 +4369,7 @@
 
 	/* Allocate requested channel variables */
 	vars = astman_get_variables(m);
-	if (s->session->chanvars) {
+	if (s->session && s->session->chanvars) {
 		struct ast_variable *v, *old;
 		old = vars;
 		vars = NULL;

Modified: tags/11.0.0-rc2/main/tcptls.c
URL: http://svnview.digium.com/svn/asterisk/tags/11.0.0-rc2/main/tcptls.c?view=diff&rev=375164&r1=375163&r2=375164
==============================================================================
--- tags/11.0.0-rc2/main/tcptls.c (original)
+++ tags/11.0.0-rc2/main/tcptls.c Wed Oct 17 14:22:46 2012
@@ -192,11 +192,19 @@
 				long res;
 				peer = SSL_get_peer_certificate(tcptls_session->ssl);
 				if (!peer) {
-					ast_log(LOG_WARNING, "No peer SSL certificate\n");
+					ast_log(LOG_ERROR, "No peer SSL certificate to verify\n");
+					ast_tcptls_close_session_file(tcptls_session);
+					ao2_ref(tcptls_session, -1);
+					return NULL;
 				}
+
 				res = SSL_get_verify_result(tcptls_session->ssl);
 				if (res != X509_V_OK) {
 					ast_log(LOG_ERROR, "Certificate did not verify: %s\n", X509_verify_cert_error_string(res));
+					X509_free(peer);
+					ast_tcptls_close_session_file(tcptls_session);
+					ao2_ref(tcptls_session, -1);
+					return NULL;
 				}
 				if (!ast_test_flag(&tcptls_session->parent->tls_cfg->flags, AST_SSL_IGNORE_COMMON_NAME)) {
 					ASN1_STRING *str;
@@ -227,17 +235,13 @@
 					}
 					if (!found) {
 						ast_log(LOG_ERROR, "Certificate common name did not match (%s)\n", tcptls_session->parent->hostname);
-						if (peer) {
-							X509_free(peer);
-						}
+						X509_free(peer);
 						ast_tcptls_close_session_file(tcptls_session);
 						ao2_ref(tcptls_session, -1);
 						return NULL;
 					}
 				}
-				if (peer) {
-					X509_free(peer);
-				}
+				X509_free(peer);
 			}
 		}
 		if (!tcptls_session->f) {	/* no success opening descriptor stacking */




More information about the asterisk-commits mailing list