In 8d6fdf9c3a invisible bridges were
skipped but that lead to producing metrics with no name and no help.
Keep track of the number of metrics configured and then only emit these.
Add a basic testcase that verifies that there is no '(NULL)' in the
output.
ASTERISK-30474
(cherry picked from commit a10de8bc72)
The channel_messages test was assuming that stasis would return
messages in a specific order. This is an incorrect assumption as
message ordering was never guaranteed. This was causing the test
to fail occasionally. We now test all the messages for the
required message types instead of testing one by one.
Resolves: #158
(cherry picked from commit 83781c23b9)
* gcc 13 is now catching when a function is declared as returning
an enum but defined as returning an int or vice versa. Fixed
a few in app.h, loader.c, stasis_message.c.
* gcc 13 is also now (incorrectly) complaining of dangling pointers
when assigning a pointer to a local char array to a char *. Had
to change that to an ast_alloca.
Resolves: #155
(cherry picked from commit 6c8b23a688)
The unit test XML output was counting all registered tests as "run"
even when only a subset were actually requested to be run and
the "failures" attribute was missing.
* The "tests" attribute of the "testsuite" element in the
output XML now reflects only the tests actually requested
to be executed instead of all the tests registered.
* The "failures" attribute was added to the "testsuite"
element.
Also added 2 new unit tests that just pass and fail to be
used for CI testing.
Change-Id: Ia137814b5aeb0e1a44c75034bd3615c26021da69
(cherry picked from commit a0fd95ef52)
`getcwd(…)` is decorated with the `warn_unused_result` attribute and
therefore needs its return value checked.
Change-Id: Idcccb20a0abf293202c28633d0e9ee0f6a9dbe93
-----------------
This commit reinstates MES with some casting fixes to the
functions in time.h that convert between doubles and timeval
structures. The casting issues were causing incorrect
timestamps to be calculated which caused transcoding from/to
G722 to produce bad or no audio.
ASTERISK-30391
-----------------
This module has been updated to provide additional
quality statistics in the form of an Asterisk
Media Experience Score. The score is avilable using
the same mechanisms you'd use to retrieve jitter, loss,
and rtt statistics. For more information about the
score and how to retrieve it, see
https://wiki.asterisk.org/wiki/display/AST/Media+Experience+Score
* Updated chan_pjsip to set quality channel variables when a
call ends.
* Updated channels/pjsip/dialplan_functions.c to add the ability
to retrieve the MES along with the existing rtcp stats when
using the CHANNEL dialplan function.
* Added the ast_debug_rtp_is_allowed and ast_debug_rtcp_is_allowed
checks for debugging purposes.
* Added several function to time.h for manipulating time-in-samples
and times represented as double seconds.
* Updated rtp_engine.c to pass through the MES when stats are
requested. Also debug output that dumps the stats when an
rtp instance is destroyed.
* Updated res_rtp_asterisk.c to implement the calculation of the
MES. In the process, also had to update the calculation of
jitter. Many debugging statements were also changed to be
more informative.
* Added a unit test for internal testing. The test should not be
run during normal operation and is disabled by default.
Change-Id: I4fce265965e68c3fdfeca55e614371ee69c65038
This module has been updated to provide additional
quality statistics in the form of an Asterisk
Media Experience Score. The score is avilable using
the same mechanisms you'd use to retrieve jitter, loss,
and rtt statistics. For more information about the
score and how to retrieve it, see
https://wiki.asterisk.org/wiki/display/AST/Media+Experience+Score
* Updated chan_pjsip to set quality channel variables when a
call ends.
* Updated channels/pjsip/dialplan_functions.c to add the ability
to retrieve the MES along with the existing rtcp stats when
using the CHANNEL dialplan function.
* Added the ast_debug_rtp_is_allowed and ast_debug_rtcp_is_allowed
checks for debugging purposes.
* Added several function to time.h for manipulating time-in-samples
and times represented as double seconds.
* Updated rtp_engine.c to pass through the MES when stats are
requested. Also debug output that dumps the stats when an
rtp instance is destroyed.
* Updated res_rtp_asterisk.c to implement the calculation of the
MES. In the process, also had to update the calculation of
jitter. Many debugging statements were also changed to be
more informative.
* Added a unit test for internal testing. The test should not be
run during normal operation and is disabled by default.
ASTERISK-30280
Change-Id: I458cb9a311e8e5dc1db769b8babbcf2e093f107a
Removes the function mkstemp_file and uses
ast_file_mkftemp from file.h instead.
ASTERISK-30295 #close
Change-Id: I7412ec06f88c39ee353bcdb8c976c2fcac546609
Fixed the specification of "outputdir" when calling ast_coredumper
so the txt files are saved in the correct place.
ASTERISK-30282
Change-Id: Ic631cb90c1e4c29d970c982dff45fda5e0eb15b6
Fix compilation errors caused by using size_t
instead of uintmax_t and non-portable format
specifiers.
ASTERISK-30273 #close
Change-Id: I363e6057ef84d54b88af80d23ad6147eef9216ee
Fixed a segfault caused by var_list_from_loc_info() encountering
an empty location info element.
Fixed an issue in ast_strsep() where a value with only whitespace
wasn't being preserved.
Fixed an issue in ast_variable_list_from_quoted_string() where
an empty value was considered a failure.
ASTERISK-30215
Reported by: Dan Cropp
Change-Id: Ieca64e061a6d9298f0196c694b60d986ef82613a
We're validating the following functionality:
encrypting a block of data with RSA
decrypting a block of data with RSA
signing a block of data with RSA
verifying a signature with RSA
encrypting a block of data with AES-ECB
encrypting a block of data with AES-ECB
as well as accessing test keys from the keystore.
ASTERISK-30045 #close
Change-Id: I0d10e7b41009c5290a4356c6480e636712d5c96d
A sporadic test failure was happening when executing the AEAP
Websocket transport tests. It was originally thought this was
due to things not getting cleaned up fast enough, but upon further
investigation I determined the underlying cause was poll()
getting interrupted and this not being handled in all places.
This change adds EINTR and EAGAIN handling to the Websocket
client connect code as well as the AEAP Websocket transport code.
If either occur then the code will just go back to waiting
for data.
The originally disabled failure test case has also been
re-enabled.
ASTERISK-30099
Change-Id: I1711a331ecf5d35cd542911dc6aaa9acf1e172ad
* Added ast_variable_list_from_quoted_string()
Parse a quoted string into an ast_variable list.
* Added ast_str_substitute_variables_full2()
Perform variable/function/expression substitution on an ast_str.
* Added ast_strsep_quoted()
Like ast_strsep except you can specify a specific quote character.
Also added unit test.
* Added ast_xml_find_child_element()
Find a direct child element by name.
* Added ast_xml_doc_dump_memory()
Dump the specified document to a buffer
* ast_datastore_free() now checks for a NULL datastore
before attempting to destroy it.
Change-Id: I5dcefed2f5f93a109e8b489e18d80d42e45244ec
The 'transport_binary' test sporadically fails, but on a theory that the
problem is caused by a previously executed test, transport_connect_fail,
part of that test has been disabled until a solution is found.
ASTERISK_30099
Change-Id: I48ed74d696aa9b6159f59661f3d535cac4c909e1
This change exposes the channel driver's unique id (i.e. the Call-ID
for chan_sip/chan_pjsip based channels) to ARI channel resources
as `protocol_id`.
ASTERISK-30027
Reported by: Moritz Fain
Tested by: Moritz Fain
Change-Id: I7cc6e7a9d29efe74bc27811d788dac20fe559b87
Most issues were in stringfields and had to do with comparing
a pointer to an constant/interned string with NULL. Since the
string was a constant, a pointer to it could never be NULL so
the comparison was always "true". gcc now complains about that.
There were also a few issues where determining if there was
enough space for a memcpy or s(n)printf which were fixed
by defining some of the involved variables as "volatile".
There were also a few other miscellaneous fixes.
ASTERISK-30044
Change-Id: Ia081ca1bcfb329df6487c4660aaf1944309eb570
Add framework to connect to, and read and write protocol based
messages from and to an external application using an Asterisk
External Application Protocol (AEAP). This has been divided into
several abstractions:
1. transport - base communication layer (currently websocket only)
2. message - AEAP description and data (currently JSON only)
3. transaction - links/binds requests and responses
4. aeap - transport, message, and transaction handler/manager
This patch also adds an AEAP implementation for speech to text.
Existing speech API callbacks for speech to text have been completed
making it possible for Asterisk to connect to a configured external
translator service and provide audio for STT. Results can also be
received from the external translator, and made available as speech
results in Asterisk.
Unit tests have also been created that test the AEAP framework, and
also the speech to text implementation.
ASTERISK-29726 #close
Change-Id: Iaa4b259f84aa63501e5fd2a6fb107f900b4d4ed2
Removes some leftover build and config references to
modules that have since been removed from Asterisk.
ASTERISK-29935 #close
Change-Id: Iaefc73a23f4b2de3c6c14d928050135b6d0ef6af
Passing 0 as the last argument to strtoimax() or strtoumax() causes
octal and hexadecimal to be accepted which was not originally
intended. So we now force to only accept decimal.
ASTERISK-29950 #close
Change-Id: I93baf0f273441e8280354630a463df263a8c0edd
Added functions to open, close, and apply XML Stylesheets
to XML documents. Although the presence of libxslt was already
being checked by configure, it was only happening if xmldoc was
enabled. Now it's checked regardless.
Added ability to parse a string consisting of comma separated
name/value pairs into an ast_variable list. The reverse of
ast_variable_list_join().
Change-Id: I1e1d149be22165a1fb8e88e2903a36bba1a6cf2e
Added:
Replace a variable in a list:
int ast_variable_list_replace_variable(struct ast_variable **head,
struct ast_variable *old, struct ast_variable *new);
Added test as well.
Create a "name=value" string from a variable list:
'name1="val1",name2="val2"', etc.
struct ast_str *ast_variable_list_join(
const struct ast_variable *head, const char *item_separator,
const char *name_value_separator, const char *quote_char,
struct ast_str **str);
Added test as well.
Allow the name of an XML element to be changed.
void ast_xml_set_name(struct ast_xml_node *node, const char *name);
Change-Id: I330a5f63dc0c218e0d8dfc0745948d2812141ccb
Recap from earlier commit: If you have a development branch for a
major project that will receive gerrit reviews it'll probably be
named something like "development/16/newproject" or a work branch
based on that "development" branch. That will necessitate
setting "defaultbranch=development/16/newproject" in .gitreview.
The make_version script uses that variable to construct the
asterisk version however, which results in versions
like "GIT-development/16/newproject-ee582a8c7b" which is probably
not what you want. It also constructs the URLs for downloading
external modules with that version, which will fail.
Fast-forward:
The earlier attempt at adding a "basebranch" variable to
.gitreview didn't work out too well in practice because changes
were made to .gitreview, which is a checked-in file. So, if
you wanted to rebase your work branch on the base branch, rebase
would attempt to overwrite your .gitreview with the one from
the base branch and complain about a conflict.
This is a slighltly different approach that adds three methods to
determine the mainline branch:
1. --- MAINLINE_BRANCH from the environment
If MAINLINE_BRANCH is already set in the environment, that will
be used. This is primarily for the Jenkins jobs.
2. --- .develvars
Instead of storing the basebranch in .gitreview, it can now be
stored in a non-checked-in ".develvars" file and keyed by the
current branch. So, if you were working on a branch named
"new-feature-work" based on "development/16/new-feature" and wanted
to push to that branch in Gerrit but wanted to pull the external
modules for 16, you'd create the following .develvars file:
[branch "new-feature-work"]
mainline-branch = 16
The .gitreview file would still look like:
[gerrit]
defaultbranch=development/16/new-feature
...which would cause any reviews pushed from "new-feature-work" to
go to the "development/16/new-feature" branch in Gerrit.
The key is that the .develvars file is NEVER checked in (it's been
added to .gitignore).
3. --- Well Known Development Branch
If you're actually working in a branch named like
"development/<mainline_branch>/some-feature", the mainline branch
will be parsed from it.
4. --- .gitreview
If none of the earlier conditions exist, the .gitreview
"defaultbranch" variable will be used just as before.
Change-Id: I1cdeeaa0944bba3f2e01d7a2039559d0c266f8c9
Currently, each module that uses libcurl duplicates the standard
Asterisk curl user agent.
This adds a global macro for the Asterisk user agent used for
curl requests to eliminate this duplication.
ASTERISK-29861 #close
Change-Id: I9fc37935980384b4daf96ae54fa3c9adb962ed2d
Adds a new option, defaultenabled, to the CDR core to
control whether or not CDR is enabled on a newly created
channel. This allows CDR to be disabled by default on
new channels and require the user to explicitly enable
CDR if desired. Existing behavior remains unchanged.
ASTERISK-29808 #close
Change-Id: Ibb78c11974bda229bbb7004b64761980e0b2c6d1
sched: Avoid a double deref when AST_SCHED_DEL_UNREF is called on an
executing call-back. This is done by adding a new variable 'rescheduled'
to the struct sched which is set in ast_sched_runq and checked in
ast_sched_del_nonrunning. ast_sched_del_nonrunning is a replacement for
now deprecated ast_sched_del which returns a new possible value -2
if called on an executing call-back with rescheduled set. ast_sched_del
is modified to call ast_sched_del_nonrunning to maintain existing code.
AST_SCHED_DEL_UNREF is also updated to look for the -2 in which case it
will not throw a warning or invoke refcall.
test_sched: Add a new unit test sched_test_freebird that will check the
reference count in the resolved scenario.
ASTERISK-29698
Change-Id: Icfb16b3acbc29cf5b4cef74183f7531caaefe21d
When test_timezone_watch runs very near a DST transition,
two time zones that would otherwise be expected to report the same
time can differ because of the DST transition.
Instead of having the test fail when this happens, report the
times, time zones, and dst flags.
ASTERISK-29722
Change-Id: Id59bdac8b277e14343ccdf0c99b89e92f79f316a
Correct typos of the following word families:
mounting
jitterbuffer
thrashing
original
manipulating
entries
actual
possibility
tasks
options
positives
taskprocessor
other
dynamic
declarative
ASTERISK-29714
Change-Id: I6b94659d045eec5d8d020fce2e9b6e2f593dfeb6
Add a function to check if there is an exact match a one string between
delimiters in another string.
Add a function that will create an ast_json object out of a list of
Asterisk variables. An excludes string can also optionally be passed
in.
Also, add a macro to make it easier to get object integers.
Change-Id: I5f34f18e102126aef3997f19a553a266d70d6226
test_voicemail_api: Use empty char* for empty_msg_ids.
chan_skinny: Fix size of calledParty to be maximum extension.
menuselect: Change Makefile to stop deprecated warnings. Added comments
test_linkedlist: 'bogus' variable was manually allocated from a macro
and the test fails if this happens but the compiler couldn't 'see' this
and returns a warning. memset to all 0's after allocation.
chan_ooh323: Fixed various indentation issues that triggered misleading
indentation warnings.
ASTERISK-29682
Reported by: George Joseph
Change-Id: If4fe42222c8444dc16828a42731ee53b4ce5cbbe
We can't rely on RAII_VAR(...) to properly clean up data that is
allocated within a loop.
ASTERISK-27176 #close
Change-Id: Ib575616101230c4f603519114ec62ebf3936882c
Use cURL's URL parsing API, falling back to the urlparser library, to
parse playback URLs in order to find their file extensions.
For backwards compatibility, we first look at the full URL, then at
any Content-Type header, and finally at just the path portion of the
URL.
ASTERISK-27871 #close
Change-Id: I16d0682f6d794be96539261b3e48f237909139cb
The calculated minimum lost packets represents the lowest number of
lost packets missed during an RTCP report interval. Zero of course
is the lowest, but the idea is that this value contain the lowest
number of lost packets once some have been missed.
This patch checks to make sure the number of lost packets over an
interval is not zero before checking and setting the minimum value.
Also, this patch updates the rtp lost packet test to check for
packet loss over several reports vs one.
Change-Id: I07d6e21cec61e289c2326138d6bcbcb3c3d5e008