summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-06-15Merge "bridge: Add a deferred queue." into 13Jenkins2
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-15Merge "app_voicemail: IMAP logout on MWI unsubscribe" into 13Jenkins2
2017-06-15Merge "app_voicemail.c: Fix compile error when IMAP enabled." into 13Jenkins2
2017-06-15Merge "res_pjsip_refer/session: Calls dropped during transfer" into 13Jenkins2
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" into 13George Joseph
2017-06-14Merge "res_pjsip_session: Correct inverted test in ↵Jenkins2
session_outgoing_nat_hook" into 13
2017-06-14Merge "res_pjsip_transport_websocket: Add NULL check in get_write_timeout" ↵Jenkins2
into 13
2017-06-14Merge "pjproject_bundled: Use the asterisk github mirror for download" into 13George Joseph
2017-06-14Merge "BuildSystem: Add patches to allow building with recent LibreSSL" into 13Joshua Colp
2017-06-14app_voicemail.c: Fix compile error when IMAP enabled.Richard Mudgett
Change-Id: I2703f15b4099b4210c68eccf293105d1975c1fc1
2017-06-14Core/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-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" into 13Jenkins2
2017-06-14res_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-14Merge "res_pjsip_mwi: don't create mwi subscriptions if initial unsolicited ↵Jenkins2
disabled" into 13
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-13Merge "pjsip: Extend 'asymmetric_rtp_codec' option to include us changing." ↵Joshua Colp
into 13
2017-06-12app_voicemail: IMAP logout on MWI unsubscribeAlexei Gradinari
Closing IMAP connection on MWI unsubscribe. ASTERISK-24052 #close Change-Id: I4ff964026002b2817b48c20fb4239f0a880228fd
2017-06-12Merge "codecs.conf.sample: Fix max_bandwidth speling error" into 13Joshua Colp
2017-06-12Merge "BuildSystem: Fix build on FreeBSD due to missing crypt.h" into 13Joshua Colp
2017-06-12Merge "eventfd: Disable during cross compilation" into 13Jenkins2
2017-06-12res_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-12CFLAGS 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-11codecs.conf.sample: Fix max_bandwidth speling errorSean Bright
Reported by Sylvain Boily via asterisk-dev mailing list. Change-Id: Idc7623f335aea3e144dd369ba383b9a757480a9d
2017-06-08BuildSystem: 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-08Merge "CHANGES: correct version for a new option 'refer_blind_progress'" into 13Jenkins2
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
2017-06-07eventfd: Disable during cross compilationSean Bright
Reported by Lonnie Abelbeck <lonnie@abelbeck.com> via private e-mail. Change-Id: Icc80f12b8d8d591e14a8e0ed9f1c02cbd193a89b
2017-06-07CHANGES: correct version for a new option 'refer_blind_progress'Alexei Gradinari
Change-Id: If4817d26a8974610827624fb8a4e56d681d6bf97
2017-06-07pjsip: Extend 'asymmetric_rtp_codec' option to include us changing.Joshua Colp
PJSIP support in Asterisk differs from chan_sip in that it allows media to be sent as-is without transcoding provided the codecs were negotiated in the SDP. This is allowed according to the RFC. Support for this differs quite a lot though and some endpoints do not handle it well. This change extends the 'asymmetric_rtp_codec' option to also cover this case. When set to no (the default) the code behaves as chan_sip does - the best codec is selected and we will only ever send that, unless we change what we are sending if the remote side changes. When set to yes we will send media as-is without transcoding if the codec has been negotiated in the SDP. ASTERISK-26996 Change-Id: Ib1647f6902a0843e8c435946f831c2159e8d1d51
2017-06-07Merge "res_pjsip: Add support for returning only reachable contacts and use ↵Jenkins2
it." into 13
2017-06-07Merge "channel: ast_write frame wrongly freed after call to audiohooks" into 13Jenkins2
2017-06-06res_rtp_multicast: Use consistent timestamps when possibleSean Bright
When a frame destined for a MulticastRTP channel does not have timing information (such as when an 'originate' is done), we generate the RTP timestamps ourselves without regard to the number of samples we are about to send. Instead, use the same method as res_rtp_asterisk and 'predict' a timestamp given the number of samples. If the difference between the timestamp that we generate and the one we predict is within a specific threshold, use the predicted timestamp so that we end up with timestamps that are consistent with the number of samples we are actually sending. Change-Id: I2bf0db3541b1573043330421cbb114ff0f22ec1f
2017-06-06res_pjsip: Add support for returning only reachable contacts and use it.Joshua Colp
This introduces the ability for PJSIP code to specify filtering flags when retrieving PJSIP contacts. The first flag for use causes the query code to only retrieve contacts that are not unreachable. This change has been leveraged by both the Dial() process and the PJSIP_DIAL_CONTACTS dialplan function so they will now only attempt calls to contacts which are not unreachable. ASTERISK-26281 Change-Id: I8233b4faa21ba3db114f5a42e946e4b191446f6c
2017-06-06Merge "format: Reintroduce smoother flags" into 13Jenkins2
2017-06-06Merge "res_srtp: Add support for libsrtp2" into 13Joshua Colp
2017-06-05channel: ast_write frame wrongly freed after call to audiohooksKevin Harwell
ASTERISK-26419 introduced a bug when calling ast_audiohook_write_list in ast_write. It would free the frame given to ast_write if the frame returned by ast_audiohook_write_list was different than the given one. The frame give to ast_write should never be freed within that function. It is the caller's resposibility to free the frame after writing (or when it its done with it). By freeing it within ast_write this of course led to some memory corruption problems. This patch makes it so the frame given to ast_write is no longer freed within the function. The frame returned by ast_audiohook_write_list is now subsequently used in ast_write and is freed later. It is freed either after translate if the frame returned by translate is different, or near the end of ast_write prior to function exit. ASTERISK-26973 #close Change-Id: I463d4ac3b736ced95de986ee74a489c7c7ab103b
2017-06-05Merge "pbx_builtin: Properly handle hangup during Background" into 13Jenkins2
2017-06-01Merge "stasis_recording: Correct ast_asprintf error checking" into 13Jenkins2
2017-06-01Merge "format_mp3: Re-work menuselect/build issues" into 13Jenkins2
2017-06-01Merge "res_pjsip: New endpoint option "refer_blind_progress"" into 13Jenkins2
2017-06-01Merge "app_confbridge: Race between removing and playing name recording ↵Jenkins2
while leaving" into 13
2017-06-01Merge "sip.conf.sample: Clarify where DTLS settings are permitted" into 13Joshua Colp