mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 20:04:50 +00:00
Background here: http://lists.digium.com/pipermail/asterisk-dev/2016-January/075266.html From CHANGES: * To help insure that Asterisk is compiled and run with the same known version of pjproject, a new option (--with-pjproject-bundled) has been added to ./configure. When specified, the version of pjproject specified in third-party/versions.mak will be downloaded and configured. When you make Asterisk, the build process will also automatically build pjproject and Asterisk will be statically linked to it. Once a particular version of pjproject is configured and built, it won't be configured or built again unless you run a 'make distclean'. To facilitate testing, when 'make install' is run, the pjsua and pjsystest utilities and the pjproject python bindings will be installed in ASTDATADIR/third-party/pjproject. The default behavior remains building with the shared pjproject installation, if any. Building: All you have to do is include the --with-pjproject-bundled option on the ./configure command line (and remove any existing --with-pjproject option if specified). Everything else is automatic. Behind the scenes: The top-level Makefile was modified to include 'third-party' in the list of MOD_SUBDIRS. The third-party directory was created to contain any third party packages that may be needed in the future. Its Makefile automatically iterates over any subdirectories passing on targets. The third-party/pjproject directory was created to house the pjproject source distribution. Its Makefile contains targets to download, patch configure, generate dependencies, compile libs, apps and python bindings, sanitized build.mak and generate a symbols list. When bootstrap.sh is run, it automatically includes the configure.m4 file in third-party/pjproject. This file has a macro to download and conifgure pjproject and get and set PJPROJECT_INCLUDE, PJPROJECT_DIR and PJPROJECT_BUNDLED. It also tests for the capabilities like PJ_TRANSACTION_GRP_LOCK by parsing preprocessor output as opposed to trying to compile. Of course, bootstrap.sh is only run once and the configure file is incldued in the patch. When configure is run with the new options, the macro in configure.m4 triggers the download, patch, conifgure and tests. No compilation is performed at this time. The downloaded tarball is cached in /tmp so it doesn't get downloaded again on a distclean. When make is run in the top-level Asterisk source directory, it will automatically descend all the subdirectories in third_party just as it does for addons, apps, etc. The top-level Makefile makes sure that the 'third-party' is built before 'main' so that dependencies from the other directories are built first. When main does build, a new shared library (libasteriskpj) is created that links statically to the pjproject .a files and exports all their symbols. The asterisk binary links to that, just as it does with libasteriskssl. When Asterisk is installed, the pjsua and pjsystest apps, and the pjproject python bindings are installed in ASTDATADIR/third-party/pjproject. This will facilitate testing, including running the testsuite which will be updated to check that directory for the pjsua module ahead of the system python library. Modules should continue to depend on pjproject if they use pjproject APIs directly. They should not care about the implementation. No changes to any res_pjsip modules were made. Change-Id: Ia7a60c28c2e9ba9537c5570f933c1ebcb20a3103
71 lines
2.8 KiB
Diff
71 lines
2.8 KiB
Diff
From a147b72df1ec150c1d733e882225db86142fb339 Mon Sep 17 00:00:00 2001
|
|
From: George Joseph <george.joseph@fairview5.com>
|
|
Date: Sun, 21 Feb 2016 10:01:53 -0700
|
|
Subject: [PATCH] Bump tcp/tls and transaction log levels from 1 to 3
|
|
|
|
sip_transport_tcp, sip_transport_tls and sip_transaction are printing messages
|
|
at log level 1 or 2 for things that are transient, recoverable, possibly
|
|
expected, or are handled with return codes. A good example of this is if we're
|
|
trying to send an OPTIONS message to a TCP client that has disappeared. Both
|
|
sip_transport_tcp and sip_transaction are printing "connection refused"
|
|
messages because the remote client isn't listening. This is generally expected
|
|
behavior and it should be up to the app caller to determine if an error message
|
|
is warranted.
|
|
---
|
|
pjsip/src/pjsip/sip_transaction.c | 4 ++--
|
|
pjsip/src/pjsip/sip_transport_tcp.c | 2 +-
|
|
pjsip/src/pjsip/sip_transport_tls.c | 2 +-
|
|
3 files changed, 4 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/pjsip/src/pjsip/sip_transaction.c b/pjsip/src/pjsip/sip_transaction.c
|
|
index 46bd971..1b4fdb7 100644
|
|
--- a/pjsip/src/pjsip/sip_transaction.c
|
|
+++ b/pjsip/src/pjsip/sip_transaction.c
|
|
@@ -1898,7 +1898,7 @@ static void send_msg_callback( pjsip_send_state *send_state,
|
|
|
|
err =pj_strerror((pj_status_t)-sent, errmsg, sizeof(errmsg));
|
|
|
|
- PJ_LOG(2,(tsx->obj_name,
|
|
+ PJ_LOG(3,(tsx->obj_name,
|
|
"Failed to send %s! err=%d (%s)",
|
|
pjsip_tx_data_get_info(send_state->tdata), -sent,
|
|
errmsg));
|
|
@@ -1938,7 +1938,7 @@ static void send_msg_callback( pjsip_send_state *send_state,
|
|
}
|
|
|
|
} else {
|
|
- PJ_PERROR(2,(tsx->obj_name, (pj_status_t)-sent,
|
|
+ PJ_PERROR(3,(tsx->obj_name, (pj_status_t)-sent,
|
|
"Temporary failure in sending %s, "
|
|
"will try next server",
|
|
pjsip_tx_data_get_info(send_state->tdata)));
|
|
diff --git a/pjsip/src/pjsip/sip_transport_tcp.c b/pjsip/src/pjsip/sip_transport_tcp.c
|
|
index 222cb13..1bbb324 100644
|
|
--- a/pjsip/src/pjsip/sip_transport_tcp.c
|
|
+++ b/pjsip/src/pjsip/sip_transport_tcp.c
|
|
@@ -164,7 +164,7 @@ static void tcp_perror(const char *sender, const char *title,
|
|
|
|
pj_strerror(status, errmsg, sizeof(errmsg));
|
|
|
|
- PJ_LOG(1,(sender, "%s: %s [code=%d]", title, errmsg, status));
|
|
+ PJ_LOG(3,(sender, "%s: %s [code=%d]", title, errmsg, status));
|
|
}
|
|
|
|
|
|
diff --git a/pjsip/src/pjsip/sip_transport_tls.c b/pjsip/src/pjsip/sip_transport_tls.c
|
|
index 617d7f5..a83ac32 100644
|
|
--- a/pjsip/src/pjsip/sip_transport_tls.c
|
|
+++ b/pjsip/src/pjsip/sip_transport_tls.c
|
|
@@ -170,7 +170,7 @@ static void tls_perror(const char *sender, const char *title,
|
|
|
|
pj_strerror(status, errmsg, sizeof(errmsg));
|
|
|
|
- PJ_LOG(1,(sender, "%s: %s [code=%d]", title, errmsg, status));
|
|
+ PJ_LOG(3,(sender, "%s: %s [code=%d]", title, errmsg, status));
|
|
}
|
|
|
|
|
|
--
|
|
2.5.0
|
|
|