Commit Graph

29858 Commits

Author SHA1 Message Date
Alexander Traud
e60135efd4 codec_gsm: Avoid shifting a negative signed value.
clang 5.0 warned about this.

ASTERISK-27558

Change-Id: Icc452ecb0d86bbeba78dae768cc472ec540699df
2018-01-06 05:05:08 -06:00
Richard Mudgett
ba57c03740 res_pjsip_endpoint_identifier_ip.c: Fix apply identify validation.
The ip_identify_apply() did not validate the configuration for simple
static configuration errors or deal well with address resolution errors.

* Added missing configuration validation checks.
* Fixed address resolution error handling.
* Demoted an error message to a warning since it does not fail applying
the identify object configuration.

Change-Id: I8b519607263fe88e8ce964f526a45359fd362b6e
2018-01-05 18:49:32 -06:00
Richard Mudgett
0feca9bc18 res_pjsip.c: Fix endpoint identifier registration name search.
If an endpoint identifier name in the endpoint_identifier_order list is a
prefix to the identifier we are registering, we could install it in the
wrong position of the list.

Assuming
endpoint_identifier_order=username,ip,anonymous

then registering the "ip_only" identifier would put the identifier in the
wrong position of the priority list.

* Fix incorrect strncmp() string prefix matching.

Change-Id: Ib8819ec4b811da8a27419fd93528c54d34f01484
2018-01-05 18:07:49 -06:00
Alexander Traud
440fb4d02b BuildSystem: Find ptlib-config on Debian/Ubuntu.
The current configure script requires that tool when libpt-dev is installed.
libpt-dev was installed by libopenh323-dev, bacause you wanted to go for H.323
based channel drivers.

ASTERISK-25329

Change-Id: I9c6ab78b7246c21536e1d252dcbffe682f63f83d
2018-01-05 14:57:54 -06:00
Alexander Traud
dda0ab236d chan_ooh323: Limit outgoinglimit to positive values as intended.
ASTERISK-27552

Change-Id: Ifbf9d51e7374ca2e8b27ec568f6770050fc1a854
2018-01-05 08:02:43 -06:00
Alexander Traud
c11999f140 ooh323cDriver: Fix typo in header guard.
ASTERISK-27551

Change-Id: I39ff66031e3373e895e2bc47b23a5e860ea4e012
2018-01-05 06:19:57 -06:00
Alexander Traud
cee6de4e63 BuildSystem: Avoid obsolete warning with HELP_STRING on autoconf.
ASTERISK-26046

Change-Id: I48f05698c235f709225b92bec5aa260fb57d69d1
2018-01-05 03:40:36 -06:00
Corey Farrell
0f141351f9 pbx: Prevent execution of NULL pointer.
pbx_extension_helper has a check for q->swo.exec == NULL but it doesn't
actually return so we would still run the function.  Fix the return.
Move the 'int res' variable into the only scope which uses it.

Change-Id: I0693af921fdc7f56b6a72a21fb816ed08b960a69
2018-01-04 17:07:03 -05:00
Jenkins2
b8271826b3 Merge "res_pjsip_history: Add missing unlock to CLI command." into 13 2018-01-04 14:37:47 -06:00
Jenkins2
eb8a36d961 Merge "aco: Fix NULL dereference in error path." into 13 2018-01-04 14:08:29 -06:00
Corey Farrell
d73a3a1764 res_pjsip_history: Add missing unlock to CLI command.
Change-Id: I872060a30543776a176a316309602d924a23eb29
2018-01-04 09:34:00 -06:00
Corey Farrell
ec74570598 aco: Fix NULL dereference in error path.
Change-Id: Id505167cf0f9414a3c144fa2c1e181a2cf288694
2018-01-04 09:33:07 -06:00
Corey Farrell
74b6fafbe6 func_odbc: Add missing unlock's to acf_odbc_read.
Change-Id: I828329ecbd252ae8f27a369a046d2b03102b07c6
2018-01-04 09:13:15 -06:00
Kevin Harwell
d25a9bc7d3 res_pjsip_session: Check if sequence header is missing
The pjsip_msg_find_hdr function can return NULL. This patch adds a check
when searching for the sequence header to make sure a NULL pointer is never
de-referenced.

Change-Id: I19af23aeeded65be016be92360e8cb7ffe51fad2
2018-01-03 10:41:46 -06:00
Jenkins2
9e47e113e1 Merge "core: Use macros to generate ao2_container callbacks where possible." into 13 2018-01-03 07:49:58 -06:00
Jenkins2
6baf53e4be Merge "astobj2: Create case-insensitive variants of container function macros." into 13 2018-01-03 07:04:10 -06:00
Joshua Colp
3fa33de301 Merge "aco: Add missing aco_option_type_string for OPT_TIMELEN_T." into 13 2018-01-03 06:51:59 -06:00
Tzafrir Cohen
00b0c67144 cdr: submit: fix logic of test for batch mode
ASTERISK-27539 #close

Change-Id: I33cdf329d2bb4486dcae975c450f6aae94c515f7
2018-01-02 09:18:16 -06:00
Jenkins2
8e5167a0b5 Merge "stasis_channels.c: Misc cleanup." into 13 2018-01-02 07:39:30 -06:00
Jenkins2
3edaa955ba Merge "cdr_mysql: Make sure connection charset is always set" into 13 2018-01-02 06:54:21 -06:00
Corey Farrell
dd528c53c0 aco: Add missing aco_option_type_string for OPT_TIMELEN_T.
ASTERISK-27117

Change-Id: I8f6c34bb30830be9f7a40823723eb4dcaaa91c61
2018-01-02 00:39:32 -06:00
Corey Farrell
5b395a7b97 core: Use macros to generate ao2_container callbacks where possible.
This uses AO2_STRING_FIELD_HASH_FN and AO2_STRING_FIELD_CMP_FN where
possible in the Asterisk core.

This removes CMP_STOP from the result of CMP_FN callbacks for the
following structure types:
* ast_bucket_metadata
* ast_bucket_scheme
* generic_monitor_instance_list (ccss.c)
* named_acl

Change-Id: Ide4c1449a894bce70dea1fef664dade9b57578f1
2018-01-01 19:17:15 -05:00
Sean Bright
d2c836d24a ice: Increase foundation buffer size
Per RFC 5245, the foundation specified with an ICE candidate can be up
to 32 characters but we are only allowing for 31.

ASTERISK-27498 #close
Reported by: Michele Prà

Change-Id: I05ce7a5952721a76a2b4c90366168022558dc7cf
2017-12-31 11:26:54 -05:00
Corey Farrell
b275b0a84f astobj2: Create case-insensitive variants of container function macros.
* AO2_STRING_FIELD_CASE_HASH_FN
* AO2_STRING_FIELD_CASE_CMP_FN
* AO2_STRING_FIELD_CASE_SORT_FN

Change-Id: I11af8c6a0c43380a42732553f519c667abb842cf
2017-12-30 12:47:54 -06:00
Jenkins2
b47882df72 Merge "func_channel.c: Update MASTER_CHANNEL documentation" into 13 2017-12-29 13:31:04 -06:00
Richard Mudgett
751fd9b628 stasis_channels.c: Misc cleanup.
* Use current OBJ_SEARCH_xxx defines instead of the deprecated versions.

* Fix hash_cb and cmp_cb container functions to correctly use the
OBJ_SEARCH_xxx values.

* Remove incorrect usage of CMP_STOP.  Most uses in the system have no
effect.  This allows the collapse of channel_role_single_cmp_cb() and
channel_role_multi_cmp_cb() into channel_role_cmp_cb().

* Remove unnecessary usage of RAII_VAR().

Change-Id: I02c405518cab22aa2a082b61e2353bf7cd629a70
2017-12-28 13:37:31 -06:00
Jenkins2
e4d536b64d Merge "manager.c: Update AMI Status event documentation" into 13 2017-12-28 13:35:30 -06:00
George Joseph
712450c78a Merge "menuselect: Fix check for running configure." into 13 2017-12-28 10:56:55 -06:00
Jenkins2
9792bb0aa9 Merge "cdr: Missing NULL check and unlock." into 13 2017-12-28 10:32:29 -06:00
Sean Bright
bae301c18c cdr_mysql: Make sure connection charset is always set
When the MYSQL_OPT_RECONNECT option is enabled, the MySQL client API
will transparently reconnect when it needs to. Ideally this simplifies
our code, but when this reconnection occurs all connection state is
lost. Because we are not notified that this has happened, we don't know
to set our character set again (with "SET NAMES 'xyz'").

Rather than calling SET NAMES, we instead set the MYSQL_SET_CHARSET_NAME
option which will do it for us under the hood on each connect. This
option has been present in the MySQL C API for at least 15 years, so it
should be safe for most installations.

I also snuck a few other changes into this patch:

* Default the MySQL port to MYSQL_PORT (3306) instead of 0 if it's not
  defined.

* Fix some erroneous and/or silly checks on the contents of the
  configuration ast_str values.

ASTERISK-27366 #close
Reported by: Halil İbrahim YILDIZ

Change-Id: I36bf8dc5d5f83584e803b3b1a151dea9396ab8f5
2017-12-28 10:38:01 -05:00
Richard Mudgett
5de8f49294 manager.c: Update AMI Status event documentation
The AMI Status event had linkedid listed twice and was missing the
effective connected line name and number headers.

NOTE: The linkedid and other standard channel snapshot fields in the XML
documentation are part of the <channel_snapshot/> XML template defined in
doc/appdocsxml.xslt.

* Cached the effective connected line party id so it doesn't get
calculated four times.

Change-Id: I004c4c4f9e7b40ef55035c831702721bec82496c
2017-12-28 09:15:54 -06:00
Richard Mudgett
9f1cfbafca bridge_native_rtp.c: Fix reentrancy framehook crash.
If two channels enter different native rtp bridges at the same time it is
possible that the framehook interface data pointer can be corrupted
because the struct variable was declared static.

* Fixed the reentrancy corruption by changing the framehook interface
struct static variable to a stack local variable.

* Moved the hook.data assignment outside of the channel lock.  It did not
need the lock's protection.  It probably was giving a false sense of
security.

The testsuite
channels/pjsip/basic_calls/two_parties/nominal/alice_initiated/bob_hangs_up
test caught this with MALLOC_DEBUG and DO_CRASH enabled.

Change-Id: If9e35b97d19209b0f984941c1d8eb5f7c55eea91
2017-12-27 23:16:21 -06:00
Richard Mudgett
eead5d0c30 func_channel.c: Update MASTER_CHANNEL documentation
Be more explicit in what is meant by the master channel to eliminate
misunderstanding.

ASTERISK-23133

Change-Id: I453bcaf4b99404a5a3e345dbf093ac6c1afcfc72
2017-12-27 21:15:06 -06:00
Corey Farrell
0bdddbe526 menuselect: Fix check for running configure.
menuselect/Makefile checks that autoconfig.h and makeopts were newer
than the '.in' files.  Unfortunately running ./configure does not touch
autoconfig.h unless the contents will change.

Instead of looking at autoconfig.h we just need to ensure that makeopts
is newer than configure.

Also make change to configure.ac so bootstrap.sh doesn't re-add the
extra trailing line-feed.

Change-Id: Ief1f831d6717007f9cebb668c14e92782cd2b794
2017-12-27 20:17:06 -06:00
Corey Farrell
d62c87bb8d cdr: Missing NULL check and unlock.
* handle_dial_message: Missing a check for NULL peer.
* ast_cdr_register: Missing unlock on allocation failure.

ast_cdr_register is fixed by reordering so the new structure is
allocated and initialized before locking the list.

Change-Id: I5799b99270d1a7a716a555c31ac85f4b00ce8686
2017-12-25 20:53:02 -06:00
Corey Farrell
92fb393cab loader: Add volatile to resource_being_loaded.
Some compiler optimizers seem to assume that dlopen will not use
__attribute__((constructor)) functions to call back to the program.
This was causing resource_being_loaded to be optimized away completely.

ASTERISK-27531 #close
Tested By: abelbeck

Change-Id: If17a3b889e06811a0e7119f0539d052494d6ece9
2017-12-24 00:34:58 -05:00
Kevin Harwell
53799318bc AST-2017-014: res_pjsip - Missing contact header can cause crash
Those SIP messages that create dialogs require a contact header to be present.
If the contact header was missing from the message it could cause Asterisk to
crash.

This patch checks to make sure SIP messages that create a dialog contain the
contact header. If the message does not and it is required Asterisk now returns
a "400 Missing Contact header" response. Also added NULL checks when retrieving
the contact header that were missing as a "just in case".

ASTERISK-27480 #close

Change-Id: I1810db87683fc637a9e3e1384a746037fec20afe
2017-12-22 15:38:56 -06:00
Sean Bright
ce3d56920b Remove as much trailing whitespace as possible.
Change-Id: I873c1c6d00f447269bd841494459efccdd2c19c0
2017-12-22 09:14:07 -05:00
Jenkins2
35a2e09c65 Merge "Fix some invalid Unicode characters" into 13 2017-12-22 07:45:52 -06:00
Jenkins2
29b10b42bb Merge "app_voicemail: Fix file copy error handling." into 13 2017-12-22 07:26:22 -06:00
Sean Bright
b4ae112e3a Fix some invalid Unicode characters
configs/samples/minivm.conf.sample contains invalid UTF-8, but that
appears to be intentional.

Change-Id: I7b1e0d332f3380fd0425962a3c9c55f9b200c8cc
2017-12-21 11:18:17 -05:00
Jenkins2
d85290ca48 Merge "Fix Common Typo's." into 13 2017-12-21 08:34:31 -06:00
Joshua Colp
e94962ce63 Merge "docs: Remove old API changes documentation" into 13 2017-12-21 06:35:22 -06:00
Jenkins2
2ca8095691 Merge "app_festival: Fix fd leak on connection failure." into 13 2017-12-21 06:11:47 -06:00
Jenkins2
0097ad91ef Merge "bridge: Old channel video source not set to NULL after unref." into 13 2017-12-21 05:47:18 -06:00
Joshua Colp
8030309a2f Merge "core: Fix unused variable error in handle_show_sysinfo." into 13 2017-12-21 05:46:32 -06:00
Corey Farrell
719e8eee03 app_voicemail: Fix file copy error handling.
Fix error where input/output file descriptors would be closed multiple
times.

Change-Id: Iba5140b60cb7de79e3d5d92be3c256947aa99da9
2017-12-20 21:39:53 -06:00
Sean Bright
6892c13a2c docs: Remove old API changes documentation
Change-Id: I1bc7957121cc7ae27dca04acc3613f4e1858476a
2017-12-20 15:54:24 -05:00
Corey Farrell
82b6ba976f Fix Common Typo's.
Fix instances of:
* Retreive
* Recieve
* other then
* different then
* Repeated words ("the the", "an an", "and and", etc).
* othterwise, teh

ASTERISK-24198 #close

Change-Id: I3809a9c113b92fd9d0d9f9bac98e9c66dc8b2d31
2017-12-20 12:54:13 -05:00
Richard Mudgett
4f45748f52 manager.h: Bump AMI version
Change-Id: I62e6ddeb261ef012687e1fb6734c554e2499b6bf
2017-12-20 11:30:54 -06:00