Commit graph

30829 commits

Author SHA1 Message Date
lvl
3fb26df4ac res_pjsip_session: properly handle SDP from a forked call with early media
In handle_negotiated_sdp(), use session->active_media_state when
session->pending_media_state is empty.  The 200's SDP should be fed into
handle_negotiated_sdp_session_media() together with the already negotiated
state, which is now in session->active_media_state instead.  Only if both
the session's pending and active media are empty should
handle_negotiated_sdp() abort.

ASTERISK-27441

Change-Id: If0d5150ffe6f38d8a854831fef37942258d4629c
2018-03-06 13:35:22 -06:00
Jenkins2
91a8c7a281 Merge "BuildSystem: Cast any intptr_t explicitly to its proposed type." 2018-03-06 13:17:54 -06:00
Jenkins2
9bc9662bc9 Merge "BuildSystem: Install init scripts on openSUSE Tumbleweed." 2018-03-06 11:13:53 -06:00
Jenkins2
73846c90fa Merge "BuildSystem: AC_PATH_PROG sets to colon character when not found." 2018-03-06 10:35:54 -06:00
Jenkins2
bc87950410 Merge "BuildSystem: Enable autotools in NetBSD." 2018-03-06 10:14:19 -06:00
Jenkins2
24c72ea286 Merge "chan_unistim: NetBSD has an incompatible struct in_pktinfo." 2018-03-05 12:42:56 -06:00
Joshua Colp
0072f75650 Merge "BuildSystem: Avoid == for comparison in ./configure." 2018-03-05 12:14:44 -06:00
Jenkins2
e21f168477 Merge "BuildSystem: Detect whether uselocale(.) is available." 2018-03-05 11:49:11 -06:00
Jenkins2
d70f53c672 Merge "BuildSystem: Avoid re-defining of pthread_* on NetBSD." 2018-03-05 11:29:44 -06:00
Jenkins2
8fd70b71b7 Merge "chan_sip: Emit a second ringing event to ensure channel is found." 2018-03-05 09:09:29 -06:00
Jenkins2
3afc2c52af Merge "core: Fix handling of maximum length lines in config files." 2018-03-05 08:32:35 -06:00
Jenkins2
debe4fe751 Merge "pjproject: Add cache_pools debugging option." 2018-03-05 08:09:11 -06:00
Alexander Traud
7e9734a858 BuildSystem: Enable autotools in NetBSD.
ASTERISK-27716

Change-Id: I52525e35e1620341272219911d054a1e3d3ec01e
2018-03-05 11:16:12 +01:00
Alexander Traud
b97905aaf2 BuildSystem: AC_PATH_PROG sets to colon character when not found.
ASTERISK-27715
Reported by: Corey Farrell

Change-Id: I0d6d9572d1352dc7ad30c9917173f1e980d8c938
2018-03-05 10:42:10 +01:00
Alexander Traud
aabbb49e33 chan_unistim: NetBSD has an incompatible struct in_pktinfo.
ASTERISK-27714
Reported by: John Nemeth

Change-Id: I1b84a89315a5f61222123d21bf35c59224da8990
2018-03-03 16:06:13 +01:00
Alexander Traud
5d19762b5f BuildSystem: Cast any intptr_t explicitly to its proposed type.
ASTERISK-27713

Change-Id: I90c769e3c7f8c26de8a3af11335862cec15a1b22
2018-03-03 15:30:47 +01:00
Alexander Traud
9749524520 BuildSystem: Detect whether uselocale(.) is available.
ASTERISK-27712
Reported by: Joerg Sonnenberger, D'Arcy Cain

Change-Id: Idf1c9d43617a3e13028b95b313415903d80ef807
2018-03-03 13:56:03 +01:00
Alexander Traud
f7b845ff41 BuildSystem: Avoid re-defining of pthread_* on NetBSD.
ASTERISK-27711

Change-Id: Idc9194035b2958b99f6b01eb5b438d45a074565b
2018-03-03 10:53:12 +01:00
Alexander Traud
313a9fe255 BuildSystem: Install init scripts on openSUSE Tumbleweed.
ASTERISK-27710

Change-Id: I4c777e41b31d4415bbe21cb435ad47b43ebb5467
2018-03-02 14:05:25 +01:00
Alexander Traud
a9c02e484a BuildSystem: Avoid == for comparison in ./configure.
ASTERISK-27709
Reported by: John Nemeth

Change-Id: I11b1ae8fd404c04066f1458f5d71f9536359d58d
2018-03-02 12:12:17 +01:00
Jenkins2
e58ae393b1 Merge "gitreview: Reorder and add padding." 2018-03-01 09:08:55 -06:00
Jenkins2
97485eefaf Merge "res_pjsip_refer.c: Fix attended transfer race condition crash." 2018-03-01 08:44:21 -06:00
Richard Mudgett
1a36a452bd pjproject: Add cache_pools debugging option.
The pool cache gets in the way of finding use after free errors of memory
pool contents.  Tools like valgrind and MALLOC_DEBUG don't know when a
pool is released because it gets put into the cache instead of being
freed.

* Added the "cache_pools" option to pjproject.conf.  Disabling the option
helps track down pool content mismanagement when using valgrind or
MALLOC_DEBUG.  The cache gets in the way of determining if the pool
contents are used after free and who freed it.

To disable the pool caching simply disable the cache_pools option in
pjproject.conf and restart Asterisk.

Sample pjproject.conf setting:
[startup]
cache_pools=no

* Made current users of the caching pool factory initialization and
destruction calls call common routines to create and destroy cached pools.

ASTERISK-27704

Change-Id: I64d5befbaeed2532f93aa027a51eb52347d2b828
2018-02-28 11:41:30 -06:00
Jenkins2
53ed437db3 Merge "Add extended properties to rtp_engine for RTP retransmission support." 2018-02-25 19:19:53 -06:00
Corey Farrell
eacee03f0e gitreview: Reorder and add padding.
Change-Id: I459dc320a8c9452a01eed6f403d786741587c890
2018-02-25 15:18:16 -05:00
George Joseph
7e2128c8e6 ast_coredumper: Minor fixes
* Fix --tarball-config so the option doesn't cause an error.

* Allow for missing /etc/os-release.

* Add a sleep between tarballing the coredump and removing the
  output directory to allow the filesystem to settle.

Change-Id: I73e03b13087978bcc7f6bc9f45753990f82d9d77
2018-02-23 15:01:18 -06:00
Ben Ford
0be1c388e4 Add extended properties to rtp_engine for RTP retransmission support.
A couple of additional properties are needed in rtp_engine to enable
support for packet retransmission: AST_RTP_PROPERTY_RETRANS_RECV and
AST_RTP_PROPERTY_RETRANS_SEND. These will both be enabled automatically
if an endpoint has the webrtc option enabled. While this adds no
functionality currently, it will serve as a building block for future
changes for RTP retransmission support.

For more information, refer to the wiki page:
https://wiki.asterisk.org/wiki/display/AST/WebRTC+User+Experience+Improvements

Change-Id: Ic598acd042a045f9d10e5bdccb66f4efc9e587cc
2018-02-23 12:56:00 -06:00
Corey Farrell
a7927471ad core: Fix handling of maximum length lines in config files.
When a line is the maximum length "\n" is found at sizeof(buf) - 2 since
the last character is actually the null terminator.  In addition if a
line was exactly 8190 plus a multiple of 8192 characters long the config
parser would skip the following line.

Additionally fix comment in voicemail.conf sample config.  It previously
stated that emailbody can only contain up to 512 characters which is
always wrong.  The buffer is normally 8192 characters unless LOW_MEMORY
is enabled then it is 512 characters.  The updated comment states that
the line can be up to 8190 or 510 characters since the line feed and
NULL terminator each use a character.

ASTERISK-26688 #close

Change-Id: I80864a0d40d2e2d8cd79d72af52a8f0a3a99c015
2018-02-23 12:12:04 -05:00
Jenkins2
d6d520a040 Merge "install_prereq: Update FreeBSD libraries." 2018-02-23 09:19:06 -06:00
Joshua Colp
6af103ec61 Merge "func_audiohookinherit: Remove deprecated module." 2018-02-23 09:02:08 -06:00
George Joseph
01510df672 Merge "res_rtp_asterisk: Fix ICE candidate nomination" 2018-02-23 08:26:50 -06:00
Richard Mudgett
bb9c1938a0 res_pjsip_refer.c: Fix attended transfer race condition crash.
The transferrer's session channel was destroyed by the transferrer's
serializer thread in a race condition with the transfer target's
serializer thread during an attended transfer.  The transfer target's
serializer was attempting to clean up a deferred end status on behalf of
the transferrer's channel when it should have passed the action to the
transferrer's serializer.  When the transfer target's serializer lost the
race then both threads wind up trying to end the transferrer's session.

* Push the ast_sip_session_end_if_deferred() call onto the transferrer's
serializer to avoid a race condition that results in a crash.  The
session_end() function that could be called by
ast_sip_session_end_if_deferred() really must be executed by the
transferrer's serializer to avoid this kind of crash.

ASTERISK-27568

Change-Id: Iacda724e7cb24d7520e49b2fd7e504aa398d7238
2018-02-22 17:15:25 -06:00
Jenkins2
d4fc1bdad6 Merge "bridge_simple.c: Fix stream topology handling." 2018-02-22 13:34:41 -06:00
Alexander Traud
c4c5d00528 install_prereq: Update FreeBSD libraries.
deleted
 autoconf gcc libsamplerate sqlite

changed
 binutils to libbfd
 freetds-devel to freetds
 gmime2 to gmime26
 mysql55-client to mysql57-client

added
 alsa-lib bison bzip2 cclient corosync doxygen libedit flex graphviz
 libhoard libical libilbc libltdl lua neon newt net-snmp
 openldap-client openssl patch pkgconf portaudio postgresql10-client
 python radcli speexdsp subversion uriparser xmlstarlet libzip

ASTERISK-27686

Change-Id: Ibe88c9b26e59c30d26cdb313a3ef01c9f37ac80d
2018-02-22 12:56:00 -06:00
Sean Bright
50d9af101e func_audiohookinherit: Remove deprecated module.
Change-Id: Id52f719078a65c4b2eee7ab99d761eba6b6aed94
2018-02-22 11:54:33 -05:00
Jenkins2
fc0cad481a Merge "manager.c: Fix lseek() parameter order." 2018-02-21 18:42:18 -06:00
Kevin Harwell
2220be2349 Merge "AST-2018-006: Properly handle WebSocket frames with 0 length payload." 2018-02-21 14:11:50 -06:00
Kevin Harwell
bd549cf936 Merge "AST-2018-003: Crash with an invalid SDP fmtp attribute" 2018-02-21 14:11:39 -06:00
Kevin Harwell
c166589207 Merge "AST-2018-002: Crash with an invalid SDP media format description" 2018-02-21 14:11:29 -06:00
Richard Mudgett
f083edc43c manager.c: Fix lseek() parameter order.
ASTERISK-27659

Change-Id: I04a2705d2cb7df250769967bc59e2b397a49b797
2018-02-21 12:56:41 -06:00
Richard Mudgett
39f733406d bridge_simple.c: Fix stream topology handling.
The handling of stream topologies was not protected by channel locks in
simple_bridge_request_stream_topology_change().

* Fixed topology handling to be protected by channel locks where needed in
simple_bridge_request_stream_topology_change().

ASTERISK-27692

Change-Id: Ica5d78a6c7ecf4f0b95fb16de28d3889b32c4776
2018-02-21 12:36:13 -06:00
George Joseph
5458175744 Merge "AST-2018-005: res_pjsip_transport_management: Move to core" 2018-02-21 10:42:28 -06:00
George Joseph
a4db014fd6 Merge "AST-2018-005: Fix tdata leaks when calling pjsip_endpt_send_response(2)" 2018-02-21 10:42:19 -06:00
George Joseph
121cbc98cb Merge "AST-2018-005: Add a check for NULL tdata in ast_sip_failover_request" 2018-02-21 10:42:07 -06:00
Joshua Colp
86c75af860 Merge "AST-2018-001: rtp / channel: Don't allow an unnegotiated format to be passed up." 2018-02-21 10:38:49 -06:00
Sean Bright
6436137959 AST-2018-006: Properly handle WebSocket frames with 0 length payload.
In ast_websocket_read() we were not adequately checking that the
payload_len was non-zero before passing it to ws_safe_read(). Calling
ws_safe_read with a len argument of 0 will result in a busy loop until
the underlying socket is closed.

ASTERISK-27658 #close

Change-Id: I9d59f83bc563f711df1a6197c57de473f6b0663a
2018-02-21 10:31:52 -06:00
Kevin Harwell
880c69f00f AST-2018-003: Crash with an invalid SDP fmtp attribute
pjproject's fmtp retrieval function failed to catch invalid fmtp attributes.
Because of this Asterisk would crash if given an SDP with an invalid fmtp
attribute.

When retrieving the format this patch now makes sure the fmtp attribute is
available. If not available it now returns an error status.

ASTERISK-27583 #close

Change-Id: I5cebe000ce2d846cae3af33b6d72c416e51caf2f
2018-02-21 09:26:28 -06:00
Kevin Harwell
d3a398cf90 AST-2018-002: Crash with an invalid SDP media format description
pjproject's media format parsing algorithm failed to catch invalid values.
Because of this Asterisk would crash if given an SDP with a invalid media
format description.

When parsing the media format description this patch now properly parses the
value and returns an error status if it can't successfully parse/convert the
value.

ASTERISK-27582 #close

Change-Id: I883b3a4ef85b6972397f7b56bf46c5779c55fdd6
2018-02-21 09:26:05 -06:00
George Joseph
758409de56 AST-2018-005: res_pjsip_transport_management: Move to core
Since res_pjsip_transport_management provides several attack
mitigation features, its functionality moved to res_pjsip and
this module has been removed.  This way the features will always
be available if res_pjsip is loaded.

ASTERISK-27618
Reported By: Sandro Gauci

Change-Id: I21a2d33d9dda001452ea040d350d7a075f9acf0d
2018-02-21 08:14:56 -07:00
George Joseph
de871515ba AST-2018-005: Fix tdata leaks when calling pjsip_endpt_send_response(2)
pjsip_distributor:
   authenticate() creates a tdata and uses it to send a challenge or
   failure response.  When pjsip_endpt_send_response2() succeeds, it
   automatically decrements the tdata ref count but when it fails, it
   doesn't.  Since we weren't checking for a return status, we weren't
   decrementing the count ourselves on error and were therefore leaking
   tdatas.

res_pjsip_session:
   session_reinvite_on_rx_request wasn't decrementing the ref count
   if an error happened while sending a 491 response.
   pre_session_setup wasn't decrementing the ref count if
   while sending an error after a pjsip_inv_verify_request failure.

res_pjsip:
   ast_sip_send_response wasn't decrementing the ref count on error.

ASTERISK-27618
Reported By: Sandro Gauci

Change-Id: Iab33a6c7b6fba96148ed465b690ba8534ac961bf
2018-02-21 08:14:47 -07:00