Commit Graph

30156 Commits

Author SHA1 Message Date
Corey Farrell
57f5335278 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 00:40:05 -05:00
Igor Goncharovskiy
8dfedbf3b1 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:07 -05:00
Corey Farrell
4b7a565dc5 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 13:53:19 -05:00
Jenkins2
f5f80fae31 Merge "codec.c: Defensively check the returned samples." into 15 2017-10-27 09:39:36 -05:00
Jenkins2
3bfb6c1514 Merge "app_voicemail.c: Fix compiler warning with IMAP build." into 15 2017-10-27 08:48:57 -05:00
Jenkins2
ed1b6d6c69 Merge "res_pjsip: Add 'ip' as a valid option to 'identify_by' on endpoint." into 15 2017-10-26 18:27:31 -05:00
Richard Mudgett
abf1e0709c app_voicemail.c: Fix compiler warning with IMAP build.
ASTERISK-27181

Change-Id: Ic4468b49860bd7f67e922baf4c9e96828c184d17
2017-10-26 12:24:40 -05:00
Richard Mudgett
a510cda254 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:13 -05:00
George Joseph
760fab5e0b Merge "http.c: Fix http header send content." into 15 2017-10-25 14:58:08 -05:00
Joshua Colp
e77bee9fb5 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:13:46 +00:00
George Joseph
c552e94d7c 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:11 -05:00
Ben Ford
373a1a9797 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:30:24 -05:00
Corey Farrell
ddcf98c0d3 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 10:26:12 -05:00
Jenkins2
aa1c969942 Merge "chan_sip: Fix SUBSCRIBE with missing "Expires" header." into 15 2017-10-25 07:59:22 -05:00
Joshua Colp
b78d63c45e Merge "hashtab: Use ast_free." into 15 2017-10-25 07:30:07 -05:00
Joshua Colp
b8140176e7 Merge "res_pjsip_sdp_rtp: Fix setting of address type for rtp_ipv6" into 15 2017-10-25 06:44:27 -05:00
Joshua Colp
4990048d9d Merge "res_pjproject.c: Upgrade bundled PJPROJECT to 2.7" into 15 2017-10-25 05:26:14 -05:00
Jenkins2
cbd9263080 Merge "main/Makefile: Remove rule for non-existant testexpr2." into 15 2017-10-24 16:13:25 -05:00
Joshua Colp
ad7a185417 Merge "res_xmpp: Ensure the connection filter is available." into 15 2017-10-24 15:35:24 -05:00
Jenkins2
da359db93d Merge "lpc10: Avoid compiler warning when DONT_OPTIMIZE/COMPILE_DOUBLE." into 15 2017-10-24 15:00:02 -05:00
Joshua Colp
cad9079339 Merge "test_config: Fix failure and segfault when config_hook is run twice." into 15 2017-10-24 13:57:06 -05:00
Corey Farrell
c75a7351bd chan_sip: Fix SUBSCRIBE with missing "Expires" header.
When chan_sip receives a SUBSCRIBE request with no "Expires" header it
processes the request as an unsubscribe.  This is incorrect, per RFC3264
when the "Expires" header is missing a default expiry should be used.

ASTERISK-18140

Change-Id: Ibf6dcd4fdd07a32c2bc38be1dd557981f08188b5
2017-10-24 11:03:22 -05:00
Joshua Colp
558431635c Merge "chan_sip: Crypto attribute not last but first on SDP media level." into 15 2017-10-24 09:28:15 -05:00
Alexander Traud
24ed38129c lpc10: Avoid compiler warning when DONT_OPTIMIZE/COMPILE_DOUBLE.
ASTERISK-23556
Reported by: Marcello Ceschia

Change-Id: Ic27e88e0336a0d83877dc857938659dc5560b93c
2017-10-24 07:29:03 -05:00
Corey Farrell
62c5a263b3 hashtab: Use ast_free.
A few places in hashtab use free instead of ast_free, remove declaration
of ASTMM_LIBC from hashtab.c as it's no longer needed.

Change-Id: I2ff089bad71640c03c3ce97f1b00fc962ef79427
2017-10-23 19:26:25 -05:00
Corey Farrell
a9ee06b497 main/Makefile: Remove rule for non-existant testexpr2.
Change-Id: Ibb3e47f27a395d74d8c5263db015b05434f5969b
2017-10-23 13:46:02 -05:00
Corey Farrell
ddce3ddab5 test_config: Fix failure and segfault when config_hook is run twice.
On second run the config_hook test was unexpectedly failing to load
test_config.conf because it was still unmodified since the last load.
This is fixed by not passing CONFIG_FLAG_FILEUNCHANGED for the initial
loads, only using it when we are tested that a reload of unmodified
files do not initiate the hook.

ASTERISK-25960

Change-Id: Ifd679509a23ed163e5cc647490bf7df4ae3cd856
2017-10-23 12:45:57 -05:00
George Joseph
942f5ab2c2 res_pjsip_sdp_rtp: Fix setting of address type for rtp_ipv6
create_outgoing_sdp_stream was setting "addr_type = STR_IP6" only
when an ipv6 media_address was specified on the endpoint.  If
rtp_ipv6 was set and ast_sip_get_host_ip_string returned an ipv6
address, we were leaving the addr_type set at the default of
STR_IP4.  This caused the address type to be set incorrectly on the
"o" and "c" SDP attributes even though the address was set
correctly.  Some clients don't like the mismatch.

 * Removed the test for endpoint/media_address and now check all
   addresses for ipv6.

ASTERISK-27198
Reported by: Martin Cisárik

Change-Id: I5214fc31b728117842243807e7927a319cf77592
2017-10-23 11:36:13 -06:00
Joshua Colp
415c8e9c8f Merge "bridge_softmix: Reduce topology cloning and improve renegotiation." into 15 2017-10-23 10:23:03 -05:00
Richard Mudgett
b148657526 app_agent_pool.c: Fix online documentation typo.
Change-Id: Ib0bc95fd0ec288c78c313823254d7a84ebfc4429
2017-10-23 07:54:22 -05:00
Joshua Colp
0efeb7885a res_xmpp: Ensure the connection filter is available.
Users of the API that res_xmpp provides expect that a
filter be available on the client at all times. When
OAuth authentication support was added this requirement
was not maintained.

This change merely moves the OAuth authentication to
after the filter is created, ensuring users of res_xmpp
can add things to the filter as needed.

ASTERISK-27346

Change-Id: I4ac474afe220e833288ff574e32e2b9a23394886
2017-10-22 17:34:07 -05:00
Alexander Traud
3eeb37b6fd chan_sip: Crypto attribute not last but first on SDP media level.
This matches the behavior of the other SIP channel driver, chan_pjsip.

ASTERISK-27365

Change-Id: I8f23a51290a58b75816da2999ed1965441dfc5d6
2017-10-21 03:45:52 -05:00
Richard Mudgett
0f3dcb250a res_pjproject.c: Upgrade bundled PJPROJECT to 2.7
Update patches included in bundled PJPROJECT for the new version.

ASTERISK-27355

Change-Id: I9ac5dbbffaadca25ad24fac8b9ab615e5ace6083
2017-10-20 14:28:13 -05:00
Corey Farrell
f2c95fb7e4 res_pjsip_pubsub: Prevent unload except during shutdown.
Prevent unload of the module as certain pjsip initialization functions
cannot be reversed.  This required a reorder of the module_load so that
the non-reversable pjsip functions are not called until all potential
errors have been ruled out.

ASTERISK-24483

Change-Id: Iee900f20bdd6ee1bfe23efdec0d87765eadce8a7
2017-10-19 10:34:56 -05:00
Jenkins2
2e028b5859 Merge "chan_sip: Fix output of 'sip set debug off'." into 15 2017-10-19 08:00:37 -05:00
Corey Farrell
e89a0a7770 res_pjsip_refer: Prevent unload except during shutdown.
Prevent unload of the module as certain pjsip initialization functions
cannot be reversed.

ASTERISK-24483

Change-Id: I94597ec8b8491f5af9c57bf66dbc3b078fe2d49d
2017-10-18 13:40:15 -05:00
Corey Farrell
91d02bdcfc chan_sip: Fix output of 'sip set debug off'.
When sip.conf contains 'sipdebug=yes' it is impossible to disable it
using CLI 'sip set debug off'.  This corrects the output of that CLI
command to instruct the user to turn sipdebug off in the configuration
file.

ASTERISK-23462 #close

Change-Id: I1cceade9caa9578e1b060feb832e3495ef5ad318
2017-10-18 12:13:22 -05:00
Alexander Traud
4865a05d4e res_srtp: Add support for libsrtp2 with AES-GCM.
Beside allowing AES-GCM again, this adds AES-192 again.

ASTERISK-27356

Change-Id: Ia97a435faf26300335d9552fa676b5d17e5f7233
2017-10-18 03:35:57 -05:00
Jenkins2
1525104534 Merge "res_corosync: Fix linking issue with Corosync 2.x" into 15 2017-10-17 11:45:10 -05:00
Joshua Colp
93ebe00c28 Merge "cdr.c: Rename the Party A CDR container." into 15 2017-10-17 11:06:36 -05:00
Joshua Colp
b66738b86b Merge "cdr.c: Add container to key off of Party B channel names." into 15 2017-10-17 11:05:56 -05:00
Joshua Colp
0555cf8da1 Merge "contrib/script/sip_to_pjsip: implement 'all' for allow/disallow" into 15 2017-10-17 09:38:52 -05:00
Jenkins2
4de4a45359 Merge "bridge_simple: Improve renegotiation success rate." into 15 2017-10-17 08:37:25 -05:00
Joshua Colp
493ba5ebe4 Merge "chan_dahdi: wrap include file which is not present on BSD systems in #ifdef" into 15 2017-10-17 08:16:08 -05:00
Matt Jordan
312a338531 res_corosync: Fix linking issue with Corosync 2.x
At some point in time in the history of Corosync (certainly within the
2.x branch), the corosync_cfg_state_track function was removed.
Unfortunately, the cfg library is only linked if this function is
present. Without the cfg library being linked to res_corosync, loading
of res_corosync will fail.

This patch makes it so that detecting corosync's core libraries,
determined by the COROSYNC external library checks, links both the cpg
and cfg libraries with res_corosync.

Change-Id: I674e9e1c8fea11c3bf81154aaa7c1fd43f945465
2017-10-17 07:13:19 -05:00
Jenkins2
f3225025a1 Merge "res_pjsip_session: Rewrite o= with external_media_address." into 15 2017-10-17 06:30:19 -05:00
Joshua Colp
fe9406e02d bridge_softmix: Reduce topology cloning and improve renegotiation.
As channels join and leave an SFU the bridge_softmix module
needs to renegotiate to add and remove their streams from
the other participants. Previously this was done by constructing
the ideal stream topology every time but in the case of leave
this was incomplete.

This change makes it so bridge_softmix keeps an ideal stream
topology for each channel and uses it when making changes. This
ensures that when we request a renegotiation we are always
certain that we are aiming for the best stream topology
possible. In the case of a channel leaving this ensures that
we try to have an existing participant fill their place if
a participant has a fixed limit on the maximum number of video
streams they allow.

ASTERISK-27354

Change-Id: I58070f421ddeadd2844a33b869b052630cf2e514
2017-10-17 10:45:23 +00:00
Richard Mudgett
0b66442350 cdr.c: Rename the Party A CDR container.
* Rename the Party A CDR container from active_cdrs_by_channel to
active_cdrs_master.

* Renamed the support functions associated with active_cdrs_master
appropriately.

ASTERISK-27335

Change-Id: I6104bb3edc3a0b7243ce502e45e8832b0cff14f7
2017-10-16 12:25:42 -05:00
Richard Mudgett
7920708ffd cdr.c: Add container to key off of Party B channel names.
The CDR performance gets worse the further it gets behind in processing
stasis messages.  One of the reasons is because of a n*m loop used when
processing Party B information.

* Added a new CDR container that is keyed to Party B so we don't need such
a large loop when processing Party B information.

NOTE: To reduce the size of the patch I deferred to another patch the
renaming of the Party A active_cdrs_by_channel container to
active_cdrs_master and renaming the container's hash and cmp functions
appropriately.

ASTERISK-27335

Change-Id: I0bf66e8868f8adaa4b5dcf9e682e34951c350249
2017-10-16 12:25:42 -05:00
Torrey Searle
e682580df4 contrib/script/sip_to_pjsip: implement 'all' for allow/disallow
when 'all' is specified in an allow or disallow section, it should erase
all values from the inverse section in the default config. E.G.
allow=all should erase any deny values from default config &
vice-versa

ASTERISK-27333 #close

Change-Id: I99219478fb98f08751d769daaee0b7795118a5a6
2017-10-16 06:25:56 -05:00