summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-02-28Merge "res_pjsip_outbound_registration: Subscribe to network change events" ↵zuul
into 13
2017-02-28Merge "build: Warn if asterisk is installed in both 32 and 64 bit sys dirs" ↵zuul
into 13
2017-02-28Merge "res_pjsip_pubsub: Remove unneeded endpoint unref" into 13zuul
2017-02-28Merge "bridge_native_rtp: Handle case where channel joins already ↵zuul
suspended." into 13
2017-02-28Merge "config: Improve documentation and behavior of outbound_proxy option." ↵zuul
into 13
2017-02-28Merge "res_pjsip: Fix crash when contact has no status" into 13zuul
2017-02-28pjsip.conf.sample: user_agent: not a specific versionTzafrir Cohen
Use the description of useragent from sip.conf here. ASTERISK-26825 #close Change-Id: I5b33a4aaa0ae1d793289d05e3bc09521affbf755
2017-02-27res_pjsip_pubsub: Remove unneeded endpoint unrefGeorge Joseph
When a subscription was being recreated and the endpoint wasn't found, we were trying to unref the endpoint. This was causing FRACKs. Removed the unref. ASTERISK-26823 #close Change-Id: If86d2aecff8fe853c7f38a1bfde721fcef3cd164
2017-02-27res_pjsip: Fix crash when contact has no statusJørgen H
This change fixes an assumption in res_pjsip that a contact will always have a status. There is a race condition where this is not true and would crash. The status will now be unknown when this situation occurs. ASTERISK-26623 #close Change-Id: Id52d3ca4d788562d236da49990a319118f8d22b5
2017-02-27res_pjsip_outbound_registration: Subscribe to network change eventsGeorge Joseph
Outbound registration now subscribes to network change events published by res_stun_monitor and refreshes all registrations when an event happens. The 'pjsip send (un)register' CLI commands were updated to accept '*all' as an argument to operate on all registrations. The 'PJSIP(Un)Register' AMI commands were also updated to accept '*all'. ASTERISK-26808 #close Change-Id: Iad58a9e0aa5d340477fca200bf293187a6ca5a25
2017-02-27build: Warn if asterisk is installed in both 32 and 64 bit sys dirsGeorge Joseph
... and clean them both up on uninstall. We've fixed the issue where 'make install' was installing to /usr/lib on 64-bit systems that use /usr/lib64. Now we need to clean up the remnants in /usr/lib. * 'make install' now prints a warning if DESTDIR/ASTLIBDIR contains 'lib64' and libasterisk* shared libraries or modules are also found in DESTDIR/ASTLIBDIR with 'lib64' transformed to 'lib'. * 'make uninstall' ALWAYS cleans up both DESTDIR/ASTLIBDIR and DESTDIR/ASTLIBDIR with 'lib64' transformed to 'lib'. ASTERISK-26705 Change-Id: I6edddeb3c07a51e7c7ba7cac3c05e4bf3ec3f01f
2017-02-27bridge_native_rtp: Handle case where channel joins already suspended.Joshua Colp
The bridge_native_rtp module did not properly handle the case where a smart bridge operation occurs while a channel is suspended. In this scenario the module would incorrectly set up local or remote RTP bridging despite the media having to flow through Asterisk. The remote endpoint would see two media streams and experience wonky audio. The module has been changed so that it ensures both channels are not suspended when performing the native RTP bridging and this requirement has been documented in the bridge technology. ASTERISK-26781 Change-Id: Id4022d73ace837d4a293106445e3ade10dbc7c7c
2017-02-24Merge "pjproject_bundled: Update for pjproject 2.6" into 13Joshua Colp
2017-02-24Merge "build: Execute ldconfig to build cache. (take two)" into 13Joshua Colp
2017-02-24config: Improve documentation and behavior of outbound_proxy option.Joshua Colp
This change updates the documentation for the outbound_proxy option to ensure it is consistently stated that a full SIP URI must be provided for the option. The res_pjsip_outbound_registration module has also been changed so that the provided outbound_proxy value is checked to ensure it is a URI and if not an error is output stating so. ASTERISK-26782 Change-Id: I6c239a32274846fd44e65b44ad9bf6373479b593
2017-02-23pjproject_bundled: Update for pjproject 2.6George Joseph
* Removed all 2.5.5 functional patches. * Updated usages of pj_release_pool to be "safe". * Updated configure options to disable webrtc. * Updated config_site.h to disable webrtc in pjmedia. * Added Richard Mudgett's recent resolver patches. Change-Id: Ib400cc4dfca68b3d07ce14d314e829bfddc252c7
2017-02-23build: Execute ldconfig to build cache. (take two)George Joseph
On some platforms a multiarch approach is used for libraries. The build system does not take this into account and still places libraries into the lib directory if no --libdir is specified to configure. On initial startup this results in libasteriskssl.so not being found, as it is not in the multiarch lib directory. To make matters worse, options were being passed to ldconfig on both Linux and FreeBSD that actually prevented the rebuild of the cache. * Fedora has a /usr/share/config.site that automatically tells autoconf to use /usr/lib64 but CentOS does not. This logic was copied to configure.ac and modified so systems like Ubuntu, which still use /usr/lib for 64-bit systems, aren't affected. Now that we have them in the correct directory... In order for the system loader to find libasteriskssl and libasteriskpj, one of 3 things has to happen... - The linker cache must be rebuilt including the directory where the libasterisk* libraries were installed. Only root can rebuild the cache. This was busted. - We have to link the asterisk binary with an rpath pointing to the directrory where the libasterisk* libraries were installed. This makes things very complicated and will happen over the collective dead bodies of everyone who's had to package a distribution with an rpath. - Finally, you can start asterisk with LD_LIBRARY_PATH set to the directrory where the libasterisk* libraries were installed. There are no other options. So... * The invokation of ldconfig has been moved from main/Makefile to ASTTOPDIR/Makefile, the options have been removed, and DESTDIR/ASTLIBDIR appended. If you aren't root, you will be warned after the "Asterisk Installation Compete" banner that you must re-run 'make install' as root, manually run 'ldconfig DESTDIR/ASTLIBDIR' as root, or run asterisk with LD_LIBRARY_PATH. ASTERISK-26705 Change-Id: I2a64b7c33a7d3e9bde20f47e3d3ab771977af982
2017-02-23res_config_pgsql: Fix thread safety problemsSean Bright
* A missing AST_LIST_UNLOCK() in find_table() * The ESCAPE_STRING() macro uses pgsqlConn under the hood and we were not consistently locking before calling it. * There were a handful of other places where pgsqlConn was accessed directly without appropriate locking. Change-Id: Iea63f0728f76985a01e95b9912c3c5c6065836ed
2017-02-23Merge "res_config_ldap: Various code improvements" into 13Joshua Colp
2017-02-22res_config_ldap: Various code improvementsSean Bright
The initial motivation for this patch was to properly handle memory allocation failures - we weren't checking the return values from the various LDAP library allocation functions. In the process, because update_ldap() and update2_ldap() were substantially the same code, they've been consolidated. Change-Id: Iebcfe404177cc6860ee5087976fe97812221b822
2017-02-22build_tools: Fix download_externals to allow the use of curl or wgetMichael L. Young
Not sure if this is really a bug versus an improvement. I can see it being viewed as a bug though by some. The current build_tools/download_externals file depends on wget in order to download external modules. The current build system is able to discover which tool to use for fetching remote files - either wget or curl. This patch takes advantage of this capability by modifying the two calls to the wget binary to instead use what was discovered by the build system. ASTERISK-26812 #close Change-Id: If9411a2554f009274d377445613ae91192d948a1
2017-02-22Merge "Revert "build: Execute ldconfig to build cache."" into 13zuul
2017-02-22Merge "pbx_realtime: Prevent premature extension matching" into 13zuul
2017-02-22Revert "build: Execute ldconfig to build cache."Joshua Colp
This reverts commit d90430953c508670a67de68de400fef44f5e9fba. Change-Id: I758fe7ea0408f83a6df8e1774310d69f482700f6
2017-02-22Merge "pbx_dundi: DUNDi weight parameter not processed correctly" into 13zuul
2017-02-22Merge "realtime: Fix ast_load_realtime_multientry handling" into 13Joshua Colp
2017-02-22pbx_realtime: Prevent premature extension matchingSean Bright
The patterns provided by pbx_realtime were checked in the order in which they were returned from the realtime backend. If there was overlap between multiple patterns, the first one to correctly match was chosen even though it may not have been the best match. We now sort the patterns descending by their length and compare in that order. There may be cases where this still results in a sub-optimal match, but this patch should improve the overall behavior. ASTERISK-18271 #close Reported by: Charlie Smurthwaite Change-Id: I56d9ac15810eb1775966b669c3028e32cc7bd809
2017-02-22Merge changes from topic 'ASTERISK-26669' into 13Joshua Colp
* changes: pjproject: Fixes to resolve DNS SRV crashes. pjproject: Increase SENDER_WIDTH column size for 64-bit system logs.
2017-02-21Merge "res_pjsip_authenticator_digest.c: Fix sorcery's immutable contract ↵zuul
violation." into 13
2017-02-21Merge "pjsip_distributor.c: Update some debug messages to get transaction ↵zuul
name." into 13
2017-02-21Merge "res_pjsip: Record the serializer earlier on the tdata." into 13zuul
2017-02-21Merge "res_pjsip: Update artificial auth whenever default_realm changes." ↵zuul
into 13
2017-02-21Merge "res_pjsip: Update authentication realm documentation." into 13zuul
2017-02-21Merge "realtime: Centralize some common realtime backend code" into 13George Joseph
2017-02-21pbx_dundi: DUNDi weight parameter not processed correctlySean Bright
The DUNDi weight field is not always converted from network byte order to host byte order. This can result in incorrect weight values and incorrect selection of DUNDi destinations. ASTERISK-18731 #close Reported by: Peter Racz Patches: dundi_weight.patch (license #6290) patch uploaded by Peter Racz Change-Id: Iba3e1a700ff539db57211a7bbc26f7b22ea9a1be
2017-02-21Merge changes from topic 'ASTERISK-26580' into 13Joshua Colp
* changes: res_config_ldap: Don't try to delete non-existent attributes res_config_ldap: Remove extraneous line numbers from log messages res_config_ldap: Make memory allocation more consistent res_config_ldap: Fix configuration inheritance from _general
2017-02-21Merge "res_config_ldap: Fix erroneous LDAP_MOD_REPLACE in LDAP modify" into 13zuul
2017-02-21Merge "build: Execute ldconfig to build cache." into 13Joshua Colp
2017-02-21realtime: Fix ast_load_realtime_multientry handlingSean Bright
ast_load_realtime_multientry() returns an ast_config structure whose ast_categorys are keyed with the empty strings. Several modules were giving semantic meaning to the category names causing problems at runtime. * app_directory: Treated the category name as the mailbox name, and would fail to direct calls to the appropriate extension after an entry was chosen. * app_queue: Queues, queue members, and queue rules were all affected and needed to be updated. * pbx_realtime: Pattern matching would never succeed because the extension entered by the user was always compared to the empty string. Change-Id: Ie7e44986344b0b76ea8f6ddb5879f5040c6ca8a7
2017-02-21realtime: Centralize some common realtime backend codeSean Bright
All of the realtime backends create artificial ast_categorys to pass back into the core as query results. These categories have no filename or line number information associated with them and the backends differ slightly on how they create them. So create a couple helper macros to help make things more consistent. Also updated the call sites to remove redundant error messages about memory allocation failure. Note that res_config_ldap sets the category filename to the 'table name' but that is not read by anything in the core, so I've dropped it. Change-Id: I3a1fd91e0c807dea1ce3b643b0a6fe5be9002897
2017-02-21Merge "realtime: Fix LIKE escaping in SQL backends" into 13zuul
2017-02-21build: Execute ldconfig to build cache.Joshua Colp
On some platforms a multiarch approach is used for libraries. The build system does not take this into account and still places libraries into the lib directory if no --libdir is specified to configure. On initial startup this results in libasteriskssl.so not being found, as it is not in the multiarch lib directory. This change does the minimally invasive thing and executes ldconfig so that the libraries in the lib directory are found and their location cached. By doing so Asterisk starts up fine. If DESTDIR is specified, however, the old logic is executed as the install process may not have permission to alter the ldconfig cache. ASTERISK-26705 Change-Id: If4eca46ac510c6fea5568256280ffdb3888d7bb4
2017-02-20res_pjsip_authenticator_digest.c: Fix sorcery's immutable contract violation.Richard Mudgett
The inbound authentication object is supposed to be immutable when it is stored in sorcery. However, the immutable property is violated if the authentication object does not have a realm set. The immutable contract violation has a different effect depending upon what sorcery back end is used. If it is the config file back end you would get the same object back until res_pjsip is reloaded. If it is the real-time or AstDB back end you would get a new object on each query. If it is cached you would get the same object back until it is refreshed from the database. Once an inbound authentication object has its realm set it may or may not get updated again if the default_realm changes. If the same authentication object is used for inbound and outbound authentication then the immutable violation can make it very hard to determine why the outbound authentication now fails. The only diagnostic message is a complaint about no realms matching when it had worked earlier. It fails because of the difference in behaviour for an empty realm setting between inbound and outbound authentication objects. * Fixed the sorcery object immutable violation by creating a new object and setting the default_realm on it instead. The new object is a shallow copy for speed. * The auth_store thread storage no longer holds an auth ref. It interferes with the shallow copy and never needed a ref anyway. ASTERISK-26799 #close Change-Id: I2328a52f61b78ed5fbba38180b7f183ee7e08956
2017-02-20res_pjsip: Update artificial auth whenever default_realm changes.Richard Mudgett
There was code attempting to update the artificial authentication object whenever the default_realm changed. However, once the artificial authentication object was created it would never get updated. The artificial authentication object would require a system restart for a change to the default_realm to take effect. ASTERISK-26799 Change-Id: Id59036e9529c2d3ed728af2ed904dc36e7094802
2017-02-20res_pjsip: Update authentication realm documentation.Richard Mudgett
Using the same auth section for inbound and outbound authentication is not recommended. There is a difference in meaning for an empty realm setting between inbound and outbound authentication uses. An empty inbound auth realm represents the global section's default_realm value when the authentication object is used to challenge an incoming request. An empty outgoing auth realm is treated as a don't care wildcard when the authentication object is used to respond to an incoming authentication challenge. ASTERISK-26799 Change-Id: Id3952f7cfa1b6683b9954f2c5d2352d2f11059ce
2017-02-20Merge "tcptls.c: Add some missing allocation failure checks." into 13zuul
2017-02-20Merge "app_voicemail: vm_authenticate accesses uninitialized memory" into 13zuul
2017-02-20pjproject: Fixes to resolve DNS SRV crashes.Richard Mudgett
* Re #1945 (misc): Don't trigger SRV complete callback when there is a parse error. * srv_resolver.c: Don't try to send query if already considered resolved. ** In resolve_hostnames() don't try to resolve a query that is already considered resolved. ** In resolve_hostnames() fix DNS typo in comments. ** In build_server_entries() move a common expression assigning to cnt earlier. * sip_transport.c: Fix tdata object name to actually contain the pointer. It helps if the logs referencing a tdata object buffer actually have a name that includes the correct pointer as part of the name. Also since the tdata has its own pool it helps if any logs referencing the pool have the same name as the tdata object. This change brings tdata logging in line with how tsx objects are named. ASTERISK-26669 #close ASTERISK-26738 #close Change-Id: I56af2ded25476b3e870ca586ee69ed6954ef75af
2017-02-20pjsip_distributor.c: Update some debug messages to get transaction name.Richard Mudgett
* Removed overloaded unmatched response ignore. We obviously sent the request so we shouldn't ignore it because it isn't new work. ASTERISK-26669 ASTERISK-26738 Change-Id: I55fb5cadc83a8e6699b347c6dc7fa32c5a617d37
2017-02-20res_pjsip: Record the serializer earlier on the tdata.Richard Mudgett
When PJPROJECT needs to do a DNS resolution and there is not a cached entry available, the SIP request message goes out on the PJSIP monitor thread instead of the original serializer thread. Thus when the response comes back it does not get processed by the original sending serializer. This patch records the serializer on tdata before passing a request message to PJPROJECT where it can in Asterisk code. There are several places in PJPROJECT for outbound registration and publishing support that would need to record the serializer. Unfortunately, without replacing the PJPROJECT DNS resolver as was done in v14 we cannot fix those without modifying PJPROJECT. Even if we backported the DNS resolver from v14, the outbound registration refresh timer does not go out on a serializer thread but the PJSIP monitor thread. Fortunately, Asterisk's outbound publish support doesn't use the auto refresh timer that would also not go out under the serializer thread. This patch is v13 only. ASTERISK-26669 ASTERISK-26738 Change-Id: I9997b9ed6dbcebd2c37d6a67dc6dcee9c78914a4