Commit Graph

29545 Commits

Author SHA1 Message Date
Jenkins2 0c0d69d4f3 Merge "cdr: fix mistake spelling of a word for Unanswered." 2017-06-20 09:25:17 -05:00
Joshua Colp 0ecf504de9 Merge "res_pjsip_mwi: unsubscribe unsolicited MWI on deleting endpoint last contact" 2017-06-20 05:47:46 -05:00
Joshua Colp 57bbba7d43 Merge "res_stasis: Plug reference leak on stolen channels" 2017-06-19 16:49:39 -05:00
Rodrigo Ramírez Norambuena a7488f8a70 cdr: fix mistake spelling of a word for Unanswered.
Change-Id: I7a610bef369924523a445c7e849ee88cc45dc5df
2017-06-19 12:28:18 -04:00
George Joseph 3f5bf287a2 Merge "SDP: Add get/set option calls for RTP sched context per type." 2017-06-19 09:27:43 -05:00
Jenkins2 317234bdc6 Merge "res_pjsip: New endpoint option "notify_early_inuse_ringing"" 2017-06-19 09:09:58 -05:00
Jenkins2 d57378d522 Merge "app_voicemail: IMAP logout on reload/unload" 2017-06-19 08:52:12 -05:00
Alexei Gradinari d7b6e06abb 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 17:54:43 -05:00
Joshua Colp 58d50025a0 Merge "formats/format_g729: Fix typo in comment" 2017-06-16 16:37:18 -05:00
George Joseph 854a6de819 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:08:45 -05:00
Matthew Fredrickson e33bd96638 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 14:56:37 -05:00
Frederic LE FOLL 0ad95bc8a0 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-16 13:26:22 -05:00
Joshua Colp 0405185357 Merge "SDP: Search for the ice-lite attribute in the right place." 2017-06-16 12:00:38 -05:00
Jenkins2 d81293a5dd Merge changes from topic 'sdp_api_adjustments'
* 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-16 11:51:41 -05:00
Jenkins2 2f684eb6a5 Merge "stream: Add ast_stream_topology_del_stream() and unit test." 2017-06-16 11:50:32 -05:00
Alexei Gradinari 7a46309d3d 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 11:25:07 -05:00
Jenkins2 322a1c3222 Merge "res_ari: Add "module loaded" check to ari stubs" 2017-06-16 11:12:48 -05:00
Alexei Gradinari 53b7df82f4 app_voicemail: IMAP logout on reload/unload
Closing IMAP connection on module reload or unload.

ASTERISK-24052 #close

Change-Id: I2a40182aa9ef249fa6865d33570430e9ada68525
2017-06-16 10:45:06 -05:00
Jenkins2 b1f46c2a36 Merge "chan_pjsip: Fix PJSIP_MEDIA_OFFER dialplan function read." 2017-06-16 07:51:17 -05:00
George Joseph 1ac0096512 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 19:34:03 -05:00
Joshua Colp 41bd01c861 Merge "channel: Fix reference counting in ast_channel_suppress." 2017-06-15 16:24:55 -05:00
Jenkins2 2adc0aef19 Merge "res_pjsip_pubsub: Fix reference to released endpoint" 2017-06-15 15:24:25 -05:00
Joshua Colp 1f2ab6e72a Merge "bridge: Add a deferred queue." 2017-06-15 15:02:26 -05:00
Richard Mudgett 11ec2945c7 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:35:53 -05:00
Richard Mudgett e563a1920e SDP: Add get/set option calls for RTP sched context per type.
Change-Id: I82dc75c63c48904e9e5a49e2205dcc06e88487e4
2017-06-15 09:42:15 -05:00
Richard Mudgett 716abaf33d SDP: Search for the ice-lite attribute in the right place.
* 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-15 09:42:15 -05:00
Richard Mudgett a95584d079 SDP: Set the remote c= line in RTP instance.
Change-Id: I23b646392082deab65bedeb19b12dcbcb9216d0c
2017-06-15 09:42:15 -05:00
Richard Mudgett 06265b8c8a stream: Add ast_stream_topology_del_stream() and unit test.
Change-Id: If07e3c716a2e3ff85ae905c17572ea6ec3cdc1f9
2017-06-15 09:42:15 -05:00
Richard Mudgett 0fdb99c268 SDP: Add t= line in sdp_create_from_state()
Change-Id: I4060391328a893101ed87d0d9bacbbab4fd8b141
2017-06-15 09:42:15 -05:00
Richard Mudgett 4797a8bb81 stream: Ignore declined streams for some topology calls.
* 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-15 09:42:15 -05:00
George Joseph 15c04db3bd Merge "app_voicemail.c: Fix compile error when IMAP enabled." 2017-06-15 09:06:23 -05:00
George Joseph f743e2e84c Merge "app_voicemail: IMAP logout on MWI unsubscribe" 2017-06-15 09:05:57 -05:00
Jenkins2 2c3c862cee Merge "res_pjsip_refer/session: Calls dropped during transfer" 2017-06-15 08:12:43 -05:00
Joshua Colp bd16c3c524 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 07:36:59 -05:00
George Joseph 54a08a2e43 Merge "res_rtp_asterisk: Fix ssrc change for rtcp srtp" 2017-06-14 16:05:37 -05:00
Jenkins2 4681b9baef Merge "res_pjsip_session: Correct inverted test in session_outgoing_nat_hook" 2017-06-14 15:54:22 -05:00
Jenkins2 433e876317 Merge "res_pjsip_transport_websocket: Add NULL check in get_write_timeout" 2017-06-14 15:24:32 -05:00
George Joseph c27acb4c99 Merge "pjproject_bundled: Use the asterisk github mirror for download" 2017-06-14 14:42:32 -05:00
Richard Mudgett b8b0b61a24 app_voicemail.c: Fix compile error when IMAP enabled.
Change-Id: I2703f15b4099b4210c68eccf293105d1975c1fc1
2017-06-14 12:35:54 -05:00
Alexei Gradinari 023eede265 app_voicemail: IMAP logout on MWI unsubscribe
Closing IMAP connection on MWI unsubscribe.

ASTERISK-24052 #close

Change-Id: I4ff964026002b2817b48c20fb4239f0a880228fd
2017-06-14 11:30:34 -05:00
George Joseph 65ed2ea311 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 11:16:54 -05:00
George Joseph ea3f8c6889 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:07:07 -05:00
Joshua Colp c33168c147 Merge "CFLAGS for BIND8 support" 2017-06-14 11:07:04 -05:00
George Joseph 88f18faf2a 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 08:59:09 -05:00
Joshua Colp d6386a8f0c 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 17:06:15 -05:00
Kevin Harwell 9e53c30610 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:28:21 -05:00
George Joseph b2fd7e5069 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 10:52:29 -05:00
Alexei Gradinari 42f738e052 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-13 09:34:24 -05:00
Jenkins2 abe1dd3039 Merge "pjsip: Extend 'asymmetric_rtp_codec' option to include us changing." 2017-06-13 09:17:10 -05:00
Jenkins2 5d3420a2de Merge "BuildSystem: Add patches to allow building with recent LibreSSL" 2017-06-13 05:47:10 -05:00