Commit Graph

30314 Commits

Author SHA1 Message Date
Joshua Colp 1ee2907a16 Merge "res_stasis_mailbox.c: Fix leak of mailbox container." 2017-11-06 07:17:22 -06:00
Sean Bright 04d3785a79 dtls: Add support for ephemeral DTLS certificates.
This mimics the behavior of Chrome and Firefox and creates an ephemeral
X.509 certificate for each DTLS session.

Currently, the only supported key type is ECDSA because of its faster
generation time, but other key types can be added in the future as
necessary.

ASTERISK-27395

Change-Id: I5122e5f4b83c6320cc17407a187fcf491daf30b4
2017-11-06 08:11:48 -05:00
Joshua Colp 052d26c169 Merge "Build System: Fix build failure caused by recent CLI improvements." 2017-11-06 06:31:28 -06:00
Corey Farrell 4013bfa52b configure: Add autoconf check for libopusfile.
This check is being added to make it easier for end-users of third party
open source Opus modules.  This was removed by ASTERISK-26426 but only
the module needed to be removed.

Change-Id: I62b9cd0c4fa8a77596ab0e042948a643a1152677
2017-11-06 04:34:34 -05:00
Alexander Traud 19332e6968 tcptls: Print notice when TLS is enabled but not configured.
Asterisk can be compiled without a SSL/TLS library, without the Development
Headers of OpenSSL. However, if TLS (SIP) or Secure-WebSockets (WebRTC) was
enabled in a configuration file, Asterisk did not notice the user. Asterisk
failed silently, only the corresponding TCP ports were not open.

ASTERISK-27394
Reported-by: mossley74

Change-Id: Ib8b7539a5b2af8154c22e5f7a40fc68f95d95b93
2017-11-06 10:18:24 +01:00
Alexander Traud 2ebea5aa03 install_prereq: Checkout of libSRTP 2.x.
Since Asterisk 13.17, libSRTP 2.x is supported. Therefore, its latest version
is installed again via the script install_prereq.

ASTERISK-27356

Change-Id: I13125839a79052356469e41edacbebff0a937d39
2017-11-04 12:05:36 +01:00
Richard Mudgett 79ddcdbc70 Stasis/ARI: Fix off-nominal path json memory leaks.
Change-Id: Id569c624c426e3b22a99936473c730592d8b83fb
2017-11-03 13:14:07 -05:00
Richard Mudgett 229790ea3d AOC: Fix AOC-S json memory leak.
Change-Id: I3a1d40a41a8a7d00fa4a187de6a343a79155d3ef
2017-11-03 12:58:49 -05:00
Richard Mudgett de4a4796d0 res_stasis_device_state.c: Optimize stasis_app_device_states_to_json()
* Eliminate RAII_VAR()
* Replace looped alloca with a char[] since that is how it is used anyway.

Change-Id: Ia27e64a884afa0f50b9ffdb1cf23da6bfa51ffdf
2017-11-03 12:43:11 -05:00
Richard Mudgett 103b05bb4b res_stasis_mailbox.c: Fix leak of mailbox container.
Change-Id: I7d33c1635713047e7d1597c9d882f7dc006d94b4
2017-11-03 12:18:08 -05:00
Corey Farrell 290bad22c9 Build System: Fix build failure caused by recent CLI improvements.
We use the editline library to help with filename completion in our CLI
interface.  Some systems failed to find the header when included from
loader.c.  This is fixed by setting the proper CFLAGS for the build of
loader.o.

ASTERISK-27378

Change-Id: Ib7fd496f1d7ed48141a2eadd5dd61cab2f2308be
2017-11-03 11:35:34 -04:00
Joshua Colp 325b5dd30f Merge "res_pjsip: Add to list of valid characters for from_user." 2017-11-03 09:06:47 -05:00
Joshua Colp 306e7912db Merge "Modules: Additional improvements to CLI completion." 2017-11-03 07:55:27 -05:00
Joshua Colp 2cafa4ef88 Merge "res/ari/resource_bridges.h: Update from 'make ari-stubs'." 2017-11-02 14:08:41 -05:00
Ben Ford f8e0f9be22 res_pjsip: Add to list of valid characters for from_user.
Fixes a regression where some characters were unable to be used in
the from_user field of an endpoint. Additionally, the backtick was
removed from the list of valid characters, since it is not valid,
and it was replaced with a single quote, which is a valid character.

ASTERISK-27387

Change-Id: Id80c10a644508365c87b3182e99ea49da11b0281
2017-11-02 11:49:53 -05:00
Joshua Colp 7a75abdf13 Merge "core: Don't attempt to write to a stream that does not exist." 2017-11-02 11:09:41 -05:00
Joshua Colp 8701479386 core: Don't attempt to write to a stream that does not exist.
When a frame is provided to ast_write ensure that a multistream
capable channel has a stream for it before attempting to give it
to the channel driver. In some cases (such as a deferred SDP
negotiation) the stream may not yet exist.

ASTERISK-27364

Change-Id: Icf84ca982a67cdd6e9a71851eb7eb1bd0e865276
2017-11-02 05:37:48 -05:00
Corey Farrell 606ae3484a Add missing menuselect dependencies.
This adds menuselect dependencies for modules that use symbols of other
modules.

ASTERISK-27390

Change-Id: Ia2d2849f5b87a72af7324a82edc3f283eafb5385
2017-11-02 02:57:52 -04:00
Corey Farrell b616b7e4a9 res/ari/resource_bridges.h: Update from 'make ari-stubs'.
A comment was updated when I ran 'make ari-stubs'.

Change-Id: Ib5154ae3ad72aff53374c28ead540fe349c42175
2017-11-01 23:00:00 -05:00
Corey Farrell 79f111e1f3 Prevent unload of modules which implement an Optional API.
Once an Optional API module is loaded it should stay loaded.  Unloading
an optional API module runs the risk of a crash if something else is
using it.  This patch causes all optional API providers to tell the
module loader not to unload except at shutdown.

ASTERISK-27389

Change-Id: Ia07786fe655681aec49cc8d3d96e06483b11f5e6
2017-11-01 20:46:11 -04:00
Corey Farrell b9f457eac0 Modules: Additional improvements to CLI completion.
Replace 'needsreload' argument with a 'type' argument to specify which
type of modules you want completion.  This provides more accurate CLI
completion for load and unload commands.

* 'module unload' now excludes modules that have active references or are
  not running.
* 'module load' now excludes modules that are already running.
* 'core set debug [atleast] <level> [module]' shows running modules only.

ASTERISK-27378

Change-Id: Iea3e00054461484196c46f688f02635cc886bad1
2017-11-01 19:37:09 -04:00
Sean Bright 1bfd1cf640 pjsip_message_filter: Only do interface lookup for wildcard addresses.
Change-Id: Ie083987e69dc43b6861671c218cacacc11b2072f
2017-11-01 13:59:17 -05:00
Joshua Colp 64f1294ef2 Merge "features: Bridge application's BRIDGERESULT not appropriately set" 2017-11-01 09:22:17 -05:00
Joshua Colp 0036a00775 Merge "res_ari_channels: Fix reference leak in channel_state_invalid." 2017-11-01 07:42:08 -05:00
Kevin Harwell 1e70011710 features: Bridge application's BRIDGERESULT not appropriately set
The dialplan application "Bridge" was not setting the BRIDGERESULT to failure
when a failure did occur. Even worse if it did fail to join the bridge it would
still report success.

This patch now sets the BRIDGERESULT variable to an appropriate value for a
given condition state. Also, removed the value INCOMPATIBLE as a valid result
type since it is no longer used.

ASTERISK-27369 #close

Change-Id: I22588e7125a765edf35cff28c98ca143e9927554
2017-10-31 15:25:28 -05:00
Joshua Colp df18445b98 Merge "Build System: Fix --disable-xmldoc option." 2017-10-31 15:14:53 -05:00
Corey Farrell f2175c5a39 res_ari_channels: Fix reference leak in channel_state_invalid.
channel_state_invalid leaked a reference to the channel snapshot any
time it was aquired.

ASTERISK-27067 #close

Change-Id: I8c653f00416b39978513c5605c4be0f03b1df29a
2017-10-31 13:43:32 -05:00
Joshua Colp 491c8054f2 Merge "core / pjsip: Add support for grouping streams together." 2017-10-31 13:27:40 -05:00
Joshua Colp d05391ed55 Merge "ast_coredumper: allow setting asterisk binary explicitly" 2017-10-31 06:48:16 -05:00
Joshua Colp 92b3ed4d32 Merge "Modules: Fix issues with CLI completion." 2017-10-30 17:18:59 -05:00
Joshua Colp 4c535f5c30 core / pjsip: Add support for grouping streams together.
In WebRTC streams (or media tracks in their world) can be grouped
together using the mslabel. This informs the browser that each
should be synchronized with each other.

This change extends the stream API so this information can
be stored with streams. The PJSIP support has been extended
to use the mslabel to determine grouped streams and store
this association on the streams. Finally when creating the
SDP the group information is used to cause each media stream
to use the same mslabel.

ASTERISK-27379

Change-Id: Id6299aa031efe46254edbdc7973c534d54d641ad
2017-10-30 17:10:03 -05:00
Joshua Colp be5b7b2076 Merge "alembic: Add bundle column in ps_endpoints table" 2017-10-30 11:56:56 -05:00
Joshua Colp 65753fb2fe Merge "app_agent_spool: Fix typo in dtmf features usage desctiption" 2017-10-30 11:08:52 -05:00
Joshua Colp 15466f225c Merge "ast_coredumper: Add gzipping of binaries and display of signal info" 2017-10-30 10:53:42 -05:00
Tzafrir Cohen 022de525be ast_coredumper: allow setting asterisk binary explicitly
Adds an extra option, --asterisk-bin=<path> to ast_coredumper. If
provided, the binary given to gdb will be the parameter, rather than
asterisk from the PATH.

ASTERISK-27380 #close

Change-Id: I25f5b91eb75059b0fb2f142e468c26b283b0a9f3
2017-10-30 16:20:18 +02:00
Florian Floimair 3052b56423 alembic: Add bundle column in ps_endpoints table
The ps_endpoints table was missing the bundle column
introduced with the bundle feature in
commit 065c3005ad.

ASTERISK-27374 #close

Change-Id: Ic900f4f2c20f64b99ea898d50f5c0a7117472d46
2017-10-30 08:36:59 -05:00
Corey Farrell e82b921c35 Modules: Fix issues with CLI completion.
* Stop using ast_module_helper to check if a module is loaded, use
  ast_module_check instead (app_confbridge and app_meetme).
* Stop ast_module_helper from listing reload classes when needsreload
  was not requested.

ASTERISK-27378

Change-Id: Iaed8c1e4fcbeb242921dbac7929a0fe75ff4b239
2017-10-30 01:39:20 -04:00
Igor Goncharovskiy 9bad4c74cc app_agent_spool: Fix typo in dtmf features usage desctiption
Fix typo, that specify usage wrong option 'dtmf-features' for CHANNEL() function
instead of correct 'dtmf_features'

ASTERISK-27377 #close

Change-Id: I15ecc829c1035b359584673e12cdb5c9291ac930
2017-10-28 19:24:17 -05:00
Corey Farrell 0991874430 res_pjsip_pubsub: Resolve potential crash in allocate_subscription.
When allocate_subscription fails to initialize fields of the new sub it
calls destroy_subscription.

Change-Id: I5b79c915ec216dc00c13c1e4172137864a4bec85
2017-10-27 14:50:14 -04:00
Joshua Colp 2a898460db Merge "codec.c: Defensively check the returned samples." 2017-10-27 09:19:11 -05:00
Joshua Colp 2fc5b92d59 Merge "app_voicemail.c: Fix compiler warning with IMAP build." 2017-10-27 08:41:09 -05:00
Joshua Colp 99f998c69d Merge "res_pjsip: Add 'ip' as a valid option to 'identify_by' on endpoint." 2017-10-26 18:45:40 -05:00
Richard Mudgett 26607e4e3b app_voicemail.c: Fix compiler warning with IMAP build.
ASTERISK-27181

Change-Id: Ic4468b49860bd7f67e922baf4c9e96828c184d17
2017-10-26 12:24:51 -05:00
Richard Mudgett 2ca3dbb197 codec.c: Defensively check the returned samples.
Earlier versions of the codec_opus samples_count callback can return
negative error values on undecodable frames.  This resulted in a divide by
zero exception.

* Added a defensive check in ast_codec_samples_count() for a "negative"
samples count return value.  Log the event and set the count to zero.

ASTERISK-27194

Change-Id: Icf69350307ecbbc80a3d74de46af9bd80ea17819
2017-10-26 11:48:20 -05:00
Joshua Colp 4f2717bab0 Merge "Single API for ast_store_lock_info and ast_remove_lock_info." 2017-10-25 18:09:16 -05:00
Joshua Colp 9e1fbab382 res_pjsip: Add 'ip' as a valid option to 'identify_by' on endpoint.
When the identify_by option on an endpoint is set to ip it will
only be identified using the res_pjsip_endpoint_identifier_ip module.
This ensures that it is not mistakenly matched using the username of
the From header. To ensure behavior has not changed the default has
been changed to "username,ip" for the identify_by option.

ASTERISK-27206

Change-Id: I2170b86a7f7e221b4f00bf14aa1ef1ac5b050bbd
2017-10-25 18:14:03 +00:00
George Joseph 4aec70690d ast_coredumper: Add gzipping of binaries and display of signal info
The --tarball-coredump option now creates a gzipped tarball of
coredumps processed, their results txt files and copies of
/etc/os-release, /usr/sbin/asterisk, /usr/lib(64)/libasterisk* and
/usr/lib(64)/asterisk as those files are needed to properly examine
the coredump.  The file will be named
/tmp/asterisk.<timestamp>.coredumps.tar.gz or
/tmp/asterisk-<uniqueid>.coredumps.tar.gz if --tarball-uniqueid was
specified.

Added dumps of *_siginfo to the top of the txt files so you can
tell what signal was invoked.

Change-Id: Ib9ee6d83592d4b1bc90cb3419a05376a88d1ded9
2017-10-25 12:28:21 -05:00
Ben Ford 3821be1c68 http.c: Fix http header send content.
Currently ast_http_send barricades a portion of the content that
needs to be sent in order to establish a connection for things
like the ARI client. The conditional and contents have been changed
to ensure that everything that needs to be sent, will be sent.

ASTERISK-27372

Change-Id: I8816d2d8f80f4fefc6dcae4b5fdfc97f1e46496d
2017-10-25 10:36:21 -05:00
Corey Farrell 5553adb8ba Build System: Fix --disable-xmldoc option.
The configure option to disable XML documentation does not currently
work.  This patch makes it effective, but also causes an ABI change by
removing the ast_xmldoc_* symbols.  Disabling xmldoc also prevents docs
from being automatically generated, but they can still be manually
generated with 'make doc/core-en_US.xml'.

ASTERISK-26639

Change-Id: Ifac562340c09f80c83e0203de098fcac93bf8c44
2017-10-25 11:26:22 -04:00
Joshua Colp 65357091d8 Merge "Bundled pjproject: Enable pj_assert when dev-mode is enabled." 2017-10-25 09:03:19 -05:00