Compare commits

...

20 Commits

Author SHA1 Message Date
Asterisk Autobuilder
8ed31147ca Importing release summary for 11.0.2 release.
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/11.0.2@377314 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-06 13:51:48 +00:00
Asterisk Autobuilder
7fcd84b829 Merge r376870 for 11.0.2
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/11.0.2@377311 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-06 13:46:45 +00:00
Asterisk Autobuilder
285ab06933 Create 11.0.2
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/11.0.2@377305 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-06 13:14:37 +00:00
Asterisk Autobuilder
d880cb4af7 Importing release summary for 11.0.1 release.
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/11.0.1@375845 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-05 17:45:48 +00:00
Asterisk Autobuilder
480fcfbe9d Update externals to point to something that actually exists
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/11.0.1@375844 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-05 17:43:25 +00:00
Asterisk Autobuilder
1af50ebfb5 Update property externals
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/11.0.1@375843 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-05 17:34:09 +00:00
Asterisk Autobuilder
0ceab30058 Merge fix for ASTERISK-20601
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/11.0.1@375836 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-05 16:56:31 +00:00
Asterisk Autobuilder
a69c0bfe4b Remove old release summaries
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/11.0.1@375835 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-05 16:30:16 +00:00
Asterisk Autobuilder
94f0f11e36 Update 11.0.1 with merged changes
Merged r375559 for ASTERISK-20631
Merged r375575 for ASTERISK-20611


git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/11.0.1@375834 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-05 16:29:46 +00:00
Asterisk Autobuilder
1ce2e1388a Create 11.0.1 tag
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/11.0.1@375833 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-05 15:39:29 +00:00
Asterisk Autobuilder
affbc6907e Importing release summary for 11.0.0 release.
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/11.0.0@375354 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-25 15:32:16 +00:00
Asterisk Autobuilder
aa4ec610ff Update ChangeLog; .version for Asterisk 11
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/11.0.0@375353 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-25 14:39:41 +00:00
Asterisk Autobuilder
b5310067fd Create 11.0.0 tag
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/11.0.0@375352 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-25 14:34:00 +00:00
Asterisk Autobuilder
2fd9440b58 Importing release summary for 11.0.0-rc2 release.
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/11.0.0-rc2@375174 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-17 19:33:15 +00:00
Asterisk Autobuilder
6257356ecc 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)



git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/11.0.0-rc2@375164 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-17 19:22:46 +00:00
Asterisk Autobuilder
2f9be4af66 Create 11.0.0-rc2
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/11.0.0-rc2@375145 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-17 18:26:39 +00:00
Asterisk Autobuilder
c41eb44de9 Use autotagged externals
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/11.0.0-rc1@374694 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-08 21:02:38 +00:00
Asterisk Autobuilder
fb2735c6aa Importing release summary for 11.0.0-rc1 release.
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/11.0.0-rc1@374693 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-08 21:02:27 +00:00
Asterisk Autobuilder
efc57f4d64 Importing files for 11.0.0-rc1 release.
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/11.0.0-rc1@374692 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-08 21:02:21 +00:00
Asterisk Autobuilder
42608e5587 Creating tag for the release of asterisk-11.0.0-rc1
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/11.0.0-rc1@374691 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-08 20:53:55 +00:00
17 changed files with 21126 additions and 61 deletions

1
.lastclean Normal file
View File

@@ -0,0 +1 @@
40

1
.version Normal file
View File

@@ -0,0 +1 @@
11.0.2

20795
ChangeLog Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -2264,7 +2264,7 @@ static char *handle_cli_confbridge_start_record(struct ast_cli_entry *e, int cmd
ast_copy_string(bridge->b_profile.rec_file, rec_file, sizeof(bridge->b_profile.rec_file));
}
if (conf_start_record(bridge)) {
if (start_conf_record_thread(bridge)) {
ast_cli(a->fd, "Could not start recording due to internal error.\n");
ao2_unlock(bridge);
ao2_ref(bridge, -1);
@@ -2602,7 +2602,7 @@ static int action_confbridgestartrecord(struct mansession *s, const struct messa
ast_copy_string(bridge->b_profile.rec_file, recordfile, sizeof(bridge->b_profile.rec_file));
}
if (conf_start_record(bridge)) {
if (start_conf_record_thread(bridge)) {
astman_send_error(s, m, "Internal error starting conference recording.");
ao2_unlock(bridge);
ao2_ref(bridge, -1);

View File

@@ -0,0 +1,60 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Release Summary - asterisk-11.0.2</title></head>
<body>
<h1 align="center"><a name="top">Release Summary</a></h1>
<h3 align="center">asterisk-11.0.2</h3>
<h3 align="center">Date: 2012-12-06</h3>
<h3 align="center">&lt;asteriskteam@digium.com&gt;</h3>
<hr/>
<h2 align="center">Table of Contents</h2>
<ol>
<li><a href="#summary">Summary</a></li>
<li><a href="#contributors">Contributors</a></li>
<li><a href="#commits">Other Changes</a></li>
<li><a href="#diffstat">Diffstat</a></li>
</ol>
<hr/>
<a name="summary"><h2 align="center">Summary</h2></a>
<center><a href="#top">[Back to Top]</a></center><br/><p>This release includes only bug fixes. The changes included were made only to address problems that have been identified in this release series. Users should be able to safely upgrade to this version if this release series is already in use. Users considering upgrading from a previous release series are strongly encouraged to review the UPGRADE.txt document as well as the CHANGES document for information about upgrading to this release series.</p>
<p>The data in this summary reflects changes that have been made since the previous release, asterisk-11.0.1.</p>
<hr/>
<a name="contributors"><h2 align="center">Contributors</h2></a>
<center><a href="#top">[Back to Top]</a></center><br/><p>This table lists the people who have submitted code, those that have tested patches, as well as those that reported issues on the issue tracker that were resolved in this release. For coders, the number is how many of their patches (of any size) were committed into this release. For testers, the number is the number of times their name was listed as assisting with testing a patch. Finally, for reporters, the number is the number of issues that they reported that were closed by commits that went into this release.</p>
<table width="100%" border="0">
<tr>
<td width="33%"><h3>Coders</h3></td>
<td width="33%"><h3>Testers</h3></td>
<td width="33%"><h3>Reporters</h3></td>
</tr>
<tr valign="top">
<td>
2 bebuild<br/>
</td>
<td>
</td>
<td>
</td>
</tr>
</table>
<hr/>
<a name="commits"><h2 align="center">Commits Not Associated with an Issue</h2></a>
<center><a href="#top">[Back to Top]</a></center><br/><p>This is a list of all changes that went into this release that did not directly close an issue from the issue tracker. The commits may have been marked as being related to an issue. If that is the case, the issue numbers are listed here, as well.</p>
<table width="100%" border="1">
<tr><td><b>Revision</b></td><td><b>Author</b></td><td><b>Summary</b></td><td><b>Issues Referenced</b></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/11?view=revision&revision=377305">377305</a></td><td>bebuild</td><td>Create 11.0.2</td>
<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/11?view=revision&revision=377311">377311</a></td><td>bebuild</td><td>Merge r376870 for 11.0.2</td>
<td></td></tr></table>
<hr/>
<a name="diffstat"><h2 align="center">Diffstat Results</h2></a>
<center><a href="#top">[Back to Top]</a></center><br/><p>This is a summary of the changes to the source code that went into this release that was generated using the diffstat utility.</p>
<pre>
.version | 2
ChangeLog | 11 ++++
asterisk-11.0.1-summary.html | 67 ----------------------------
asterisk-11.0.1-summary.txt | 102 -------------------------------------------
channels/chan_local.c | 21 +++++---
5 files changed, 25 insertions(+), 178 deletions(-)
</pre><br/>
<hr/>
</body>
</html>

View File

@@ -0,0 +1,88 @@
Release Summary
asterisk-11.0.2
Date: 2012-12-06
<asteriskteam@digium.com>
----------------------------------------------------------------------
Table of Contents
1. Summary
2. Contributors
3. Other Changes
4. Diffstat
----------------------------------------------------------------------
Summary
[Back to Top]
This release includes only bug fixes. The changes included were made only
to address problems that have been identified in this release series.
Users should be able to safely upgrade to this version if this release
series is already in use. Users considering upgrading from a previous
release series are strongly encouraged to review the UPGRADE.txt document
as well as the CHANGES document for information about upgrading to this
release series.
The data in this summary reflects changes that have been made since the
previous release, asterisk-11.0.1.
----------------------------------------------------------------------
Contributors
[Back to Top]
This table lists the people who have submitted code, those that have
tested patches, as well as those that reported issues on the issue tracker
that were resolved in this release. For coders, the number is how many of
their patches (of any size) were committed into this release. For testers,
the number is the number of times their name was listed as assisting with
testing a patch. Finally, for reporters, the number is the number of
issues that they reported that were closed by commits that went into this
release.
Coders Testers Reporters
2 bebuild
----------------------------------------------------------------------
Commits Not Associated with an Issue
[Back to Top]
This is a list of all changes that went into this release that did not
directly close an issue from the issue tracker. The commits may have been
marked as being related to an issue. If that is the case, the issue
numbers are listed here, as well.
+------------------------------------------------------------------------+
| Revision | Author | Summary | Issues Referenced |
|------------+----------+---------------------------+--------------------|
| 377305 | bebuild | Create 11.0.2 | |
|------------+----------+---------------------------+--------------------|
| 377311 | bebuild | Merge r376870 for 11.0.2 | |
+------------------------------------------------------------------------+
----------------------------------------------------------------------
Diffstat Results
[Back to Top]
This is a summary of the changes to the source code that went into this
release that was generated using the diffstat utility.
.version | 2
ChangeLog | 11 ++++
asterisk-11.0.1-summary.html | 67 ----------------------------
asterisk-11.0.1-summary.txt | 102 -------------------------------------------
channels/chan_local.c | 21 +++++---
5 files changed, 25 insertions(+), 178 deletions(-)
----------------------------------------------------------------------

View File

@@ -1092,7 +1092,6 @@ static void iax_pvt_callid_new(int callno)
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);
}

View File

@@ -311,15 +311,20 @@ static int local_devicestate(const char *data)
res = AST_DEVICE_NOT_INUSE;
it = ao2_iterator_init(locals, 0);
while ((lp = ao2_iterator_next(&it)) && (res == AST_DEVICE_NOT_INUSE)) {
if (!strcmp(exten, lp->exten) && !strcmp(context, lp->context) && lp->owner) {
ao2_lock(lp);
if (ast_test_flag(lp, LOCAL_LAUNCHED_PBX)) {
res = AST_DEVICE_INUSE;
}
ao2_unlock(lp);
for (; (lp = ao2_iterator_next(&it)); ao2_ref(lp, -1)) {
int is_inuse;
ao2_lock(lp);
is_inuse = !strcmp(exten, lp->exten)
&& !strcmp(context, lp->context)
&& lp->owner
&& ast_test_flag(lp, LOCAL_LAUNCHED_PBX);
ao2_unlock(lp);
if (is_inuse) {
res = AST_DEVICE_INUSE;
ao2_ref(lp, -1);
break;
}
ao2_ref(lp, -1);
}
ao2_iterator_destroy(&it);

View File

@@ -1729,6 +1729,7 @@ static struct ast_channel *jingle_request(const char *type, struct ast_format_ca
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 @@ static struct ast_channel *jingle_request(const char *type, struct ast_format_ca
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,14 +1949,10 @@ static int jingle_interpret_ice_udp_transport(struct jingle_session *session, ik
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;
if (!ast_strlen_zero(ufrag) && !ast_strlen_zero(pwd)) {
ice->set_authentication(rtp, ufrag, 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");
char *generation = iks_find_attrib(candidate, "generation"), *id = iks_find_attrib(candidate, "id");
@@ -2102,7 +2108,8 @@ static int jingle_interpret_content(struct jingle_session *session, ikspak *pak)
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;
}

View File

@@ -7287,7 +7287,8 @@ static int initialize_udptl(struct sip_pvt *p)
return 0;
}
int ast_sipinfo_send(
static int sipinfo_send(
struct ast_channel *chan,
struct ast_variable *headers,
const char *content_type,
@@ -30495,7 +30496,16 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, str
static int peer_markall_func(void *device, void *arg, int flags)
{
struct sip_peer *peer = device;
if (!peer->selfdestruct || sip_cfg.autocreatepeer != AUTOPEERS_PERSIST) {
if (!peer->selfdestruct) {
peer->the_mark = 1;
}
return 0;
}
static int peer_markall_autopeers_func(void *device, void *arg, int flags)
{
struct sip_peer *peer = device;
if (peer->selfdestruct) {
peer->the_mark = 1;
}
return 0;
@@ -30637,6 +30647,11 @@ static int reload_config(enum channelreloadreason reason)
ast_mutex_unlock(&authl_lock);
cleanup_all_regs();
/* Then, actually destroy users and registry */
ASTOBJ_CONTAINER_DESTROYALL(&regl, sip_registry_destroy);
ast_debug(4, "--------------- Done destroying registry list\n");
ao2_t_callback(peers, OBJ_NODATA, peer_markall_func, NULL, "callback to mark all peers");
}
/* Reset certificate handling for TLS sessions */
@@ -31363,11 +31378,8 @@ static int reload_config(enum channelreloadreason reason)
max_subexpiry = max_expiry;
}
if (reason != CHANNEL_MODULE_LOAD) {
/* Then, actually destroy users and registry */
ASTOBJ_CONTAINER_DESTROYALL(&regl, sip_registry_destroy);
ast_debug(4, "--------------- Done destroying registry list\n");
ao2_t_callback(peers, OBJ_NODATA, peer_markall_func, NULL, "callback to mark all peers");
if (reason != CHANNEL_MODULE_LOAD && sip_cfg.autocreatepeer != AUTOPEERS_PERSIST) {
ao2_t_callback(peers, OBJ_NODATA, peer_markall_autopeers_func, NULL, "callback to mark autopeers for destruction");
}
if (subscribe_network_change) {
@@ -33162,6 +33174,12 @@ static const struct ast_data_entry sip_data_providers[] = {
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)
{
@@ -33171,6 +33189,10 @@ static int load_module(void)
return AST_MODULE_LOAD_FAILURE;
}
if (ast_sip_api_provider_register(&chan_sip_api_provider)) {
return AST_MODULE_LOAD_FAILURE;
}
/* the fact that ao2_containers can't resize automatically is a major worry! */
/* if the number of objects gets above MAX_XXX_BUCKETS, things will slow down */
peers = ao2_t_container_alloc(HASH_PEER_SIZE, peer_hash_cb, peer_cmp_cb, "allocate peers");
@@ -33332,6 +33354,8 @@ static int unload_module(void)
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 +33531,7 @@ static int unload_module(void)
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,

View File

@@ -1,6 +0,0 @@
{
global:
LINKER_SYMBOL_PREFIX*ast_sipinfo_send;
local:
*;
};

View File

@@ -510,14 +510,14 @@ srvlookup=yes ; Enable DNS SRV lookups on outbound calls
;
;refer_addheaders=yes ; on by default
;autocreatepeers=no ; Allow any not exsplicitly defined here UAC to register
; WITHOUT AUTHENTICATION. Enabling this options poses a high
; potential security risk and should be avoided unless the
; server is behind a trusted firewall.
; When enabled by setting to "yes", the autocreated peers are
; pruned immediately when the "sip reload" command is issued
; through CLI. When enabled by setting to "persist", the auto-
; created peers survive the "sip reload" command.
;autocreatepeer=no ; Allow any UAC not explicitly defined to register
; WITHOUT AUTHENTICATION. Enabling this options poses a high
; potential security risk and should be avoided unless the
; server is behind a trusted firewall.
; If set to "yes", then peers created in this fashion
; are purged during SIP reloads.
; When set to "persist", the peers created in this fashion
; are not purged during SIP reloads.
;
;------------------------ TLS settings ------------------------------------------------------------

View File

@@ -26,6 +26,16 @@ extern "C" {
#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 @@ int ast_sipinfo_send(struct ast_channel *chan,
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

View File

@@ -4369,7 +4369,7 @@ static int action_originate(struct mansession *s, const struct message *m)
/* 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;

60
main/sip_api.c Normal file
View File

@@ -0,0 +1,60 @@
/*
* Asterisk -- An open source telephony toolkit.
*
* Copyright (C) 2012, Digium, Inc.
*
* Mark Michelson <mmichelson@digium.com>
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
* any of the maintainers of this project for assistance;
* the project provides a web site, mailing lists and IRC
* channels for your use.
*
* This program is free software, distributed under the terms of
* the GNU General Public License Version 2. See the LICENSE file
* at the top of the source tree.
*/
#include "asterisk.h"
#include "asterisk/sip_api.h"
#include "asterisk/logger.h"
static const struct ast_sip_api_tech *api_provider;
int ast_sipinfo_send(struct ast_channel *chan,
struct ast_variable *headers,
const char *content_type,
const char *content,
const char *useragent_filter)
{
if (!api_provider) {
ast_log(LOG_WARNING, "Unable to send custom SIP INFO. No API provider registered\n");
return -1;
}
return api_provider->sipinfo_send(chan, headers, content_type, content, useragent_filter);
}
int ast_sip_api_provider_register(const struct ast_sip_api_tech *provider)
{
if (api_provider) {
ast_log(LOG_WARNING, "SIP provider %s has already registered. Not registering provider %s\n",
api_provider->name, provider->name);
return -1;
}
if (provider->version != AST_SIP_API_VERSION) {
ast_log(LOG_WARNING, "SIP API provider version mismatch: Current version is %d but provider "
"uses version %d\n", AST_SIP_API_VERSION, provider->version);
return -1;
}
api_provider = provider;
return 0;
}
void ast_sip_api_provider_unregister(void)
{
api_provider = NULL;
}

View File

@@ -192,11 +192,19 @@ static void *handle_tcptls_connection(void *data)
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 @@ static void *handle_tcptls_connection(void *data)
}
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 */

View File

@@ -1,18 +1,18 @@
{
global:
LINKER_SYMBOL_PREFIXast_websocket_add_protocol;
LINKER_SYMBOL_PREFIXast_websocket_remove_protocol;
LINKER_SYMBOL_PREFIXast_websocket_read;
LINKER_SYMBOL_PREFIXast_websocket_write;
LINKER_SYMBOL_PREFIXast_websocket_close;
LINKER_SYMBOL_PREFIXast_websocket_reconstruct_enable;
LINKER_SYMBOL_PREFIXast_websocket_reconstruct_disable;
LINKER_SYMBOL_PREFIXast_websocket_ref;
LINKER_SYMBOL_PREFIXast_websocket_unref;
LINKER_SYMBOL_PREFIXast_websocket_fd;
LINKER_SYMBOL_PREFIXast_websocket_remote_address;
LINKER_SYMBOL_PREFIXast_websocket_is_secure;
LINKER_SYMBOL_PREFIXast_websocket_set_nonblock;
LINKER_SYMBOL_PREFIX*ast_websocket_add_protocol;
LINKER_SYMBOL_PREFIX*ast_websocket_remove_protocol;
LINKER_SYMBOL_PREFIX*ast_websocket_read;
LINKER_SYMBOL_PREFIX*ast_websocket_write;
LINKER_SYMBOL_PREFIX*ast_websocket_close;
LINKER_SYMBOL_PREFIX*ast_websocket_reconstruct_enable;
LINKER_SYMBOL_PREFIX*ast_websocket_reconstruct_disable;
LINKER_SYMBOL_PREFIX*ast_websocket_ref;
LINKER_SYMBOL_PREFIX*ast_websocket_unref;
LINKER_SYMBOL_PREFIX*ast_websocket_fd;
LINKER_SYMBOL_PREFIX*ast_websocket_remote_address;
LINKER_SYMBOL_PREFIX*ast_websocket_is_secure;
LINKER_SYMBOL_PREFIX*ast_websocket_set_nonblock;
local:
*;
};