Commit Graph

31415 Commits

Author SHA1 Message Date
George Joseph 61b6d9efa4 Merge "res_pjsip_caller_id: Add "party" parameter to RPID header." 2018-08-15 09:44:43 -05:00
Jenkins2 9241b11216 Merge "res_pjsip/rtp: No joint capabilities between streams." 2018-08-15 09:38:12 -05:00
George Joseph 76b73549db Merge "contrib/scripts: Make astgenkey executable" 2018-08-15 07:50:48 -05:00
Jenkins2 5241a53acd Merge "Build System: Improve ccache matching for different menuselect options." 2018-08-14 13:41:32 -05:00
Richard Mudgett 58c3677581 contrib/scripts: Make astgenkey executable
Change-Id: I11641d65592536dea9cbca5aa94a24c25d24dd5f
2018-08-14 12:10:01 -05:00
Joshua Colp fca3d4fe5f res_pjsip_caller_id: Add "party" parameter to RPID header.
This change adds the "party" parameter to the Remote-Party-ID header
which indicates which party the header information is applicable
to. In Asterisk this is determined on whether we are the calling
or called party. This is added to improve interoperability with some
implementations.

ASTERISK-28006

Change-Id: I1eec3e377ffff8633b5c1dd59a05e9533122cfca
2018-08-14 08:55:38 -05:00
Jenkins2 863858ed5a Merge "CI: Add support for coverage processing." 2018-08-14 07:34:13 -05:00
Ben Ford c31a01bd75 res_pjsip/rtp: No joint capabilities between streams.
When a conference contained a mixture of audio/video and audio-only
users, a NOTICE message would pop up stating there are no joint
capabilities between streams. This happens because streams can never be
removed, but they can be in a REMOVED state. If we have the scenario
where user A joins with audio/video, user B joins with audio-only, and
user C joins with audio/video, then user A leaves, the message would
be triggered. That removed stream is still in the SDP, but Asterisk
would pass it through, causing it to be seen as a ulaw stream. A check
has been added for removed streams, setting their status to REMOVED when
handling negotiated SDPs.

Also addressed an issue where user A joins, then user B joins but does
not receive video until much later. Full frames were not being sent,
causing some PLI from the browser. Because the video was flowing in one
direction, the browser sets the SSRC to 1, but Asterisk was dropping the
PLI because of that. Added a check to see if the SSRC is 1 or not, which
sends full frames and allows video to flow between user A and user B.
This should only happen when dealing with PSFB or FUR, and in the case
of PSFB, only for PLI.

ASTERISK-27398

Change-Id: I26e7c6f101bc119549eeca406b5bcd25ad8ebc5e
2018-08-13 14:01:53 -05:00
Ivan Poddubny 2ce061091e app_queue: set QUEUESTATUS to LEAVEEMPTY instead of CONTINUE
When a call leaves a queue on leaveempty condition, QUEUESTATUS
must be set to LEAVEEMPTY, no matter whether Queue was executed with or
without the "c" (continue) option.

The regression was introduced in the fix for ASTERISK_25665.
The following fix (ASTERISK_27065) was incomplete, as QUEUESTATUS was
overwritten in case when "c" is set, regardless of what was the cause
for leaving the queue.

ASTERISK-27973 #close
Reported-by: Valentin Safonov

Change-Id: Iec013fe6a26a4e825ca572a1dda4f3cee5f6f80c
2018-08-13 12:45:16 -05:00
Corey Farrell 63ca367ab9 Sample configs: Fix pjsip.conf syntax error.
It is valid for a config file to be empty or contain only comments, but
not valid for a config value to be set when no uncommented context
exists.  This caused an error to be loged numerous times during start
when loading the default pjsip.conf.

Change-Id: Icf3b0d69b4ecb6e935eecd43c99ed8b32a5a1cf6
2018-08-09 16:28:39 -04:00
Joshua Colp b0ac1ecc29 Merge "res_pjsip_registrar: Improve performance on inbound handling." 2018-08-08 12:08:49 -05:00
Corey Farrell addfc93815 CI: Add support for coverage processing.
Enable coverage with `./tests/CI/buildAsterisk.sh --coverage`.  This
will cause Asterisk to be compiled with coverage support.  It also
initializes 'before' coverage data for all sources.  Accept
--tested-only to disable modules which are not run by any test.
Enabling coverage also sets tested-only true by default.  To build
everything with coverage enabled use `--coverage --tested-only=0`.

./tests/CI/processCoverage.sh is used to process the coverage and
generate HTML reports.

Fix utils/check_expr2 which failed to compiled with coverage enabled.

Add status output 5 times per stage of astobj2_test_perf to ensure
remote CLI does not timeout when compiled with coverage.  Remote CLI
disconnects if no output is received for 60 seconds.  When coverage is
enabled it takes about 70 seconds for my laptop to run the stages of
this test, so with the change a message is printed every 14 seconds.

Change-Id: I890f7d5665087426ad7d3e363187691b9afc2222
2018-08-08 10:59:16 -05:00
Joshua Colp a0426e136b Merge "stasis: Reduce calculation of stasis message type hash." 2018-08-08 05:54:02 -05:00
Joshua Colp 39a8920504 Merge "res_pjsip: Make pjlib.h consistently included." 2018-08-08 05:53:53 -05:00
Joshua Colp da71652782 Merge "res_pjsip.h: Fix doxygen comments." 2018-08-08 05:18:44 -05:00
Joshua Colp b002b85762 Merge "pjproject_bundled: Fix for Solaris builds. Do not undef s_addr." 2018-08-08 05:10:32 -05:00
Richard Mudgett c6ad25dcb7 res_pjsip.h: Fix doxygen comments.
Change-Id: I9cf97bdc756012d1f552ab007f4aa85e0ddb4e62
2018-08-07 10:30:45 -05:00
Joshua Colp 455ca1095e stasis: Reduce calculation of stasis message type hash.
When the stasis cache is used a hash is calculated for
retrieving or inserting messages. This change calculates
a hash when the message type is initialized that is then
used each time needed. This ensures that the hash is
calculated only once for the message type.

Change-Id: I4fe6bfdafb55bf5c322dd313fbd8c32cce73ef37
2018-08-06 11:18:04 -05:00
Joshua Colp db765cea68 Merge "dialplan_functions: wrong srtp use status report of a dialplan function" 2018-08-06 08:34:20 -05:00
Joshua Colp 833548ff75 Merge "pjproject_bundled: Find shared libraries in root --with-ssl=PATH." 2018-08-06 05:28:47 -05:00
Alexander Traud 603d1e8d4b pjproject_bundled: Fix for Solaris builds. Do not undef s_addr.
The authors of PJProject undef s_addr because of some issue in Microsoft
Windows. However in Oracle Solaris, s_addr is not a structure member, but
defined to map to the real structure member.

Updates the patch from ASTERISK_20366

ASTERISK-27997

Change-Id: I8223026d4d54e2a46521085fcc94bfa6ebe35b11
2018-08-03 16:59:03 -05:00
Richard Mudgett acbb9f52b2 res_pjsip: Make pjlib.h consistently included.
* Don't include pjlib.h twice in res_pjsip.h
* Consistently use #include <> form for pjproject includes.
(pjsip.h and pjlib.h)

Change-Id: I3f7b42044840de64edf7e9d7695cb60c45990dc7
2018-08-03 16:07:22 -05:00
Salah Ahmed a90177cd63 dialplan_functions: wrong srtp use status report of a dialplan function
If asterisk offer an endpoint with SRTP and that endpoint respond
with non srtp, in that case channel(rtp,secure,audio) reply wrong
status.

Why delete flag AST_SRTP_CRYPTO_OFFER_OK while check identical remote_key:
Currently this flag has being set redundantly. In either case identical
or different remote_key this flag has being set. So if we
don't set it while we receive identical remote_key or non SRTP SDP
response then we can take decision of srtp use by using that flag.

ASTERISK-27999

Change-Id: I29dc2843cf4e5ae2604301cb4ff258f1822dc2d7
2018-08-03 13:50:04 -05:00
Kevin Harwell 1dcb357291 Merge "BuildSystem: Enable ncurses for menuselect in Solaris 11." 2018-08-03 13:29:11 -05:00
Kevin Harwell cce0b6ed5e Merge "pjsip_wizard.conf.sample: Update remote_hosts description." 2018-08-03 13:27:24 -05:00
Kevin Harwell 139319b510 Merge "res_pjsip_endpoint_identifier_ip.c: Added regex support to match_header" 2018-08-03 13:26:30 -05:00
Alexander Traud 1c7c867ce0 pjproject_bundled: Find shared libraries in root --with-ssl=PATH.
The script configure from Teluu expects shared libraries (.so) in a subfolder
called 'lib', when --with-xyz=PATH is specified. However for OpenSSL, the
default location is the root of the source folder = PATH. Furthermore, Asterisk
supports both, 'lib' and root. For consistency and because Asterisk is using
(only) OpenSSL in PJProject, it is enhanced to support both locations, just
like Asterisk.

ASTERISK-27995

Change-Id: I8eb916a88b6b8c22e29bb40bee8faaca6c73406f
2018-08-03 16:18:22 +02:00
Joshua Colp cbf082ed53 res_pjsip_registrar: Improve performance on inbound handling.
This change removes a sorcery lookup for retrieving all
contacts at the end of the registration process by keeping
track of the contacts that are added/updated/deleted.

This ensures at the end of the process the container of
contacts we have is the current state.

Pool usage has also been reduced by allocating one for
usage throughout the handling of a REGISTER and resetting
it to a clean state. This ensures that in most cases
we allocate once and just reuse it.

ASTERISK-28001

Change-Id: I1a78b2d46f9a2045dbbff1a3fd6dba84b612b3cb
2018-08-03 04:09:15 -05:00
Joshua Colp 9fcb3aeb07 Merge "thirdparty/pjproject: fix deadlock in response retransmissions" 2018-08-02 07:12:35 -05:00
Joshua Colp 8fa4d9e207 Merge "BuildSystem: Enable Jansson in Solaris 11." 2018-08-02 06:39:07 -05:00
Torrey Searle 3424795f3a thirdparty/pjproject: fix deadlock in response retransmissions
The tdata containing the response can be shared by both the dialog
object and the tsx object.  In order to prevent the race condition
between the tsx retransmission and the dialog sending a response,
clone the tdata before modifying it for the dialog send response.

ASTERISK-27966 #close

Change-Id: Ic381004a3a212fe1d8eca0e707fe09dba4a6ab4e
2018-08-01 11:12:16 -05:00
Corey Farrell a10a3aff6a Build System: Improve ccache matching for different menuselect options.
Changing any Menuselect option in the `Compiler Flags` section causes a
full rebuild of the Asterisk source tree.  Every enabled option causes
a #define to be added to buildopts.h, thus breaking ccache caching for
every source file that includes "asterisk.h".  In most cases each option
only applies to one or two files.  Now we only define those options for
the specific sources which use them, this causes much better cache
matching when working with multiple builds.  For example testing code
with an without MALLOC_DEBUG will now use just over half the ccache
size, only main/astmm.o will have two builds cached instead of every
file.

Reorder main/Makefile so _ASTCFLAGS set on specific object files are all
together, sorted by filename.  Stop adding -DMALLOC_DEBUG to CFLAGS of
bundled pjproject, this define is no longer used by any header so only
serves to break cache.

The only code change is a slight adjustment to how main/astmm.c is
initialized.  Initialization functions always exist so main/asterisk.c
can call them unconditionally.  Additionally rename the astmm
initialization functions so they are not exported.

Change-Id: Ie2085237a964f6e1e6fff55ed046e2afff83c027
2018-08-01 12:01:15 -04:00
Joshua Colp 44ff1e1675 Merge "res_rtp_asterisk: In Developer Mode, do not require OpenSSL." 2018-08-01 04:23:06 -05:00
Joshua Colp 17edf66341 Merge "res_pjsip_pubsub: Use ast_true for "prune_on_boot"." 2018-07-31 16:11:32 -05:00
Richard Mudgett 68a3d39a99 pjsip_wizard.conf.sample: Update remote_hosts description.
Remove the note that SRV records are not supported as that is no longer
true.

ASTERISK-27993

Change-Id: Id0dd6ef40e52702be9727a2b6122216cb00bb4ca
2018-07-31 11:29:24 -05:00
George Joseph a354599ecc CI: Add optional uninstall step before installing asterisk
Change-Id: I7dedf1e925eafc3a0adf01dd9dfbe44eb642aab7
2018-07-30 07:44:05 -06:00
Alexander Traud 7418dfa2c7 BuildSystem: Enable ncurses for menuselect in Solaris 11.
The check for the library ncurses should use not use the header <curses.h> but
<ncurses.h>, because on some platforms <curses.h> is not a drop-in replacement
for <ncurses.h>: For example in Solaris, the symbol initscr is a typedef in
<curses.h> to a symbol which does not exist in the library ncurses (initscr32).
Simply use <ncurses.h> when you link to ncurses.

Furthermore in Solaris, the header <ncurses.h> is in a subdirectory
/usr/include/ncurses and not available via pkg-config.

ASTERISK-15331
ASTERISK-14935
ASTERISK-12382
ASTERISK-9107

Change-Id: Ife367776b0ccf17d3fefed868245376bfb93745d
2018-07-29 03:17:43 -05:00
Joshua Colp 3aa6be6b51 res_pjsip_pubsub: Use ast_true for "prune_on_boot".
Change-Id: Iedec4e7390b3e821987681da24d0298632b9873d
2018-07-28 08:01:27 -05:00
Alexander Traud 0a4d58735f BuildSystem: Enable Jansson in Solaris 11.
In Solaris, the header <jansson.h> is in /usr/include/jansson. To find
Jansson even in such a subdirectory, the tool pkg-config is queried via
AST_PKG_CONFIG_CHECK. For those platforms, which do not list Jansson via
pkg-config, the previous check remains and is executed thereafter.

Because the check for the NetBSD Editline library uses the tool pkg-config
the code of PKG_PROG_PKG_CONFIG must be used. Because that check happens
earlier than Jansson, it must be placed in front of that.

ASTERISK-27991

Change-Id: I69ea0f379f87a50049654b2487c76ee1c04fa53a
2018-07-28 14:39:40 +02:00
Richard Mudgett e5ae04b48b res_pjsip_endpoint_identifier_ip.c: Added regex support to match_header
This patch adds regular expression support to make the identify section's
match_header option more useful when attempting to match complex headers
like the 'To' or 'From' headers.  The 'From' header has variable
components such as the tag parameter that you cannot predict.  To specify
a regular expression put slashes around the regular expression in place of
the header value.

[identify-alice]
type=identify
endpoint=alice
match_header=From: /<sip:alice@127\\.0\\.0\\.1>/

* Added regex support to match_header so you could match a 'To' header
among other complex headers.

Fixed reported crashes when trying to match special headers like 'Contact'.
The identify section's match_header method used code that assumed you were
matching a generic header.  Any other type of header could cause a crash
if the header structure variant did not match the generic header enough.

* Made use code that will work for any header type instead of code
specific to generic headers.

Other fixes while in the area:

* Made check all headers of the requested name.
* Added some more sanity checks to the configured identify matching
options when applying the configuration.

ASTERISK-27548

Change-Id: I27dfd4ff5e2259b906640e3c330681b76b4ed1f1
2018-07-27 10:58:38 -05:00
Joshua Colp 4265391859 res_pjsip_pubsub: Treat "prune_on_boot" as a yes / no.
The alembic for the PJSIP subscription persistence table has the
"prune_on_boot" field as a boolean. While in Asterisk we are
tolerant of many different definitions of true and false in the
database we only accept "yes" and "no". This change makes the
field treated as a yes/no instead of an integer, thus storing
"yes" and "no" instead of "1" and "0".

Change-Id: Ic8b9211b36babefe78f70def6828a135a6ae7ab6
2018-07-27 10:47:31 -05:00
Alexander Traud 870fe7f60c res_rtp_asterisk: In Developer Mode, do not require OpenSSL.
OpenSSL is an optional external library and should stay optional even when
Developer Mode is configured.

ASTERISK-27990

Change-Id: Ia68a4cd5474b26d45e0f43b04032ad598022853b
2018-07-27 08:40:32 -05:00
Joshua Colp 4febeaefa6 Merge "devicestate: Don't create topic when change isn't cached." 2018-07-27 06:09:50 -05:00
Joshua Colp 54a5de9c95 Merge "loader: Process dependencies for built-in modules." 2018-07-27 06:04:51 -05:00
Joshua Colp d7ebf716f8 Merge "Build System: Create 'make install-configs' target." 2018-07-27 05:51:44 -05:00
Joshua Colp 90129b9736 Merge "res_rtp_asterisk: Avoid merging command and regular T.140 text packets" 2018-07-27 05:35:17 -05:00
George Joseph 116a599b7e CI: Fix placement of job summary statments
Change-Id: Iace19e718f4e8fb48eb7dc9f98af53b115cc45f3
2018-07-26 17:55:41 -06:00
Corey Farrell 709f4b81e7 loader: Process dependencies for built-in modules.
With the new module loader it was missed that built-in modules never
parsed dependencies from mod->info into vectors of mod.  This caused
manager to be initialized before acl (named_acl).  If manager.conf
used any named ACL's they would not be found and result in no ACL being
applied to the AMI user.

In addition to the manager ACL fix this adds "extconfig" to all builtin
modules which support realtime configuration.  This only matters if one
of the builtin modules is configured with 'preload', depending on
"extconfig" will cause config.c to automatically be initialize during
the preload stage.

Change-Id: I482ed6bca6c1064b05bb538d7861cd7a4f02d9fc
2018-07-26 14:29:18 -05:00
neutrino88 cb276b5085 res_rtp_asterisk: Avoid merging command and regular T.140 text packets
When realtime text packets are to be sent, the text is accumulated in a
buffer and sent regularly by a timer.  It can happen that commands such as
a backspace, CR, or LF get merged with regular text.  This breaks some
UAs.

The proposed change:
* We test if the current packet contains a command.  If so we send the
buffer immediately.
* We test if the buffer contained a command.  If so we send the buffer
immediately.
* We accumulate the text (or the command) in the buffer.

ASTERISK-27970

Change-Id: Ifbe993311410fa855cb8aa4a12084db75f413462
2018-07-26 13:58:22 -05:00
Jenkins2 7e0e6fd123 Merge "CI: Add docker info to job summary" 2018-07-26 11:44:30 -05:00