summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-06-16Core/PBX: Deadlock between dialplan execution and application unregistration.Frederic LE FOLL
Not easy to reproduce, but we have noticed deadlocks when unloading a module while dialplan is handling a request. The deadlock is between : 1) Dialplan execution: pbx_extension_helper() first taking conlock, then pbx_findapp() [when called] asking for lock on apps list. 2) Application unregistration: ast_unregister_application() first taking lock on apps list, then unreference_cached_app() [when called] asking for conlock. As a protection, I suggest to modify ast_unregister_application(), so that it anticipates the need of conlock, before taking the lock on apps list. The side effect is a longer unavailability of conlock when unregistering an application. ASTERISK-27041 Change-Id: I0db0f1eb320da6a5758cce3a47d765be1face8e2
2017-06-16Merge "SDP: Search for the ice-lite attribute in the right place."Joshua Colp
2017-06-16Merge changes from topic 'sdp_api_adjustments'Jenkins2
* changes: SDP: Set the remote c= line in RTP instance. SDP: Add t= line in sdp_create_from_state() stream: Ignore declined streams for some topology calls.
2017-06-16Merge "stream: Add ast_stream_topology_del_stream() and unit test."Jenkins2
2017-06-16res_pjsip: New endpoint option "notify_early_inuse_ringing"Alexei Gradinari
This option was added to control whether to notify dialog-info state 'early' or 'confirmed' on Ringing when already INUSE. The value "yes" is useful for some SIP phones (Cisco SPA) to be able to indicate and pick up ringing devices. ASTERISK-26919 #close Change-Id: Ie050bc30023543c7dfb4365c5be3ce58c738c711
2017-06-16Merge "res_ari: Add "module loaded" check to ari stubs"Jenkins2
2017-06-16app_voicemail: IMAP logout on reload/unloadAlexei Gradinari
Closing IMAP connection on module reload or unload. ASTERISK-24052 #close Change-Id: I2a40182aa9ef249fa6865d33570430e9ada68525
2017-06-16res_corosync: Change thread stack sizeJan Friesse
In Corosync 2.x libraries were changed to use LibQB IPC. Sadly LibQB IPC doesn't support copy-free access to received buffer, so Corosync libraries were rewritten to use stack as buffer. Mostly the needed stack size is quite small, but for all *_dispatch functions, 1MiB is needed. Asterisk function ast_pthread_create_background set stack size for new thread to much smaller AST_BACKGROUND_STACKSIZE (~500KiB). This results in Asterisk crash when running with Corosync 2.x. Patch solves this issue by creating it's own version of ast_pthread_create_background which sets stack size to much higher value (actually it's AST_BACKGROUND_STACKSIZE + 3MiB). Another problem may appear when "corosync show members" netconsole command is executed. It is also executed in thread and also has only 500KiB stack size. Sadly it calls corosync_cfg_get_node_addrs which again needs at least 1MiB stack. Solution is to use HAVE_COROSYNC_CFG_STATE_TRACK as a discriminator between Corosync 1.x and 2.x. If 1.x is found, nothing changes. If 2.x is found, NodeID is displayed instead of IP address. ASTERISK-25370 #close Reported by: mdu113 Change-Id: Id95b0d21ab6e708e7d74ad8786c587211676fa08
2017-06-16Merge "chan_pjsip: Fix PJSIP_MEDIA_OFFER dialplan function read."Jenkins2
2017-06-15res_ari: Add "module loaded" check to ari stubsGeorge Joseph
The recent change to make the use of LOAD_DECLINE more consistent caused res_ari to unload itself before declining if the ari.conf file wasn't found. The ari stubs though still tried to use the configuration resulting in segfaults. This patch creates a new CHECK_ARI_MODULE_LOADED macro which tests to see if res_ari is actually loaded and causes the stubs to also decline if it isn't. The macro was then added to the mustache template's "load_module" function. ASTERISK-27026 #close Reported-by: Ronald Raikes Change-Id: I263d56efa628ee3c411bdcd16d49af6260c6c91d
2017-06-15Merge "channel: Fix reference counting in ast_channel_suppress."Joshua Colp
2017-06-15Merge "res_pjsip_pubsub: Fix reference to released endpoint"Jenkins2
2017-06-15Merge "bridge: Add a deferred queue."Joshua Colp
2017-06-15chan_pjsip: Fix PJSIP_MEDIA_OFFER dialplan function read.Richard Mudgett
The construction of the returned string assumed incorrectly that the supplied buffer would always be initialized as an empty string. If it is not an empty string we could overrun the supplied buffer by the length of the non-empty buffer string plus one. It is also theoreticaly possible for the supplied buffer to be overrun by a string terminator during a read operation even if the supplied buffer is an empty string. * Fix the assumption that the supplied buffer would already be an empty string. The buffer is not guaranteed to contain an empty string by all possible callers. * Fix string terminator buffer overrun potential. Change-Id: If6a0806806527678c8554b1dcb34fd7808aa95c9
2017-06-15SDP: Add get/set option calls for RTP sched context per type.Richard Mudgett
Change-Id: I82dc75c63c48904e9e5a49e2205dcc06e88487e4
2017-06-15SDP: Search for the ice-lite attribute in the right place.Richard Mudgett
* Pulled finding the rtcp-mux attribute flag out of the ICE candidate for loop. Also ordered the RTCP ICE candidate skip test to fail earlier. Change-Id: I8905d9c68563027a46cd3ae14dbcc27e9c814809
2017-06-15SDP: Set the remote c= line in RTP instance.Richard Mudgett
Change-Id: I23b646392082deab65bedeb19b12dcbcb9216d0c
2017-06-15stream: Add ast_stream_topology_del_stream() and unit test.Richard Mudgett
Change-Id: If07e3c716a2e3ff85ae905c17572ea6ec3cdc1f9
2017-06-15SDP: Add t= line in sdp_create_from_state()Richard Mudgett
Change-Id: I4060391328a893101ed87d0d9bacbbab4fd8b141
2017-06-15stream: Ignore declined streams for some topology calls.Richard Mudgett
* Made ast_format_cap_from_stream_topology() not include any formats from declined streams. * Made ast_stream_topology_get_first_stream_by_type() ignore declined streams to return the first active stream of the type. * Updated unit tests to check these changes have the expected effect. Change-Id: Iabbc6a3e8edf263a25fd3056c3c614407c7897df
2017-06-15Merge "app_voicemail.c: Fix compile error when IMAP enabled."George Joseph
2017-06-15Merge "app_voicemail: IMAP logout on MWI unsubscribe"George Joseph
2017-06-15Merge "res_pjsip_refer/session: Calls dropped during transfer"Jenkins2
2017-06-15channel: Fix reference counting in ast_channel_suppress.Joshua Colp
The ast_channel_suppress function wrongly decremented the reference count of the underlying structure used to keep track of what should be suppressed on a channel if the function was called multiple times on the same channel. This change cleans up the reference counting a bit so this no longer occurs. ASTERISK-27016 Change-Id: I2eed4077cb4916e6626f9f120b63b963acc5c136
2017-06-14Merge "res_rtp_asterisk: Fix ssrc change for rtcp srtp"George Joseph
2017-06-14Merge "res_pjsip_session: Correct inverted test in session_outgoing_nat_hook"Jenkins2
2017-06-14Merge "res_pjsip_transport_websocket: Add NULL check in get_write_timeout"Jenkins2
2017-06-14Merge "pjproject_bundled: Use the asterisk github mirror for download"George Joseph
2017-06-14app_voicemail.c: Fix compile error when IMAP enabled.Richard Mudgett
Change-Id: I2703f15b4099b4210c68eccf293105d1975c1fc1
2017-06-14app_voicemail: IMAP logout on MWI unsubscribeAlexei Gradinari
Closing IMAP connection on MWI unsubscribe. ASTERISK-24052 #close Change-Id: I4ff964026002b2817b48c20fb4239f0a880228fd
2017-06-14res_pjsip_pubsub: Fix reference to released endpointGeorge Joseph
destroy_subscription was attempting to get the id of the subscription tree's endpoint after we'd already called ao2_cleanup on it causing a segfault. Moved the cleanup until after the debug statement and since endpoint could also be NULL at this point, check for that as well. ASTERISK-27057 #close Reported-by: Ryan Smith Change-Id: Ice0a7727f560cf204d870a774c6df71e159b1678
2017-06-14res_pjsip_session: Correct inverted test in session_outgoing_nat_hookGeorge Joseph
There was a typo introduced in commit 776ffd77 which was preventing the transport's external media address from being used. ASTERISK-27024 #close Reported-by: Christopher van de Sande patches: patch.diff submitted by Florian Floimair (license 6892) Change-Id: I7ec617171eaa2d86d2680b00cf37d5088adafc27
2017-06-14Merge "CFLAGS for BIND8 support"Joshua Colp
2017-06-14res_rtp_asterisk: Fix ssrc change for rtcp srtpGeorge Joseph
It looks like there was a copy/paste error in ast_rtp_change_source where if there was a rtcp srtp instance, instead of updating its ssrc we were updating the srtp instance ssrc twice. ASTERISK-27022 #close Reported-by: Michael Walton Change-Id: Ic88f3aee7227b401c58745ac265ff92c19620095
2017-06-13bridge: Add a deferred queue.Joshua Colp
This change adds a deferred queue to bridging. If a bridge technology determines that a frame can not be written and should be deferred it can indicate back to bridging to do so. Bridging will then requeue any deferred frames upon a new channel joining the bridge. This change has been leveraged for T.38 request negotiate control frames. Without the deferred queue there is a race condition between the bridge receiving the T.38 request negotiate and the second channel joining and being in the bridge. If the channel is not yet in the bridge then the T.38 negotiation fails. A unit test has also been added that confirms that a T.38 request negotiate control frame is deferred when no other channel is in the bridge and that it is requeued when a new channel joins the bridge. ASTERISK-26923 Change-Id: Ie05b08523f399eae579130f4a5f562a344d2e415
2017-06-13res_pjsip_refer/session: Calls dropped during transferKevin Harwell
When doing an attended transfer it's possible for the transferer, after receiving an accepted response from Asterisk, to send a BYE to Asterisk, which can then be processed before Asterisk has time to start and/or complete the transfer process. This of course causes the transfer to not complete successfully, thus dropping the call. This patch makes it so any BYEs received from the transferer, after the REFER, that initiate a session end are deferred until the transfer is complete. This allows the channel that would have otherwise been hung up by Asterisk to remain available throughout the transfer process. ASTERISK-27053 #close Change-Id: I43586db79079457d92d71f1fd993be9a3b409d5a
2017-06-13pjproject_bundled: Use the asterisk github mirror for downloadGeorge Joseph
We now mirror the pjproject tarball and md5 at https://github.com/asterisk/third-party/tree/master/pjproject To improve download reliability, we now get the tarball from our mirror instead of from pjsip.org. ASTERISK-27052 #close Reported-by: 'alex' Change-Id: I60236587a8935bfa71fcc391f4e2ecb31918c08a
2017-06-13res_pjsip_mwi: don't create mwi subscriptions if initial unsolicited disabledAlexei Gradinari
If sending unsolicited mwi to all endpoints on startup is disabled (mwi_disable_initial_unsolicited=yes) do not need to create subscriptions. If there are many (thousands) realtime endpoints configured with unsolicited mwi and Vociemail Storage configured as ODBC or IMAP there will be huge number of DB/IMAP requests on startup. ASTERISK-26230 #close Change-Id: I50ae909639e3ee298b931a54def4b2b9e0fb86c5
2017-06-13Merge "pjsip: Extend 'asymmetric_rtp_codec' option to include us changing."Jenkins2
2017-06-13Merge "BuildSystem: Add patches to allow building with recent LibreSSL"Jenkins2
2017-06-12Merge "BuildSystem: Fix build on FreeBSD due to missing crypt.h"Jenkins2
2017-06-12Merge "codecs.conf.sample: Fix max_bandwidth speling error"Jenkins2
2017-06-12Merge "eventfd: Disable during cross compilation"Joshua Colp
2017-06-11codecs.conf.sample: Fix max_bandwidth speling errorSean Bright
Reported by Sylvain Boily via asterisk-dev mailing list. Change-Id: Idc7623f335aea3e144dd369ba383b9a757480a9d
2017-06-09res_pjsip_transport_websocket: Add NULL check in get_write_timeoutJørgen H
Added check for NULL return value when calling ast_sorcery_retrieve_by_id in function get_write_timeout ASTERISK-27046 Change-Id: I9357717278da631c3a1cb502c412693929b0cb41
2017-06-09BuildSystem: Add patches to allow building with recent LibreSSLGuido Falsi
Add some #if defined checks which allow building against LibreSSL. These patchess come from OpenBSD ports: https://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/telephony/asterisk/patches/ ASTERISK-27043 #close Reported by: OpenBSD ports Change-Id: I2f6c08a5840b85ad4d2b75370b947ddde7a9a572
2017-06-08CFLAGS for BIND8 supportDavid M. Lee
Some systems (like macOS) require BIND_8_COMPAT to be defined so that the nameser libraries are, well, BIND8 compatible. Change-Id: If79fc27a64f90de1835b5aa3aadfa9be22bd16b0
2017-06-08Merge "CHANGES: correct version for a new option 'refer_blind_progress'"Jenkins2
2017-06-08BuildSystem: Fix build on FreeBSD due to missing crypt.hGuido Falsi
FreeBSD does not include a crypt.h include file. Definitions for crypt() and crypt_r() are in unistd.h ASTERISK-27042 #close Change-Id: Ib307ee5e384870c6af50efa89fb73722dd0c3a7e
2017-06-07chan_pjsip: Update device state when in early media.Joshua Colp
The chan_pjsip module uses a calculation approach for determining device state. This means that in situations where we would expect device state to change we need to tell the core to query. A scenario that was missed is when early media was signaled. This change adds the notification for the core to query device state when we are told that early media is being provided. ASTERISK-27039 Change-Id: Iafebfd152894966344ff2e950a3cee9f59a3eb6f