* Added checks for missing session, session->channel and rdata
in stir_shaken_incoming_request.
* Added checks for missing session, session->channel and tdata
in stir_shaken_outgoing_request.
Resolves: #645
Add a timeout option to control the amount of time
to wait if no early media is received before giving
up. This allows aborting early if the destination
is not being responsive.
Resolves: #588
UserNote: The timeout argument to Dial now allows
specifying the maximum amount of time to dial if
early media is not received.
Most app_voicemail unit tests were not properly cleaning up
after themselves after running. This led to test mailboxes
lingering around in the system. It also meant that if any
unit tests in app_voicemail that create mailboxes were executed
and the module was not unloaded/loaded again prior to running
the test_voicemail_vm_info unit test, Asterisk would segfault
due to an attempt to copy a NULL string.
The load_config test did actually have logic to reinitialize
the config after the test. However, this did not work in practice
since load_config() would not reload the config since voicemail.conf
had not changed during the test; thus, additional logic has been
added to ensure that voicemail.conf is truly reloaded, after any
unit tests which modify the users list.
This prevents the SEGV due to invalid mailboxes lingering around,
and also ensures that the system state is restored to what it was
prior to the tests running.
Resolves: #629
This adds an option to allow preventing callers from leaving
messages marked as 'urgent'.
Resolves: #619
UserNote: The leaveurgent mailbox option can now be used to
control whether callers may leave messages marked as 'Urgent'.
This migrates the relevant schema objects from the `('yes', 'no')`
definition to the `('0', '1', 'off', 'on', 'false', 'true', 'yes', 'no')`
one.
Fixes#617
In as_check_common_config, we were calling ast_std_free on
raw_key but raw_key was allocated with ast_malloc so it
should be freed with ast_free.
Resolves: #636
The default location for the stir_shaken cache is
/var/lib/asterisk/keys/stir_shaken/cache but we were only creating
/var/lib/asterisk/keys/stir_shaken on istall. We now create
the cache sub-directory.
Resolves: #634
Why do we need a refactor?
The original stir/shaken implementation was started over 3 years ago
when little was understood about practical implementation. The
result was an implementation that wouldn't actually interoperate
with any other stir-shaken implementations.
There were also a number of stir-shaken features and RFC
requirements that were never implemented such as TNAuthList
certificate validation, sending Reason headers in SIP responses
when verification failed but we wished to continue the call, and
the ability to send Media Key(mky) grants in the Identity header
when the call involved DTLS.
Finally, there were some performance concerns around outgoing
calls and selection of the correct certificate and private key.
The configuration was keyed by an arbitrary name which meant that
for every outgoing call, we had to scan the entire list of
configured TNs to find the correct cert to use. With only a few
TNs configured, this wasn't an issue but if you have a thousand,
it could be.
What's changed?
* Configuration objects have been refactored to be clearer about
their uses and to fix issues.
* The "general" object was renamed to "verification" since it
contains parameters specific to the incoming verification
process. It also never handled ca_path and crl_path
correctly.
* A new "attestation" object was added that controls the
outgoing attestation process. It sets default certificates,
keys, etc.
* The "certificate" object was renamed to "tn" and had it's key
change to telephone number since outgoing call attestation
needs to look up certificates by telephone number.
* The "profile" object had more parameters added to it that can
override default parameters specified in the "attestation"
and "verification" objects.
* The "store" object was removed altogther as it was never
implemented.
* We now use libjwt to create outgoing Identity headers and to
parse and validate signatures on incoming Identiy headers. Our
previous custom implementation was much of the source of the
interoperability issues.
* General code cleanup and refactor.
* Moved things to better places.
* Separated some of the complex functions to smaller ones.
* Using context objects rather than passing tons of parameters
in function calls.
* Removed some complexity and unneeded encapsuation from the
config objects.
Resolves: #351Resolves: #46
UserNote: Asterisk's stir-shaken feature has been refactored to
correct interoperability, RFC compliance, and performance issues.
See https://docs.asterisk.org/Deployment/STIR-SHAKEN for more
information.
UpgradeNote: The stir-shaken refactor is a breaking change but since
it's not working now we don't think it matters. The
stir_shaken.conf file has changed significantly which means that
existing ones WILL need to be changed. The stir_shaken.conf.sample
file in configs/samples/ has quite a bit more information. This is
also an ABI breaking change since some of the existing objects
needed to be changed or removed, and new ones added. Additionally,
if res_stir_shaken is enabled in menuselect, you'll need to either
have the development package for libjwt v1.15.3 installed or use
the --with-libjwt-bundled option with ./configure.
This adds a dummy migration to 18 and 20 so that our alembic heads are
synchronized across all supported branches.
In this case the migration we are stubbing (24c12d8e9014) is:
775352ee6c
The new mode lists for each codec translation the actual real cost in cpu microseconds per second translated audio.
This allows to compare the real cpu usage of translations and helps in evaluation of codec implementation changes regarding performance (regression testing).
- add new table mode
- hide the 999999 comp values, as these only indicate an issue with transcoding
- hide the 0 values, as these also do not contain any information (only indicate a multistep transcoding)
Resolves: #601
If a dynamic string is created with an initial length of 0,
`ast_str_buffer(…)` will return an invalid pointer.
This was a secondary discovery when fixing #65.
Media Experience Score relies on incorrect pseudo_mos variable
calculation. According to forming an opinion section of the
documentation, calculation relies on ITU-T G.107 standard:
https://docs.asterisk.org/Deployment/Media-Experience-Score/#forming-an-opinion
ITU-T G.107 Annex B suggests to calculate MOS with a coefficient
"seven times ten to the power of negative six", 7 * 10^(-6). which
would mean 6 digits after the decimal point. Current implementation
has 7 digits after the decimal point, which downrates the calls.
Fixes: #597
If ast_dsp_process is called with a codec besides slin, ulaw,
or alaw, a warning is logged that in-band DTMF is not supported,
but this message is not always appropriate or correct, because
ast_dsp_process is much more generic than just DTMF detection.
This logs a more generic message in those cases, and also improves
codec-mismatch logging throughout dsp.c by ensuring incompatible
codecs are printed out.
Resolves: #595
Under rare circumstances, it's possible for the original audio
session in the active_media_state default_session to be corrupted
instead of removed when switching to the t38/image media session
during fax negotiation. This can cause a segfault when a "pjsip
show channelstats" attempts to print that audio media session's
rtp statistics. In these cases, the active_media_state
topology is correctly showing only a single t38/image stream
so we now check that there's an audio stream in the topology
before attempting to use the audio media session to get the rtp
statistics.
Resolves: #592
When started with a verbose level of 3, asterisk can emit over 1500
verbose message that serve no real purpose other than to fill up
logs. When asterisk shuts down, it emits another 1100 that are of
even less use. Since the testsuite runs asterisk with a verbose
level of 3, and asterisk starts and stops for every one of the 700+
tests, the number of log messages is staggering. Besides taking up
resources, it also makes it hard to debug failing tests.
This commit changes the log level for those verbose messages to 5
instead of 3 which reduces the number of log messages to only a
handful. Of course, NOTICE, WARNING and ERROR message are
unaffected.
There's also one other minor change...
ast_context_remove_extension_callerid2() logs a DEBUG message
instead of an ERROR if the extension you're deleting doesn't exist.
The pjsip_config_wizard calls that function to clean up the config
and has been triggering that annoying error message for years.
Resolves: #582
The last time configure was run, it was run on a system that
did not enable -std=gnu11 by default, which meant that the
restrict qualifier would not be recognized on certain platforms.
This regenerates the configure files from running bootstrap.sh,
so that these should be recognized on all supported platforms.
Resolves: #586
Fixes: #406
UserNote: Bundled pjproject has been upgraded to 2.14. For more
information on what all is included in this change, check out the
pjproject Github page: https://github.com/pjsip/pjproject/releases
Adds 'p' option to SpeechBackground() application.
With this option, when the app timeout is reached,
whatever the backend speech engine collected will
be returned as if it were the final, full result.
(This works for engines that make partial results.)
Resolves: #572
UserNote: The SpeechBackground dialplan application now supports a 'p'
option that will return partial results from speech engines that
provide them when a timeout occurs.
Given the scenario of passing an empty string to the
ast_strsep functions the functions would return NULL
instead of an empty string. This is counter to how
strsep itself works.
This change alters the behavior of the functions to
match that of strsep.
Fixes: #565
Adds the 'D' option to app chanspy that causes the input and output
frames of the spied channel to be interleaved in the spy output frame.
This allows the input and output of the spied channel to be decoded
separately by the receiver.
If the 'o' option is also set, the 'D' option is ignored as the
audio being spied is inherently one direction.
Fixes: #569
UserNote: The ChanSpy application now accepts the 'D' option which
will interleave the spied audio within the outgoing frames. The
purpose of this is to allow the audio to be read as a Dual channel
stream with separate incoming and outgoing audio. Setting both the
'o' option and the 'D' option and results in the 'D' option being
ignored.
Commit fa3922a4d2 fixed
a branching issue but "overshoots" when calculating
the next priority. This fixes that; accompanying
test suite tests have also been extended.
Resolves: #560
Resolves a regression identified by @justinludwig involving the
rendering of IPv6 addresses in outgoing SDP.
Also updates `media_address` on PJSIP endpoints so that if we are able
to parse the configured value as an IP we store it in a format that we
can directly use later. Based on my reading of the code it appeared
that one could configure `media_address` as:
```
[foo]
type = endpoint
...
media_address = [2001:db8::]
```
And that value would be blindly copied into the outgoing SDP without
regard to its format.
Fixes#541
Currently, a reload will always occur if the
Reload header is provided for the UpdateConfig
action. However, we should not be doing a reload
if the header value has a falsy value, per the
documentation, so this makes the reload behavior
consistent with the existing documentation.
Resolves: #551
The numeric bridge profile options `internal_sample_rate` and
`maximum_sample_rate` are documented to accept the special values
`auto` and `none`, respectively. While these values currently work,
they also emit warnings when used which could be confusing for users.
In passing, also ensure that we only accept the documented range of
sample rate values between 8000 and 192000.
Fixes#546
This adds a CLI command to manually toggle the MWI status
of a channel, useful for troubleshooting or resetting
MWI devices, similar to the capabilities offered with
SIP messaging to manually control MWI status.
UserNote: The 'dahdi set mwi' now allows MWI on channels
to be manually toggled if needed for troubleshooting.
Resolves: #440
Commit 008731b0a4
caused a regression by resulting in logger.xml
being compiled and linked into the asterisk
binary in lieu of logger.c on certain platforms
if Asterisk was compiled in dev mode.
To fix this, we ensure the file has a unique
name without the extension. Most existing .xml
files have been named differently from any
.c files in the same directory or did not
pose this issue.
channels/pjsip/dialplan_functions.xml does not
pose this issue but is also being renamed
to adhere to this policy.
Resolves: #539
This adds a simple CLI command that can be used for
analyzing all frames currently queued to a channel.
A couple log messages are also adjusted to be more
useful in tracing bridging problems.
Resolves: #533
This reverts commit 315eb551db.
Over the past year, we've had several reports of "topology storms"
occurring where 2 external facing channels connected by one or more
local channels and bridges will get themselves in a state where
they continually send each other topology change requests. This
usually manifests itself in no-audio calls and a flood of
"Exceptionally long queue length" messages. It appears that this
commit is the cause so we're reverting it for now until we can
determine a more appropriate solution.
Resolves: #530
This fixes faulty branching logic for the
EndIf application. Instead of computing
the next priority, which should be done
for false conditionals or ExitIf, we should
simply advance to the next priority.
Resolves: #341
Commit 424be34563 introduced
a regression by calling ast_free on memory allocated by
realpath. This causes Asterisk to abort when executing this
function. Since the memory is allocated by glibc, it should
be freed using ast_std_free.
Resolves: #513
* Since ICE candidates are used for the check and pjproject is
required to use ICE, res_rtp_asterisk was failing to compile
when pjproject wasn't available. The check is now wrapped
with an #ifdef HAVE_PJPROJECT.
* The rtp->ice_active_remote_candidates container was being
used to check the address on incoming packets but that
container doesn't contain peer reflexive candidates discovered
during negotiation. This was causing the check to fail
where it shouldn't. We now check against pjproject's
real_ice->rcand array which will contain those candidates.
* Also fixed a bug in ast_sockaddr_from_pj_sockaddr() where
we weren't zeroing out sin->sin_zero before returning. This
was causing ast_sockaddr_cmp() to always return false when
one of the inputs was converted from a pj_sockaddr, even
if both inputs had the same address and port.
Resolves: #500Resolves: #503Resolves: #505
When updating an existing header the 'update' code incorrectly
just copied the new value into the existing buffer. If the
new value exceeded the available buffer size memory outside
of the buffer would be written into, potentially causing
a crash.
This change makes it so that the 'update' now duplicates
the new header value instead of copying it into the existing
buffer.
Add patch to split the log level for invalid packets received on the
signaling port. The warning regarding the packet will move to level 2
so that it can still be displayed, while the raw packet will be at level
4.
When ICE is in use, we can prevent a possible DOS attack by allowing
DTLS protocol messages (client hello, etc) only from sources that
are in the active remote candidates list.
Resolves: GHSA-hxj9-xwr8-w8pq
When using AMI GetConfig, it was possible to access files outside of the
Asterisk configuration directory by using filenames with ".." and "./"
even while live_dangerously was not enabled. This change resolves the
full path and ensures we are still in the configuration directory before
attempting to access the file.
Improve the "manager show connected" CLI command
to clarify that the last two columns are permissions
related, not counts, and use sufficient widths
to consistently display these values.
ASTERISK-30143 #close
Resolves: #482
Although `make_xml_documentation`'s `print_dependencies` command was
corrected by the previous fix (#461) for #142, the `create_xml` was
not properly handling `LOCAL_MOD_SUBDIRS` XML documentation.
This fixes a number of broken links throughout the
tree, mostly caused by wiki.asterisk.org being replaced
with docs.asterisk.org, which should eliminate the
need for sporadic fixes as in f28047db36.
Resolves: #430
Resolves: #462
UserNote: The option "j" is now available for the Dial application which
uses the initial stream topology of the caller to create the outgoing
channels.
Instead of searching for the asterisk binary and the modules in the
filesystem, we now get their locations, along with libdir, from
the coredump itself...
For the binary, we can use `gdb -c <coredump> ... "info proc exe"`.
gdb can print this even without having the executable and symbols.
Once we have the binary, we can get the location of the modules with
`gdb ... "print ast_config_AST_MODULE_DIR`
If there was no result then either it's not an asterisk coredump
or there were no symbols loaded. Either way, it's not usable.
For libdir, we now run "strings" on the note0 section of the
coredump (which has the shared library -> memory address xref) and
search for "libasteriskssl|libasteriskpj", then take the dirname.
Since we're now getting everything from the coredump, it has to be
correct as long as we're not crossing namespace boundaries like
running asterisk in a docker container but trying to run
ast_coredumper from the host using a shared file system (which you
shouldn't be doing).
There is still a case for using --asterisk-bin and/or --libdir: If
you've updated asterisk since the coredump was taken, the binary,
libraries and modules won't match the coredump which will render it
useless. If you can restore or rebuild the original files that
match the coredump and place them in a temporary directory, you can
use --asterisk-bin, --libdir, and a new --moddir option to point to
them and they'll be correctly captured in a tarball created
with --tarball-coredumps. If you also use --tarball-config, you can
use a new --etcdir option to point to what normally would be the
/etc/asterisk directory.
Also addressed many "shellcheck" findings.
Resolves: #445
The `get_documentation` awk script will only extract the first
DOCUMENTATION block that it finds in a given file. This is by design
(9bc2127) to prevent AMI event documentation from being pulled in to
the core.xml documentation file.
Because of this, the `LOG_GROUP` documentation added in 89709e2 was
not being properly extracted and was missing fom the resulting XML
documentation file. This commit moves the `LOG_GROUP` documentation to
a separate `logger.xml` file.
There are valid scenarios where res_odbc's connection pool might have some dead
or stuck connections while others are healthy (imagine network
elements/firewalls/routers silently timing out connections to a single DB and a
single IP address, or a heterogeneous connection pool connected to potentially
multiple IPs/instances of a replicated DB using a DNS front end for load
balancing and one replica fails).
In order to time out those unhealthy connections without blocking access to
other parts of Asterisk that may attempt access to the connection pool, it would
be beneficial to not lock/block access around the entire pool in
_ast_odbc_request_obj2 while doing potentially blocking operations on connection
pool objects such as the connection_dead() test, odbc_obj_connect(), or by
dereferencing a struct odbc_obj for the last time and triggering a
odbc_obj_disconnect().
This would facilitate much quicker and concurrent timeout of dead connections
via the connection_dead() test, which could block potentially for a long period
of time depending on odbc.ini or other odbc connector specific timeout settings.
This also would make rapid failover (in the clustered DB scenario) much quicker.
This patch changes the locking in _ast_odbc_request_obj2() to not lock around
odbc_obj_connect(), _disconnect(), and connection_dead(), while continuing to
lock around truly shared, non-immutable state like the connection_cnt member and
the connections list on struct odbc_class.
Fixes: #465
If the script referenced by `#exec` does not exist, writes anything to
stderr, or exits abnormally or with a non-zero exit status, we log
that to Asterisk's error logging channel.
Additionally, write out a warning if the script produces no output.
Fixes#259
Resequencing is a process that occurs when we open a voicemail folder
and discover that there are gaps between messages (e.g. `msg0000.txt`
is missing but `msg0001.txt` exists). Resequencing involves shifting
the existing messages down so we end up with a sequential list of
messages.
Currently, this process stops after reaching a threshold based on the
message limit (`maxmsg`) configured on the current folder. However, if
`maxmsg` is lowered when a voicemail folder contains more than
`maxmsg + 10` messages, resequencing will not run completely leaving
the mailbox in an inconsistent state.
We now resequence up to the maximum number of messages permitted by
`app_voicemail` (currently hard-coded at 9999 messages).
Fixes#86
When mwimonitor=yes is enabled for an FXO port,
the do_monitor thread will launch mwi_thread if it thinks
there could be MWI on an FXO channel, due to the noise
threshold being satisfied. This, in turns, calls
analog_ss_thread_start in sig_analog. However, unlike
all other instances where __analog_ss_thread is called
in sig_analog, this call path does not properly set
pvt->ss_astchan to the Asterisk channel, which means
that the Asterisk channel is NULL when __analog_ss_thread
starts executing. As a result, the thread exits and the
channel is never properly cleaned up by calling ast_hangup.
This caused issues with do_monitor on incoming calls,
as it would think the channel was still owned even while
receiving events, leading to an infinite barrage of
warning messages; additionally, the channel would persist
improperly.
To fix this, the assignment is added to the call path
where it is missing (which is only used for mwi_thread).
A warning message is also added since previously there
was no indication that __analog_ss_thread was exiting
abnormally. This resolves both the channel leak and the
condition that led to the warning messages.
Resolves: #458
Certain channel options are not set anywhere or
exposed in any way to users, making them unusable.
This exposes some of these options which make sense
for users to manipulate at runtime.
Resolves: #442
Any function or application that accepts a `&`-separated list of
filenames can now include a literal `&` in a filename by wrapping the
entire filename in single quotes, e.g.:
```
exten = _X.,n,Playback('https://example.com/sound.cgi?a=b&c=d'&hello-world)
```
Fixes#172
UpgradeNote: Ampersands in URLs passed to the `Playback()`,
`Background()`, `SpeechBackground()`, `Read()`, `Authenticate()`, or
`Queue()` applications as filename arguments can now be escaped by
single quoting the filename. Additionally, this is also possible when
using the `CONFBRIDGE` dialplan function, or configuring various
features in `confbridge.conf` and `queues.conf`.
`astcachedir` (added in b0842713) was not added to `live_ast` so
continued to point to the system `/var/cache` directory instead of the
one in the live environment.
Fixes a crash due to a lack of proper reference on the nativeformats
object before passing it into ast_request(). Also found potentially
similar use case bugs in app_chanisavail.c, bridge.c, and bridge_basic.c
Fixes: #388
This improves the documentation for the bandwidth setting
in iax.conf by making it clearer what the ramifications
of this setting are. It also changes the sample default
from low to high, since only high is compatible with good
codecs that people will want to use in the vast majority
of cases, and this is a common gotcha that trips up new users.
Resolves: #425
This adds the ability to filter console
logging by channel or groups of channels.
This can be useful on busy systems where
an administrator would like to analyze certain
calls in detail. A dialplan function is also
included for the purpose of assigning a channel
to a group (e.g. by tenant, or some other metric).
ASTERISK-30483 #close
Resolves: #242
UserNote: The console log can now be filtered by
channels or groups of channels, using the
logger filter CLI commands.
Fedora 37 started shipping ilbc 3.0.4 which we don't yet support.
configure.ac now checks the system for "libilbc < 3" instead of
just "libilbc". If true, the system version of ilbc will be used.
If not, the version included at codecs/ilbc will be used.
Resolves: #84
See UserNote below.
Exposed the existing Hangup AMI action in manager.c so we can use
all of it's channel search and AMI protocol handling without
duplicating that code in dialplan_functions.c.
Added a lookup function to res_pjsip.c that takes in the
string represenation of the pjsip_status_code enum and returns
the actual status code. I.E. ast_sip_str2rc("DECLINE") returns
603. This allows the caller to specify PJSIPHangup(decline) in
the dialplan, just like Hangup(call_rejected).
Also extracted the XML documentation to its own file since it was
almost as large as the code itself.
UserNote: A new dialplan app PJSIPHangup and AMI action allows you
to hang up an unanswered incoming PJSIP call with a specific SIP
response code in the 400 -> 699 range.
When IAX2 debugging was enabled (`iax2 set debug on`), if the last IE
in a frame was one that may not have any data - such as the CALLTOKEN
IE in an NEW request - it was not getting displayed.
This adds optional ADSI support to the Directory
application, which allows callers with ADSI CPE
to navigate the Directory system significantly
faster than is possible using the audio prompts.
Callers can see the directory name (and optionally
extension) on their screenphone and confirm or
reject a match immediately rather than waiting
for it to be spelled out, enhancing usability.
Resolves: #356
Currently, trying to call a Local channel with a slash
in the extension will fail due to the parsing of characters
after such a slash as being dial modifiers. Additionally,
core_local is inconsistent and incomplete with
its parsing of Local dial strings in that sometimes it
uses the first slash and at other times it uses the last.
For instance, something like DAHDI/5 or PJSIP/device
is a perfectly usable extension in the dialplan, but Local
channels in particular prevent these from being called.
This creates inconsistent behavior for users, since using
a slash in an extension is perfectly acceptable, and using
a Goto to accomplish this works fine, but if specified
through a Local channel, the parsing prevents this.
This fixes this by explicitly parsing options from the
last slash in the extension, rather than the first one,
which doesn't cause an issue for extensions with slashes.
ASTERISK-30013 #close
Resolves: #248
This adds an AMI event that is emitted whenever a
mailbox password is successfully changed, allowing
AMI consumers to process these.
UserNote: The VoicemailPasswordChange event is
now emitted whenever a mailbox password is updated,
containing the mailbox information and the new
password.
Resolves: #398
In simple_bridge_join, we were sending topology change requests
even when the new and old topologies were the same. In some
circumstances, this can cause unnecessary re-invites and even
a re-invite flood. We now suppress those.
Resolves: #384
If too many ciphers are specified in the PJSIP config,
include the maximum number of ciphers that may be
specified in the user-facing error message.
Resolves: #396
* Allow res_speech to translate the input channel if the
format is translatable to a format suppored by the
speech provider.
Resolves: #129
UserNote: res_speech now supports translation of an input channel
to a format supported by the speech provider, provided a translation
path is available between the source format and provider capabilites.
The '*' list indicator for default values and allowable values for
path, query and POST parameters need to be indented 4 spaces
instead of 2.
Should resolve issue 38 in the documentation repo.
Per RFC8827:
Implementations MUST NOT implement DTLS renegotiation and MUST
reject it with a "no_renegotiation" alert if offered.
So we disable it when webrtc=yes is set.
Fixes#378
UpgradeNote: The dtls_rekey will be disabled if webrtc support is
requested on an endpoint. A warning will also be emitted.
Commit f66f77f last year prevents the res_pjsip_exten_state and
res_pjsip_mwi modules from unloading due to possible pjproject
asserts if the modules are reloaded. A side effect of the
implementation is that the taskprocessors these modules use aren't
being released. When asterisk is doing a graceful shutdown, it
waits AST_TASKPROCESSOR_SHUTDOWN_MAX_WAIT seconds for all
taskprocessors to stop but since those 2 modules don't release
theirs, the shutdown hangs for that amount of time.
This change allows the modules to be unloaded and their resources to
be released when ast_shutdown_final is true.
Resolves: #379
This commit introduces an extension to the endpoint and relevant
resource sizes for PJSIP, transitioning from its current 40-character
constraint to a more versatile 255-character capacity. This enhancement
significantly overcomes limitations related to domain qualification and
practical usage, ultimately delivering improved functionality. In
addition, it includes adjustments to accommodate the expanded realm size
within the ARI, specifically enhancing the maximum realm length.
Resolves: #345
UserNote: With this update, the PJSIP realm lengths have been extended
to support up to 255 characters.
UpgradeNote: As part of this update, the maximum allowable length
for PJSIP endpoints and relevant resources has been increased from
40 to 255 characters. To take advantage of this enhancement, it is
recommended to run the necessary procedures (e.g., Alembic) to
update your schemas.
The workflows that get triggered when PRs are submitted or updated
have been replaced with ones that are more secure and have
a higher level of parallelism.
The workflows that get triggered when PRs are submitted or updated
have been replaced with ones that are more secure and have
a higher level of parallelism.
res_statsis's app loop sleeps for up to .2s waiting on input
to a channel before re-checking the command queue. This can
cause delays between channel setup and bridge.
This change is to send a SIGURG on the sleeping thread when
a new command is enqueued. This exits the sleeping thread out
of the ast_waitfor() call triggering the new command being
processed on the channel immediately.
Resolves: #362
UserNote: Call setup times should be significantly improved
when using ARI.
Make it possible to start a playback and the calling party
to receive audio on a bridge before the call is connected.
Model the implementation after play_on_channel and deliver a
AST_CONTROL_PROGRESS before starting the playback.
For a PJSIP channel this will result in sending a SIP 183
Session Progress.
You can now define the _TRACE_PREFIX_ macro to change the
default trace line prefix of "file:line function" to
something else. Full documentation in logger.h.
The current STIR/SHAKEN implementation is not currently usable due
to encryption issues. Rather than trying to futz with OpenSSL and
the the current code, we can take advantage of the existing
capabilities of libjwt but we first need to add it to the
third-party infrastructure already in place for jansson and
pjproject.
A few tweaks were also made to the third-party infrastructure as
a whole. The jansson "dest" install directory was renamed "dist"
to better match convention, and the third-party Makefile was updated
to clean all product directories not just the ones currently in
use.
Resolves: #349
The documentation on qualify_timeout does not explicitly state that the timeout
includes any time required to perform any needed DNS queries on the endpoint.
If the OPTIONS response is delayed due to the DNS query, it can still render an
endpoint as Unreachable if the net time is enough for qualify_timeout to expire.
Resolves: #352
Internally, chan_dahdi only applies callgroup and
pickupgroup to FXO signalled channels, but this is
not documented anywhere. This is now documented in
the sample config, and a warning is emitted if a
user tries configuring these settings for channel
types that do not support these settings, since they
will not have any effect.
Resolves: #294
This commit fixes crashes in JSON_DECODE() for types null, true, false
and real numbers.
In addition it ensures that a path is not deeper than 32 levels.
Also allow root object to be an array.
Add unit tests for above cases.
res_speech_aeap previously did not register an error handler
with aeap, so it was not notified of a disconnect. This resulted
in SpeechBackground never exiting upon a websocket disconnect.
Resolves: #303
If ADSI is available on a channel, app_voicemail will repeatedly
try to use ADSI, even if there is no CPE that supports it. This
leads to many unnecessary delays during the session. If ADSI is
available but ADSI setup fails, we now disable it to prevent
further attempts to use ADSI during the session.
Resolves: #354
Some providers require a multiple of 20 for the maxptime or fail to complete calls,
e.g. Vivo in Brazil. To increase compatibility, only multiples of 20 are now used.
Resolves: #260
Previously, DETECT_DEADLOCKS depended on DEBUG_THREADS.
Unfortunately, DEBUG_THREADS adds a lot of lock tracking overhead
to all of the lock lifecycle calls whereas DETECT_DEADLOCKS just
causes the lock calls to loop over trylock in 200us intervals until
the lock is obtained and spits out log messages if it takes more
than 5 seconds. From a code perspective, the only reason they were
tied together was for logging. So... The ifdefs in lock.c were
refactored to allow DETECT_DEADLOCKS to be enabled without
also enabling DEBUG_THREADS.
Resolves: #321
UserNote: You no longer need to select DEBUG_THREADS to use
DETECT_DEADLOCKS. This removes a significant amount of overhead
if you just want to detect possible deadlocks vs needing full
lock tracing.
The CLI .asterisk_history file is read from/written to the directory
specified by the HOME environment variable. If the root user starts
asterisk with the -U/-G options, or with runuser/rungroup set in
asterisk.conf, the asterisk process is started as root but then it
calls setuid/setgid to set the new user/group. This does NOT reset
the HOME environment variable to the new user's home directory
though so it's still left as "/root". In this case, the new user
will almost certainly NOT have access to read from or write to the
history file.
* Added function process_histfile() which calls
getpwuid(geteuid()) and uses pw->dir as the home directory
instead of the HOME environment variable.
* ast_el_read_default_histfile() and ast_el_write_default_histfile()
have been modified to use the new process_histfile()
function.
Resolves: #337
From the gdb information, ast_websocket_read reads a message successfully,
then transport_read is called in the serializer. During execution of pjsip_transport_down,
ws_session->stream->fd is closed; ast_websocket_read encounters an error and exits the while loop.
After executing transport_shutdown, the transport's reference count becomes 0, causing a crash when sending SIP messages.
This was due to pjsip_transport_dec_ref executing earlier than pjsip_rx_data_clone, leading to this issue.
In websocket_cb executeing pjsip_transport_add_ref, this we now ensure the transport is not destroyed while in the loop.
Resolves: asterisk#299
To terminate a console channel, stop_stream causes pthread_cancel
to make stream_monitor exit. However, commit 5b8fea93d1
added locking to this function which results in deadlock due to
the stream_monitor thread being killed while it's holding the pvt lock.
To resolve this, a flag is now set and read to indicate abort, so
the use of pthread_cancel and pthread_kill can be avoided altogether.
Resolves: #308
To better co-exist with sounds files that may be managed by
packages, custom sound files may now be placed in
AST_DATA_DIR/sounds/custom instead of the standard
AST_DATA_DIR/sounds/<lang> directory. If the new
"sounds_search_custom_dir" option in asterisk.conf is set
to "true", asterisk will search the custom directory for sounds
files before searching the standard directory. For performance
reasons, the "sounds_search_custom_dir" defaults to "false".
Resolves: #315
UserNote: A new option "sounds_search_custom_dir" has been added to
asterisk.conf that allows asterisk to search
AST_DATA_DIR/sounds/custom for sounds files before searching the
standard AST_DATA_DIR/sounds/<lang> directory.
In function rtp_ioqueue_thread_remove counter in ioqueue object is not decreased
which prevents unused ICE TURN threads from being removed.
Resolves: #301
The previous behavior of make_buildopts_h was to not add the
non-ABI-breaking MENUSELECT_CFLAGS like DETECT_DEADLOCKS,
REF_DEBUG, etc. to the buildopts.h file because "it caused
ccache to invalidate files and extended compile times". They're
only defined by passing them on the gcc command line with '-D'
options. In practice, including them in the include file rarely
causes any impact because the only time ccache cares is if you
actually change an option so the hit occurrs only once after
you change it.
OK so why would we want to include them? Many IDEs follow the
include files to resolve defines and if the options aren't in an
include file, it can cause the IDE to mark blocks of "ifdeffed"
code as unused when they're really not.
So...
* Added a new menuselect compile option ADD_CFLAGS_TO_BUILDOPTS_H
which tells make_buildopts_h to include the non-ABI-breaking
flags in buildopts.h as well as the ABI-breaking ones. The default
is disabled to preserve current behavior. As before though,
only the ABI-breaking flags appear in AST_BUILDOPTS and only
those are used to calculate AST_BUILDOPT_SUM.
A new AST_BUILDOPT_ALL define was created to capture all of the
flags.
* make_version_c was streamlined to use buildopts.h and also to
create asterisk_build_opts_all[] and ast_get_build_opts_all(void)
* "core show settings" now shows both AST_BUILDOPTS and
AST_BUILDOPTS_ALL.
UserNote: The "Build Options" entry in the "core show settings"
CLI command has been renamed to "ABI related Build Options" and
a new entry named "All Build Options" has been added that shows
both breaking and non-breaking options.
func_periodic_hook was truncating long channel names which
causes issues when you need to run other dialplan functions/apps
on the channel.
Resolves: #319
If the safe_asterisk script detects that the /var/lib/asterisk
directory doesn't exist, it now creates it with 755 permissions
instead of 770. safe_asterisk needing to create that directory
should be extremely rare though because it's normally created
by 'make install' which already sets the permissions to 755.
Resolves: #316
Resolves: #298
UserNote: The dial string option 'g' was added to the UnicastRTP channel
which enables RTP glue and therefore native RTP bridges with those
channels.
This newly introduced periodic-announce-startdelay makes it possible to
configure the initial start delay of the first periodic announcement
after which periodic-announce-frequency takes over.
UserNote: Introduce a new queue configuration option called
'periodic-announce-startdelay' which will vary the normal (historic)
behavior of starting the periodic announcement cycle at
periodic-announce-frequency seconds after entering the queue to start
the periodic announcement cycle at period-announce-startdelay seconds
after joining the queue. The default behavior if this config option is
not set remains unchanged.
Signed-off-by: Jaco Kroon <jaco@uls.co.za>
Using the Set dialplan application does not actually
delete channel or global variables. Instead the
variables are set to an empty value.
This change adds two dialplan functions,
GLOBAL_DELETE and DELETE which can be used to
delete global and channel variables instead
of just setting them to empty.
There is also no ability within the dialplan to
determine if a global or channel variable has
actually been set or not.
This change also adds two dialplan functions,
GLOBAL_EXISTS and VARIABLE_EXISTS which can be
used to determine if a global or channel variable
has been set or not.
Resolves: #289
UserNote: Four new dialplan functions have been added.
GLOBAL_DELETE and DELETE have been added which allows
the deletion of global and channel variables.
GLOBAL_EXISTS and VARIABLE_EXISTS have been added
which checks whether a global or channel variable has
been set.
All of the links that reference page anchors with capital letters in
the ids (#Something) have been changed to lower case to match the
anchors that are generated by mkdocs.
Handle session interval lower than endpoint's configured minimum timer
when sending first answer. Timer setting is checked during this step and
needs to handled appropriately.
Before this change, no response was sent at all. After this change a
response with 422 Session Interval too small is sent to UAC.
If the called party hangs up while digits are being
sent, -1 is returned to indicate so, but app_dial
was not checking the return value, resulting in
the hangup being lost and looping forever until
the caller manually hangs up the channel. We now
abort if digit sending fails.
ASTERISK-29428 #close
Resolves: #281
Add quoting around the ps_endpoints 100rel column in the ALTER
statements. Although alembic doesn't complain when generating
sql statements, postgresql does (rightly so).
Resolves: #274
* Fixed issue with the script not parsing the new tag format for
certified releases. The format changed from certified/18.9-cert5
to certified-18.9-cert5.
* Fixed issue where the asterisk version wasn't being considered
when looking for cached versions.
Resolves: #263
This adds support for Called Subscriber Held for FXS
lines, which allows users to go on hook when receiving
a call and resume the call later from another phone on
the same line, without disconnecting the call. This is
a convenience mechanism that most real PSTN telephone
switches support.
ASTERISK-30372 #close
Resolves: #240
UserNote: Called Subscriber Held is now supported for analog
FXS channels, using the calledsubscriberheld option. This allows
a station user to go on hook when receiving an incoming call
and resume from another phone on the same line by going on hook,
without disconnecting the call.
app_macro sometimes would crash due to datastore list corruption on the
channel because of lack of locking around find and create process for
the macro datastore. This patch locks the channel lock prior to protect
against this problem.
Resolves: #265
This reverts commit 617dad4cba.
apps/app_stack.c: Revert buggy gosub patch
This seems to break the case when a predial macro calls a gosub.
When the gosub calls return, the Return function outputs:
app_stack.c:423 return_exec: Return without Gosub: stack is empty
This returns -1 to the calling macro, which returns to app_dial
and causes the call to hangup instead of proceeding with the macro
that invoked the gosub.
Resolves: #253
Fixes dependency solutions in install_prereq for Debian aarch64
platforms. install_prereq was attempting to forcibly install 32-bit
armhf packages due to the aptitude search for dependencies.
Resolves: #37
If the contact_user is configured on the endpoint it will now be set on the local Contact header URI for incoming calls. The contact_user has already been set on the local Contact header URI for outgoing calls.
Resolves: #226
Added a new boolean configuration flag -
`order_multi_row_results_by_initial_column` - to both res_pgsql.conf
and res_config_odbc.conf that allows the administrator to disable the
explicit `ORDER BY` that was previously being added to all generated
SQL statements that returned multiple rows.
Fixes: #179
An earlier cherry-pick that involved rest-api somehow didn't include
a comment change in res/ari/resource_endpoints.h. This commit
corrects that. No changes other than the comment.
The documentation for PJSIP_HEADERS claims that
prefix is optional, but in the code it is actually not.
However, there is no inherent reason for this, as users
may want to retrieve all header names, not just those
beginning with a certain prefix.
This makes the prefix optional for this function,
simply fetching all header names if not specified.
As a result, the documentation is now correct.
Resolves: #230
UserNote: The prefix argument to PJSIP_HEADERS is now
optional. If not specified, all header names will be
returned.
The default is 32 with 8 being used by pjproject itself. Recent
commits have put us over the limit resulting in assertions in
pjproject. Since this value is used in invites, dialogs,
transports and subscriptions as well as the global pjproject
endpoint, we don't want to increase it too much.
Resolves: #255
In some cases I have yet to determine some stasis messages may
be created without a channel snapshot. This change adds some
tolerance to this scenario, preventing a crash from occurring.
This change adds support for refers that are not session based. It
includes a refer implementation for the PJSIP technology which results
in out-of-dialog REFERs being sent to a PJSIP endpoint. These can be
triggered using the new ARI endpoint `/endpoints/refer`.
Resolves: #71
UserNote: There is a new ARI endpoint `/endpoints/refer` for referring
an endpoint to some URI or endpoint.
Currently, if an FXS channel is still off hook when
all calls on the line have hung up, the user is provided
reorder tone until going back on hook again.
In addition to not reflecting what most commercial switches
actually do, it's very common for switches to automatically
reoriginate for the user so that dial tone is provided without
the user having to depress and release the hookswitch manually.
This can increase convenience for users.
This behavior is now supported for kewlstart FXS channels.
It's supported only for kewlstart (FXOKS) mainly because the
behavior doesn't make any sense for ground start channels,
and loop start signalling doesn't provide the necessary DAHDI
event that makes this easy to implement. Likely almost everyone
is using FXOKS over FXOLS anyways since FXOLS is pretty useless
these days.
ASTERISK-30357 #close
Resolves: #224
UserNote: The autoreoriginate setting now allows for kewlstart FXS
channels to automatically reoriginate and provide dial tone to the
user again after all calls on the line have cleared. This saves users
from having to manually hang up and pick up the receiver again before
making another call.
sig_analog allows users to flash and use the three-way dial
tone as a primitive hold function, simply by never timing
it out.
Some systems allow this dial tone to time out to silence,
so the user is not annoyed by a persistent dial tone.
This option allows the dial tone to time out normally to
silence.
ASTERISK-30004 #close
Resolves: #205
UserNote: The threewaysilenthold option now allows the three-way
dial tone to time out to silence, rather than continuing forever.
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
Fixes#221
UserNote: res_pjsip now allows TLS v1.3 to be enabled if supported by
the underlying PJSIP library. The bundled version of PJSIP supports
TLS v1.3.
c3ff4648 removed the [iaxtel700] context but neglected to remove
references to it.
This commit addresses that and also removes iaxtel and freeworlddialup
references from other config files.
The app_queue module provides both an AMI action and a CLI command
to change the priority of a caller in a queue. Up to now this change
of priority has only been reflected to new callers into the queue.
This change adds an "immediate" option to both the AMI action and
CLI command which immediately applies the priority change respective
to the other callers already in the queue. This can allow, for example,
a caller to be placed at the head of the queue immediately if their
priority is sufficient.
Resolves: #202
UserNote: The 'queue priority caller' CLI command and
'QueueChangePriorityCaller' AMI action now have an 'immediate'
argument which allows the caller priority change to be reflected
immediately, causing the position of a caller to move within the
queue depending on the priorities of the other callers.
The ast_app_getdata() and ast_app_getdata_terminator() declarations
in app.h were changed recently to return enum ast_getdata_result
(which is how they were defined in app.c). The existing
declaration of ast_getdata_result in app.h was about 1000 lines
after those functions however so under certain circumstances,
a "use before declaration" error was thrown by the compiler.
The declaration of the enum was therefore moved to before those
functions.
Resolves: #200
A change made in 82cebaa0 did not properly handle the case when a
channel was not provided, triggering a crash. ast_check_hangup(...)
does not protect against NULL pointers.
Fixes#180
in a particular mailbox folder. The forward command can be used
to copy a message within a mailbox or to another mailbox. Also adds
a VoicemailBoxSummarry, required to retrieve message ID's.
Resolves: #181
UserNote: The following manager actions have been added
VoicemailBoxSummary - Generate message list for a given mailbox
VoicemailRemove - Remove a message from a mailbox folder
VoicemailMove - Move a message from one folder to another within a mailbox
VoicemailForward - Copy a message from one folder in one mailbox
to another folder in another or the same mailbox.
Adds CLI commands to allow move/remove/forward individual messages
from a particular mailbox folder. The forward command can be used
to copy a message within a mailbox or to another mailbox. Also adds
a show mailbox, required to retrieve message ID's.
Resolves: #170
UserNote: The following CLI commands have been added to app_voicemail
voicemail show mailbox <mailbox> <context>
Show contents of mailbox <mailbox>@<context>
voicemail remove <mailbox> <context> <from_folder> <messageid>
Remove message <messageid> from <from_folder> in mailbox <mailbox>@<context>
voicemail move <mailbox> <context> <from_folder> <messageid> <to_folder>
Move message <messageid> in mailbox <mailbox>&<context> from <from_folder> to <to_folder>
voicemail forward <from_mailbox> <from_context> <from_folder> <messageid> <to_mailbox> <to_context> <to_folder>
Forward message <messageid> in mailbox <mailbox>@<context> <from_folder> to
mailbox <mailbox>@<context> <to_folder>
From the gdb information, it was found that when calling __ast_free, the size of the
allocated space pointed to by the pointer matches the size created when rtp->themssrc_valid
is equal to 0. However, in reality, when reading the value of rtp->themssrc_valid in gdb,
it is found to be 1.
Within ast_rtcp_write(), the call to ast_rtp_rtcp_report_alloc() uses rtp->themssrc_valid,
which is outside the protection of the rtp_instance lock. However,
ast_rtcp_generate_report(), which is called by ast_rtcp_generate_compound_prefix(), uses
rtp->themssrc_valid within the protection of the rtp_instance lock.
This can lead to the possibility that the value of rtp->themssrc_valid used in the call to
ast_rtp_rtcp_report_alloc() may be different from the value of rtp->themssrc_valid used
within ast_rtcp_generate_report().
Resolves: asterisk#63
In PROpenedOrUpdated, the cherry-pick reminder will now be
suppressed if there are already valid 'cherry-pick-to' comments
in the PR or the PR contained a 'cherry-pick-to: none' comment.
When immediate=yes on an FXS channel, sig_analog will
start fake audible ringback that continues until the
channel is answered. Even if it answers immediately,
the ringback is still audible for a brief moment.
This can be disruptive and unwanted behavior.
This adds an option to disable this behavior, though
the default behavior remains unchanged.
ASTERISK-30003 #close
Resolves: #118
UserNote: The immediatering option can now be set to no to suppress
the fake audible ringback provided when immediate=yes on FXS channels.
This accomplishes the same thing as a `find ... | sort` but with the
added benefit of clarity and avoiding a call to a subshell.
Additionally drop the -s option from call to patch as it is not POSIX.
The apply_patches script wasn't sorting the list of patches in
the "patches" directory before applying them. This left the list
in an indeterminate order. In most cases, the list is actually
sorted but rarely, they can be out of order and cause dependent
patches to fail to apply.
We now sort the list but the "sort" program wasn't in the
configure scripts so we needed to add that and regenerate
the scripts as well.
Resolves: #193
Fixes two compilation errors in app_voicemail_imap, one due to an unsed
variable and one due to a new variable added in the incorrect location
in _163.
Resolves: #174
Adds last locked and unlocked timestamps as well as a
counter for the number of times the lock has been
attempted (vs locked/unlocked) to debug output printed
using the DEBUG_THREADS option.
Resolves: #110
The new documentation site uses traditional markdown instead
of the Confluence flavored version. This required changes in
the mustache templates and the python that generates the files.
Some callers of __messagecount did not correctly handle error return,
instead returning a -1 message count.
This caused a notification with "Messages-Waiting: yes" and
"Voice-Message: -1/0 (0/0)" if the IMAP server was unavailable.
Fixes: #64
Added two new functions (ast_sip_session_get_dialog and
ast_sip_session_get_pjsip_inv_state) that retrieve the dialog and the
pjsip_inv_state respectively from the pjsip_inv_session on the
ast_sip_session struct. This is due to pjproject adding a new field to
the pjsip_inv_session struct that caused crashes when trying to access
fields that were no longer where they were expected to be if a module
was compiled against a different version of pjproject.
Resolves: #145
This adds an option 'force_longest_waiting_caller' which changes the
global behavior of the queue engine to prevent queue callers from
'jumping ahead' when an agent is in multiple queues.
Resolves: #108
Also closes old asterisk issues:
- ASTERISK-17732
- ASTERISK-17570
Change-Id: I0f84e27903fefbe2018d0afa2d67b23aa0b321ce
These were uncovered when trying to run `bootstrap.sh` with Autoconf
2.71:
* AC_CONFIG_HEADER() is deprecated in favor of AC_CONFIG_HEADERS().
* AC_HEADER_TIME is obsolete.
* $as_echo is deprecated in favor of AS_ECHO() which requires an update
to ax_pthread.m4.
Note that the generated artifacts in this commit are from Autoconf 2.69.
Resolves#139
In a handful of migrations, the comment header that indicates the
current and previous revisions has drifted from the identifiers
revision and down_revision variables. This updates the comment headers
to match the code.
If we don't set this to -1 if the structure can be potentially re-used
later then it's possible that we'll issue a close() on an unrelated file
descriptor, breaking asterisk in other interesting ways.
I believe this to be an unlikely scenario, but it costs nothing to be
safe.
Signed-off-by: Jaco Kroon <jaco@uls.co.za>
Add a parking space extension parameter (ParkingSpace) to the Park action.
Park action will attempt to park the call to that extension.
If the extension is already in use, then execution will continue at the next priority.
UserNote: New ParkingSpace parameter has been added to AMI action Park.
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
* 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
* app_followme: fix issue with enable_callee_prompt=no
If the FollowMe option 'enable_callee_prompt' is set to 'no' then Asterisk
incorrectly sets a winner channel to the channel from which any control frame was read.
This fix sets the winner channel only to the answered channel.
Resolves: #87
ASTERISK-30326
Adds the loop_last option to res_musiconhold,
which allows the last audio file in the directory
to be looped perpetually once reached, rather than
circling back to the beginning again.
Resolves: #122
ASTERISK-30462
UserNote: The loop_last option in musiconhold.conf now
allows the last file in the directory to be looped once reached.
Currently, the presentation for incoming channels is
always available, because it is never actually set,
meaning the channel presentation can be nonsensical.
If the presentation from the incoming Caller ID spill
is private or unavailable, we now update the channel
presentation to reflect this.
Resolves: #120
ASTERISK-30333
ASTERISK-21741
Adds a new AMI action (CoreShowChannelMap) that takes in a channel name
and provides a list of all channels that are connected to that channel,
following local channel connections as well.
Resolves: #104
UserNote: New AMI action CoreShowChannelMap has been added.
A previous change, ASTERISK_29991, made it possible
to send additional Caller ID parameters that were
not previously supported.
This change adds support for analog DAHDI channels
to now be able to receive these parameters for
on-hook Caller ID, in order to enhance the usability
of CPE that support these parameters.
Resolves: #94
ASTERISK-30331
UserNote: Additional Caller ID properties are now supported on
incoming calls to FXS stations, namely the
redirecting reason and call qualifier.
Add new type 'sdp_label' when creating a bridge using the ARI. This will
add labels to the SDP for each stream, the label is set to the
corresponding channel id.
Resolves: #91
UserNote: When creating a bridge using the ARI the 'type' argument now
accepts a new value 'sdp_label' which will configure the bridge to add
labels for each stream in the SDP with the corresponding channel id.
When Asterisk is restarted it does not preserve paused reason for
members of realtime queues. This was fixed for non-realtime queues in
ASTERISK_25732
Resolves: #66
UpgradeNote: Add a new column to the queue_member table:
reason_paused VARCHAR(80) so the reason can be preserved.
UserNote: Make paused reason in realtime queues persist an
Asterisk restart. This was fixed for non-realtime
queues in ASTERISK_25732.
The Caller ID generation routine currently is hardcoded
to always use the system time zone. This makes it possible
to optionally specify any TZ-format time zone.
Resolves: #98
ASTERISK-30330
The Asterisk logrotate script contains explicit
references to files with the .log extension,
which are also included when *log is expanded.
This causes issues with newer versions of logrotate.
This fixes this by ensuring that a log file cannot
be referenced multiple times after expansion occurs.
Resolves: #96
ASTERISK-30442
Reported by: EN Barnett
Tested by: EN Barnett
With this change, session modifications in the early media state are
possible if the SDP was sent reliably and confirmed by a PRACK. For
details, see RFC 6337, escpecially section 3.2.
Resolves: #73
The hidecallerid setting in chan_dahdi.conf currently
is broken for a couple reasons.
First, the actual code in sig_analog to "allow" or "block"
Caller ID depending on this setting improperly used
ast_set_callerid instead of updating the presentation.
This issue was mostly fixed in ASTERISK_29991, and that
fix is carried forward to this code as well.
Secondly, the hidecallerid setting is set on the DAHDI
pvt but not carried forward to the analog pvt properly.
This is because the chan_dahdi config loading code improperly
set permhidecallerid to permhidecallerid from the config file,
even though hidecallerid is what is actually set from the config
file. (This is done correctly for call waiting, a few lines above.)
This is fixed to read the proper value.
Thirdly, in sig_analog, hidecallerid is set to permhidecallerid
only on hangup. This can lead to potential security vulnerabilities
as an allowed Caller ID from an initial call can "leak" into subsequent
calls if no hangup occurs between them. This is fixed by setting
hidecallerid to permcallerid when calls begin, rather than when they end.
This also means we don't need to also set hidecallerid in chan_dahdi.c
when copying from the config, as we would have to otherwise.
Fourthly, sig_analog currently only allows dialing *67 or *82 if
that would actually toggle the presentation. A comment is added
clarifying that this behavior is okay.
Finally, a couple log messages are updated to be more accurate.
Resolves: #100
ASTERISK-30349 #close
Commit 09e989f972
categorized the T option as not being compatible
with remote consoles, but they do affect verbose
messages with remote console. This fixes this.
Resolves: #102
This enables the test to work with CC=clang.
Without this the test for 6 args would fail with:
utils.c:99:12: error: static declaration of 'gethostbyname_r' follows non-static declaration
static int gethostbyname_r (const char *name, struct hostent *ret, char *buf,
^
/usr/include/netdb.h:177:12: note: previous declaration is here
extern int gethostbyname_r (const char *__restrict __name,
^
Fixing the expected return type to int sorts this out.
Signed-off-by: Jaco Kroon <jaco@uls.co.za>
If processing an XInclude results in new <xi:include> elements, we
need to run XInclude processing again. This continues until no
replacement occurs or an error is encountered.
There is a separate issue with dynamic strings (ast_str) that will be
addressed separately.
Resolves: #65
We should also return all codecs on an re-INVITE without SDP for a
call that used late offer (e.g. no SDP in the initial INVITE, SDP
in the ACK). Bugfix for feature introduced in ASTERISK-30193
(https://issues.asterisk.org/jira/browse/ASTERISK-30193)
Migration from previous gerrit change that was not merged.
The current AST_CEL_LOCAL_OPTIMIZE event is and has been
triggered on a local optimization end to serve as a flag
indicating the event occurred. This change adds a second
AST_CEL_LOCAL_OPTIMIZE_BEGIN event for further detail.
Resolves: #52
UpgradeNote: The existing AST_CEL_LOCAL_OPTIMIZE can continue
to be used as-is and the AST_CEL_LOCAL_OPTIMIZE_BEGIN event
can be ignored if desired.
UserNote: The new AST_CEL_LOCAL_OPTIMIZE_BEGIN can be used
by itself or in conert with the existing
AST_CEL_LOCAL_OPTIMIZE to book-end local channel optimizaion.
* Remove .gitreview and switch to pulling the main asterisk branch
version from configure.ac instead.
* Replace references to JIRA with GitHub.
* Other minor cleanup found along the way.
Resolves: #39
When using mediasec, requests sent after a 401 must still contain the
Security-Client header according to
draft-dawes-sipcore-mediasec-parameter.
Resolves: #48
Currently, both pulse and tone dialing are always enabled
on all FXS lines, with no way of disabling one or the other.
In some circumstances, it is desirable or necessary to
disable one of these, and this behavior can be problematic.
A new "dialmode" option is added which allows setting the
methods to support on a per channel basis for FXS (FXO
signalled lines). The four options are "both", "pulse",
"dtmf"/"tone", and "none".
Additionally, integration with the CHANNEL function is
added so that this setting can be updated for a channel
during a call.
Resolves: #35
ASTERISK-29992
UserNote: A "dialmode" option has been added which allows
specifying, on a per-channel basis, what methods of
subscriber dialing (pulse and/or tone) are permitted.
Additionally, this can be changed on a channel
at any point during a call using the CHANNEL
function.
The current STIR/SHAKEN signing process is inconsistent with the
RFCs in a couple ways that can cause interoperability issues.
RFC8225 specifies that the keys must be ordered lexicographically, but
currently the fields are simply ordered according to the order
in which they were added to the JSON object, which is not
compliant with the RFC and can cause issues with some carriers.
To fix this, we now leverage libjansson's ability to dump a JSON
object sorted by key value, yielding the correct field ordering.
Additionally, telephone numbers must have any leading + prefix removed
and must not contain characters outside of 0-9, *, and # in order
to comply with the RFCs. Numbers are now properly formatted as such.
ASTERISK-30407 #close
Change-Id: Iab76d39447c4b8cf133de85657dba02fda07f9a2
Adds PJSIP as a supported technology to DUNDi.
To facilitate this, we now allow an endpoint to be specified
for outgoing PJSIP calls. We also allow users to force a specific
channel technology for outgoing SIP-protocol calls.
ASTERISK-28109 #close
ASTERISK-28233 #close
Change-Id: I2e28e5a5d007bd49e3df113ad567b011103899bf
In a three party scenario with INVITE with replaces, we need to
unhold the call, otherwise one party continues to get music on
hold, and the call is not properly bridged between them.
ASTERISK-30428
Change-Id: I5675df11e739be5226b328f8828d4b8d81fbefb4
A comment at the top of voicemail.conf says that #include
cannot be used in voicemail.conf because this breaks
the ability for app_voicemail to auto-update passwords.
This is factually incorrect, since Asterisk has no problem
updating files that are #include'd in the main configuration
file, and this does work in voicemail.conf as well.
ASTERISK-30479 #close
Change-Id: I3bf7d275849ab83f55f7fb6702a75a3077ee1df3
The F option in the xmldocs for the Queue application
was erroneously duplicated, causing it to display
twice on the wiki. The two sections are now merged into one.
Additionally, the description for the d option was quite
vague. Some more details are added to provide context
as to what this actually does.
ASTERISK-30486 #close
Change-Id: I6706cea708b5cc781f59f8652c2cb377e55aed7e
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
There are two main parts of the change associated with this
commit. These are driven by the change in call order of
pubsub_on_rx_refresh and pubsub_on_evsub_state by pjproject
when an in-dialog SUBSCRIBE is received.
First, the previous behavior was for pjproject to call
pubsub_on_rx_refresh before calling pubsub_on_evsub_state
when an in-dialog SUBSCRIBE was received that changes the
subscription state.
If that change was a termination due to a re-SUBSCRIBE with
an expires of 0, we used to use the call to pubsub_on_rx_refresh
to set the substate of the evsub to TERMINATE_PENDING before
pjproject could call pubsub_on_evsub_state.
This substate let pubsub_on_evsub_state know that the
subscription TERMINATED event could be ignored as there was
still a subsequent NOTIFY that needed to be generated and
another call to pubsub_on_evsub_state to come with it.
That NOTIFY was sent via serialized_pubsub_on_refresh_timeout
which would see the TERMINATE_PENDING state and transition it
to TERMINATE_IN_PROGRESS before triggering another call to
pubsub_on_evsub_state (which now would clean up the evsub.)
The new pjproject behavior is to call pubsub_on_evsub_state
before pubsub_on_rx_refresh. This means we no longer can set
the state to TERMINATE_PENDING to tell pubsub_on_evsub_state
that it can ignore the first TERMINATED event.
To handle this, we now look directly at the event type,
method type and the expires value to determine whether we
want to ignore the event or use it to trigger the evsub
cleanup.
Second, pjproject now expects the NOTIFY to actually be sent
during pubsub_on_rx_refresh and avoids the protocol violation
inherent in sending a NOTIFY before the SUBSCRIBE is
acknowledged by caching the sent NOTIFY then sending it
after responding to the SUBSCRIBE.
This requires we send the NOTIFY using the non-serialized
pubsub_on_refresh_timeout directly and let pjproject handle
the protocol violation.
ASTERISK-30469
Change-Id: I05c1d91a44fe28244ae93faa4a2268a3332b5fd7
Various changes to ensure that the lexers and parsers can be correctly
generated when REBUILD_PARSERS is enabled.
Some notes:
* Because of the version of flex we are using to generate the lexers
(2.5.35) some post-processing in the Makefile is still required.
* The generated lexers do not contain the problematic C99 check that
was being replaced by the call to sed in the respective Makefiles so
it was removed.
* Since these files are generated, they will include trailing
whitespace in some places. This does not need to be corrected.
Change-Id: Ibbd343606fcf5c0d285b1599e6e8e59f514f2e4e
Add periodic beep option to one-touch recording by setting
the touch variable TOUCH_MONITOR_BEEP or
TOUCH_MIXMONITOR_BEEP to the desired interval in seconds.
If the interval is less than 5 seconds, a minimum of 5
seconds will be imposed. If the interval is set to an
invalid value, it will default to 15 seconds.
A new test event PERIODIC_HOOK_ENABLED was added to the
func_periodic_hook hook_on function to indicate when
a hook is started. This is so we can test that the touch
variable starts the hook as expected.
ASTERISK-30446
Change-Id: I800e494a789ba7a930bbdcd717e89d86040d6661
While it is possible to create multiple mixmonitor instances
on a channel, it was not previously possible to mute individual
instances.
This change includes the ability to specify the MixMonitorID
when calling the manager action: MixMonitorMute. This will
allow an individual MixMonitor instance to be muted via id.
This id can be stored as a channel variable using the 'i'
MixMonitor option.
As part of this change, if no MixMonitorID is specified in
the manager action MixMonitorMute, Asterisk will set the mute
flag on all MixMonitor spy-type audiohooks on the channel.
This is done via the new audiohook function:
ast_audiohook_set_mute_all.
ASTERISK-30464
Change-Id: Ibba8c7e750577aa1595a24b23316ef445245be98
Sending the "RECORD FILE" command without the optional
`offset_samples` argument can result in two beeps playing on the
channel.
This bug has been present since Asterisk 0.3.0 (2003-02-06).
ASTERISK-30457 #close
Change-Id: I95e88aa59378784d7f0eb648843f090e6723b787
Fix issue with returning empty instead of dumping
the JSON string when recursing.
Also adds a unit test to capture this fix.
ASTERISK-30441 #close
Change-Id: If0bde9f3fe84f7af485e0838205cc21e0f752a85
DTMF frames are not handled in app_dial when sent towards the
caller. This means that if DTMF is sent to the calling party
and the call has not yet been answered, the DTMF is not audible.
This is now fixed by relaying DTMF frames if only a single
destination is being dialed.
ASTERISK-29516 #close
Change-Id: Iafd7430ac2915126d42dc48f0b73b262452ee027
For 'core show channels', the Channel name field is increased
to 64 characters and the Location name field is increased to
32 characters.
For 'core show channels verbose', the Channel name field is
increased to 80 characters, the Context is increased to 24
characters and the Extension is increased to 24 characters.
ASTERISK-30455
Change-Id: Ibec3742ce360ffc93bc56e9984c2a21dabc4d5e1
This newly introduced periodic-announce-startdelay makes it possible to
configure the initial start delay of the first periodic announcement
after which periodic-announce-frequency takes over.
ASTERISK-30437 #close
Change-Id: Ia79984b6377ef78f167ad9ea2ac084bec29955d0
Signed-off-by: Jaco Kroon <jaco@uls.co.za>
* All of the code that used subversion has been removed.
* When Asterisk is checked out from a tag or commit instead
of one of the regular branches, git would emit messages like
"fatal: ref HEAD is not a symbolic ref" which weren't fatal
at all. Those are now suppressed.
Change-Id: I2a11bc9ebbaf6dfa50f53516ede50a6bac65ca3c
Make the existing CURL parameters configurable and allow
to specify the usable protocols, proxy and DNS timeout.
ASTERISK-30340
Change-Id: I2eb02ef44190e026716720419bcbdbcc8125777b
Fix the following build failure with libressl by using SSL_is_server
which is available since version 2.7.0 and
d7ec516916:
iostream.c: In function 'ast_iostream_close':
iostream.c:559:41: error: invalid use of incomplete typedef 'SSL' {aka 'struct ssl_st'}
559 | if (!stream->ssl->server) {
| ^~
ASTERISK-30107 #close
Fixes: - http://autobuild.buildroot.org/results/ce4d62d00bb77ba5b303cacf6be7e350581a62f9
Change-Id: Iea7f34970297f2fb50285d73462d0174ba7e9587
`rc.archlinux.asterisk`, which explicitly requests bash in its
shebang, uses the following command syntax:
${DAEMON} -rx "core stop now" > /dev/null 2&>1
The intent of which is to execute:
${DAEMON} -rx "core stop now"
While sending both stdout and stderr to `/dev/null`. Unfortunately,
because the `&` is in the wrong place, bash is interpreting the `2` as
just an additional argument to the `$DAEMON` command and not as a file
descriptor and proceeds to use the bashism `&>` to send stderr and
stdout to a file named `1`.
So we clean it up and just use bash's shortcut syntax.
Issue raised and a fix suggested (but not used) by peutch on GitHub¹.
ASTERISK-30449 #close
1. https://github.com/asterisk/asterisk/pull/31
Change-Id: Ie279bf4efb4d95cbf507313483d316e977303d19
* Added a new function ast_utf8_replace_invalid_chars() to
utf8.c that copies a string replacing any invalid UTF-8
sequences with the Unicode specified U+FFFD replacement
character. For example: "abc\xffdef" becomes "abc\uFFFDdef".
Any UTF-8 compliant implementation will show that character
as a � character.
* Updated res_pjsip:set_id_from_hdr() to use
ast_utf8_replace_invalid_chars and print a warning if any
invalid sequences were found during the copy.
* Updated stasis_channels:ast_channel_publish_varset to use
ast_utf8_replace_invalid_chars and print a warning if any
invalid sequences were found during the copy.
ASTERISK-27830
Change-Id: I4ffbdb19c80bf0efc675d40078a3ca4f85c567d8
This avoids buffer overflow errors when running tests that capture
output from child processes.
This also corrects a copypasta in an off-nominal error message.
Change-Id: Ib482847a3515364f14c7e7a0c0a4213851ddb10d
ASTERISK_29392 (a security fix) introduced a regression by
not processing frames when we don't have an audio format.
Currently, chan_iax2 only calls jb_get to read frames from
the jitterbuffer when the voiceformat has been set on the pvt.
However, this only happens when we receive a voice frame, which
means that prior to receiving voice frames, other types of frames
get stalled completely in the jitterbuffer.
To fix this, we now fallback to using the format negotiated during
call setup until we've actually received a voice frame with a format.
This ensures we're always able to read from the jitterbuffer.
ASTERISK-30354 #close
ASTERISK-30162 #close
Change-Id: Ie4fd1e8e088a145ad89e0427c2100a530e964fe9
`getcwd(…)` is decorated with the `warn_unused_result` attribute and
therefore needs its return value checked.
Change-Id: Idcccb20a0abf293202c28633d0e9ee0f6a9dbe93
Asterisk makefiles auto-detect SSL library availability,
then they assume that pjproject makefiles will also autodetect
an SSL library at the same time, so they do not pass on the
autodetection result to pjproject.
This normally works, except the pjproject makefiles disables
autodetection when cross-compiling.
Fix by explicitly configuring pjproject to use SSL if we
have been told to use it or it was autodetected
ASTERISK-30424 #close
Change-Id: I8fe2999ea46710e21d1d55a1bed92769c6ebded9
Adds 'e' option to allow Read() to return the terminator as the
dialed digits in the case where only the terminator is entered.
ie; if "#" is entered, return "#" if the 'e' option is set and ""
if it is not.
ASTERISK-30411
Change-Id: I49f3221824330a193a20c660f99da0f1fc2cbbc5
Phones moving between subnets on multi-homed server have their
initially connected interface IP cached in the SERVER variable,
even when it is not specified in the configuration files. This
prevents phones from obtaining the correct SERVER variable value
when they move to another subnet.
ASTERISK-30388 #close
Reported-by: cmaj
Change-Id: I1d18987a9d58e85556b4c4a6814ce7006524cc92
Adds 's' option to skip calling the extension and instead set the
extension as DIRECTORY_EXTEN channel variable.
ASTERISK-30405
Change-Id: Ib9d9db1ba5b7524594c640461b4aa8f752db8299
Adds a new option to SendDTMF() which will answer the specified
channel if it is not already up. If no channel is specified, the
current channel will be answered instead.
ASTERISK-30422
Change-Id: Iddcbd501fcdf9fef0f453b7a8115a90b11f1d085
contributed pjproject - patch to check sub->pending_notify
in evsub.c:on_tsx_state before calling
pjsip_evsub_send_request()
res_pjsip_pubsub - change post pjsip 2.13 behavior to use
pubsub_on_refresh_timeout to avoid the ao2_cleanup call on
the sub_tree. This is is because the final NOTIFY send is no
longer the last place the sub_tree is referenced.
ASTERISK-30419
Change-Id: Ib5cc662ce578e9adcda312e16c58a10b6453e438
Several queue fields were not being set to their default value during
a reload.
Additionally added some sample configuration options that were missing
from queues.conf.sample.
Change-Id: I3a88c7877af91752b1b46a0c087384f7eb9c47e4
Removed multiple patches.
Code chages in res_pjsip_pubsub due to changes in evsub.
Pjsip now calls on_evsub_state() before on_rx_refresh(),
so the sub tree deletion that used to take place in
on_evsub_state() now must take place in on_rx_refresh().
Additionally, pjsip now requires that you send the NOTIFY
from within on_rx_refresh(), otherwise it will assert
when going to send the 200 OK. The idea is that it will
look for this NOTIFY and cache it until after sending the
response in order to deal with the self-imposed message
mis-order. Asterisk previously dealt with this by pushing
the NOTIFY in on_rx_refresh(), but pjsip now forces us
to use it's method.
Changes were required to configure in order to detect
which way pjsip handles this as the two are not
compatible for the reasons mentioned above.
A corresponding change in testsuite is required in order
to deal with the small interal timing changes caused by
moving the NOTIFY send.
ASTERISK-30325
Change-Id: I50b00cac89d950d3511d7b250a1c641965d9fe7f
Adds the Signal and WaitForSignal
applications, which can be used for inter-channel
signaling in the dialplan.
Signal supports sending a signal to other channels
listening for a signal of the same name, with an
optional data payload. The signal is received by
all channels waiting for that named signal.
ASTERISK-29810 #close
Change-Id: Ic34439de3d60f8609357666a465c354d81f5fef3
Adds option to app_directory to specify a filename from which to
read configuration instead of voicemail.conf ie;
same => n,Directory(,,c(directory.conf))
This configuration should contain a list of extensions using the
voicemail.conf format, ie;
2020=2020,Dog Dog,,,,attach=no|saycid=no|envelope=no|delete=no
ASTERISK-30404
Change-Id: Id58ccb1344ad1e563fa10db12f172fbd104a9d13
Adds support for arrays to JSON_DECODE by allowing the
user to print out entire arrays or index a particular
key or print the number of keys in a JSON array.
Additionally, adds support for recursively iterating a
JSON tree in a single function call, making it easier
to parse JSON results with multiple levels. A maximum
depth is imposed to prevent potentially blowing
the stack.
Also fixes a bug with the unit tests causing an empty
string to be printed instead of the actual test result.
ASTERISK-29913 #close
Change-Id: I603940b216a3911b498fc6583b18934011ef5d5b
Added NULL pointer check and channel lock to prevent resource release
while the chanspy is processing.
ASTERISK-29604
Change-Id: Ibdc675f98052da32333b19685b1708a3751b6d24
Variable references within global variable assignments are now
expanded rather than being included literally.
ASTERISK-30406 #close
Change-Id: I136e8d6395e90a4c92d9777a46a7bc3edb08d05d
Adds the overlap_context option, which can be used
to explicitly specify a context to use for overlap
dialing extension matches, rather than forcibly
using the context configured for the endpoint.
ASTERISK-30262 #close
Change-Id: Ibbcd4a8b11402428a187fb56b8d4e7408774a0db
In Asterisk 11, if a channel was redirected away during Playback(),
the PLAYBACKSTATUS variable would be set to SUCCESS. In Asterisk 12
(specifically commit 7d9871b394) that
behavior was inadvertently changed and the same operation would result
in the PLAYBACKSTATUS variable being set to FAILED. The Asterisk 11
behavior has been restored.
Partial fix for ASTERISK~25661.
Change-Id: I53f54e56b59b61c99403a481b6cb8d88b5a559ff
Rounding issues with double math were causing rtp timestamp
slips in outgoing packets. We're now back to integer math
and are getting no more slips.
ASTERISK-30391
Change-Id: I6ba992b49ffdf9ebea074581dfa784a188c661a4
Each playback of WAV files results in logging
"Skipping unknown block 'LIST'".
To prevent unnecessary flooding of this DEBUG log this patch replaces
ast_log(LOG_DEBUG, ...) by ast_debug(1, ...).
Change-Id: Iaa09cf19c5348a05385518fdb8cb181b45fe05f0
Add ability to set HANGUPCAUSE when SIP causecode received in BYE (in addition to currently supported Q.850).
ASTERISK-30319 #close
Change-Id: I3f55622dc680ce713a2ffb5a458ef5dd39fcf645
-----------------
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
Currently, if a module declines to load, dlopen is called
to register the module but dlclose never gets called.
Furthermore, loader.c currently doesn't allow dlclose
to ever get called on the module, since it declined to
load and the unload function bails early in this case.
This can be problematic if a module is updated, since the
new module cannot be loaded into memory since we haven't
closed all references to it. To fix this, we now allow
modules to be unloaded, even if they never "loaded" in
Asterisk itself, so that dlclose is called and the module
can be properly cleaned up, allowing the updated module
to be loaded from scratch next time.
ASTERISK-30345 #close
Change-Id: Ifc743aadfa85ebe3284e02a63e124dafa64988d5
Adds a new application, Broadcast, which can be used for
one-to-many transmission and many-to-one reception of
channel audio in Asterisk. This is similar to ChanSpy,
except it is designed for multiple channel targets instead
of a single one. This can make certain kinds of audio
manipulation more efficient and streamlined. New kinds
of audio injection impossible with ChanSpy are also made
possible.
ASTERISK-30180 #close
Change-Id: I7ba72f765dbab9b58deeae028baca3f4f8377726
Since text frames contain a text body, make FRAME_TRACE
more useful for text frames by actually printing the text.
ASTERISK-30353 #close
Change-Id: Ia6ce3d15cecd7a673a528d34faac86854a2bab50
json.h contains macros to get a string and an integer
from a JSON object. However, the macro to do this for
JSON reals is missing. This adds that.
ASTERISK-30361 #close
Change-Id: I8d0e28d763febf27b05801cdc83b73282aa6ee7a
The if statement here is always false after the for
loop finishes, so variables are never appended.
This removes that to properly append to the end
of the variable list.
ASTERISK-30351 #close
Reported by: Sebastian Gutierrez
Change-Id: I1b7f8b85a8918f6a814cb933a479d4278cf16199
When Asterisk receives a new websocket conenction, it creates a new
pjsip transport for it and copies connection data into it. The
transport manager then uses the remote IP address and port on the
transport to create a monitor for each connection. However, the
remote port wasn't being copied, only the IP address which meant
that the transport manager was creating only 1 monitoring entry for
all websocket connections from the same IP address. Therefore, if
one of those connections failed, it deleted the transport taking
all the the connections from that same IP address with it.
* We now copy the remote port into the created transport and the
transport manager behaves correctly.
ASTERISK-30369
Change-Id: Ib506d40897ea6286455ac0be4dfbb0ed43b727e1
If native HTTP is disabled but HTTPS is enabled and status page enabled
too, Core/HTTP crashes while loading. 'global_http_server' references
to NULL, but the status page tries to dereference it.
The patch adds a check for HTTP is enabled.
ASTERISK-30379 #close
Change-Id: I11b02fc920b72aaed9c809fc43210523ccfdc249
Do not crash when a URL has no path component as in this case the
ast_uri_path function will return NULL. Make the code cope with not
having a path.
The below would crash
> media cache create http://google.com /tmp/foo.wav
Thread 1 "asterisk" received signal SIGSEGV, Segmentation fault.
0x0000ffff836616cc in strrchr () from /lib/aarch64-linux-gnu/libc.so.6
(gdb) bt
#0 0x0000ffff836616cc in strrchr () from /lib/aarch64-linux-gnu/libc.so.6
#1 0x0000ffff43d43a78 in file_extension_from_string (str=<optimized out>, buffer=buffer@entry=0xffffca9973c0 "",
capacity=capacity@entry=64) at res_http_media_cache.c:288
#2 0x0000ffff43d43bac in file_extension_from_url_path (bucket_file=bucket_file@entry=0x3bf96568,
buffer=buffer@entry=0xffffca9973c0 "", capacity=capacity@entry=64) at res_http_media_cache.c:378
#3 0x0000ffff43d43c74 in bucket_file_set_extension (bucket_file=bucket_file@entry=0x3bf96568) at res_http_media_cache.c:392
#4 0x0000ffff43d43d10 in bucket_file_run_curl (bucket_file=0x3bf96568) at res_http_media_cache.c:555
#5 0x0000ffff43d43f74 in bucket_http_wizard_create (sorcery=<optimized out>, data=<optimized out>, object=<optimized out>)
at res_http_media_cache.c:613
#6 0x0000000000487638 in bucket_file_wizard_create (sorcery=<optimized out>, data=<optimized out>, object=<optimized out>)
at bucket.c:191
#7 0x0000000000554408 in sorcery_wizard_create (object_wizard=object_wizard@entry=0x3b9f0718,
details=details@entry=0xffffca9974a8) at sorcery.c:2027
#8 0x0000000000559698 in ast_sorcery_create (sorcery=<optimized out>, object=object@entry=0x3bf96568) at sorcery.c:2077
#9 0x00000000004893a4 in ast_bucket_file_create (file=file@entry=0x3bf96568) at bucket.c:727
#10 0x00000000004f877c in ast_media_cache_create_or_update (uri=0x3bfa1103 "https://google.com",
file_path=0x3bfa1116 "/tmp/foo.wav", metadata=metadata@entry=0x0) at media_cache.c:335
#11 0x00000000004f88ec in media_cache_handle_create_item (e=<optimized out>, cmd=<optimized out>, a=0xffffca9976b8)
at media_cache.c:640
ASTERISK-30375 #close
Change-Id: I6a9433688cb5d3d4be8758b7642d923bdde6c273
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
pbx_exec makes a channel snapshot before executing applications.
This doesn't cause an issue during normal dialplan execution
where pbx_exec is called over and over again in succession.
However, if pbx_exec is called "one off", e.g. using
ast_pbx_exec_application, then a channel snapshot never ends
up getting made after the executed application returns, and
inaccurate snapshot information will linger for a while, causing
"core show channels", etc. to show erroneous info.
This is fixed by manually making a channel snapshot at the end
of ast_pbx_exec_application, since we anticipate that pbx_exec
might not get called again immediately.
ASTERISK-30367 #close
Change-Id: I2a5131053aa9d11badbc0ef2ef40b1f83d0af086
Currently, there is no Caller ID available to us when
checking for an extension match when handling INVITEs.
As a result, extension patterns that depend on the Caller ID
are not matched and calls may be incorrectly rejected.
The Caller ID is not available because the supplement that
adds Caller ID to the session does not execute until after
this check. Supplement callbacks cannot yet be executed
at this point since the session is not yet in the appropriate
state.
To fix this without impacting existing behavior, the Caller ID
number is now retrieved before attempting to pattern match.
This ensures pattern matching works correctly and there is
no behavior change to the way supplements are called.
ASTERISK-28767 #close
Change-Id: Iec7f5a3b90e51b65ccf74342f96bf80314b7cfc7
When a call is put on hold and it has moh_passthrough and rtp_timeout
set on the endpoint, the wrong timeout will be used. rtp_timeout_hold is
expected to be used, but rtp_timeout is used instead. This change adds a
couple of checks for locally_held to determine if rtp_timeout_hold needs
to be used instead of rtp_timeout.
ASTERISK-30350
Change-Id: I7b106fc244332014216d12bba851cefe884cc25f
Fixes a negative offset warning by initializing
the buffer to empty.
Additionally, although it doesn't currently complain
about it, the size of a buffer is increased to
accomodate the maximum size contents it could have.
ASTERISK-30240 #close
Change-Id: I8eecedf14d3f2a75864797f802277cac89a32877
Currently, if a user attempts to set a Caller ID related
function to an invalid value, a warning is emitted,
except for when setting the redirecting reason.
We now emit a warning if we were unable to successfully
parse the user-provided reason.
ASTERISK-30332 #close
Change-Id: Ic341f5d5f7303b6f1115549be64db58a85944f5a
Fix aor lookup on sip path addition. Issue happens in case of dialing
with @ and overriding user part of RURI.
ASTERISK-30100 #close
Reported-by: Yury Kirsanov
Change-Id: I3f2c42a583578c94397b113e32ca3ebf2d600e13
When ast_stream_and_wait returns an error (for example, when attempting
to stream to a channel after hangup) the stream is not closed, and
callers typically do not check the return code. This results in leaking
file descriptors, leading to resource exhaustion.
This change ensures that the stream is closed in case of error.
ASTERISK-30198 #close
Reported-by: Julien Alie
Change-Id: Ie46b67314590ad75154595a3d34d461060b2e803
Removes see-also references to applications that don't
exist anymore (removed in Asterisk 19),
so these dead links don't show up on the wiki.
ASTERISK-30347 #close
Change-Id: I9539bc30f57cd65aa4e2d5ce8185eafa09567909
The `ast_geoloc_datastore_add_eprofile` function does not return 0 on
success, it returns the size of the underlying datastore. This means
that the datastore will be freed and its pointer set to NULL when no
error occured at all.
ASTERISK-30346
Change-Id: Iea9b209bd1244cc57b903b9496cb680c356e4bb9
When adding AOC to an outgoing response the code
assumed that a body would exist for comparing the
Content-Type. This isn't always true.
The code now checks to make sure the response has
a body before checking the Content-Type.
ASTERISK-21502
Change-Id: Iaead371434fc3bc693dad487228106a7d7a5ac76
chan_sip supported sending AOC-D and AOC-E information in SIP INFO
messages in an "AOC" header in a format that was originally defined by
Snom. In the meantime, ETSI TS 124 647 introduced an XML-based AOC
format that is supported by devices from multiple vendors, including
Snom phones with firmware >= 8.4.2 (released in 2010).
This commit adds a new res_pjsip_aoc module that inserts AOC information
into outgoing messages or sends SIP INFO messages as described below.
It also fixes a small issue in res_pjsip_session which didn't always
call session supplements on outgoing_response.
* AOC-S in the 180/183/200 responses to an INVITE request
* AOC-S in SIP INFO (if a 200 response has already been sent or if the
INVITE was sent by Asterisk)
* AOC-D in SIP INFO
* AOC-D in the 200 response to a BYE request (if the client hangs up)
* AOC-D in a BYE request (if Asterisk hangs up)
* AOC-E in the 200 response to a BYE request (if the client hangs up)
* AOC-E in a BYE request (if Asterisk hangs up)
The specification defines one more, AOC-S in an INVITE request, which
is not implemented here because it is not currently possible in
Asterisk to have AOC data ready at this point in call setup. Once
specifying AOC-S via the dialplan or passing it through from another
SIP channel's INVITE is possible, that might be added.
The SIP INFO requests are sent out immediately when the AOC indication
is received. The others are inserted into an appropriate outgoing
message whenever that is ready to be sent. In the latter case, the XML
is stored in a channel variable at the time the AOC indication is
received. Depending on where the AOC indications are coming from (e.g.
PRI or AMI), it may not always be possible to guarantee that the AOC-E
is available in time for the BYE.
Successfully tested AOC-D and both variants of AOC-E with a Snom D735
running firmware 10.1.127.10. It does not appear to properly support
AOC-S however, so that could only be tested by inspecting SIP traces.
ASTERISK-21502 #close
Reported-by: Matt Jordan <mjordan@digium.com>
Change-Id: Iebb7ad0d5f88526bc6629d3a1f9f11665434d333
When passing a JSON body to the 'create' channel route
it would be converted into Asterisk variables, but never
freed resulting in a memory leak.
This change makes it so that the variables are freed in
all cases.
ASTERISK-30344
Change-Id: I924dbd866a01c6073e2d6fb846ccaa27ef72d49d
msg_create_from_file currently does not dispatch emails,
which means that applications using this function, such
as MixMonitor, will not trigger notifications to users
(only AMI events are sent our currently). This is inconsistent
with other ways users can receive voicemail.
This is fixed by adding an option that attempts to send
an email and falling back to just the notifications as
done now if that fails. The existing behavior remains
the default.
ASTERISK-30283 #close
Change-Id: I597cbb9cf971a18d8776172b26ab187dc096a5c7
This fixes a small typo in the from_domain documentation on the endpoint documentation
ASTERISK-30328 #close
Change-Id: Ia6f0897c3f5cab899ef2cde6b3ac07265b8beb21
Adds support for the capture agent name field
of the Homer protocol to Asterisk by allowing
users to specify a name that will be sent to
the HEP server.
ASTERISK-30322 #close
Change-Id: I6136583017f9dd08daeb8be02f60fb8df4639a2b
Adds the If, ElseIf, Else, ExitIf, and EndIf
applications for conditional execution
of a block of dialplan, similar to the While,
EndWhile, and ExitWhile applications. The
appropriate branch is executed at most once
if available and may be broken out of while
inside.
ASTERISK-29497
Change-Id: I3aa3bd35a5add82465c6ee9bd86b64601f0e1f49
Some SIP devices use an empty extension for PLAR functionality.
Rather than rejecting these empty extensions, we now use the s
extension for such calls to mirror the existing PLAR functionality
in Asterisk (e.g. chan_dahdi).
ASTERISK-30265 #close
Change-Id: I0861a405cd49bbbf532b52f7b47f0e2810832590
Updates the documentation for the 'contact_user' field to point out the
default outbound contact if no contact_user is specified 's'
ASTERISK-30316 #close
Change-Id: I61f24fb9164e4d07e05908a2511805281874c876
The commit that rearchitected media formats,
a2c912e997 (ASTERISK_23114)
introduced a regression by improperly translating code in res_adsi.c.
In particular, the pointer to the frame buffer was initialized
at the top of adsi_careful_send, rather than dynamically updating it
for each frame, as is required.
This resulted in the first frame being repeatedly sent,
rather than advancing through the frames.
This corrupted the transmission of the CAS to the CPE,
which meant that CPE would never respond with the DTMF acknowledgment,
effectively completely breaking ADSI functionality.
This issue is now fixed, and ADSI now works properly again.
ASTERISK-29793 #close
Change-Id: Icdeddf733eda2981c98712d1ac9cddc0db507dbe
Adds support for custom URI and header parameters
in the From header in PJSIP. Parameters can be
both set and read using this function.
ASTERISK-30150 #close
Change-Id: Ifb1bc3c512ad5f6faeaebd7817f004a2ecbd6428
When parsing information from AstDB while loading,
it is possible that certain pointers are never
set, which leads to invalid memory access and
then, fatally, invalid free attempts on this memory.
We now initialize to NULL to prevent this.
ASTERISK-30311 #close
Change-Id: I6120681d04fd2c12a9473f35ce95a1f8e74e3929
ASTERISK_28702 previously attempted to fix an
issue with flash hook hold timing out after
just under 17 minutes, when it should have never
been timing out. It fixed this by changing 999999
to INT_MAX, but it did so in chan_dahdi, which
is the wrong place since ss_thread is now in
sig_analog and the one in chan_dahdi is mostly
dead code.
This fixes this by porting the fix to sig_analog.
ASTERISK-30336 #close
Change-Id: I05eb69cc0b5319d357842a70bd26ef64d145cb15
The XML docs are currently only loaded on
startup with no way to update them during runtime.
This makes it impossible to load modules that
use ACO/Sorcery (which require documentation)
if they are added to the source tree and built while
Asterisk is running (e.g. external modules).
This adds a CLI command to reload the XML docs
during runtime so that documentation can be updated
without a full restart of Asterisk.
ASTERISK-30289 #close
Change-Id: I4f265b0e5517e757c5453a0f241201a5788d3a07
This file includes some doxygen comments referencing
ast_format_set. This is an obsolete API that was
removed years back, but documentation was not fully
updated to reflect that. These examples are
updated to the current way of doing things
(using the format cache).
ASTERISK-30327 #close
Change-Id: I570f3b8007fa17ba470cc7117f44bfe7c555d2f7
MixMonitor currently uses the Connected Line as the Caller ID
for voicemails. This is due to the implementation being written
this way for use with Digium phones. However, in general this
is not correct for generic usage in the dialplan, and people
may need the real Caller ID instead. This adds an option to do that.
ASTERISK-30286 #close
Change-Id: I3d0ce76dfe75e2a614e0f709ab27acbd2478267c
It was possible for a module that registered for transport monitor
events to pass in a pjsip_transport that had already been freed.
This caused pjsip_transport_events to crash when looking up the
monitor for the transport. The fix is a two pronged approach.
1. We now increment the reference count on pjsip_transports when we
create monitors for them, then decrement the count when the
transport is going to be destroyed.
2. There are now APIs to register and unregister monitor callbacks
by "transport key" which is a string concatenation of the remote ip
address and port. This way the module needing to monitor the
transport doesn't have to hold on to the transport object itself to
unregister. It just has to save the transport_key.
* Added the pjsip_transport reference increment and decrement.
* Changed the internal transport monitor container key from the
transport->obj_name (which may not be unique anyway) to the
transport_key.
* Added a helper macro AST_SIP_MAKE_REMOTE_IPADDR_PORT_STR() that
fills a buffer with the transport_key using a passed-in
pjsip_transport.
* Added the following functions:
ast_sip_transport_monitor_register_key
ast_sip_transport_monitor_register_replace_key
ast_sip_transport_monitor_unregister_key
and marked their non-key counterparts as deprecated.
* Updated res_pjsip_pubsub and res_pjsip_outbound_register to use
the new "key" monitor functions.
NOTE: res_pjsip_registrar also uses the transport monitor
functionality but doesn't have a persistent object other than
contact to store a transport key. At this time, it continues to
use the non-key monitor functions.
ASTERISK-30244
Change-Id: I1a20baf2a8643c272dcf819871d6c395f148f00b
Add live_dangerously flag to manager and use this flag to
determine if a configuation file outside of AST_CONFIG_DIR
should be read.
ASTERISK-30176
Change-Id: I46b26af4047433b49ae5c8a85cb8cda806a07404
When decoding q.931 encoded calling/called number
now checking for length being less than minimum required.
ASTERISK-30103
Change-Id: I3dcfce0f35eca258dc450f87c92d4d7af402c2e7
The Answer application currently waits for up to 500ms
for media, even if users specify a different timeout.
This adds an option to not wait for media on the channel
by doing a raw answer instead. The default 500ms threshold
is also documented.
ASTERISK-30308 #close
Change-Id: Id59cd340c44b8b8b2384c479e17e5123e917cba4
Currently, chan_dahdi will wait for at least one
ring before an incoming call can enter the dialplan.
This is generally necessary in order to receive
the Caller ID spill and/or distinctive ringing
detection.
However, if neither of these is required, then there
is nothing gained by waiting for one ring and this
unnecessarily delays call setup. Users can now
use immediate=yes to make FXO channels (FXS signaled)
begin processing dialplan as soon as Asterisk receives
the call.
ASTERISK-30305 #close
Change-Id: I20818b370b2e4892c7f40c8a8753fa06a81750b5
This PR contains two relatively separate changes in channel.c and
res_pjsip_session.c which ensure that topology changes are not ignored
in cases where they should be handled.
For channel.c:
The function ast_channel_request_stream_topology_change only triggers a
stream topology request change indication, if the channel's topology
does not equal the requested topology. However, a channel could be in a
state where it is currently "negotiating" a new topology but hasn't
updated it yet, so the topology request change would be lost. Channels
need to be able to handle such situations internally and stream
topology requests should therefore always be passed on.
In the case of chan_pjsip for example, it queues a session refresh
(re-INVITE) if it is currently in the middle of a transaction or has
pending requests (among other reasons).
Now, ast_channel_request_stream_topology_change always indicates a
stream topology request change even if the requested topology equals the
channel's topology.
For res_pjsip_session.c:
The function resolve_refresh_media_states does not process stream state
changes if the delayed active state differs from the current active
state. I.e. if the currently active stream state has changed between the
time the sip session refresh request was queued and the time it is being
processed, the session refresh is ignored. However, res_pjsip_session
contains logic that ensures that session refreshes are queued and
re-queued correctly if a session refresh is currently not possible. So
this check is not necessary and led to some session refreshes being
lost.
Now, a session refresh is done even if the delayed active state differs
from the current active state and it is checked whether the delayed
pending state differs from the current active - because that means a
refresh is necessary.
Further, the unit test of resolve_refresh_media_states was adapted to
reflect the new behavior. I.e. the changes to delayed pending are
prioritized over the changes to current active because we want to
preserve the original intention of the pending state.
ASTERISK-30184
Change-Id: Icd0703295271089057717006730b555b9a1d4e5a
SLAStation currently autoservices the station channel before
creating a thread to actually dial the trunk. This leads
to duplicate servicing of the channel which causes assertions,
deadlocks, crashes, and moreover not the correct behavior.
Removing the autoservice prevents the crash, but if the station
hangs up before the trunk answers, the call hangs since the hangup
was never serviced on the channel.
This is fixed by not autoservicing the channel, but instead
servicing it in the thread dialing the trunk, since it is doing
so synchronously to begin with. Instead of sleeping for 100ms
in a loop, we simply use the channel for timing, and abort
if it disappears.
The same issue also occurs with SLATrunk when a call is answered,
because ast_answer invokes ast_waitfor_nandfds. Thus, we use
ast_raw_answer instead which does not cause any conflict and allows
the call to be answered normally without thread blocking issues.
ASTERISK-29998 #close
Change-Id: Icc237d50354b5910000d2305901e86d2c87bb9d8
Found in res_geolocation, but I believe others may have similar issues,
thus not linking to a specific issue.
Essentially gcc doesn't mark the stack for being non-executable unless
it's compiling the source, this informs ld via gcc to mark the object as
not requiring an executable stack (which a binary blob obviously
doesn't).
ASTERISK-30321
Change-Id: I71bcc2fd1fe0c82a28b3257405d6f2b566fd9bfc
Signed-off-by: Jaco Kroon <jaco@uls.co.za>
A memory leak was present in func_json due to
using ast_json_free, which just calls ast_free,
as opposed to recursively freeing the JSON
object as needed. This is now fixed to use the
right free functions.
ASTERISK-30293 #close
Change-Id: I982324dde841dc9147c8d8ad35c8719daf418b49
Removes the function mkstemp_file and uses
ast_file_mkftemp from file.h instead.
ASTERISK-30295 #close
Change-Id: I7412ec06f88c39ee353bcdb8c976c2fcac546609
The "RECORD FILE" command in res_agi has its own
implementation for actually doing the recording. This
has resulted in it not actually obeying the option
"transmit_silence" when recording.
This change causes it to now send silence if the
option is enabled.
ASTERISK-30314
Change-Id: Ib3a85601ff35d1b904f836691bad8a4b7e957174
Adds an option that allows MixMonitor to delete
its copy of any recording files before exiting.
This can be handy in conjunction with options
like m, which copy the file elsewhere, and the
original files may no longer be needed.
ASTERISK-30284 #close
Change-Id: Ida093679c67e300efc154a97b6d8ec0f104e581e
The ModuleCheck XML documentation falsely
claims that the module's version number is returned.
This has not been the case since 14, since the version
number is not available anymore, but the documentation
was not changed at the time. It is now updated to
reflect this.
ASTERISK-30285 #close
Change-Id: Idde2d1205a11f2623fa1ddab192faa3dc4081e91
Fixed the specification of "outputdir" when calling ast_coredumper
so the txt files are saved in the correct place.
ASTERISK-30282
Change-Id: Ic631cb90c1e4c29d970c982dff45fda5e0eb15b6
When gosub is executed on channels without a PBX, the context,
extension, and priority are initialized to the channel driver's
default location for that endpoint. As a result, the last Return
will restore this location and the Gosub logs will print out bogus
information about our exit point.
To fix this, on channels that don't have a PBX, the execution
location is left intact on the last return if there are no
further stack frames left. This allows the correct location
to be printed out to the user, rather than the bogus default
context.
ASTERISK-30076 #close
Change-Id: I1d42a99c9aa9e3708d32718863175158a894e414
unicast_rtp_request() was setting the channel variables like this:
pbx_builtin_setvar_helper(chan, "UNICASTRTP_LOCAL_ADDRESS",
ast_sockaddr_stringify_addr(&local_address));
ast_rtp_instance_get_local_address(instance, &local_address);
pbx_builtin_setvar_helper(chan, "UNICASTRTP_LOCAL_PORT",
ast_sockaddr_stringify_port(&local_address));
...which made it appear that UNICASTRTP_LOCAL_ADDRESS was being
set before local_address was set. In fact, the address part of
local_address was set earlier in the function, just not the port.
This was confusing however so ast_rtp_instance_get_local_address()
is now being called before setting UNICASTRTP_LOCAL_ADDRESS.
ASTERISK-30281
Change-Id: I872ac49477100f4eb33891d46efc6ca21ec81aa4
When a websocket (or potentially any stateful connection) is quickly
created then destroyed, it is possible that the qualify thread will
destroy the transaction before the initialzing thread is finished
with it.
Depending on the timing, this can cause an assertion within pjsip.
To prevent this, ast_send_stateful_response will now create the group
lock and add a reference to it before creating the transaction.
While this should resolve the crash, there is still the potential that
the contact will not be cleaned up properly, see:ASTERISK~29286. As a
result, the contact has to 'time out' before it will be removed.
ASTERISK-28689
Change-Id: Id050fded2247a04d8f0fc5b8a2cf3e5482cb8cee
write_openssl_error_to_log has been erroneously
using ast_free instead of free, which will
cause a crash when MALLOC_DEBUG is enabled since
the memory was not allocated by Asterisk's memory
manager. This changes it to use the actual free
function directly to avoid this.
ASTERISK-30278 #close
Change-Id: Iac8b6468b718075809c45d8ad16b101af21a474d
Current registration code use pjsip_parse_uri to verify outbound_proxy
that is different from the reading this option for the endpoint. This
made value with multiple proxies invalid for registration pjsip settings.
Removing URI validation helps to use registration through multiple proxies.
ASTERISK-30217 #close
Change-Id: I064558e66f04b9f3260c46181812a01349761357
Fix compilation errors caused by using size_t
instead of uintmax_t and non-portable format
specifiers.
ASTERISK-30273 #close
Change-Id: I363e6057ef84d54b88af80d23ad6147eef9216ee
Currently chan_pjsip on receiving a re-INVITE without SDP will only
return the codecs that are previously negotiated and not offering
all enabled codecs.
This causes interoperability issues with different equipment (e.g.
from Cisco) for some of our customers and probably also in other
scenarios involving 3PCC infrastructure.
According to RFC 3261, section 14.2 we SHOULD return all codecs
on a re-INVITE without SDP
The PR proposes a new parameter to configure this behaviour:
all_codecs_on_empty_reinvite. It includes the code, documentation,
alembic migrations, CHANGES file and example configuration additions.
ASTERISK-30193 #close
Change-Id: I69763708d5039d512f391e296ee8a4d43a1e2148
The PJSIP notify CLI commands allow for using
"options" configured in pjsip_notify.conf.
This allows these same options to be used in
AMI actions as well.
Additionally, as part of this improvement,
some repetitive common code is refactored.
ASTERISK-30263 #close
Change-Id: Ie4496b322b63b61eaf9672183a959ab99a04b6b5
Expands the pjsip logger to support the ability to filter
by SIP message method. This can make certain types of SIP debugging
easier by only logging messages of particular method(s).
ASTERISK-30146 #close
Co-authored-by: Sean Bright <sean@seanbright.com>
Change-Id: I9c8cbb6fc8686ef21190eb42e08bc9a9b147707f
race condition: ast_dial_join() may not cancel outgoing call, if
function is called just after called party answer and before
application execution (bit is_running_app not yet set).
This fix adds ast_softhangup() calls in addition to existing
pthread_kill() when is_running_app is not set.
ASTERISK-30258
Change-Id: Idbdd5c15122159661aa8e996a42d5800083131e4
This fixes dahdi_request to properly set the cause
code to CONGESTION instead of BUSY if no channels
were actually available.
Currently, the cause is erroneously set to busy
if the channel itself is found, regardless of its
current state. However, if the channel is not available
(e.g. T1 down, card not operable, etc.), then the
channel itself may not be in a functional state,
in which case CHANUNAVAIL is the correct cause to use.
This adds a simple check to ensure that busy tone
is only returned if a channel is encountered that
has an owner, since that is the only possible way
that a channel could actually be busy.
ASTERISK-30274 #close
Change-Id: Iad5870223c081240c925b19df8d6af136953b994
pjproject does not provide any mechanism of removing
event packages, which means that once a subscription
handler is registered, it is effectively permanent.
pjproject will assert if the same event package is
ever registered again, so currently unloading and
loading any Asterisk modules that use subscriptions
will cause a crash that is beyond our control.
For that reason, we now prevent users from being
able to unload these modules, to prevent them
from ever being loaded twice.
ASTERISK-30264 #close
Change-Id: I7fdcb1a5e44d38b7ba10c44259fe98f0ae9bc12c
Some logic in say.c for determining if we need
to also add an ampersand for file seperation was faulty,
as non-successful files would increment the count, causing
a leading ampersand to be added improperly.
This is fixed, and a unit test that captures this regression
is also added.
ASTERISK-30248 #close
Change-Id: I02c1d3a11d82fe4ea8b462070cbd1effb5834d2b
Add enum to allow setting optional direction. If set to only one
direction, only feed matching-direction frames to the associated
slin factory.
This prevents mangling the transcoder on non-mixed frames when the
READ and WRITE frames would have otherwise required it. Also
removes the need to mute or discard the un-wanted frames as they
are no longer added in the first place.
res_stasis_snoop is changed to use this addition to set direction
on audiohook based on spy direction.
If no direction is set, the ast_audiohook_init will init this enum
to BOTH which maintains existing functionality.
ASTERISK-30252
Change-Id: If8716bad334562a5d812be4eeb2a92e4f3be28eb
Allows bridging, parking, and dial messages to be globally
ignored for all CDRs such that only a single CDR record
is generated per channel.
This is useful when CDRs should endure for the lifetime of
an entire channel and bridging and dial updates in the
dialplan should not result in multiple CDR records being
created for the call. With the ignore bridging option,
bridging changes have no impact on the channel's CDRs.
With the ignore dial state option, multiple Dials and their
outcomes have no impact on the channel's CDRs. The
last disposition on the channel is preserved in the CDR,
so the actual disposition of the call remains available.
These two options can reduce the amount of "CDR hacks" that
have hitherto been necessary to ensure that CDR was not
"spoiled" by these messages if that was undesired, such as
putting a dummy optimization-disabled local channel between
the caller and the actual call and putting the CDR on the channel
in the middle to ensure that CDR would persist for the entire
call and properly record start, answer, and end times.
Enabling these options is desirable when calls correspond
to the entire lifetime of channels and the CDR should
reflect that.
Current default behavior remains unchanged.
ASTERISK-30091 #close
Change-Id: I393981af42732ec5ac3ff9266444abb453b7c832
Adds support for detecting audible ringback tone
to the TONE_DETECT function using the p option.
ASTERISK-30254 #close
Change-Id: Ie2329ff245248768367d26749c285fbe823f6414
"fname" is passed in as a const char *, but strstr() mangles that
into a char *, and we were attempting to modify the string in place.
This is an unwanted (and undocumented) side-effect.
ASTERISK-30213
Change-Id: Ifa36d352aafeb7f9beec3f746332865c7d21e629
Also added a note to the geolocation.conf.sample file
and added a README to the res/res_geolocation/wiki
directory.
Change-Id: I89c3c5db8c0701b33127993622d5e4f904bddfbc
This patch adds support for mediasec SIP headers and SDP attributes.
These are defined in RFC 3329, 3GPP TS 24.229 and
draft-dawes-sipcore-mediasec-parameter. The new features are
implemented so that a backbone for RFC 3329 is present to streamline
future work on RFC 3329.
With this patch, Asterisk can communicate with Deutsche Telekom trunks
which require these fields.
ASTERISK-30032
Change-Id: Ia7f5b5ba42db18074fdd5428c4e1838728586be2
Avoid crashing by skipping invisible bridges and checking the
snapshot for a null pointer. In effect this is how the bridges
are enumerated in res/ari/resource_bridges.c already.
ASTERISK-30239
ASTERISK-30237
Change-Id: I58ef9f44036feded5966b5fc70ae754f8182883d
If geolocation is not in use for an endpoint, the NOTICE
log level is currently spammed with messages about this,
even though nothing is wrong and these messages provide
no real value. These log messages are therefore changed
to debugs.
ASTERISK-30241 #close
Change-Id: I656b355d812f67cc0f0fdf09b00b0e1458598bb4
The DBGetTree AMI action's ListItem previously
always reported 1, regardless of the count. This
is corrected to report the actual count.
ASTERISK-30245 #close
patches:
gettreecount.diff submitted by Birger Harzenetter (license 5870)
Change-Id: I46d8992710f1b8524426b1255f57d1ef4a4934d4
The IF function currently emits warnings if both IF branches
are empty. However, there is no actual necessity that either
branch be non-empty as, unlike other conditional applications/
functions, nothing is inherently done with IF, and both
sides could legitimately be empty. The warning is thus turned
into a debug message.
ASTERISK-30243 #close
Change-Id: I5250625dd720f95e1859b5dfb933905d7e7a730e
Adds the n "no answer" option to the Bridge application
so that answer supervision can not automatically
be provided when Bridge is executed.
Additionally, a mechanism (dialplan variable)
is added to prevent bridge targets (typically the
target of a masquerade) from answering the channel
when they enter the bridge.
ASTERISK-30223 #close
Change-Id: I76f73fcd8e403bcd18f2abb40c658f537ac1ba6d
Adds the n option to not answer the channel when calling
BridgeWait, so the application can be used without
forcing answer supervision.
ASTERISK-30216 #close
Change-Id: I6b85ef300b1f7b5170f8537e2b10889cc2e6605a
Adds an option that will play an audio file
to the party while AMD is running on the
channel, so the called party does not just
hear silence.
ASTERISK-30179 #close
Change-Id: I4af306274552b61b3d9f0883c33f698abd4699b6
Adds the EXPORT function, which allows write
access to variables and functions on other
channels.
ASTERISK-29432 #close
Change-Id: I7492645ae4307553d0f586d78e13a4f586231fdf
This patch adds a new option to the 100rel parameter for pjsip
endpoints called "peer_supported". When an endpoint with this option
receives an incoming request and the request indicated support for the
100rel extension, then Asterisk will send 1xx responses reliably. If
the request did not indicate 100rel support, Asterisk sends 1xx
responses normally.
ASTERISK-30158
Change-Id: Id6d95ffa8f00dab118e0b386146e99f254f287ad
If we find that n_max (currently hard wired to 1) sessions were purged,
schedule the next purge for 1ms into the future rather than 5000ms (as
per current). This way we will purge up to 1000 sessions per second
rather than 1 every 5 seconds.
This mitigates a build-up of sessions should http sessions gets
established faster than 1 per 5 seconds.
Change-Id: I9820d39aa080109df44fe98c1325cafae48d54f5
Signed-off-by: Jaco Kroon <jaco@uls.co.za>
Adds TRIM, LTRIM, and RTRIM, which can be used
for trimming leading and trailing whitespace
from strings.
ASTERISK-30222 #close
Change-Id: I50fb0c40726d044a7a41939fa9026f3da4872554
Adding user=phone to local-side uri's when user_eq_phone=yes is set for
an endpoint. Previously this would only add the header to the To and R-URI.
ASTERISK-30178
Change-Id: Id3bfb5d225d762e7d2668c023fe09e4541ae8600
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
This change adds an option, answeredonly, that will prevent music on
hold on channels that are not answered.
ASTERISK-30135
Change-Id: I1ab0defa43a29a26ae39f94c623596cf90fddc08
This change allows TEL URI requests to come through for basic calls. The
allowed requests are INVITE, ACK, BYE, and CANCEL. The From and To
headers will now allow TEL URIs, as well as the request URI.
Support is only for TEL URIs present in traffic from a remote party.
Asterisk does not generate any TEL URIs on its own.
ASTERISK-26894
Change-Id: If5729e6cd583be7acf666373bf9f1b9d653ec29a
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
The FRAME_TRACE function currently asserts if it sees
a MASQUERADE_NOTIFY. However, this is a legitimate thing
that can happen so asserting is inappropriate, as there
are no clear negative ramifications of such a thing. This
is adjusted to be like the other frames to print out
the subclass.
ASTERISK-30210 #close
Change-Id: I8ecbdcf17e35f64bdeab42868471f581ad1d1a56
Adds an AMI event to indicate that a deadlock
has likely started, when Asterisk is compiled
with DETECT_DEADLOCKS enabled. This can make
it easier to perform automated deadlock detection
and take appropriate action (such as doing a core
dump). Unlike the deadlock warnings, the AMI event
is emitted only once per deadlock.
ASTERISK-30161 #close
Change-Id: Ifc6ed3e390f8b4cff7f8077a50e4d7a5b54e42fb
Adds the end_marked_any option, which can be used
to kick a user from a conference if any marked user
leaves.
ASTERISK-30211 #close
Change-Id: I9e8da7ccb892e522546c0f2b5476d172e022c2f5
Use const char for char arguments to
pbx_substitute_variables_helper_full_location
that can do so (context and exten).
ASTERISK-30209 #close
Change-Id: I001357177e9c3dca2b2b4eebc5650c1095b3da6f
Added an 'a' option to the GEOLOC_PROFILE function to allow
variable lists like location_info_refinement to be appended
to instead of replacing the entire list.
Added an 'r' option to the GEOLOC_PROFILE function to resolve all
variables before a read operation and after a Set operation.
Added a few missing parameters to the ones allowed for writing
with GEOLOC_PROFILE.
Fixed a bug where calling GEOLOC_PROFILE to read a parameter
might actually update the profile object.
Cleaned up XML documentation a bit.
ASTERISK-30190
Change-Id: I75f541db43345509a2e86225bfa4cf8e242e5b6c
You can now specify the location object's format, location_info,
method, location_source and confidence parameters directly on
a profile object for simple scenarios where the location
information isn't common with any other profiles. This is
mutually exclusive with setting location_reference on the
profile.
Updated appdocsxml.dtd to allow xi:include in a configObject
element. This makes it easier to link to complete configOptions
in another object. This is used to add the above fields to the
profile object without having to maintain the option descriptions
in two places.
ASTERISK-30185
Change-Id: Ifd5f05be0a76f0a6ad49fa28d17c394027677569
Added profile parameter "suppress_empty_ca_elements" that
will cause Civic Address elements that are empty to be
suppressed from the outgoing PIDF-LO document.
Fixed a possible SEGV if a sub-parameter value didn't have a
value.
ASTERISK-30177
Change-Id: I924ccc5aa2f45110a3155b22e53dfaf3ef2092dd
The trigger to perform outgoing geolocation processing is the
presence of a geoloc_outgoing_call_profile on an endpoint. This
is intentional so as to not leak location information to
destinations that shouldn't receive it. In a totally dynamic
configuration scenario however, there may not be any profiles
defined in geolocation.conf. This makes it impossible to do
outgoing processing without defining a "dummy" profile in the
config file.
This commit adds 4 built-in profiles:
"<prefer_config>"
"<discard_config>"
"<prefer_incoming>"
"<discard_incoming>"
The profiles are empty except for having their precedence
set and can be set on an endpoint to allow processing without
entries in geolocation.conf. "<discard_config>" is actually the
best one to use in this situation.
ASTERISK-30182
Change-Id: I1819ccfa404ce59802a3a07ad1cabed60fb9480a
When producing an outgoing SDP we iterate through the configured
formats and produce SDP information. It is possible for some
configured formats to not have SDP information available. If this
is the case we skip over them to allow the SDP to still be
produced.
ASTERISK-29185
Change-Id: I3e37569aa4ca341260e6ca5904dc2f75e46a1749
If "core show channels" is run before startup has completed, it
is possible for bad ao2 refs to occur because the system is not
yet fully initialized. This will lead to an assertion failing.
To prevent this, initialization of CLI builtins is moved to be
later along in the main load sequence. Core CLI commands are
loaded at the same time, but channel-related commands are loaded
later on.
ASTERISK-29846 #close
Change-Id: If6b3cde802876bd738c1b4cf2683bea6ddc615b6
This change adds support using the pjsip_tls_transport_restart
function for reloading the TLS certificate and key, if the filenames
remain unchanged. This is useful for Let's Encrypt and other
situations. Note that no restart of the transport will occur if
the certificate and key remain unchanged.
ASTERISK-30186
Change-Id: I9bc95a6bf791830a9491ad9fa43c17d4010028d0
Fixes two typos that cause fax detection to not work.
One refers to the wrong frame variable, and the other
refers to the subclass.integer instead of the frametype
as it should.
ASTERISK-30192 #close
Change-Id: I7b35fdb7bcf25a29a212eee37c20812c64ab3ef1
The following required columns were missing,
now added to the ps_endpoints table:
incoming_call_offer_pref
outgoing_call_offer_pref
stir_shaken_profile
ASTERISK-29453
Change-Id: I5cf565edf30195844d6acbc1e1de8c5f0d837568
With gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0:
> chan_dahdi.c:4129:18: error: ‘%s’ directive output may be truncated
> writing up to 255 bytes into a region of size between 242 and 252
> [-Werror=format-truncation=]
This removes the error-prone sizeof(...) calculations in favor of just
doubling the size of the base buffer.
Change-Id: I2d276785286730d3d5d0a921bcea2e065dbf27c5
Set termination state to old subscriptions to prevent queueing and sending
NOTIFY messages on exten/device state changes.
Postpone destruction of old subscriptions until all already queued tasks
that may be using old subscriptions have completed.
ASTERISK-29906
Change-Id: I96582aad3a26515ca73a8460ee6756f56f6ba23b
The DECLARE_STRINGFIELD_SETTERS_FOR() declares ast_channel_name_set()
for us, so no need to declare it separately.
Change-Id: I4813a884ada475ddc62bca480bceb4a53b3ec59a
Adds additional control options over the transfer
feature functionality to give users more control
in how the transfer feature sounds and works.
First, the "transfer" sound that plays when a transfer is
initiated can now be customized by the user in
features.conf, just as with the other transfer sounds.
Secondly, the user can now specify the transfer extension
in advance by using the TRANSFER_EXTEN variable. If
a valid extension is contained in this variable, the call
will automatically be transferred to this destination.
Otherwise, it will fall back to collecting the extension
from the user as is always done now.
ASTERISK-29899 #close
Change-Id: Ibff309caa459a2b958706f2ed0ca393b1ef502e3
Fixes a few coding guideline violations:
* Use of C99 comments
* Opening brace on same line as function prototype
ASTERISK-30163 #close
Change-Id: I07771c4c89facd41ce8d323859f022ddbddf6ca7
* Added processing for the 'confidence' element.
* Added documentation to some APIs.
* removed a lot of complex code related to the very-off-nominal
case of needing to process multiple location info sources.
* Create a new 'ast_geoloc_eprofile_to_pidf' API that just takes
one eprofile instead of a datastore of multiples.
* Plugged a huge leak in XML processing that arose from
insufficient documentation by the libxml/libxslt authors.
* Refactored stylesheets to be more efficient.
* Renamed 'profile_action' to 'profile_precedence' to better
reflect it's purpose.
* Added the config option for 'allow_routing_use' which
sets the value of the 'Geolocation-Routing' header.
* Removed the GeolocProfileCreate and GeolocProfileDelete
dialplan apps.
* Changed the GEOLOC_PROFILE dialplan function as follows:
* Removed the 'profile' argument.
* Automatically create a profile if it doesn't exist.
* Delete a profile if 'inheritable' is set to no.
* Fixed various bugs and leaks
* Updated Asterisk WiKi documentation.
ASTERISK-30167
Change-Id: If38c23f26228e96165be161c2f5e849cb8e16fa0
If the CONFBRIDGE function is used to dynamically set
menu options, a memory leak occurs when a menu option
that has been set is overridden, since the menu entry
is not destroyed before being freed. This ensures that
it is.
Additionally, logic that duplicates the destroy function
is removed in lieu of the destroy function itself.
ASTERISK-28422 #close
Change-Id: I71cfb5c24e636984d41086d1333a416dc12ff995
The manager XML documentation documents a "FilterList"
action, but there is no such action. Therefore, this can
lead to confusion when people try to use a documented
action that does not, in fact, exist. This is removed
as the action never did exist in the past, nor would it
be trivial to add since we only store the regex_t
objects, so the filter list can't actually be provided
without storing that separately. Most likely, the
documentation was originally added (around version 10)
in anticipation of something that never happened.
ASTERISK-29917 #close
Change-Id: I846b16fd6f80a91d4ddc5d8a861b522d7c6f8f97
Adjusts some logging levels to be more or less important,
that is more prominent when actual problems occur and less
prominent for less noteworthy things.
ASTERISK-30153 #close
Change-Id: Ifc8f7df427aa018627db462125ae744986d3261b
The CDR sample config still mentions that app_mysql
is available in the addons directory, but this is
incorrect as it was removed as of 19. This removes
that to avoid confusion.
ASTERISK-30160 #close
Change-Id: Ie5293ccb4f2b365896981811b480544e67bb9cd7
There are a handful of files in the tree that
reference an SVN link for the coding guidelines.
This removes these because the links are dead
and the vast majority of source files do not
contain these links, so this is more consistent.
app_skel still maintains an (up to date) link
to the coding guidelines.
ASTERISK-30159 #close
Change-Id: I35bbb20f66982e98099cff3029ede20091ffdac7
Documents the ConfbridgeListRooms AMI response,
which is currently not documented.
ASTERISK-30020 #close
Change-Id: Id6fff7a936244bae7b52686301eb740c1169cdea
The MeetmeList and MeetmeListRooms AMI
responses are currently completely undocumented.
This adds documentation for these responses.
ASTERISK-30018 #close
Change-Id: Id93135b7edf01de6f8fba266e2122989dc8996b8
Adds missing documentation for the field parameter
for the SRVRESULT function.
ASTERISK-30151
Reported by: Chris Young
Change-Id: I4385a2e0892a07e30dea1a8a0588e2c1bea2b1f1
When ast_func_read2 is used to read a function using
its read function (as opposed to a native ast_str read2
function), the result is copied directly by the function
into the ast_str buffer. As a result, the ast_str length
remains initialized to 0, which is a bug because this is
not the real string length.
This can cascade and have issues elsewhere, such as when
reading substrings of functions that only register read
as opposed to read2 callbacks. In this case, since reading
ast_str_strlen returns 0, the returned substring is empty
as opposed to the actual substring. This has caused
the ast_str family of functions to behave inconsistently
and erroneously, in contrast to the pbx_variables substitution
functions which work correctly.
This fixes this issue by manually updating the ast_str length
when the result is copied directly into the ast_str buffer.
Additionally, an assertion and a unit test that previously
exposed these issues are added, now that the issue is fixed.
ASTERISK-29966 #close
Change-Id: I4e2dba41410f9d4dff61c995d2ca27718248e07f
configure script detects /sbin/launchd, but the result of this
check is not used in Makefile (bininstall). Makefile also detects
/sbin/launchd file to decide if it is required to install
safe_asterisk.
configure script correctly detects cross compile build and sets
PBX_LAUNCHD=0
In case of building asterisk on MacOS host for Linux target using
external toolchain (e.g. OpenWrt toolchain), bininstall does not
install safe_asterisk (due to /sbin/launchd detection in Makefile),
but it is required on target (Linux).
This patch adds HAVE_SBIN_LAUNCHD=@PBX_LAUNCHD@ to makeopts.in to
use the result of /sbin/launchd detection from configure script in
Makefile.
Also this patch uses HAVE_SBIN_LAUNCHD in Makefile (bininstall) to
decide if it is required to install safe_asterisk.
ASTERISK-29905 #close
Change-Id: Iff61217276cd188f43f51ef4cdbffe39d9f07f65
Adds the DBGetTree action, which can be used to
retrieve all of the DB keys beginning with a
particular prefix, similar to the capability
provided by the database show CLI command.
ASTERISK-30136 #close
Change-Id: I3be9425e53be71f24303fdd4d2923c14e84337e6
The global event filtering code was only in one
possible execution path, so not all events were
being properly filtered out if requested. This moves
that into the universal AMI handling code so all
events are properly handled.
Additionally, the CLI listing of disabled events can
also get truncated, so we now print out everything.
ASTERISK-30137 #close
Change-Id: If8c42edcb2abc5158552da7eba2a8ff6b20e1959
Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution. Please note that log messages and other files should not be sent to the Sangoma Asterisk Team unless explicitly asked for. All files should be placed on this issue in a sanitized fashion as needed.
A good first step is for you to review the Asterisk Issue Guidelines if you haven't already. The guidelines detail what is expected from an Asterisk issue report.
Then, if you are submitting a patch, please review the Patch Contribution Process.
Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.
Please note that by submitting data, code, or documentation to Sangoma through GitHub, you accept the Terms of Use present at
https://www.asterisk.org/terms-of-use/.
Thanks for taking the time to fill out this bug report!
- type:dropdown
id:severity
attributes:
label:Severity
options:
- Trivial
- Minor
- Major
- Critical
- Blocker
validations:
required:true
- type:input
id:versions
attributes:
label:Versions
description:Enter one or more versions separated by commas.
validations:
required:true
- type:input
id:components
attributes:
label:Components/Modules
description:Enter one or more components or modules separated by commas.
validations:
required:true
- type:textarea
id:environment
attributes:
label:Operating Environment
description:OS, Disribution, Version, etc.
validations:
required:true
- type:dropdown
id:frequency
attributes:
label:Frequency of Occurrence
options:
- "Never"
- "One Time"
- "Occasional"
- "Frequent"
- "Constant"
- type:textarea
id:description
attributes:
label:Issue Description
validations:
required:true
- type:textarea
id:logs
attributes:
label:Relevant log output
description:Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
description:Submit an improvement to existing functionality
title:"[improvement]: "
labels:["improvement","triage"]
body:
- type:markdown
attributes:
value:|
Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution. Please note that log messages and other files should not be sent to the Sangoma Asterisk Team unless explicitly asked for. All files should be placed on this issue in a sanitized fashion as needed.
A good first step is for you to review the Asterisk Issue Guidelines if you haven't already. The guidelines detail what is expected from an Asterisk issue report.
Then, if you are submitting a patch, please review the Patch Contribution Process.
Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.
Please note that by submitting data, code, or documentation to Sangoma through GitHub, you accept the Terms of Use present at
https://www.asterisk.org/terms-of-use/.
Thanks for taking the time to fill out this bug report!
- type:textarea
id:description
attributes:
label:Improvement Description
description:Describe the improvement in as much detail as possible
Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution. Please note that log messages and other files should not be sent to the Sangoma Asterisk Team unless explicitly asked for. All files should be placed on this issue in a sanitized fashion as needed.
A good first step is for you to review the Asterisk Issue Guidelines if you haven't already. The guidelines detail what is expected from an Asterisk issue report.
Then, if you are submitting a patch, please review the Patch Contribution Process.
Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.
Please note that by submitting data, code, or documentation to Sangoma through GitHub, you accept the Terms of Use present at
https://www.asterisk.org/terms-of-use/.
Thanks for taking the time to fill out this bug report!
- type:textarea
id:description
attributes:
label:Feature Description
description:Describe the new feature in as much detail as possible
stale-issue-message:'This issue is stale because it has been open 7 days with no activity. Remove stale label or comment or this will be closed in 14 days.'
stale-issue-label:stale
close-issue-message:'This issue was closed because it has been stalled for 14 days with no activity.'
The Asterisk project maintains a [documentation page](https://docs.asterisk.org/About-the-Project/Asterisk-Versions/) of releases. Each version is listed with its release date, security fix only date, and end of life date. Consult this wiki page to see if the version of Asterisk you are reporting a security vulnerability against is still supported.
## Reporting a Vulnerability
To report a vulnerability use the "Report a vulnerability" button under the "Security" tab of this project.
/* don't need to back up a priority, because we don't actually need to execute Else, just jump to the priority after. Directly executing Else will exit the conditional. */
/* If is false, and Else exists, so jump to Else */
ast_verb(3,"Taking absolute false branch, jumping to priority %d\n",pri);
ast_channel_priority_set(chan,pri);
}else{
pri=endifpri;
if(pri>0){
ast_verb(3,"Exiting conditional, jumping to priority %d\n",pri);
ast_channel_priority_set(chan,pri);
}elseif(end==4){/* Condition added because of end > 0 instead of end == 4 */
ast_log(LOG_WARNING,"Couldn't find matching EndIf? (If at %s@%s priority %d)\n",ast_channel_context(chan),ast_channel_exten(chan),ast_channel_priority(chan));
<membername="ADD_CFLAGS_TO_BUILDOPTS_H"displayname="Add ALL of the flags on this page to buildopts.h. Useful for IDEs but may cause slightly longer compile times after flags are changed.">