Commit Graph

28965 Commits

Author SHA1 Message Date
Jenkins2
2619c04f1e Merge "cdr: fix mistake spelling of a word for Unanswered." into 13 2017-06-20 09:15:58 -05:00
Jenkins2
34b3665612 Merge "res_pjsip_mwi: unsubscribe unsolicited MWI on deleting endpoint last contact" into 13 2017-06-20 05:45:51 -05:00
Rodrigo Ramírez Norambuena
cecf6540dc cdr: fix mistake spelling of a word for Unanswered.
Change-Id: I7a610bef369924523a445c7e849ee88cc45dc5df
2017-06-20 04:59:59 -05:00
Jenkins2
507ce0aa95 Merge "res_stasis: Plug reference leak on stolen channels" into 13 2017-06-19 11:38:02 -05:00
George Joseph
470bccd769 Merge "app_voicemail: IMAP logout on reload/unload" into 13 2017-06-19 09:19:39 -05:00
Jenkins2
707e0e62e6 Merge "res_pjsip: New endpoint option "notify_early_inuse_ringing"" into 13 2017-06-19 08:48:09 -05:00
Alexei Gradinari
8e749c8f51 res_pjsip_mwi: unsubscribe unsolicited MWI on deleting endpoint last contact
If the endpoint's last contact is deleted unsolicited MWI has to be
unsubscribed.

ASTERISK-27051 #close

Change-Id: I33e174e0b9dba0998927d16d6d100fda5c7254e0
2017-06-16 18:45:51 -04:00
Jenkins2
2c87fced4f Merge "formats/format_g729: Fix typo in comment" into 13 2017-06-16 16:16:18 -05:00
Jenkins2
47b9651658 Merge "Core/PBX: Deadlock between dialplan execution and application unregistration." into 13 2017-06-16 16:05:39 -05:00
George Joseph
edfdb4dff5 res_stasis: Plug reference leak on stolen channels
When a stasis channel is stolen by another app, the control
structure is unreffed but never unlinked from the app_controls
container.  This causes the channel reference to leak.

Added OBJ_UNLINK to the callback in channel_stolen_cb.

Also added some additional channel lifecycle debug messages to
channel.c.

ASTERISK-27059 #close
Repoorted-by: George Joseph

Change-Id: Ib820936cd49453f20156971785e7f4f182c56e14
2017-06-16 15:06:56 -05:00
Matthew Fredrickson
0a40073750 formats/format_g729: Fix typo in comment
There was a typo in a comment.  This commit is to fix the typo.

ASTERISK-27060 #close

Change-Id: Ic2699f8dbeaacd58ccb6ec3203e853e1babe3235
2017-06-16 15:00:54 -05:00
Alexei Gradinari
a6e4899612 res_pjsip: New endpoint option "notify_early_inuse_ringing"
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-16 12:08:27 -04:00
Jenkins2
0b7a0681a3 Merge "res_ari: Add "module loaded" check to ari stubs" into 13 2017-06-16 10:57:43 -05:00
Jenkins2
d88344c3d4 Merge "chan_pjsip: Fix PJSIP_MEDIA_OFFER dialplan function read." into 13 2017-06-16 07:48:28 -05:00
George Joseph
7901b9853e res_ari: Add "module loaded" check to ari stubs
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-15 18:31:53 -06:00
Jenkins2
37bc343b58 Merge "channel: Fix reference counting in ast_channel_suppress." into 13 2017-06-15 16:18:26 -05:00
Alexei Gradinari
3b6c327c51 app_voicemail: IMAP logout on reload/unload
Closing IMAP connection on module reload or unload.

ASTERISK-24052 #close

Change-Id: I2a40182aa9ef249fa6865d33570430e9ada68525
2017-06-15 16:52:34 -04:00
Jenkins2
ae6c38db98 Merge "res_pjsip_pubsub: Fix reference to released endpoint" into 13 2017-06-15 15:02:31 -05:00
Jenkins2
5fa52f0b5a Merge "bridge: Add a deferred queue." into 13 2017-06-15 14:48:39 -05:00
Richard Mudgett
b9a4ab8c8c chan_pjsip: Fix PJSIP_MEDIA_OFFER dialplan function read.
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-15 12:33:22 -05:00
Jenkins2
8b12ad2f61 Merge "app_voicemail: IMAP logout on MWI unsubscribe" into 13 2017-06-15 09:23:58 -05:00
Jenkins2
a3b142dbe0 Merge "app_voicemail.c: Fix compile error when IMAP enabled." into 13 2017-06-15 08:46:01 -05:00
Jenkins2
320fb81580 Merge "res_pjsip_refer/session: Calls dropped during transfer" into 13 2017-06-15 08:01:31 -05:00
Joshua Colp
4910a3bf40 channel: Fix reference counting in ast_channel_suppress.
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-15 12:32:32 +00:00
George Joseph
8a858275eb Merge "res_rtp_asterisk: Fix ssrc change for rtcp srtp" into 13 2017-06-14 16:05:58 -05:00
Jenkins2
ffedf68136 Merge "res_pjsip_session: Correct inverted test in session_outgoing_nat_hook" into 13 2017-06-14 15:28:32 -05:00
Jenkins2
4ade9085d5 Merge "res_pjsip_transport_websocket: Add NULL check in get_write_timeout" into 13 2017-06-14 15:15:56 -05:00
George Joseph
3065bcd021 Merge "pjproject_bundled: Use the asterisk github mirror for download" into 13 2017-06-14 14:43:36 -05:00
Joshua Colp
4ece39f476 Merge "BuildSystem: Add patches to allow building with recent LibreSSL" into 13 2017-06-14 14:22:58 -05:00
Richard Mudgett
f1a209d5ac app_voicemail.c: Fix compile error when IMAP enabled.
Change-Id: I2703f15b4099b4210c68eccf293105d1975c1fc1
2017-06-14 12:34:06 -05:00
Frederic LE FOLL
dc307af7f2 Core/PBX: Deadlock between dialplan execution and application unregistration.
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-14 18:29:40 +02:00
George Joseph
c2eea791e4 res_pjsip_pubsub: Fix reference to released endpoint
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-14 10:12:21 -06:00
George Joseph
2dee95cc7a res_pjsip_session: Correct inverted test in session_outgoing_nat_hook
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-14 11:06:18 -05:00
Jenkins2
e26d15fabb Merge "CFLAGS for BIND8 support" into 13 2017-06-14 10:39:13 -05:00
Jørgen H
e16a669c70 res_pjsip_transport_websocket: Add NULL check in get_write_timeout
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-14 09:54:16 -05:00
Jenkins2
44d4b55697 Merge "res_pjsip_mwi: don't create mwi subscriptions if initial unsolicited disabled" into 13 2017-06-14 09:34:04 -05:00
George Joseph
7dafe82751 res_rtp_asterisk: Fix ssrc change for rtcp srtp
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-14 07:54:45 -06:00
Joshua Colp
e414833f6e bridge: Add a deferred queue.
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-13 22:05:28 +00:00
Kevin Harwell
6cdf3191d3 res_pjsip_refer/session: Calls dropped during transfer
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-13 14:17:29 -05:00
George Joseph
0bde568669 pjproject_bundled: Use the asterisk github mirror for download
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-13 09:47:43 -06:00
Joshua Colp
bc51d4324a Merge "pjsip: Extend 'asymmetric_rtp_codec' option to include us changing." into 13 2017-06-13 09:18:18 -05:00
Alexei Gradinari
08be5e01e8 app_voicemail: IMAP logout on MWI unsubscribe
Closing IMAP connection on MWI unsubscribe.

ASTERISK-24052 #close

Change-Id: I4ff964026002b2817b48c20fb4239f0a880228fd
2017-06-12 18:55:15 -04:00
Joshua Colp
d715beae16 Merge "codecs.conf.sample: Fix max_bandwidth speling error" into 13 2017-06-12 16:02:00 -05:00
Joshua Colp
052cd049bc Merge "BuildSystem: Fix build on FreeBSD due to missing crypt.h" into 13 2017-06-12 15:57:32 -05:00
Jenkins2
1f7aedf6f7 Merge "eventfd: Disable during cross compilation" into 13 2017-06-12 15:31:51 -05:00
Alexei Gradinari
59c9bbe696 res_pjsip_mwi: don't create mwi subscriptions if initial unsolicited disabled
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-12 10:57:24 -04:00
David M. Lee
68de35a6a0 CFLAGS for BIND8 support
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-12 08:46:00 -05:00
Sean Bright
da3312457e codecs.conf.sample: Fix max_bandwidth speling error
Reported by Sylvain Boily via asterisk-dev mailing list.

Change-Id: Idc7623f335aea3e144dd369ba383b9a757480a9d
2017-06-11 13:06:17 -04:00
Guido Falsi
6a64f65fe6 BuildSystem: Add patches to allow building with recent LibreSSL
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-08 17:54:46 +02:00
Jenkins2
85dff8e26e Merge "CHANGES: correct version for a new option 'refer_blind_progress'" into 13 2017-06-08 10:48:13 -05:00