Currently, if attempting to place a call to a peer that only allows
RSA authentication, if we fail to provide an outkey when placing
the call, Asterisk will crash.
This exposes the broader issue that IAX2 is prone to causing a crash
if encryption or decryption is attempted but we never initialized
the encryption and decryption keys. In other words, if the logic
to use encryption in chan_iax2 is not perfectly aligned with the
decision to build keys in the first place, then a crash is not
only possible but probable. This was demonstrated by ASTERISK_29264,
for instance.
This permanently prevents such events from causing a crash by explicitly
checking that keys are initialized properly before setting the flags
to use encryption for the call. Instead of crashing, the call will
now abort.
ASTERISK-30007 #close
Change-Id: If925c3d86099ceac7f621804f2532baac5050c9a
A bug in menuselect can cause modules that are disabled
by default to be recompiled every time a recompilation
occurs. This occurs for module categories that are NOT
positive output, as for these categories, the modules
contained in the makeopts file indicate modules which
should NOT be selected. The existing procedure of iterating
through these modules to mark modules as present is thus
insufficient. This has led to modules with a default_enabled
tag of "no" to get deleted and recompiled every time, even
when they haven't changed.
To fix this, we now modify the mark as present behavior
for module categories that are not positive output. For
these, we start by iterating through the module tree
and marking all modules as present, then go back and
mark anything contained in the makeopts file as not
present. This ensures that makeopt selections are actually
used properly, regardless of whether a module category
uses positive output or not.
ASTERISK-29728 #close
Change-Id: Idf2974c4ed8d0ba3738a92f08a6082b234277b95
The admin_exec function in app_meetme is used by the SLA
applications for internal bridging. However, in these cases,
chan is NULL. Currently, this function will set some status
variables that are intended for a channel, but since channel
is NULL, this is erroneously creating meaningless global
variables, which shouldn't be happening. This sets these
variables only if chan is not NULL.
ASTERISK-30002 #close
Change-Id: I817df6c26f5bda131678e56791b0b61ba64fc6f7
Some command line options to Asterisk only apply when Asterisk
is started and cannot be used with remote console mode. If a
user tries to use any of these, they are currently simply
silently ignored.
This prints out a warning if incompatible options are used,
informing users that an option used cannot be used with remote
console mode. Additionally, some clarifications are added to
the help text and man page.
ASTERISK-22246
ASTERISK-26582
Change-Id: I980a5380ef2c19e8ea348596396d5382893c4337
Adds the DB_KEYCOUNT function, which can be used to retrieve
the number of keys at a given prefix in AstDB.
ASTERISK-29968 #close
Change-Id: Ib2393b77b7e962dbaae6192f8576bc3f6ba92d09
According to chan_dahdi.conf, up to 64 groups (numbered
0 through 63) can be used when dialing DAHDI channels.
However, currently dialing round robin with a group number
greater than 31 fails because the array for the round robin
structure is only size 32, instead of 64 as it should be.
This fixes that so the round robin array size is consistent
with the actual groups capacity.
ASTERISK-29994
Change-Id: I4caa08d7025f78ac75a0539f71aaf3eb3e85b3b7
If Asterisk receives a SIP REFER with Session-Timers UAC
maintain Session-Timers when sending UPDATE"
ASTERISK-29843
Change-Id: I8e9a21c13bf757fa34d778f49ba3cf859b29ae5c
This adds the EVAL_EXTEN function, which may be used to retrieve
the variable-substituted data at any extension.
ASTERISK-29486
Change-Id: Iad81019689674c9f4ac77d235f5d7234adbb1432
Currently, if a user uses an application like ControlPlayback
to try to rewind a file past the beginning, this can throw
warnings when the file format (e.g. PCM) tries to seek to
a negative offset.
Instead of letting file formats try (and fail) to seek a
negative offset, we instead now catch this in the rewind
function to ensure that we never seek an offset less than 0.
This prevents legitimate user actions from triggering warnings
from any particular file formats.
ASTERISK-29943 #close
Change-Id: Ia53f2623f57898f4b8e5c894b968b01e95426967
PJSIP currently is capable of receiving flash events
and converting them to FLASH control frames, but it
currently lacks support for doing the reverse: taking
a FLASH control frame and converting it into a flash
event in the SIP domain.
This adds the ability for PJSIP to process flash control
frames by converting them into the appropriate SIP INFO
message, which can then be sent to the peer. This allows,
for example, flash events to be sent between Asterisk
systems using PJSIP.
ASTERISK-29941 #close
Change-Id: I1590221a4d238597f79672fa5825dd4a920c94dd
Adds the dialplan eval function commands to evaluate a dialplan
function from the CLI. The return value and function result are
printed out and can be used for testing or debugging.
ASTERISK-29820 #close
Change-Id: I833e97ea54c49336aca145330a2adeebfad05209
Adds version information for applications, functions,
and manager events/actions.
This is not completely exhaustive by any means but
covers most new things added that have release
versioning information in the issue tracker.
ASTERISK-29940 #close
Change-Id: I506401e93c799715dbbe97c0a8ba18af2bf5e131
Removes a couple sample config files for modules
which have since been removed from Asterisk.
ASTERISK-30008 #close
Change-Id: I6be89cafc6c575d98a5315e4912b61a833aacf52
added new global config option "allow_sending_180_after_183"
that if enabled will preserve 180 after a 183
ASTERISK-29842
Change-Id: I8a53f8c35595b6d16d8e86e241b5f110d92f3d18
if Asterisk need to send an UPDATE before answer
on a channel that uses Record-Route:
it will not include a Route header
ASTERISK-29955
Change-Id: Id1920ecbfea7739a038b14dc94487ecfe7b57eef
On a write error to an AMI session a flag was set to
indicate that the write error had occurred, with the
expected result being that the session be terminated.
This was not actually happening and instead writing
would continue to be attempted.
This change adds a check for the write error and causes
the session to actually terminate.
ASTERISK-29948
Change-Id: Icaf5d413d4c0d5dc78292a17287fecc8720a31a5
Patch provided inline by Yury Kirsanov on the linked issue and
approved by Josh Colp.
ASTERISK-29253 #close
Change-Id: I5b9ccc67ebf06e875ed061d9e7fc21f47b0a4e1f
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
When executing dial, the topology of the incoming channel is cloned and
used for the outgoing channel. This creates issues when an incoming
stream is sendonly or recvonly as the stream state of the outgoing
channel will be the same as the stream state of the incoming channel.
Now the stream state is flipped for the outgoing stream in
dial_exec_full if the incoming stream topology is recvonly or sendonly.
ASTERISK-29655
Reported by: Michael Auracher
ASTERISK-29638
Reported by: Michael Auracher
Change-Id: I294dc834ac9a5f048b101b691669959e9df630e1
There was an issue with the conditional where STIR/SHAKEN would be
enabled even when not configured. It has been changed to ensure that if
a profile does not exist and stir_shaken is not set in pjsip.conf, then
the conditional will return from the function without performing
STIR/SHAKEN operations.
ASTERISK-30024
Change-Id: I41286a3d35b033ccbfbe4129427a62cb793a86e6
The async_operations setting on a transport configures how
many simultaneous incoming packets the transport can handle
when multiple threads are polling and waiting on the transport.
As we only use a single thread this was needlessly creating
incoming packets when set to a non-default value, wasting memory.
ASTERISK-30006
Change-Id: I1915973ef352862dc2852a6ba4cfce2ed536e68f
Chrome has added more attributes, causing the limit to be
exceeded. This raises it up some more.
ASTERISK-30015
Change-Id: I964957c005c4e6f7871b15ea1ccd9b4659c7ef32
Adds a new configuration option, stir_shaken_profile, in pjsip.conf that
can be specified on a per endpoint basis. This option will reference a
stir_shaken_profile that can be configured in stir_shaken.conf. The type
of this option must be 'profile'. The stir_shaken option can be
specified on this object with the same values as before (attest, verify,
on), but it cannot be off since having the profile itself implies wanting
STIR/SHAKEN support. You can also specify an ACL from acl.conf (along
with permit and deny lines in the object itself) that will be used to
limit what interfaces Asterisk will attempt to retrieve information from
when reading the Identity header.
ASTERISK-29476
Change-Id: I87fa61f78a9ea0cd42530691a30da3c781842406
Put checks in place to limit how much we will actually download, as well
as a check for the data we receive at the start to ensure it begins with
what we would expect a certificate to begin with.
ASTERISK-29872
Change-Id: Ifd3c6b8bd52b8b6192a04166ccce4fc8a8000b46
Some databases depending on their configuration using backslashes
for escaping. When combined with the use of ' this can result in
a broken func_odbc query.
This change adds a SQL_ESC_BACKSLASHES dialplan function which can
be used to escape the backslashes.
This is done as a dialplan function instead of being always done
as some databases do not require this, and always doing it would
result in incorrect data being put into the database.
ASTERISK-29838
Change-Id: I152bf34899b96ddb09cca3e767254d8d78f0c83d
The ReceiveMF and ReceiveSF applications currently always
return 0, even if a channel has hung up. The call will still
end but generally applications are expected to return -1 if
the channel has hung up.
We now return -1 if a hangup occured to bring this behavior
in line with this norm. This has no functional impact, but
merely increases conformity with how these modules interact
with the PBX core.
ASTERISK-29951 #close
Change-Id: I234d755050ab8ed58f197c6925b968ba26b14033
Adds the m option to the Queue application, which allows a
music on hold class to be specified at runtime which will
override the class configured in queues.conf.
This option functions like the m option to Dial.
ASTERISK-29876 #close
Change-Id: Ie25a48569cf8755c305c9438b1ed292c3adcf8d7
Currently, if a user tries to access a non-dynamic
MeetMe conference and the conference is not found,
the call simply silent hangs up. There is no indication
to the user that anything went wrong at all.
This changes the relevant debug message to a warning
so that the user is notified of this invalidity.
ASTERISK-29954 #close
Change-Id: Iebcfae3755d00f2150d676ee211c57bc59530048
Removes some leftover build and config references to
modules that have since been removed from Asterisk.
ASTERISK-29935 #close
Change-Id: Iaefc73a23f4b2de3c6c14d928050135b6d0ef6af
When adding headers to an outgoing request the headers were cloned using
the dialog's pool when they should have been cloned using tdata's pool.
Under certain circumstances it was possible for the dialog object, and
its pool to be freed while tdata is still active and available. Thus the
cloned header "disappeared", and when tdata tried to later access it a
crash would occur.
This patch makes it so all added headers are cloned appropriately using
tdata's pool.
ASTERISK-29411 #close
ASTERISK-29535 #close
Change-Id: I9852025b5ee93ce1c038209150ee9dba1e0767c5
Several modules removal and deprecations occurred in 19.0.0 (initial
19 release), but associated UPGRADE files were not removed from
staging for some reason in the master branch.
This patch removes those files, and also removes a spurious leftover
header, chan_phone.h (associated module removed in 19).
Change-Id: Ib92142c846b45c882d6b2b6caca7225253c83add
This change removes patches which have been merged into
upstream and updates some existing ones. It also adds
some additional config_site.h changes to restore previous
behavior, as well as a patch to allow multiple Authorization
headers. There seems to be some confusion or disagreement
on language in RFC 8760 in regards to whether multiple
Authorization headers are supported. The RFC implies it
is allowed, as does some past sipcore discussion. There is
also the catch all of "local policy" to allow it. In
the case of Asterisk we allow it.
ASTERISK-29351
Change-Id: Id39ece02dedb7b9f739e0e37ea47d76854af7191
The PBX core uses the stack when it comes to includes, which
means that a context can only contain strictly fewer than
AST_PBX_MAX_STACK includes. If this is exceeded, then warnings
will be emitted for each number of includes beyond this if
searching for an extension in the including context, and if
the extension's inclusion is beyond the stack size, it will
simply not be found.
To address this, we now check if there are too many includes
in a context when the dialplan is reloaded so that if there
is an issue, the user is aware of at "compile time" as opposed
to "run time" only. Secondly, more details are printed out
when this message is encountered so it's clear what has happened.
ASTERISK-26719
Change-Id: Ia3700452e75a7af3391b3e82ee69f06a669f8958
make_xml_documentation was being called with the --validate
flag set when it shouldn't have been. This was causing
build failures if neither xmllint nor xmlstarlet were installed.
The correct behavior is to simply print a message that either
one of those tools should be installed for validation and
continue with the build.
ASTERISK-29988
Change-Id: Idc6c44114e7dd3fadae183a4e22f4fdba0b8a645
get_sourceable_makeopts wasn't handling variables with embedded
double quotes in them very well. One example was the DOWNLOAD
variable when curl was being used instead of wget. Rather than
trying to fix get_sourceable_makeopts, it's just been removed.
ASTERISK-29986
Reported by: Stefan Ruijsenaars
Change-Id: Idf2a90902228c2558daa5be7a4f8327556099cd2
The iax2 show netstats command previously didn't contain
enough spacing in the header to properly align the table
header with the table body. This caused column headers
to not align with the values on longer channel names.
Some spacing is added to account for the longest channel
names that display (before truncation occurs) so that
columns are always properly aligned.
ASTERISK-29895 #close
patches:
61205_misaligned2.patch submitted by Birger Harzenetter (license 5870)
Change-Id: I450ce6bb81157b9d6d149007e53b749f237b6d9f
There is work going on to update our OpenSSL usage to avoid the
deprecated functions but in the meantime make it possible to compile
in devmode.
Change-Id: Ib082eb8b3751f0185d8aa8fe127da664c93f0726
Adding information in the readme about running the install_preqreq script to install components that the ./configure script might indicate as missing.
ASTERISK-29976 #close
Change-Id: Ic287b46300168729838bddd8f9265e98fc22bce6
ASTERISK_22025 introduced a regression that shows
the host IP and port as the perceived IP and port
again, as opposed to showing the actual perceived
address. This fixes this by showing the correct
information.
ASTERISK-29048 #close
Change-Id: I0ad3e25bc6b449e83ce72ea5d1a1cdba72aa304a
Change RTP timer behavior for detecting RTP only after two-way
SDP channel establishment. Ignore detecting after receiving 183
with SDP or while direct media is used.
Make rtp_timeout and rtp_timeout_hold options consistent to rtptimeout
and rtpholdtimeout options in chan_sip.
ASTERISK-26689 #close
ASTERISK-29929 #close
Change-Id: I07326d5b9c40f25db717fd6075f6f3a8d77279eb
Use pkg-config to detect libxml2, falling back to xml2-config if the
former is not available.
This patch ensures Asterisk continues to build on systems without
xml2-config installed.
The patch also updates the associated 'configure' files.
ASTERISK-29970 #close
Change-Id: I3c90dfe0b0590486cbb8e6d426a7c5c4199410c0
Treat time_t's as entirely unique and use the POSIX API's for
converting to/from strings.
Lastly, a 64-bit integer formats as 20 digits at most in base10.
Don't need to have any 100 byte buffers to hold that.
ASTERISK-29674 #close
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Change-Id: Id7b25bdca8f92e34229f6454f6c3e500f2cd6f56
When asterisk generates the RLMI part of NOTIFY request,
the asterisk uses the local contact uri instead of the URI to which
the SUBSCRIBE request is sent.
Because of this mismatch some IP phones (for example Cisco 5XX) ignore
this list.
According
https://datatracker.ietf.org/doc/html/rfc4662#section-5.2
The first mandatory <list> attribute is "uri", which contains the uri
that corresponds to the list. Typically, this is the URI to which
the SUBSCRIBE request was sent.
https://datatracker.ietf.org/doc/html/rfc4662#section-5.3
The "uri" attribute identifies the resource to which the <resource>
element corresponds. Typically, this will be a SIP URI that, if
subscribed to, would return the state of the resource.
This patch makes asterisk to generate URI using SUBSCRIBE request URI.
ASTERISK-29961 #close
Change-Id: I1fcfc08fd589677f40608c59a4e143c45ee05f6c
Adds documentation for all of the possible return values
for the DIALSTATUS variable in the Dial application.
ASTERISK-25716
Change-Id: Id22593f1f1f7ea86e5734cee49516ec50848e8c0
Using the length of a file found on the filesystem rather than the
file being requested could result in filenames whose names are
substrings of another to be erroneously matched.
We now ensure a complete comparison before returning a positive
result.
ASTERISK-29960 #close
Change-Id: Id3ffc77681b9b75b8569062f3d952a128a21c71a
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
MUSL defines BUFSIZ as 1024 which is not reasonable for log messages.
More broadly, BUFSIZ is the amount of buffering stdio.h does, which
is arbitrary and largely orthogonal to what logging should accept
as the maximum message size.
ASTERISK-29928
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Change-Id: Iaa49fbbab029c64ae3d95e4b18270e0442cce170