Commit Graph

31538 Commits

Author SHA1 Message Date
George Joseph d22d761257 Merge "res_pjsip_t38.c: Fix crash if already saw a final T.38 reINVITE response." 2018-08-20 10:55:01 -05:00
Joshua Colp 457ba355aa res_pjsip: Reduce processing when a Contact is updated.
When a Contact is updated the only material change that qualify
support cares about is the underlying configuration for the AOR.
In this case we will update things with the new AOR information but
otherwise the callback to indicate the Contact has changed can be
ignored.

This is because it is only when a Contact is added or deleted that
material changes occur within the qualify support. An update can't
change the URI since it would result in a new Contact so it can be
ignored.

Change-Id: I2f97ebfa79969a36a97bb7b9afd5b6268cf1a07d
2018-08-18 18:09:25 -03:00
Richard Mudgett 40f1604e2f res_pjsip_t38.c: Fix crash if already saw a final T.38 reINVITE response.
We were still getting crashes after the first fix.  Somehow we receive a
non-2xx final response before we get a 200 final response.  With the
failure response we had already cleaned up and destroyed some data
structures.  When the unexpected 200 response comes in we crash.

* Add protection code to prevent processing another final T.38 reINVITE
response.

ASTERISK-27944

Change-Id: I8b5baba8d07fe4d63f0d7d05d3eb9a3d27d40a74
2018-08-17 18:56:24 -05:00
Richard Mudgett 8cd36ab9b6 res_sorcery_realtime.c: Fix unqualified fetch warning.
The allow_unqualified_fetch option for the sorcery realtime backend
blocked actually fetching all rows when the option is set to warn.

* Made issue a warning and actually do the request when
allow_unqualified_fetch=warn is set.

Change-Id: I74456c80a03a62dce66fc3dc3cb0cf2351ac4312
2018-08-17 16:33:24 -05:00
Kirsty Tyerman 328f772d3b pbx_dundi: Added IPv6 support for dundi
Change includes move to netsock2 library.

ASTERISK-27164
Reported-by: Adam Secombe

Change-Id: Ia9e8dc3d153de7a291dbda4bd87fc827dd2bb846
2018-08-17 16:03:14 -05:00
Richard Mudgett 273e2802aa pbx_dundi.c: Misc memory management fixes when destroying peers
* In destroy_peer(), fixed memory leaks of lookup history strings and
qualify transactions when destroying peers.

* In destroy_peer(), fixed leaving the registerexpire scheduled callback
active when a peer is destroyed on a reload.  The reload marks and sweeps
peers so any peers not explicitly configured get destroyed.  Peers created
dynamically from the '*' peer will not exist until they re-register after
the reload.  These destroyed peers caused memory corruption when the
registerexpire timer expired.

* Made build_peer() not schedule any callbacks on the '*' peer
(empty_eid).  It is a special peer that is cloned to dynamically created
peers so it doesn't actually get involved in any message transactions.

* Made do_register_expire() remove the dundi/dpeers AstDB entry when a
peer registration expires.

* Fix deep_copy_peer() to not copy some things that cannot be copied to
the cloned peer structure.  Timers, message transactions, and lookup
history are specific to a peer instance.

* Made set_config() lock around processing the mappings configuration.

* Reordered unload_module() to handle load_module() declining the load due
to error.

Change-Id: Ib846b2b60d027f3a2c2b3b563d9a83a357dce1d6
2018-08-17 14:25:27 -05:00
Richard Mudgett d4e72ee296 pbx_dundi.c: Handle thread shutdown better.
Change-Id: Id52f99bd6a948fe6dd82acc0a28b2447a224fe87
2018-08-17 14:24:28 -05:00
Richard Mudgett 916abe7cdc pbx_dundi: Fix debug frame decode string.
* Fixed a typo in the name of the REGREQ frame decode string array.
* Fixed off by one range check indexing into the frame decode string
array.
* Removed some unneeded casts associated with the decode string array.

Change-Id: I77435e81cd284bab6209d545919bf236ad7933c2
2018-08-17 14:23:31 -05:00
Richard Mudgett c035d0afe0 pbx_dundi: Update sample config documentation.
Change-Id: I33d0ad0611c2124ca3440f0f811fa0f45e4e2849
2018-08-17 14:22:29 -05:00
Richard Mudgett aee5f7c1b6 res_rtp_asterisk.c: Fix unused variable warnings
Compiling without SRTP support installed resulted in some unused variable
warnings.  These warnings also showed that the srtp variable was obtained
and passed around some functions but not really used even when a system
has SRTP installed.

Change-Id: I6daad34be3e89b19adef6e2fbe738018975155fc
2018-08-17 14:03:28 -05:00
Joshua Colp 5cd416f354 Merge "res_resolver_unbound: Fix leak of config nameserver strings." 2018-08-17 05:40:01 -05:00
Joshua Colp a88cec6334 Merge "res_pjsip: Resolve transport management leak at shutdown." 2018-08-17 05:38:56 -05:00
Kevin Harwell b400d50b1e Merge "res_odbc: Allow unload at shutdown." 2018-08-16 17:48:01 -05:00
George Joseph 00563ce21a CI: Fixup for non-13 branches
Change-Id: I5e1d4a09e58b92b541bc8ed6f9e10e54c4e5101f
2018-08-16 12:53:12 -06:00
George Joseph e5f30eba79 CI: Final version of setting correct gerrit creds
Change-Id: I7729ecceedceb12f52bf18dae259846aa1d993b3
2018-08-16 12:34:07 -06:00
George Joseph 8e1c541acf CI: Add https credentials to gerrit checkouts
If the review to be tested is in a project with restricted access,
we need to use the jenkins user's gerrit https credentials when we
do the checkout or the checkout will fail.

Change-Id: I9dc9994763c5ebfeb9f1cff60fb53f6902b7fd5f
2018-08-16 12:34:07 -06:00
George Joseph c2f81cf446 Merge "res/res_pjsip_sdp_rtp: put rtcp-mux in answer only if offered" 2018-08-16 09:45:33 -05:00
Rodrigo Ramírez Norambuena 01c90fefb3 make config: os-release output error.
Fix not show the error
"/bin/sh: /etc/os-release: No such file or directory" when the command
'make config' is run in a System without systemv.

The instruction 'make config' pre execute the syntax
"$(shell . /etc/os-release && echo $$ID)" to identified if system is a
Slackware and Opensuse.

This change prevent show the message and is send to the /dev/null

Change-Id: I7f43e281a8d9405b2519fc653de82d9b8b645fdf
2018-08-16 11:07:17 -03:00
Torrey Searle 926d647def res/res_pjsip_sdp_rtp: put rtcp-mux in answer only if offered
If in the initial sdp the caller doesn't include the line
a=rtcp-mux

Then asterisk shoud not include rtcp-mux in the response regardless
of rtcp-mux being enabled on the endpoint

ASTERISK-28007 #close

Change-Id: I58e9b9f40a139afc0da5de41906cc608fb62adc7
2018-08-16 02:06:43 -05:00
Corey Farrell a83c464d9d res_resolver_unbound: Fix leak of config nameserver strings.
Change-Id: I3f396316bb40d1ae6e91f5f688042420f1a540ed
2018-08-15 15:32:25 -05:00
Corey Farrell 24302bda21 res_pjsip: Resolve transport management leak at shutdown.
Cleanup idle check scheduled events at shutdown.

Change-Id: I61bfbb56bac69fe840c3242927d31ff3593be461
2018-08-15 13:55:41 -05:00
Corey Farrell eb34b881a4 res_odbc: Allow unload at shutdown.
This makes it possible for REF_DEBUG to report no leaks when loading
res_odbc.

Change-Id: I1a3dea786bd6e7f4820a6dd5cbaa197fa783ce93
2018-08-15 11:33:37 -05:00
Corey Farrell 52fe5fe2c8 res_pjsip: Fix leak in pjsip_options.
sip_options_get_endpoint_state_compositor_state leaked a reference to
the first available endpoint state compositor that was found.

Change-Id: Idb6be19f7219b6eed1dfb19c1e740dd40cb3fdc7
2018-08-15 11:33:21 -05:00
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