Commit Graph

30080 Commits

Author SHA1 Message Date
Joshua Colp
83c61383c8 Merge "stasis: Remove silly use of RAII_VAR in stasis_forward_all." 2017-11-07 09:32:45 -06:00
Joshua Colp
a34b36c513 Merge "stasis_channels.c: Remove a very silly RAII_VAR()." 2017-11-07 08:44:12 -06:00
Joshua Colp
a576d7c2e4 Merge "stasis/app.c: Optimize stasis_app_get_debug_by_name()" 2017-11-07 07:57:39 -06:00
Joshua Colp
e7c52d1b61 Merge "Fix ast_(v)asprintf() malloc failure usage conditions." 2017-11-07 07:18:12 -06:00
Joshua Colp
5407291ec6 Merge "RTP Engine: Deal with errors returned from AST_VECTOR_REPLACE." 2017-11-07 06:36:32 -06:00
Corey Farrell
70fcc043bb res_pjproject: Handle error from adding to the buildopts vector.
Change-Id: I076c7bd207c7989a23005395ce1735392657be65
2017-11-06 18:17:13 -05:00
Corey Farrell
2f4f216026 RTP Engine: Deal with errors returned from AST_VECTOR_REPLACE.
Check for errors from AST_VECTOR_REPLACE and clean memory if needed.

Change-Id: I124d15cc1d645f85a72a1279f623c1993b304b0b
2017-11-06 16:20:06 -05:00
Corey Farrell
64bcb65a78 stasis: Remove silly use of RAII_VAR in stasis_forward_all.
Change-Id: I46de4c968d40144d5b049966304ff66c1469fb65
2017-11-06 15:23:46 -05:00
Joshua Colp
637b37fb98 Merge "dtls: Add support for ephemeral DTLS certificates." 2017-11-06 12:22:38 -06:00
Richard Mudgett
f81970d3fc stasis_channels.c: Remove a very silly RAII_VAR().
Change-Id: I28b458b3c1a442c4ef0be7b4986a95ea4149e14f
2017-11-06 13:06:56 -05:00
Joshua Colp
3126c396b1 Merge "install_prereq: Checkout of libSRTP 2.x." 2017-11-06 11:57:58 -06:00
Richard Mudgett
9771f089f5 stasis/app.c: Optimize stasis_app_get_debug_by_name()
* Eliminate RAII_VAR()
* Short circuit application name lookup if global debug enabled.

Change-Id: I5f78b7bd6ca7fd2c3b07cbbe036c6a93b4681123
2017-11-06 12:50:23 -05:00
Richard Mudgett
ee08f10d06 Fix ast_(v)asprintf() malloc failure usage conditions.
When (v)asprintf() fails, the state of the allocated buffer is undefined.
The library had better not leave an allocated buffer as a result or no one
will know to free it.  The most likely way it can return failure is for an
allocation failure.  If the printf conversion fails then you actually have
a threading problem which is much worse because another thread modified
the parameter values.

* Made __ast_asprintf()/__ast_vasprintf() set the returned buffer to NULL
on failure.  That is much more useful than either an uninitialized pointer
or a pointer that has already been freed.  Many uses won't have to check
for failure to ensure that the buffer won't be double freed or prevent an
attempt to free an uninitialized pointer.

* stasis.c: Fixed memory leak in multi_object_blob_to_ami() allocated by
ast_asprintf().

* ari/resource_bridges.c:ari_bridges_play_helper(): Remove assignment to
the wrong thing which is now not needed even if assigning to the right
thing.

Change-Id: Ib5252fb8850ecf0f78ed0ee2ca0796bda7e91c23
2017-11-06 12:47:30 -05:00
Joshua Colp
21d408a942 Merge "configure: Add autoconf check for libopusfile." 2017-11-06 10:38:18 -06:00
Joshua Colp
68b6ebd836 Merge "Prevent unload of modules which implement an Optional API." 2017-11-06 10:11:51 -06:00
Joshua Colp
ac7ec5026c Merge "Add missing menuselect dependencies." 2017-11-06 09:26:18 -06:00
Joshua Colp
3c6fe0545a Merge "Stasis/ARI: Fix off-nominal path json memory leaks." 2017-11-06 08:15:03 -06:00
Joshua Colp
036bbe2d3f Merge "AOC: Fix AOC-S json memory leak." 2017-11-06 07:51:36 -06:00
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
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