Compare commits

..

176 Commits

Author SHA1 Message Date
Asterisk Development Team 2e7b22a503 Update for 21.2.0 2024-03-18 13:25:20 +00:00
Asterisk Development Team 4a91ec7fc4 Update for 21.2.0-rc2 2024-03-11 17:17:46 +00:00
George Joseph aa23bd9bd7 res_pjsip_stir_shaken.c: Add checks for missing parameters
* 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
2024-03-11 11:06:58 -06:00
Asterisk Development Team 211bfe1220 Update for 21.2.0-rc1 2024-03-07 14:18:52 +00:00
Naveen Albert 6e5a6c176d app_dial: Add dial time for progress/ringing.
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.

(cherry picked from commit bdf9327a33)
2024-03-07 14:18:41 +00:00
Naveen Albert ae2fa8c5f0 app_voicemail: Properly reinitialize config after unit tests.
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
(cherry picked from commit 2ac9c8fb5c)
2024-03-07 14:18:41 +00:00
Shaaah d43d250e14 app_queue.c : fix "queue add member" usage string
Fixing bracket placement in the "queue add member" cli usage string.

(cherry picked from commit 6f99268f79)
2024-03-07 14:18:41 +00:00
Naveen Albert 6af036a855 app_voicemail: Allow preventing mark messages as urgent.
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'.

(cherry picked from commit 190b6eafb3)
2024-03-07 14:18:41 +00:00
Sean Bright 0aa4dbcae7 res_pjsip: Use consistent type for boolean columns.
This migrates the relevant schema objects from the `('yes', 'no')`
definition to the `('0', '1', 'off', 'on', 'false', 'true', 'yes', 'no')`
one.

Fixes #617

(cherry picked from commit 1a94502551)
2024-03-07 14:18:41 +00:00
George Joseph 0fe641503a .github: Remove timeout-minutes from gatetests
(cherry picked from commit 94176ecb88)
2024-03-07 14:18:41 +00:00
George Joseph c085753c2e attestation_config.c: Use ast_free instead of ast_std_free
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
(cherry picked from commit 1b94c90524)
2024-03-07 14:18:41 +00:00
George Joseph 82df7454dc Makefile: Add stir_shaken/cache to directories created on install
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
(cherry picked from commit 215424aa76)
2024-03-07 14:18:41 +00:00
George Joseph ddc6cc5465 .github: Pass only single GATETEST_COMMAND to AsteriskGateComposite
(cherry picked from commit d58ca20247)
2024-03-07 14:18:41 +00:00
George Joseph d7e262226f Stir/Shaken Refactor
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: #351
Resolves: #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.

(cherry picked from commit 2e0d837e01)
2024-03-07 14:18:41 +00:00
Sebastian Jennen 91df8b031c translate.c: implement new direct comp table mode
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
(cherry picked from commit 3c72bc8a7b)
2024-03-07 14:18:41 +00:00
Shyju Kanaprath c33cdfd49e README.md: Removed outdated link
Removed outdated link http://www.quicknet.net from README.md

cherry-pick-to: 18
cherry-pick-to: 20
cherry-pick-to: 21
(cherry picked from commit 07055dce94)
2024-03-07 14:18:41 +00:00
Sean Bright 419feb11bd strings.h: Ensure ast_str_buffer(…) returns a 0 terminated string.
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.

(cherry picked from commit 31ab82840b)
2024-03-07 14:18:41 +00:00
George Joseph 1daec58db8 .github: Add force_cherry_pick option to Releaser
(cherry picked from commit 2d1a4bab25)
2024-03-07 14:18:41 +00:00
George Joseph 53931fac06 .github: Remove start_version from Releaser
(cherry picked from commit 4077b4b340)
2024-03-07 14:18:41 +00:00
romryz e95611216f res_rtp_asterisk.c: Correct coefficient in MOS calculation.
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
(cherry picked from commit a7a03bc294)
2024-03-07 14:18:41 +00:00
Naveen Albert 31cb02dc01 dsp.c: Fix and improve potentially inaccurate log message.
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
(cherry picked from commit 6ddcdfce1f)
2024-03-07 14:18:41 +00:00
George Joseph 3ca2bb5e84 pjsip show channelstats: Prevent possible segfault when faxing
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
(cherry picked from commit adcfbcd50e)
2024-03-07 14:18:41 +00:00
George Joseph f72d97b7b1 Reduce startup/shutdown verbose logging
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
(cherry picked from commit a5ae546b88)
2024-03-07 14:18:41 +00:00
Naveen Albert 52a80f974b configure: Rerun bootstrap on modern platform.
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
(cherry picked from commit d0d09ef010)
2024-03-07 14:18:40 +00:00
Ben Ford f7d37df114 Upgrade bundled pjproject to 2.14.
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

(cherry picked from commit 6efa51f512)
2024-03-07 14:18:40 +00:00
Flole998 096243745c res_pjsip_outbound_registration.c: Add User-Agent header override
This introduces a setting for outbound registrations to override the
global User-Agent header setting.

Resolves: #515

UserNote: PJSIP outbound registrations now support a per-registration
User-Agent header

(cherry picked from commit c7fc6ae362)
2024-03-07 14:18:40 +00:00
cmaj 1377ac9e89 app_speech_utils.c: Allow partial speech results.
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.

(cherry picked from commit c863e0d77d)
2024-03-07 14:18:40 +00:00
Joshua C. Colp 731fddd5d0 utils: Make behavior of ast_strsep* match strsep.
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
(cherry picked from commit 8ce69eda14)
2024-03-07 14:18:40 +00:00
Mike Bradeen b510d681a1 app_chanspy: Add 'D' option for dual-channel audio
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.

(cherry picked from commit 69fe814813)
2024-03-07 14:18:40 +00:00
George Joseph 5c12fda94e .github: Update github-script to v7 and fix a rest bug
Need to update the github-script to v7 to squash deprecation
warnings.

Also fixed the API name for github.rest.pulls.requestReviewers.

(cherry picked from commit 9baf49497e)
2024-03-07 14:18:40 +00:00
Naveen Albert 5e0f1bb5d2 app_if: Fix next priority calculation.
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
(cherry picked from commit ed39406838)
2024-03-07 14:18:40 +00:00
Sean Bright 36184820bd res_pjsip_t38.c: Permit IPv6 SDP connection addresses.
The existing code prevented IPv6 addresses from being properly parsed.

Fixes #558

(cherry picked from commit 841cd1480c)
2024-03-07 14:18:40 +00:00
Brad Smith 14f84cc202 BuildSystem: Bump autotools versions on OpenBSD.
Bump up to the more commonly used and modern versions of
autoconf and automake.

(cherry picked from commit 9deb4c679e)
2024-03-07 14:18:40 +00:00
Brad Smith 30d05081d7 main/utils: Simplify the FreeBSD ast_get_tid() handling
FreeBSD has had kernel threads for 20+ years.

(cherry picked from commit ec2c10689f)
2024-03-07 14:18:40 +00:00
Sean Bright 2ec0b83e5b res_pjsip_session.c: Correctly format SDP connection addresses.
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

(cherry picked from commit 9f20b4659f)
2024-03-07 14:18:40 +00:00
Sean Bright 3b74538fcf rtp_engine.c: Correct sample rate typo for L16/44100.
Fixes #555

(cherry picked from commit 671b47cfda)
2024-03-07 14:18:40 +00:00
Naveen Albert dd90d4536f manager.c: Fix erroneous reloads in UpdateConfig.
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
(cherry picked from commit 874ee6e9aa)
2024-03-07 14:18:40 +00:00
Naveen Albert e65c8cede5 res_calendar_icalendar: Print iCalendar error on parsing failure.
If libical fails to parse a calendar, print the error message it provdes.

Resolves: #492
(cherry picked from commit ef891529fa)
2024-03-07 14:18:40 +00:00
Sean Bright dbcd737302 app_confbridge: Don't emit warnings on valid configurations.
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

(cherry picked from commit 03ad690276)
2024-03-07 14:18:40 +00:00
Mike Bradeen ab1a9fa7d1 app_voicemail_odbc: remove macrocontext from voicemail_messages table
When app_macro was deprecated, the macrocontext column was removed from
the INSERT statement but the binds were not renumbered. This broke the
insert.

This change removes the macrocontext column via alembic and re-numbers
the existing columns in the INSERT.

Fixes: #527

UserNote: The fix requires removing the macrocontext column from the
voicemail_messages table in the voicemail database via alembic upgrade.

UpgradeNote: The fix requires that the voicemail database be upgraded via
alembic. Upgrading to the latest voicemail database via alembic will
remove the macrocontext column from the voicemail_messages table.

(cherry picked from commit a22db8fd60)
2024-03-07 14:18:40 +00:00
Naveen Albert 76d33df366 chan_dahdi: Allow MWI to be manually toggled on channels.
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
(cherry picked from commit 4b908f364d)
2024-03-07 14:18:40 +00:00
PeterHolik 727a4cceec chan_rtp.c: MulticastRTP missing refcount without codec option
Fixes: #529
(cherry picked from commit 3b46872a8f)
2024-03-07 14:18:40 +00:00
PeterHolik 8a999b6706 chan_rtp.c: Change MulticastRTP nameing to avoid memory leak
Fixes: asterisk#536
(cherry picked from commit 6fe045fd64)
2024-03-07 14:18:40 +00:00
Naveen Albert 947ba375d7 func_frame_trace: Add CLI command to dump frame queue.
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
(cherry picked from commit 67088b256d)
2024-03-07 14:18:40 +00:00
Asterisk Development Team 2dccaa4830 Update for 21.1.0 2024-01-25 16:23:00 +00:00
Asterisk Development Team 2310df0ff6 Update for 21.1.0-rc2 2024-01-18 16:48:17 +00:00
Naveen Albert e735ab8cfb logger: Fix linking regression.
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
2024-01-17 14:55:27 -07:00
Asterisk Development Team 6b8dd72f50 Update for 21.1.0-rc1 2024-01-12 18:32:27 +00:00
George Joseph 077a1b171c Revert "core & res_pjsip: Improve topology change handling."
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
(cherry picked from commit c31cd32b82)
2024-01-12 18:32:14 +00:00
Naveen Albert 625826afd4 menuselect: Use more specific error message.
Instead of using the same error message for
missing dependencies and conflicts, be specific
about what actually went wrong.

Resolves: #520
(cherry picked from commit 7683259f37)
2024-01-12 18:32:14 +00:00
Maximilian Fridrich b7701ba973 res_pjsip_nat: Fix potential use of uninitialized transport details
The ast_sip_request_transport_details must be zero initialized,
otherwise this could lead to a SEGV.

Resolves: #509
(cherry picked from commit 81188ada5f)
2024-01-12 18:32:13 +00:00
Naveen Albert c148203225 app_if: Fix faulty EndIf branching.
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
(cherry picked from commit 1bf4493371)
2024-01-12 18:32:13 +00:00
Naveen Albert ba4a8de400 manager.c: Fix regression due to using wrong free function.
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
(cherry picked from commit bb364fc61f)
2024-01-12 18:32:13 +00:00
George Joseph c0843b907a doc: Remove obsolete CHANGES-staging and UPGRADE-staging directories
These should have been deleted after the release of 21.0.0
but were missed.

(cherry picked from commit df958a7d63)
2024-01-12 18:32:13 +00:00
Naveen Albert ce29be5536 config_options.c: Fix truncation of option descriptions.
This increases the format width of option descriptions
to avoid needless truncation for longer descriptions.

Resolves: #428
(cherry picked from commit d20c3e2f6f)
2024-01-12 18:32:13 +00:00
Naveen Albert 6c33bf874d manager.c: Improve clarity of "manager show connected".
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

(cherry picked from commit 09bd80c627)
2024-01-12 18:32:13 +00:00
Sean Bright d5fc671ae4 make_xml_documentation: Really collect LOCAL_MOD_SUBDIRS documentation.
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.

(cherry picked from commit e001a1b6d3)
2024-01-12 18:32:13 +00:00
Naveen Albert f485d3cc8b general: Fix broken links.
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
(cherry picked from commit 3bb34477d4)
2024-01-12 18:32:13 +00:00
George Joseph 0fd8f9ca88 MergeApproved.yml: Remove unneeded concurrency
The concurrency parameter on the MergeAndCherryPick job has
been rmeoved.  It was a hold-over from earlier days.

(cherry picked from commit 751f8649fd)
2024-01-12 18:32:13 +00:00
Maximilian Fridrich b3cff31e1a app_dial: Add option "j" to preserve initial stream topology of caller
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.

(cherry picked from commit 366dc1e99f)
2024-01-12 18:32:13 +00:00
Sean Bright 0f5d624740 pbx_config.c: Don't crash when unloading module.
`pbx_config` subscribes to manager events to capture the `FullyBooted`
event but fails to unsubscribe if the module is loaded after that
event fires. If the module is unloaded, a crash occurs the next time a
manager event is raised.

We now unsubscribe when the module is unloaded if we haven't already
unsubscribed.

Fixes #470

(cherry picked from commit 16a42b2aec)
2024-01-12 18:32:13 +00:00
George Joseph b10a8aa212 ast_coredumper: Increase reliability
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
(cherry picked from commit aec2453688)
2024-01-12 18:32:13 +00:00
Sean Bright b9a9e1e742 logger.c: Move LOG_GROUP documentation to dedicated XML file.
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.

(cherry picked from commit 1d05e34d98)
2024-01-12 18:32:13 +00:00
Matthew Fredrickson dd79040125 res_odbc.c: Allow concurrent access to request odbc connections
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
(cherry picked from commit e0bf65bde6)
2024-01-12 18:32:13 +00:00
Sean Bright fb289b0bad res_pjsip_header_funcs.c: Check URI parameter length before copying.
Fixes #477

(cherry picked from commit 002d6c2108)
2024-01-12 18:32:13 +00:00
Sean Bright 1c617f9b01 config.c: Log #exec include failures.
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

(cherry picked from commit b437cc3267)
2024-01-12 18:32:13 +00:00
Sean Bright 8087a4ef2c make_xml_documentation: Properly handle absolute LOCAL_MOD_SUBDIRS.
If LOCAL_MOD_SUBDIRS contains absolute paths, do not prefix them with
the path to Asterisk's source tree.

Fixes #142

(cherry picked from commit 5f0b568341)
2024-01-12 18:32:13 +00:00
Sean Bright 77e8011291 app_voicemail.c: Completely resequence mailbox folders.
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

(cherry picked from commit fbe92dce2b)
2024-01-12 18:32:13 +00:00
Naveen Albert 4e774da45a sig_analog: Fix channel leak when mwimonitor is enabled.
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
(cherry picked from commit c930230a73)
2024-01-12 18:32:13 +00:00
Sean Bright 72d631b7bd res_rtp_asterisk.c: Update for OpenSSL 3+.
In 5ac5c2b0 we defined `OPENSSL_SUPPRESS_DEPRECATED` to silence
deprecation warnings. This commit switches over to using
non-deprecated API.

(cherry picked from commit 05924e30f9)
2024-01-12 18:32:13 +00:00
Sean Bright 9831c65f38 alembic: Update list of TLS methods available on ps_transports.
Related to #221 and #222.

Also adds `*.ini` to the `.gitignore` file in ast-db-manage for
convenience.

(cherry picked from commit c7838a352a)
2024-01-12 18:32:13 +00:00
Naveen Albert bef9a9422d func_channel: Expose previously unsettable options.
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
(cherry picked from commit 9211fb5e97)
2024-01-12 18:32:13 +00:00
Sean Bright 0620c14eb6 app.c: Allow ampersands in playback lists to be escaped.
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`.

(cherry picked from commit 33213c1979)
2024-01-12 18:32:13 +00:00
Sean Bright 6a75f22858 uri.c: Simplify ast_uri_make_host_with_port()
(cherry picked from commit e2e18b366c)
2024-01-12 18:32:13 +00:00
Sean Bright 1eeca01d89 func_curl.c: Remove CURLOPT() plaintext documentation.
I assume this was missed when initially converting to XML
documentation and we've been kicking the can down the road since.

(cherry picked from commit d3c411cd05)
2024-01-12 18:32:13 +00:00
Sean Bright a44fde08dd res_http_websocket.c: Set hostname on client for certificate validation.
Additionally add a `assert()` to in the TLS client setup code to
ensure that hostname is set when it is supposed to be.

Fixes #433

(cherry picked from commit 40a9f5a88c)
2024-01-12 18:32:13 +00:00
Sean Bright 6142e38125 live_ast: Add astcachedir to generated asterisk.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.

(cherry picked from commit 1e426b6f1c)
2024-01-12 18:32:13 +00:00
George Joseph b783ba6b13 SECURITY.md: Update with correct documentation URL
(cherry picked from commit 6ffb295c69)
2024-01-12 18:32:13 +00:00
Naveen Albert 138f6f4b92 func_lock: Add missing see-also refs to documentation.
Resolves: #423
(cherry picked from commit 3be75073a9)
2024-01-12 18:32:13 +00:00
Matthew Fredrickson 8c71aefa04 app_followme.c: Grab reference on nativeformats before using it
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
(cherry picked from commit b5c31b55c9)
2024-01-12 18:32:13 +00:00
Naveen Albert 04764945cf configs: Improve documentation for bandwidth in iax.conf.
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
(cherry picked from commit 582c4645f3)
2024-01-12 18:32:13 +00:00
Naveen Albert dce2fb6996 logger: Add channel-based filtering.
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.

(cherry picked from commit a6439d3723)
2024-01-12 18:32:13 +00:00
Sean Bright a694931478 chan_iax2.c: Don't send unsanitized data to the logger.
This resolves an issue where non-printable characters could be sent to
the console/log files.

(cherry picked from commit da4e6e7ddb)
2024-01-12 18:32:13 +00:00
George Joseph 45c224f9d7 codec_ilbc: Disable system ilbc if version >= 3.0.0
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
(cherry picked from commit 5a770ad13f)
2024-01-12 18:32:13 +00:00
Sean Bright 157e66de0e resource_channels.c: Explicit codec request when creating UnicastRTP.
Fixes #394

(cherry picked from commit 64603c4807)
2024-01-12 18:32:13 +00:00
Sean Bright cbf1226829 doc: Update IP Quality of Service links.
Fixes #328

(cherry picked from commit e4eeda6502)
2024-01-12 18:32:13 +00:00
George Joseph c40496cb38 chan_pjsip: Add PJSIPHangup dialplan app and manager action
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.

(cherry picked from commit af7e89ebf8)
2024-01-12 18:32:13 +00:00
Sean Bright cd39daaed1 chan_iax2.c: Ensure all IEs are displayed when dumping frame contents.
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.

(cherry picked from commit 19507ae160)
2024-01-12 18:32:13 +00:00
Naveen Albert 27f3df7139 chan_dahdi: Warn if nonexistent cadence is requested.
If attempting to ring a channel using a nonexistent cadence,
emit a warning, before falling back to the default cadence.

Resolves: #409
(cherry picked from commit cdcdca5199)
2024-01-12 18:32:13 +00:00
Holger Hans Peter Freyther 35281dac6a stasis: Update the snapshot after setting the redirect
The previous commit added the caller_rdnis attribute. Make it
avialble during a possible ChanngelHangupRequest.

(cherry picked from commit 9fd2655d5a)
2024-01-12 18:32:13 +00:00
Holger Hans Peter Freyther 4053abc214 ari: Provide the caller ID RDNIS for the channels
Provide the caller ID RDNIS when available. This will allow an
application to follow the redirect.

(cherry picked from commit da0b1ac1c1)
2024-01-12 18:32:13 +00:00
Brad Smith 5fa3c03738 main/utils: Implement ast_get_tid() for OpenBSD
Implement the ast_get_tid() function for OpenBSD. OpenBSD supports
getting the TID via getthrid().

(cherry picked from commit 29a3e5660b)
2024-01-12 18:32:13 +00:00
Brad Smith 3949358ee1 res_rtp_asterisk.c: Fix runtime issue with LibreSSL
The module will fail to load. Use proper function DTLS_method() with LibreSSL.

(cherry picked from commit 1d9c5faeb3)
2024-01-12 18:32:13 +00:00
Naveen Albert 0f33423107 app_directory: Add ADSI support to Directory.
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
(cherry picked from commit 4a356e984c)
2024-01-12 18:32:13 +00:00
Naveen Albert f6e0478bf4 core_local: Fix local channel parsing with slashes.
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
(cherry picked from commit 65f83311b7)
2024-01-12 18:32:13 +00:00
Mark Murawski 7ea2c5926b Remove files that are no longer updated
Fixes: #360
(cherry picked from commit 6ebd820e26)
2024-01-12 18:32:13 +00:00
Naveen Albert 8ad6e6e585 app_voicemail: Add AMI event for mailbox PIN changes.
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
(cherry picked from commit 95bc661542)
2024-01-12 18:32:13 +00:00
Sean Bright 4feaf8a880 app_queue.c: Emit unpause reason with PauseQueueMember event.
Fixes #395

(cherry picked from commit baf3ce25f5)
2024-01-12 18:32:13 +00:00
George Joseph 1972df7b09 bridge_simple: Suppress unchanged topology change requests
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
(cherry picked from commit 57d31d97dc)
2024-01-12 18:32:12 +00:00
Naveen Albert 1a95cd932b res_pjsip: Include cipher limit in config error message.
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
(cherry picked from commit d4185ca025)
2024-01-12 18:32:12 +00:00
Mike Bradeen c28302f839 res_speech: allow speech to translate input channel
* 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.

(cherry picked from commit e8fbdca40b)
2024-01-12 18:32:12 +00:00
Sean Bright 81386086be res_rtp_asterisk.c: Fix memory leak in ephemeral certificate creation.
Fixes #386

(cherry picked from commit 74a5c452de)
2024-01-12 18:32:12 +00:00
Sean Bright 7f3a5b2be0 res_pjsip_dtmf_info.c: Add 'INFO' to Allow header.
Fixes #376

(cherry picked from commit 3af55f14fa)
2024-01-12 18:32:12 +00:00
George Joseph e571b7c4dd api.wiki.mustache: Fix indentation in generated markdown
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.

(cherry picked from commit 443f94b438)
2024-01-12 18:32:12 +00:00
Sean Bright b614397206 pjsip_configuration.c: Disable DTLS renegotiation if WebRTC is enabled.
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.

(cherry picked from commit c7afd5357c)
2024-01-12 18:32:12 +00:00
Samuel Olaechea 3139269b33 configs: Fix typo in pjsip.conf.sample.
(cherry picked from commit 4c507d31b9)
2024-01-12 18:32:12 +00:00
George Joseph 785cc25519 res_pjsip_exten_state,res_pjsip_mwi: Allow unload on shutdown
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
(cherry picked from commit b9ee664440)
2024-01-12 18:32:12 +00:00
sungtae kim 39c2f5733e res_pjsip: Expanding PJSIP endpoint ID and relevant resource length to 255 characters
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.

(cherry picked from commit 9b70b18dec)
2024-01-12 18:32:12 +00:00
George Joseph 56d568d1d5 .github: PRSubmitActions: Fix adding reviewers to PR
(cherry picked from commit 79c5845141)
2024-01-12 18:32:12 +00:00
George Joseph b404679de0 .github: New PR Submit workflows
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.

(cherry picked from commit 6389654b21)
2024-01-12 18:32:12 +00:00
George Joseph b01a9f59b5 .github: New PR Submit workflows
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.

(cherry picked from commit d06bb7f2fe)
2024-01-12 18:32:12 +00:00
Mike Bradeen 054ec2bf4a res_stasis: signal when new command is queued
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.

(cherry picked from commit 7ea0e3bfda)
2024-01-12 18:32:12 +00:00
Holger Hans Peter Freyther 849cf31e51 ari/stasis: Indicate progress before playback on a bridge
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.

(cherry picked from commit 624c7ac883)
2024-01-12 18:32:12 +00:00
Sean Bright 421924e07c func_curl.c: Ensure channel is locked when manipulating datastores.
(cherry picked from commit 8c1491dda9)
2024-01-12 18:32:12 +00:00
George Joseph 6a60ce8eae .github: Fix job prereqs in PROpenedUpdated
(cherry picked from commit 9e9037a8aa)
2024-01-12 18:32:12 +00:00
George Joseph f3561210c2 .github: Block PR tests until approved
(cherry picked from commit 29e202085d)
2024-01-12 18:32:12 +00:00
George Joseph a2d71fce2a .github: Use generic releaser
(cherry picked from commit ceddfbe7b8)
2024-01-12 18:32:12 +00:00
George Joseph 02b84fa88c logger.h: Add ability to change the prefix on SCOPE_TRACE output
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.

(cherry picked from commit f599114ee3)
2024-01-12 18:32:12 +00:00
George Joseph cfc6832062 Add libjwt to third-party
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
(cherry picked from commit d7a6116681)
2024-01-12 18:32:12 +00:00
Mike Bradeen 893483f915 res_pjsip: update qualify_timeout documentation with DNS note
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
(cherry picked from commit 323a51fd6c)
2024-01-12 18:32:12 +00:00
Naveen Albert c58d5e9190 chan_dahdi: Clarify scope of callgroup/pickupgroup.
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
(cherry picked from commit 5b89e40541)
2024-01-12 18:32:12 +00:00
Bastian Triller 903c594cef func_json: Fix crashes for some types
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.

(cherry picked from commit 1cbbf36929)
2024-01-12 18:32:12 +00:00
Mike Bradeen 779fb2052a res_speech_aeap: add aeap error handling
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
(cherry picked from commit e921f5e010)
2024-01-12 18:32:12 +00:00
Naveen Albert a11885989c app_voicemail: Disable ADSI if unavailable.
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
(cherry picked from commit 75620616f4)
2024-01-12 18:32:12 +00:00
Eduardo d8238d0e15 codec_builtin: Use multiples of 20 for maximum_ms
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
(cherry picked from commit ca1ed84820)
2024-01-12 18:32:12 +00:00
George Joseph 75bb76528a lock.c: Separate DETECT_DEADLOCKS from DEBUG_THREADS
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.

(cherry picked from commit e1050b4add)
2024-01-12 18:32:12 +00:00
George Joseph fe1bca6a72 asterisk.c: Use the euid's home directory to read/write cli history
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
(cherry picked from commit fc516f5781)
2024-01-12 18:32:12 +00:00
Tinet-mucw aadf9d920a res_pjsip_transport_websocket: Prevent transport from being destroyed before message finishes.
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
(cherry picked from commit a38add11e6)
2024-01-12 18:32:12 +00:00
Mike Bradeen f9efc9c681 cel: add publish user event helper
Add a wrapper function around ast_cel_publish_event that
packs event and extras into a blob before publishing

Resolves:#330
(cherry picked from commit 4592f97c36)
2024-01-12 18:32:12 +00:00
Naveen Albert d01b047de3 chan_console: Fix deadlock caused by unclean thread exit.
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
(cherry picked from commit 3b027d1e47)
2024-01-12 18:32:12 +00:00
George Joseph dadbaed6f5 file.c: Add ability to search custom dir for sounds
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.

(cherry picked from commit 0e0f99db1d)
2024-01-12 18:32:12 +00:00
Naveen Albert 69338381ea chan_iax2: Improve authentication debugging.
Improves and adds some logging to make it easier
for users to debug authentication issues.

Resolves: #286
(cherry picked from commit f93138bcad)
2024-01-12 18:32:12 +00:00
Vitezslav Novy e1231fa4ac res_rtp_asterisk: fix wrong counter management in ioqueue objects
In function  rtp_ioqueue_thread_remove counter in ioqueue object is not decreased
which prevents unused ICE TURN threads from being removed.

Resolves: #301
(cherry picked from commit 56244a7371)
2024-01-12 18:32:12 +00:00
George Joseph 58c8d60f4b res_pjsip_pubsub: Add body_type to test_handler for unit tests
The ast_sip_subscription_handler "test_handler" used for the unit
tests didn't set "body_type" so the NULL value was causing
a SEGV in build_subscription_tree().  It's now set to "".

Resolves: #335
(cherry picked from commit 71d75373f9)
2024-01-12 18:32:12 +00:00
George Joseph e2c3fd8d41 make_buildopts_h, et. al. Allow adding all cflags to buildopts.h
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.

(cherry picked from commit 42f82d55b0)
2024-01-12 18:32:12 +00:00
Mike Bradeen 4799c0eda3 func_periodic_hook: Add hangup step to avoid timeout
func_periodic_hook does not hangup after playback, relying on hangup
which keeps the channel alive longer than necessary.

Resolves: #325
(cherry picked from commit 2265eafb3a)
2024-01-12 18:32:12 +00:00
Sean Bright fd7a35fad8 res_stasis_recording.c: Save recording state when unmuted.
Fixes #322

(cherry picked from commit b952a8c38d)
2024-01-12 18:32:12 +00:00
Mike Bradeen 2fb8dbc679 res_speech_aeap: check for null format on response
* Fixed issue in res_speech_aeap when unable to provide an
  input format to check against.

(cherry picked from commit 3759d034cc)
2024-01-12 18:32:12 +00:00
George Joseph e4edc9c75d func_periodic_hook: Don't truncate channel name
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
(cherry picked from commit cff637a24f)
2024-01-12 18:32:12 +00:00
George Joseph 569dc4fb43 safe_asterisk: Change directory permissions to 755
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
(cherry picked from commit 6bd9f9ae81)
2024-01-12 18:32:12 +00:00
Maximilian Fridrich 3829c94d71 chan_rtp: Implement RTP glue for UnicastRTP channels
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.

(cherry picked from commit 1af2ae177c)
2024-01-12 18:32:12 +00:00
Jaco Kroon 9eeee41fc5 app_queue: periodic announcement configurable start time.
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>
(cherry picked from commit 130c3ab792)
2024-01-12 18:32:12 +00:00
Joshua C. Colp 73179928e6 variables: Add additional variable dialplan functions.
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.

(cherry picked from commit 182ad6926b)
2024-01-12 18:32:12 +00:00
George Joseph 2f5dc8985a Restore CHANGES and UPGRADE.txt to allow cherry-picks to work 2024-01-12 11:08:07 -07:00
Asterisk Development Team 71ddb39bd9 Update for 21.0.2 2023-12-20 16:27:02 +00:00
George Joseph a49bb17dbb res_rtp_asterisk: Fix regression issues with DTLS client check
* 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: #500
Resolves: #503
Resolves: #505
2023-12-20 08:47:02 -07:00
Asterisk Development Team beba569755 Update for 21.0.1 2023-12-14 20:03:39 +00:00
Gitea b9594cc08a res_pjsip_header_funcs: Duplicate new header value, don't copy.
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.
2023-12-14 12:02:12 -07:00
Mike Bradeen 8043d060e3 res_pjsip: disable raw bad packet logging
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.
2023-12-14 12:01:55 -07:00
George Joseph be5e9c568d res_rtp_asterisk.c: Check DTLS packets against ICE candidate list
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
2023-12-14 12:01:47 -07:00
Ben Ford 1c4d6d3af1 manager.c: Prevent path traversal with GetConfig.
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.
2023-12-14 12:01:35 -07:00
Asterisk Development Team 12da95e53f Update for 21.0.0 2023-10-18 17:14:20 +00:00
Asterisk Development Team f53f391889 Update for 21.0.0-rc1 2023-09-06 18:21:42 +00:00
George Joseph bbbc9a8540 ari-stubs: Fix more local anchor references
Also allow CreateDocs job to be run manually with default branches.

(cherry picked from commit c457784bd0)
2023-09-06 18:21:31 +00:00
George Joseph a0fc6c3ab0 ari-stubs: Fix more local anchor references
Also allow CreateDocs job to be run manually with default branches.

(cherry picked from commit b68006f3a1)
2023-09-06 18:21:31 +00:00
George Joseph 1108db21ef ari-stubs: Fix broken documentation anchors
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.

(cherry picked from commit c4508accc6)
2023-09-06 18:21:31 +00:00
Bastian Triller 28320a9cd8 res_pjsip_session: Send Session Interval too small response
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.

(cherry picked from commit 9284dca636)
2023-09-06 18:21:31 +00:00
George Joseph 4b11eb23c8 .github: Update workflow-application-token-action to v2
(cherry picked from commit 83964ede1f)
2023-09-06 18:21:31 +00:00
Naveen Albert 3b7a0d617f app_dial: Fix infinite loop when sending digits.
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
(cherry picked from commit c032d38d3f)
2023-09-06 18:21:31 +00:00
Mike Bradeen 5f7c8e75fd app_voicemail: Fix for loop declarations
Resolve for loop initial declarations added in cli changes.

Resolves: #275
(cherry picked from commit e9b269692f)
2023-09-06 18:21:31 +00:00
George Joseph c4e2c00553 alembic: Fix quoting of the 100rel column
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
(cherry picked from commit f8438714ca)
2023-09-06 18:21:31 +00:00
Naveen Albert d29a7c19d0 pbx.c: Fix gcc 12 compiler warning.
Resolves: #277
(cherry picked from commit 9e6266e008)
2023-09-06 18:21:31 +00:00
zhengsh d15a5c547f app_audiosocket: Fixed timeout with -1 to avoid busy loop.
Resolves: asterisk#234
(cherry picked from commit eab40e755e)
2023-09-06 18:21:30 +00:00
George Joseph 62e5a2720a download_externals: Fix a few version related issues
* 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
(cherry picked from commit 644ad2f9cd)
2023-09-06 18:21:30 +00:00
Maximilian Fridrich 9cb77904e0 main/refer.c: Fix double free in refer_data_destructor + potential leak
Resolves: #267
(cherry picked from commit 48e6a482c2)
2023-09-06 18:21:30 +00:00
Naveen Albert e2f0538dea sig_analog: Add Called Subscriber Held capability.
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.

(cherry picked from commit cd0bfe193f)
2023-09-06 18:21:30 +00:00
Matthew Fredrickson 64f76bdc60 Revert "app_stack: Print proper exit location for PBXless channels."
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
(cherry picked from commit 1d7ae8d227)
2023-09-06 18:21:30 +00:00
Jason D. McCormick 41e4673eb0 install_prereq: Fix dependency install on aarch64.
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
(cherry picked from commit 2f02095da8)
2023-09-06 18:21:30 +00:00
MikeNaso 59618c3a34 res_pjsip.c: Set contact_user on incoming call local Contact header
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
(cherry picked from commit 720813dc97)
2023-09-06 18:21:30 +00:00
Sean Bright 7e8aadae5a extconfig: Allow explicit DB result set ordering to be disabled.
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
(cherry picked from commit 1171beb7e4)
2023-09-06 18:21:30 +00:00
George Joseph f287e8fce4 rest-api: Run make ari-stubs
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.

(cherry picked from commit 21b0522abd)
2023-09-06 18:21:30 +00:00
Naveen Albert c011914f70 res_pjsip_header_funcs: Make prefix argument optional.
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.

(cherry picked from commit 2179082eaf)
2023-09-06 18:21:30 +00:00
George Joseph e37cfa85bb pjproject_bundled: Increase PJSIP_MAX_MODULE to 38
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
(cherry picked from commit d3ee0e6516)
2023-09-06 18:21:30 +00:00
Joshua C. Colp f549da4cf2 manager: Tolerate stasis messages with no channel snapshot.
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.

(cherry picked from commit a75035be55)
2023-09-06 18:21:30 +00:00
George Joseph f7ea380b04 Remove unneeded CHANGES and UPGRADE files
(cherry picked from commit ea7e719d71)
2023-09-06 18:21:30 +00:00
George Joseph 68349125a8 Update version for Asterisk 21 2023-08-09 18:58:48 +00:00
34 changed files with 16792 additions and 1930 deletions

View File

@ -77,7 +77,7 @@ body:
- type: markdown
attributes:
value: |
[Asterisk Issue Guidelines](https://docs.asterisk.org/Asterisk-Community/Asterisk-Issue-Guidelines/)
[Asterisk Issue Guidelines](https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines)
- type: checkboxes
id: guidelines
attributes:

View File

@ -1,8 +1,7 @@
name: NightlyAdmin
name: Nightly Admin
on:
schedule:
- cron: '30 1 * * *'
workflow_dispatch:
env:
ASTERISK_REPO: ${{ github.repository }}
@ -14,6 +13,16 @@ env:
jobs:
CloseStaleIssues:
uses: asterisk/asterisk-ci-actions/.github/workflows/CloseStaleIssuesAndPRs.yml@main
secrets:
ASTERISKTEAM_PAT: ${{ secrets.ASTERISKTEAM_PAT }}
runs-on: ubuntu-latest
steps:
- name: Close Stale Issues
uses: actions/stale@v7
with:
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.'
days-before-stale: 7
days-before-close: 14
days-before-pr-close: -1
only-labels: triage,feedback-required

View File

@ -123,9 +123,8 @@ jobs:
REVIEWERS: ${{vars.PR_REVIEWERS}}
with:
retries: 5
github-token: ${{ secrets.ASTERISKTEAM_PAT }}
script: |
let rs = JSON.parse(process.env.REVIEWERS.length ? process.env.REVIEWERS : '[]');
let rs = JSON.parse(process.env.REVIEWERS);
let users = [];
let teams = [];
for (const r of rs) {

1
.version Normal file
View File

@ -0,0 +1 @@
21.2.0

1
CHANGES.md Symbolic link
View File

@ -0,0 +1 @@
ChangeLogs/ChangeLog-21.2.0.md

View File

@ -0,0 +1,766 @@
Change Log for Release asterisk-21.0.0
========================================
Links:
----------------------------------------
- [Full ChangeLog](https://downloads.asterisk.org/pub/telephony/asterisk/releases/ChangeLog-21.0.0.md)
- [GitHub Diff](https://github.com/asterisk/asterisk/compare/21.0.0-pre1...21.0.0)
- [Tarball](https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-21.0.0.tar.gz)
- [Downloads](https://downloads.asterisk.org/pub/telephony/asterisk)
Summary:
----------------------------------------
- Update master branch for Asterisk 21
- translate.c: Prefer better codecs upon translate ties.
- chan_skinny: Remove deprecated module.
- app_osplookup: Remove deprecated module.
- chan_mgcp: Remove deprecated module.
- chan_alsa: Remove deprecated module.
- pbx_builtins: Remove deprecated and defunct functionality.
- chan_sip: Remove deprecated module.
- app_cdr: Remove deprecated application and option.
- app_macro: Remove deprecated module.
- res_monitor: Remove deprecated module.
- http.c: Minor simplification to HTTP status output.
- app_osplookup: Remove obsolete sample config.
- say.c: Fix French time playback. (#42)
- core: Cleanup gerrit and JIRA references. (#58)
- utils.h: Deprecate `ast_gethostbyname()`. (#79)
- res_pjsip_pubsub: Add new pubsub module capabilities. (#82)
- app_sla: Migrate SLA applications out of app_meetme.
- rest-api: Ran make ari stubs to fix resource_endpoints inconsistency
- .github: Update AsteriskReleaser for security releases
- users.conf: Deprecate users.conf configuration.
- Update version for Asterisk 21
- Remove unneeded CHANGES and UPGRADE files
- res_pjsip_pubsub: Add body_type to test_handler for unit tests
- ari-stubs: Fix more local anchor references
- ari-stubs: Fix more local anchor references
- ari-stubs: Fix broken documentation anchors
- res_pjsip_session: Send Session Interval too small response
- .github: Update workflow-application-token-action to v2
- app_dial: Fix infinite loop when sending digits.
- app_voicemail: Fix for loop declarations
- alembic: Fix quoting of the 100rel column
- pbx.c: Fix gcc 12 compiler warning.
- app_audiosocket: Fixed timeout with -1 to avoid busy loop.
- download_externals: Fix a few version related issues
- main/refer.c: Fix double free in refer_data_destructor + potential leak
- sig_analog: Add Called Subscriber Held capability.
- Revert "app_stack: Print proper exit location for PBXless channels."
- install_prereq: Fix dependency install on aarch64.
- res_pjsip.c: Set contact_user on incoming call local Contact header
- extconfig: Allow explicit DB result set ordering to be disabled.
- rest-api: Run make ari-stubs
- res_pjsip_header_funcs: Make prefix argument optional.
- pjproject_bundled: Increase PJSIP_MAX_MODULE to 38
- manager: Tolerate stasis messages with no channel snapshot.
- Remove unneeded CHANGES and UPGRADE files
User Notes:
----------------------------------------
- ### sig_analog: Add Called Subscriber Held capability.
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.
- ### res_pjsip_header_funcs: Make prefix argument optional.
The prefix argument to PJSIP_HEADERS is now
optional. If not specified, all header names will be
returned.
- ### http.c: Minor simplification to HTTP status output.
For bound addresses, the HTTP status page now combines the bound
address and bound port in a single line. Additionally, the SSL bind
address has been renamed to TLS.
Upgrade Notes:
----------------------------------------
- ### utils.h: Deprecate `ast_gethostbyname()`. (#79)
ast_gethostbyname() has been deprecated and will be removed
in Asterisk 23. New code should use `ast_sockaddr_resolve()` and
`ast_sockaddr_resolve_first_af()`.
- ### app_sla: Migrate SLA applications out of app_meetme.
The SLAStation and SLATrunk applications have been moved
from app_meetme to app_sla. If you are using these applications and have
autoload=no, you will need to explicitly load this module in modules.conf.
- ### users.conf: Deprecate users.conf configuration.
The users.conf config is now deprecated
and will be removed in a future version of Asterisk.
- ### res_monitor: Remove deprecated module.
This module was deprecated in Asterisk 16
and is now being removed in accordance with
the Asterisk Module Deprecation policy.
This also removes the 'w' and 'W' options
for app_queue.
MixMonitor should be default and only option
for all settings that previously used either
Monitor or MixMonitor.
- ### app_osplookup: Remove deprecated module.
This module was deprecated in Asterisk 19
and is now being removed in accordance with
the Asterisk Module Deprecation policy.
- ### app_cdr: Remove deprecated application and option.
The previously deprecated NoCDR application has been removed.
Additionally, the previously deprecated 'e' option to the ResetCDR
application has been removed.
- ### app_macro: Remove deprecated module.
This module was deprecated in Asterisk 16
and is now being removed in accordance with
the Asterisk Module Deprecation policy.
For most modules that interacted with app_macro,
this change is limited to no longer looking for
the current context from the macrocontext when set.
The following modules have additional impacts:
app_dial - no longer supports M^ connected/redirecting macro
app_minivm - samples written using macro will no longer work.
The sample needs to be re-written
app_queue - can no longer call a macro on the called party's
channel. Use gosub which is currently supported
ccss - no callback macro, gosub only
app_voicemail - no macro support
channel - remove macrocontext and priority, no connected
line or redirection macro options
options - stdexten is deprecated to gosub as the default
and only options
pbx - removed macrolock
pbx_dundi - no longer look for macro
snmp - removed macro context, exten, and priority
- ### translate.c: Prefer better codecs upon translate ties.
When setting up translation between two codecs the quality was not taken into account,
resulting in suboptimal translation. The quality is now taken into account,
which can reduce the number of translation steps required, and improve the resulting quality.
- ### chan_sip: Remove deprecated module.
This module was deprecated in Asterisk 17
and is now being removed in accordance with
the Asterisk Module Deprecation policy.
- ### chan_alsa: Remove deprecated module.
This module was deprecated in Asterisk 19
and is now being removed in accordance with
the Asterisk Module Deprecation policy.
- ### pbx_builtins: Remove deprecated and defunct functionality.
The previously deprecated ImportVar and SetAMAFlags
applications have now been removed.
- ### chan_mgcp: Remove deprecated module.
This module was deprecated in Asterisk 19
and is now being removed in accordance with
the Asterisk Module Deprecation policy.
- ### chan_skinny: Remove deprecated module.
This module was deprecated in Asterisk 19
and is now being removed in accordance with
the Asterisk Module Deprecation policy.
Closed Issues:
----------------------------------------
- #37: [Bug]: contrib/scripts/install_prereq tries to install armhf packages on aarch64 Debian platforms
- #39: [Bug]: Remove .gitreview from repository.
- #41: [Bug]: say.c Time announcement does not say o'clock for the French language
- #50: [improvement]: app_sla: Migrate SLA applications from app_meetme
- #78: [improvement]: Deprecate ast_gethostbyname()
- #81: [improvement]: Enhance and add additional PJSIP pubsub callbacks
- #179: [bug]: Queue strategy “Linear” with Asterisk 20 on Realtime
- #183: [deprecation]: Deprecate users.conf
- #226: [improvement]: Apply contact_user to incoming calls
- #230: [bug]: PJSIP_RESPONSE_HEADERS function documentation is misleading
- #240: [new-feature]: sig_analog: Add Called Subscriber Held capability
- #253: app_gosub patch appear to have broken predial handlers that utilize macros that call gosubs
- #255: [bug]: pjsip_endpt_register_module: Assertion "Too many modules registered"
- #263: [bug]: download_externals doesn't always handle versions correctly
- #267: [bug]: ari: refer with display_name key in request body leads to crash
- #274: [bug]: Syntax Error in SQL Code
- #275: [bug]:Asterisk make now requires ASTCFLAGS='-std=gnu99 -Wdeclaration-after-statement'
- #277: [bug]: pbx.c: Compiler error with gcc 12.2
- #281: [bug]: app_dial: Infinite loop if called channel hangs up while receiving digits
- #335: [bug]: res_pjsip_pubsub: The bad_event unit test causes a SEGV in build_resource_tree
Commits By Author:
----------------------------------------
- ### Asterisk Development Team (1):
- Update for 21.0.0-rc1
- ### Bastian Triller (1):
- res_pjsip_session: Send Session Interval too small response
- ### George Joseph (9):
- Remove unneeded CHANGES and UPGRADE files
- pjproject_bundled: Increase PJSIP_MAX_MODULE to 38
- rest-api: Run make ari-stubs
- download_externals: Fix a few version related issues
- alembic: Fix quoting of the 100rel column
- .github: Update workflow-application-token-action to v2
- ari-stubs: Fix broken documentation anchors
- ari-stubs: Fix more local anchor references
- ari-stubs: Fix more local anchor references
- ### Jason D. McCormick (1):
- install_prereq: Fix dependency install on aarch64.
- ### Joshua C. Colp (1):
- manager: Tolerate stasis messages with no channel snapshot.
- ### Matthew Fredrickson (1):
- Revert "app_stack: Print proper exit location for PBXless channels."
- ### Maximilian Fridrich (1):
- main/refer.c: Fix double free in refer_data_destructor + potential leak
- ### Mike Bradeen (1):
- app_voicemail: Fix for loop declarations
- ### MikeNaso (1):
- res_pjsip.c: Set contact_user on incoming call local Contact header
- ### Naveen Albert (4):
- res_pjsip_header_funcs: Make prefix argument optional.
- sig_analog: Add Called Subscriber Held capability.
- pbx.c: Fix gcc 12 compiler warning.
- app_dial: Fix infinite loop when sending digits.
- ### Sean Bright (1):
- extconfig: Allow explicit DB result set ordering to be disabled.
- ### zhengsh (1):
- app_audiosocket: Fixed timeout with -1 to avoid busy loop.
Detail:
----------------------------------------
- ### Update master branch for Asterisk 21
Author: George Joseph
Date: 2022-07-20
- ### translate.c: Prefer better codecs upon translate ties.
Author: Naveen Albert
Date: 2021-05-27
If multiple codecs are available for the same
resource and the translation costs between
multiple codecs are the same, ties are
currently broken arbitrarily, which means a
lower quality codec would be used. This forces
Asterisk to explicitly use the higher quality
codec, ceteris paribus.
ASTERISK-29455
- ### chan_skinny: Remove deprecated module.
Author: Mike Bradeen
Date: 2022-11-16
ASTERISK-30300
- ### app_osplookup: Remove deprecated module.
Author: Mike Bradeen
Date: 2022-11-18
ASTERISK-30302
- ### chan_mgcp: Remove deprecated module.
Author: Mike Bradeen
Date: 2022-11-15
Also removes res_pktcops to avoid merge conflicts
with ASTERISK~30301.
ASTERISK-30299
- ### chan_alsa: Remove deprecated module.
Author: Mike Bradeen
Date: 2022-11-14
ASTERISK-30298
- ### pbx_builtins: Remove deprecated and defunct functionality.
Author: Naveen Albert
Date: 2022-11-29
This removes the ImportVar and SetAMAFlags applications
which have been deprecated since Asterisk 12, but were
never removed previously.
Additionally, it removes remnants of defunct options
that themselves were removed years ago.
ASTERISK-30335 #close
- ### chan_sip: Remove deprecated module.
Author: Mike Bradeen
Date: 2022-11-28
ASTERISK-30297
- ### app_cdr: Remove deprecated application and option.
Author: Naveen Albert
Date: 2022-12-22
This removes the deprecated NoCDR application, which
was deprecated in Asterisk 12, having long been fully
superseded by the CDR_PROP function.
The deprecated e option to ResetCDR is also removed
for the same reason.
ASTERISK-30371 #close
- ### app_macro: Remove deprecated module.
Author: Mike Bradeen
Date: 2022-12-12
For most modules that interacted with app_macro, this change is limited
to no longer looking for the current context from the macrocontext when
set. Additionally, the following modules are impacted:
app_dial - no longer supports M^ connected/redirecting macro
app_minivm - samples written using macro will no longer work.
The sample needs a re-write
app_queue - can no longer a macro on the called party's channel.
Use gosub which is currently supported
ccss - no callback macro, gosub only
app_voicemail - no macro support
channel - remove macrocontext and priority, no connected line or
redirection macro options
options - stdexten is deprecated to gosub as the default and only
pbx - removed macrolock
pbx_dundi - no longer look for macro
snmp - removed macro context, exten, and priority
ASTERISK-30304
- ### res_monitor: Remove deprecated module.
Author: Mike Bradeen
Date: 2022-11-18
ASTERISK-30303
- ### http.c: Minor simplification to HTTP status output.
Author: Boris P. Korzun
Date: 2023-01-05
Change the HTTP status page (located at /httpstatus by default) by:
* Combining the address and port into a single line.
* Changing "SSL" to "TLS"
ASTERISK-30433 #close
- ### app_osplookup: Remove obsolete sample config.
Author: Naveen Albert
Date: 2023-02-24
ASTERISK_30302 previously removed app_osplookup,
but its sample config was not removed.
This removes it since nothing else uses it.
ASTERISK-30438 #close
- ### say.c: Fix French time playback. (#42)
Author: InterLinked1
Date: 2023-05-02
ast_waitstream was not called after ast_streamfile,
resulting in "o'clock" being skipped in French.
Additionally, the minute announcements should be
feminine.
Reported-by: Danny Lloyd
Resolves: #41
ASTERISK-30488
- ### core: Cleanup gerrit and JIRA references. (#58)
Author: Sean Bright
Date: 2023-05-03
* 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
- ### utils.h: Deprecate `ast_gethostbyname()`. (#79)
Author: Sean Bright
Date: 2023-05-11
Deprecate `ast_gethostbyname()` in favor of `ast_sockaddr_resolve()` and
`ast_sockaddr_resolve_first_af()`. `ast_gethostbyname()` has not been
used by any in-tree code since 2021.
This function will be removed entirely in Asterisk 23.
Resolves: #78
UpgradeNote: ast_gethostbyname() has been deprecated and will be removed
in Asterisk 23. New code should use `ast_sockaddr_resolve()` and
`ast_sockaddr_resolve_first_af()`.
- ### res_pjsip_pubsub: Add new pubsub module capabilities. (#82)
Author: InterLinked1
Date: 2023-05-18
The existing res_pjsip_pubsub APIs are somewhat limited in
what they can do. This adds a few API extensions that make
it possible for PJSIP pubsub modules to implement richer
features than is currently possible.
* Allow pubsub modules to get a handle to pjsip_rx_data on subscription
* Allow pubsub modules to run a callback when a subscription is renewed
* Allow pubsub modules to run a callback for outgoing NOTIFYs, with
a handle to the tdata, so that modules can append their own headers
to the NOTIFYs
This change does not add any features directly, but makes possible
several new features that will be added in future changes.
Resolves: #81
ASTERISK-30485 #close
Master-Only: True
- ### app_sla: Migrate SLA applications out of app_meetme.
Author: Naveen Albert
Date: 2023-05-02
This removes the dependency of the SLAStation and SLATrunk
applications on app_meetme, in anticipation of the imminent
removal of the deprecated app_meetme module.
The user interface for the SLA applications is exactly the
same, and in theory, users should not notice a difference.
However, the SLA applications now use ConfBridge under the
hood, rather than MeetMe, and they are now contained within
their own module.
Resolves: #50
ASTERISK-30309
UpgradeNote: The SLAStation and SLATrunk applications have been moved
from app_meetme to app_sla. If you are using these applications and have
autoload=no, you will need to explicitly load this module in modules.conf.
- ### rest-api: Ran make ari stubs to fix resource_endpoints inconsistency
Author: George Joseph
Date: 2023-06-27
- ### .github: Update AsteriskReleaser for security releases
Author: George Joseph
Date: 2023-07-07
- ### users.conf: Deprecate users.conf configuration.
Author: Naveen Albert
Date: 2023-06-30
This deprecates the users.conf config file, which
is no longer as widely supported but still integrated
with a number of different modules.
Because there is no real mechanism for marking a
configuration file as "deprecated", and users.conf
is not just used in a single place, this now emits
a warning to the user when the PBX loads to notify
about the deprecation.
This configuration mechanism has been widely criticized
and discouraged since its inception, and is no longer
relevant to the configuration that most users are doing
today. Removing it will allow for some simplification
and cleanup in the codebase.
Resolves: #183
UpgradeNote: The users.conf config is now deprecated
and will be removed in a future version of Asterisk.
- ### Update version for Asterisk 21
Author: George Joseph
Date: 2023-08-09
- ### Remove unneeded CHANGES and UPGRADE files
Author: George Joseph
Date: 2023-08-09
- ### res_pjsip_pubsub: Add body_type to test_handler for unit tests
Author: George Joseph
Date: 2023-09-15
The ast_sip_subscription_handler "test_handler" used for the unit
tests didn't set "body_type" so the NULL value was causing
a SEGV in build_subscription_tree(). It's now set to "".
Resolves: #335
- ### ari-stubs: Fix more local anchor references
Author: George Joseph
Date: 2023-09-05
Also allow CreateDocs job to be run manually with default branches.
- ### ari-stubs: Fix more local anchor references
Author: George Joseph
Date: 2023-09-05
Also allow CreateDocs job to be run manually with default branches.
- ### ari-stubs: Fix broken documentation anchors
Author: George Joseph
Date: 2023-09-05
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.
- ### res_pjsip_session: Send Session Interval too small response
Author: Bastian Triller
Date: 2023-08-28
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.
- ### .github: Update workflow-application-token-action to v2
Author: George Joseph
Date: 2023-08-31
- ### app_dial: Fix infinite loop when sending digits.
Author: Naveen Albert
Date: 2023-08-28
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
- ### app_voicemail: Fix for loop declarations
Author: Mike Bradeen
Date: 2023-08-29
Resolve for loop initial declarations added in cli changes.
Resolves: #275
- ### alembic: Fix quoting of the 100rel column
Author: George Joseph
Date: 2023-08-28
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
- ### pbx.c: Fix gcc 12 compiler warning.
Author: Naveen Albert
Date: 2023-08-27
Resolves: #277
- ### app_audiosocket: Fixed timeout with -1 to avoid busy loop.
Author: zhengsh
Date: 2023-08-24
Resolves: asterisk#234
- ### download_externals: Fix a few version related issues
Author: George Joseph
Date: 2023-08-18
* 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
- ### main/refer.c: Fix double free in refer_data_destructor + potential leak
Author: Maximilian Fridrich
Date: 2023-08-21
Resolves: #267
- ### sig_analog: Add Called Subscriber Held capability.
Author: Naveen Albert
Date: 2023-08-09
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.
- ### Revert "app_stack: Print proper exit location for PBXless channels."
Author: Matthew Fredrickson
Date: 2023-08-10
This reverts commit 617dad4cba1513dddce87b8e95a61415fb587cf1.
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
- ### install_prereq: Fix dependency install on aarch64.
Author: Jason D. McCormick
Date: 2023-04-28
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
- ### res_pjsip.c: Set contact_user on incoming call local Contact header
Author: MikeNaso
Date: 2023-08-08
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
- ### extconfig: Allow explicit DB result set ordering to be disabled.
Author: Sean Bright
Date: 2023-07-12
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
- ### rest-api: Run make ari-stubs
Author: George Joseph
Date: 2023-08-09
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.
- ### res_pjsip_header_funcs: Make prefix argument optional.
Author: Naveen Albert
Date: 2023-08-09
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.
- ### pjproject_bundled: Increase PJSIP_MAX_MODULE to 38
Author: George Joseph
Date: 2023-08-11
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
- ### manager: Tolerate stasis messages with no channel snapshot.
Author: Joshua C. Colp
Date: 2023-08-09
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.
- ### Remove unneeded CHANGES and UPGRADE files
Author: George Joseph
Date: 2023-08-09

View File

@ -0,0 +1,172 @@
Change Log for Release asterisk-21.0.1
========================================
Links:
----------------------------------------
- [Full ChangeLog](https://downloads.asterisk.org/pub/telephony/asterisk/releases/ChangeLog-21.0.1.md)
- [GitHub Diff](https://github.com/asterisk/asterisk/compare/21.0.0...21.0.1)
- [Tarball](https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-21.0.1.tar.gz)
- [Downloads](https://downloads.asterisk.org/pub/telephony/asterisk)
Summary:
----------------------------------------
- res_pjsip_header_funcs: Duplicate new header value, don't copy.
- res_pjsip: disable raw bad packet logging
- res_rtp_asterisk.c: Check DTLS packets against ICE candidate list
- manager.c: Prevent path traversal with GetConfig.
User Notes:
----------------------------------------
- ### http.c: Minor simplification to HTTP status output.
For bound addresses, the HTTP status page now combines the bound
address and bound port in a single line. Additionally, the SSL bind
address has been renamed to TLS.
Upgrade Notes:
----------------------------------------
- ### chan_sip: Remove deprecated module.
This module was deprecated in Asterisk 17
and is now being removed in accordance with
the Asterisk Module Deprecation policy.
- ### res_monitor: Remove deprecated module.
This module was deprecated in Asterisk 16
and is now being removed in accordance with
the Asterisk Module Deprecation policy.
This also removes the 'w' and 'W' options
for app_queue.
MixMonitor should be default and only option
for all settings that previously used either
Monitor or MixMonitor.
- ### app_osplookup: Remove deprecated module.
This module was deprecated in Asterisk 19
and is now being removed in accordance with
the Asterisk Module Deprecation policy.
- ### app_cdr: Remove deprecated application and option.
The previously deprecated NoCDR application has been removed.
Additionally, the previously deprecated 'e' option to the ResetCDR
application has been removed.
- ### chan_skinny: Remove deprecated module.
This module was deprecated in Asterisk 19
and is now being removed in accordance with
the Asterisk Module Deprecation policy.
- ### chan_mgcp: Remove deprecated module.
This module was deprecated in Asterisk 19
and is now being removed in accordance with
the Asterisk Module Deprecation policy.
- ### translate.c: Prefer better codecs upon translate ties.
When setting up translation between two codecs the quality was not taken into account,
resulting in suboptimal translation. The quality is now taken into account,
which can reduce the number of translation steps required, and improve the resulting quality.
- ### app_macro: Remove deprecated module.
This module was deprecated in Asterisk 16
and is now being removed in accordance with
the Asterisk Module Deprecation policy.
For most modules that interacted with app_macro,
this change is limited to no longer looking for
the current context from the macrocontext when set.
The following modules have additional impacts:
app_dial - no longer supports M^ connected/redirecting macro
app_minivm - samples written using macro will no longer work.
The sample needs to be re-written
app_queue - can no longer call a macro on the called party's
channel. Use gosub which is currently supported
ccss - no callback macro, gosub only
app_voicemail - no macro support
channel - remove macrocontext and priority, no connected
line or redirection macro options
options - stdexten is deprecated to gosub as the default
and only options
pbx - removed macrolock
pbx_dundi - no longer look for macro
snmp - removed macro context, exten, and priority
- ### chan_alsa: Remove deprecated module.
This module was deprecated in Asterisk 19
and is now being removed in accordance with
the Asterisk Module Deprecation policy.
- ### pbx_builtins: Remove deprecated and defunct functionality.
The previously deprecated ImportVar and SetAMAFlags
applications have now been removed.
Closed Issues:
----------------------------------------
None
Commits By Author:
----------------------------------------
- ### Ben Ford (1):
- manager.c: Prevent path traversal with GetConfig.
- ### George Joseph (1):
- res_rtp_asterisk.c: Check DTLS packets against ICE candidate list
- ### Gitea (1):
- res_pjsip_header_funcs: Duplicate new header value, don't copy.
- ### Mike Bradeen (1):
- res_pjsip: disable raw bad packet logging
Detail:
----------------------------------------
- ### res_pjsip_header_funcs: Duplicate new header value, don't copy.
Author: Gitea
Date: 2023-07-10
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.
- ### res_pjsip: disable raw bad packet logging
Author: Mike Bradeen
Date: 2023-07-25
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.
- ### res_rtp_asterisk.c: Check DTLS packets against ICE candidate list
Author: George Joseph
Date: 2023-11-09
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
- ### manager.c: Prevent path traversal with GetConfig.
Author: Ben Ford
Date: 2023-11-13
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.

View File

@ -0,0 +1,68 @@
Change Log for Release asterisk-21.0.2
========================================
Links:
----------------------------------------
- [Full ChangeLog](https://downloads.asterisk.org/pub/telephony/asterisk/releases/ChangeLog-21.0.2.md)
- [GitHub Diff](https://github.com/asterisk/asterisk/compare/21.0.1...21.0.2)
- [Tarball](https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-21.0.2.tar.gz)
- [Downloads](https://downloads.asterisk.org/pub/telephony/asterisk)
Summary:
----------------------------------------
- res_rtp_asterisk: Fix regression issues with DTLS client check
User Notes:
----------------------------------------
Upgrade Notes:
----------------------------------------
Closed Issues:
----------------------------------------
- #500: [bug regression]: res_rtp_asterisk doesn't build if pjproject isn't used
- #503: [bug]: The res_rtp_asterisk DTLS check against ICE candidates fails when it shouldn't
- #505: [bug]: res_pjproject: ast_sockaddr_cmp() always fails on sockaddrs created by ast_sockaddr_from_pj_sockaddr()
Commits By Author:
----------------------------------------
- ### George Joseph (1):
- res_rtp_asterisk: Fix regression issues with DTLS client check
Detail:
----------------------------------------
- ### res_rtp_asterisk: Fix regression issues with DTLS client check
Author: George Joseph
Date: 2023-12-15
* 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: #500
Resolves: #503
Resolves: #505

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,766 @@
Change Log for Release asterisk-21.2.0
========================================
Links:
----------------------------------------
- [Full ChangeLog](https://downloads.asterisk.org/pub/telephony/asterisk/releases/ChangeLog-21.2.0.md)
- [GitHub Diff](https://github.com/asterisk/asterisk/compare/21.1.0...21.2.0)
- [Tarball](https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-21.2.0.tar.gz)
- [Downloads](https://downloads.asterisk.org/pub/telephony/asterisk)
Summary:
----------------------------------------
- res_pjsip_stir_shaken.c: Add checks for missing parameters
- app_dial: Add dial time for progress/ringing.
- app_voicemail: Properly reinitialize config after unit tests.
- app_queue.c : fix "queue add member" usage string
- app_voicemail: Allow preventing mark messages as urgent.
- res_pjsip: Use consistent type for boolean columns.
- attestation_config.c: Use ast_free instead of ast_std_free
- Makefile: Add stir_shaken/cache to directories created on install
- Stir/Shaken Refactor
- translate.c: implement new direct comp table mode
- README.md: Removed outdated link
- strings.h: Ensure ast_str_buffer(…) returns a 0 terminated string.
- res_rtp_asterisk.c: Correct coefficient in MOS calculation.
- dsp.c: Fix and improve potentially inaccurate log message.
- pjsip show channelstats: Prevent possible segfault when faxing
- Reduce startup/shutdown verbose logging
- configure: Rerun bootstrap on modern platform.
- Upgrade bundled pjproject to 2.14.
- res_pjsip_outbound_registration.c: Add User-Agent header override
- app_speech_utils.c: Allow partial speech results.
- utils: Make behavior of ast_strsep* match strsep.
- app_chanspy: Add 'D' option for dual-channel audio
- app_if: Fix next priority calculation.
- res_pjsip_t38.c: Permit IPv6 SDP connection addresses.
- BuildSystem: Bump autotools versions on OpenBSD.
- main/utils: Simplify the FreeBSD ast_get_tid() handling
- res_pjsip_session.c: Correctly format SDP connection addresses.
- rtp_engine.c: Correct sample rate typo for L16/44100.
- manager.c: Fix erroneous reloads in UpdateConfig.
- res_calendar_icalendar: Print iCalendar error on parsing failure.
- app_confbridge: Don't emit warnings on valid configurations.
- app_voicemail_odbc: remove macrocontext from voicemail_messages table
- chan_dahdi: Allow MWI to be manually toggled on channels.
- chan_rtp.c: MulticastRTP missing refcount without codec option
- chan_rtp.c: Change MulticastRTP nameing to avoid memory leak
- func_frame_trace: Add CLI command to dump frame queue.
User Notes:
----------------------------------------
- ### app_dial: Add dial time for progress/ringing.
The timeout argument to Dial now allows
specifying the maximum amount of time to dial if
early media is not received.
- ### app_voicemail: Allow preventing mark messages as urgent.
The leaveurgent mailbox option can now be used to
control whether callers may leave messages marked as 'Urgent'.
- ### Stir/Shaken Refactor
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.
- ### Upgrade bundled pjproject to 2.14.
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
- ### res_pjsip_outbound_registration.c: Add User-Agent header override
PJSIP outbound registrations now support a per-registration
User-Agent header
- ### app_speech_utils.c: Allow partial speech results.
The SpeechBackground dialplan application now supports a 'p'
option that will return partial results from speech engines that
provide them when a timeout occurs.
- ### app_chanspy: Add 'D' option for dual-channel audio
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.
- ### app_voicemail_odbc: remove macrocontext from voicemail_messages table
The fix requires removing the macrocontext column from the
voicemail_messages table in the voicemail database via alembic upgrade.
- ### chan_dahdi: Allow MWI to be manually toggled on channels.
The 'dahdi set mwi' now allows MWI on channels
to be manually toggled if needed for troubleshooting.
Resolves: #440
Upgrade Notes:
----------------------------------------
- ### Stir/Shaken Refactor
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.
- ### app_voicemail_odbc: remove macrocontext from voicemail_messages table
The fix requires that the voicemail database be upgraded via
alembic. Upgrading to the latest voicemail database via alembic will
remove the macrocontext column from the voicemail_messages table.
Closed Issues:
----------------------------------------
- #46: [bug]: Stir/Shaken: Wrong CID used when looking up certificates
- #351: [improvement]: Refactor res_stir_shaken to use libjwt
- #406: [improvement]: pjsip: Upgrade bundled version to pjproject 2.14
- #440: [new-feature]: chan_dahdi: Allow manually toggling MWI on channels
- #492: [improvement]: res_calendar_icalendar: Print icalendar error if available on parsing failure
- #515: [improvement]: Implement option to override User-Agent-Header on a per-registration basis
- #527: [bug]: app_voicemail_odbc no longer working after removal of macrocontext.
- #529: [bug]: MulticastRTP without selected codec leeds to "FRACK!, Failed assertion bad magic number 0x0 for object" after ~30 calls
- #533: [improvement]: channel.c, func_frame_trace.c: Improve debuggability of channel frame queue
- #551: [bug]: manager: UpdateConfig triggers reload with "Reload: no"
- #560: [bug]: EndIf() causes next priority to be skipped
- #565: [bug]: Application Read() returns immediately
- #569: [improvement]: Add option to interleave input and output frames on spied channel
- #572: [improvement]: Copy partial speech results when Asterisk is ready to move on but the speech backend is not
- #582: [improvement]: Reduce unneeded logging during startup and shutdown
- #586: [bug]: The "restrict" keyword used in chan_iax2.c isn't supported in older gcc versions
- #588: [new-feature]: app_dial: Allow Dial to be aborted if early media is not received
- #592: [bug]: In certain circumstances, "pjsip show channelstats" can segfault when a fax session is active
- #595: [improvement]: dsp.c: Fix and improve confusing warning message.
- #597: [bug]: wrong MOS calculation
- #601: [new-feature]: translate.c: implement new direct comp table mode (PR #585)
- #619: [new-feature]: app_voicemail: Allow preventing callers from marking messages as urgent
- #629: [bug]: app_voicemail: Multiple executions of unit tests cause segfault
- #634: [bug]: make install doesn't create the stir_shaken cache directory
- #636: [bug]: Possible SEGV in res_stir_shaken due to wrong free function
- #645: [bug]: Occasional SEGV in res_pjsip_stir_shaken.c
Commits By Author:
----------------------------------------
- ### Ben Ford (1):
- Upgrade bundled pjproject to 2.14.
- ### Brad Smith (2):
- main/utils: Simplify the FreeBSD ast_get_tid() handling
- BuildSystem: Bump autotools versions on OpenBSD.
- ### Flole998 (1):
- res_pjsip_outbound_registration.c: Add User-Agent header override
- ### George Joseph (6):
- Reduce startup/shutdown verbose logging
- pjsip show channelstats: Prevent possible segfault when faxing
- Stir/Shaken Refactor
- Makefile: Add stir_shaken/cache to directories created on install
- attestation_config.c: Use ast_free instead of ast_std_free
- res_pjsip_stir_shaken.c: Add checks for missing parameters
- ### Joshua C. Colp (1):
- utils: Make behavior of ast_strsep* match strsep.
- ### Mike Bradeen (2):
- app_voicemail_odbc: remove macrocontext from voicemail_messages table
- app_chanspy: Add 'D' option for dual-channel audio
- ### Naveen Albert (10):
- func_frame_trace: Add CLI command to dump frame queue.
- chan_dahdi: Allow MWI to be manually toggled on channels.
- res_calendar_icalendar: Print iCalendar error on parsing failure.
- manager.c: Fix erroneous reloads in UpdateConfig.
- app_if: Fix next priority calculation.
- configure: Rerun bootstrap on modern platform.
- dsp.c: Fix and improve potentially inaccurate log message.
- app_voicemail: Allow preventing mark messages as urgent.
- app_voicemail: Properly reinitialize config after unit tests.
- app_dial: Add dial time for progress/ringing.
- ### PeterHolik (2):
- chan_rtp.c: Change MulticastRTP nameing to avoid memory leak
- chan_rtp.c: MulticastRTP missing refcount without codec option
- ### Sean Bright (6):
- app_confbridge: Don't emit warnings on valid configurations.
- rtp_engine.c: Correct sample rate typo for L16/44100.
- res_pjsip_session.c: Correctly format SDP connection addresses.
- res_pjsip_t38.c: Permit IPv6 SDP connection addresses.
- strings.h: Ensure ast_str_buffer(…) returns a 0 terminated string.
- res_pjsip: Use consistent type for boolean columns.
- ### Sebastian Jennen (1):
- translate.c: implement new direct comp table mode
- ### Shaaah (1):
- app_queue.c : fix "queue add member" usage string
- ### Shyju Kanaprath (1):
- README.md: Removed outdated link
- ### cmaj (1):
- app_speech_utils.c: Allow partial speech results.
- ### romryz (1):
- res_rtp_asterisk.c: Correct coefficient in MOS calculation.
Detail:
----------------------------------------
- ### res_pjsip_stir_shaken.c: Add checks for missing parameters
Author: George Joseph
Date: 2024-03-11
* 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
- ### app_dial: Add dial time for progress/ringing.
Author: Naveen Albert
Date: 2024-02-08
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.
- ### app_voicemail: Properly reinitialize config after unit tests.
Author: Naveen Albert
Date: 2024-02-29
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
- ### app_queue.c : fix "queue add member" usage string
Author: Shaaah
Date: 2024-01-23
Fixing bracket placement in the "queue add member" cli usage string.
- ### app_voicemail: Allow preventing mark messages as urgent.
Author: Naveen Albert
Date: 2024-02-24
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'.
- ### res_pjsip: Use consistent type for boolean columns.
Author: Sean Bright
Date: 2024-02-27
This migrates the relevant schema objects from the `('yes', 'no')`
definition to the `('0', '1', 'off', 'on', 'false', 'true', 'yes', 'no')`
one.
Fixes #617
- ### attestation_config.c: Use ast_free instead of ast_std_free
Author: George Joseph
Date: 2024-03-05
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
- ### Makefile: Add stir_shaken/cache to directories created on install
Author: George Joseph
Date: 2024-03-04
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
- ### Stir/Shaken Refactor
Author: George Joseph
Date: 2023-10-26
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: #351
Resolves: #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.
- ### translate.c: implement new direct comp table mode
Author: Sebastian Jennen
Date: 2024-02-25
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
- ### README.md: Removed outdated link
Author: Shyju Kanaprath
Date: 2024-02-23
Removed outdated link http://www.quicknet.net from README.md
cherry-pick-to: 18
cherry-pick-to: 20
cherry-pick-to: 21
- ### strings.h: Ensure ast_str_buffer(…) returns a 0 terminated string.
Author: Sean Bright
Date: 2024-02-17
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.
- ### res_rtp_asterisk.c: Correct coefficient in MOS calculation.
Author: romryz
Date: 2024-02-06
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
- ### dsp.c: Fix and improve potentially inaccurate log message.
Author: Naveen Albert
Date: 2024-02-09
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
- ### pjsip show channelstats: Prevent possible segfault when faxing
Author: George Joseph
Date: 2024-02-09
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
- ### Reduce startup/shutdown verbose logging
Author: George Joseph
Date: 2024-01-31
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
- ### configure: Rerun bootstrap on modern platform.
Author: Naveen Albert
Date: 2024-02-12
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
- ### Upgrade bundled pjproject to 2.14.
Author: Ben Ford
Date: 2024-02-05
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
- ### res_pjsip_outbound_registration.c: Add User-Agent header override
Author: Flole998
Date: 2023-12-13
This introduces a setting for outbound registrations to override the
global User-Agent header setting.
Resolves: #515
UserNote: PJSIP outbound registrations now support a per-registration
User-Agent header
- ### app_speech_utils.c: Allow partial speech results.
Author: cmaj
Date: 2024-02-02
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.
- ### utils: Make behavior of ast_strsep* match strsep.
Author: Joshua C. Colp
Date: 2024-01-31
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
- ### app_chanspy: Add 'D' option for dual-channel audio
Author: Mike Bradeen
Date: 2024-01-31
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.
- ### app_if: Fix next priority calculation.
Author: Naveen Albert
Date: 2024-01-28
Commit fa3922a4d28860d415614347d9f06c233d2beb07 fixed
a branching issue but "overshoots" when calculating
the next priority. This fixes that; accompanying
test suite tests have also been extended.
Resolves: #560
- ### res_pjsip_t38.c: Permit IPv6 SDP connection addresses.
Author: Sean Bright
Date: 2024-01-29
The existing code prevented IPv6 addresses from being properly parsed.
Fixes #558
- ### BuildSystem: Bump autotools versions on OpenBSD.
Author: Brad Smith
Date: 2024-01-27
Bump up to the more commonly used and modern versions of
autoconf and automake.
- ### main/utils: Simplify the FreeBSD ast_get_tid() handling
Author: Brad Smith
Date: 2024-01-27
FreeBSD has had kernel threads for 20+ years.
- ### res_pjsip_session.c: Correctly format SDP connection addresses.
Author: Sean Bright
Date: 2024-01-27
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
- ### rtp_engine.c: Correct sample rate typo for L16/44100.
Author: Sean Bright
Date: 2024-01-28
Fixes #555
- ### manager.c: Fix erroneous reloads in UpdateConfig.
Author: Naveen Albert
Date: 2024-01-25
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
- ### res_calendar_icalendar: Print iCalendar error on parsing failure.
Author: Naveen Albert
Date: 2023-12-14
If libical fails to parse a calendar, print the error message it provdes.
Resolves: #492
- ### app_confbridge: Don't emit warnings on valid configurations.
Author: Sean Bright
Date: 2024-01-21
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
- ### app_voicemail_odbc: remove macrocontext from voicemail_messages table
Author: Mike Bradeen
Date: 2024-01-10
When app_macro was deprecated, the macrocontext column was removed from
the INSERT statement but the binds were not renumbered. This broke the
insert.
This change removes the macrocontext column via alembic and re-numbers
the existing columns in the INSERT.
Fixes: #527
UserNote: The fix requires removing the macrocontext column from the
voicemail_messages table in the voicemail database via alembic upgrade.
UpgradeNote: The fix requires that the voicemail database be upgraded via
alembic. Upgrading to the latest voicemail database via alembic will
remove the macrocontext column from the voicemail_messages table.
- ### chan_dahdi: Allow MWI to be manually toggled on channels.
Author: Naveen Albert
Date: 2023-11-10
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
- ### chan_rtp.c: MulticastRTP missing refcount without codec option
Author: PeterHolik
Date: 2024-01-15
Fixes: #529
- ### chan_rtp.c: Change MulticastRTP nameing to avoid memory leak
Author: PeterHolik
Date: 2024-01-16
Fixes: asterisk#536
- ### func_frame_trace: Add CLI command to dump frame queue.
Author: Naveen Albert
Date: 2024-01-12
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

File diff suppressed because it is too large Load Diff

View File

@ -84,7 +84,7 @@ struct mysql_conn {
AST_RWLIST_ENTRY(mysql_conn) list;
ast_mutex_t lock;
MYSQL handle;
char host[MAXHOSTNAMELEN];
char host[50];
char name[50];
char user[50];
char pass[50];

View File

@ -276,21 +276,6 @@
<enum name="none" />
</enumlist>
</enum>
<enum name="waitfordialtone">
<para>W/O Duration in ms for which to wait for dial tone on the current call.</para>
<para>This setting is will temporarily override the <literal>waitfordialtone</literal>
setting in <literal>chan_dahdi.conf</literal> (typically if that setting is disabled).
You must call this in a pre-dial handler when making a call on an analog trunk
(e.g. FXS-signalled interface).</para>
<para>This allows, for example, being able to barge in on an in-use trunk,
if dialed specifically, but allows skipping the trunk when routing calls
if dial tone is not present on a channel.</para>
<para>This setting will only apply to the current (next) call made on the
DAHDI channel, and will not persist for future calls.</para>
<para>Please keep in mind that due to the way that chan_dahdi implements dial tone detection,
DTMF digits on an in-use channel will temporarily relay to any other channels attempting to use the channel for a call.
However, voice transmission will not leak.</para>
</enum>
</enumlist>
</info>
<info name="Dial_Resource" language="en_US" tech="DAHDI">
@ -2119,40 +2104,11 @@ static void my_set_waitingfordt(void *pvt, struct ast_channel *ast)
{
struct dahdi_pvt *p = pvt;
/* We reset p->waitfordialtonetemp here, to prevent leaking to future calls,
* but we also need to check against this value until we get dialtone
* or the timer expires, since waitingfordt is when the timer started,
* not when it should expire.
*
* Critically, we only set p->waitingfordt here if waitfordialtone or waitfordialtonetemp
* has already been set, as waitingfordt is what is checked at runtime to determine
* if we should be waiting for dial tone. This ensures that if a second call
* is initiated concurrently, the first one "consumes" waitfordialtonetemp and resets it,
* preventing leaking to other calls while remaining available to check on the first one while dialing.
*/
p->waitfordialtoneduration = p->waitfordialtonetemp ? p->waitfordialtonetemp : p->waitfordialtone;
p->waitfordialtonetemp = 0;
if (!(p->waitfordialtoneduration && CANPROGRESSDETECT(p))) {
return;
if (p->waitfordialtone && CANPROGRESSDETECT(p) && p->dsp) {
ast_debug(1, "Defer dialing for %dms or dialtone\n", p->waitfordialtone);
gettimeofday(&p->waitingfordt, NULL);
ast_setstate(ast, AST_STATE_OFFHOOK);
}
/* Because the DSP is allocated when the channel is created,
* if we requested waitfordialtone later (in a predial handler),
* we need to create it now */
if (!p->dsp) {
p->dsp = ast_dsp_new();
if (!p->dsp) {
ast_log(LOG_ERROR, "Unable to allocate DSP\n");
return;
}
}
p->dsp_features |= DSP_FEATURE_WAITDIALTONE;
ast_dsp_set_features(p->dsp, p->dsp_features);
ast_debug(1, "Defer dialing for %dms or dialtone\n", p->waitfordialtoneduration);
gettimeofday(&p->waitingfordt, NULL);
ast_setstate(ast, AST_STATE_OFFHOOK);
}
static int my_check_waitingfordt(void *pvt)
@ -7298,21 +7254,6 @@ static int dahdi_func_write(struct ast_channel *chan, const char *function, char
res = -1;
}
ast_mutex_unlock(&p->lock);
} else if (!strcasecmp(data, "waitfordialtone")) {
if (ast_strlen_zero(value)) {
ast_log(LOG_WARNING, "waitfordialtone requires a duration in ms\n");
return -1;
}
ast_mutex_lock(&p->lock);
if (!CANPROGRESSDETECT(p)) {
ast_log(LOG_WARNING, "%s only supported on analog trunks\n", data);
ast_mutex_unlock(&p->lock);
return -1;
}
/* Only set the temp waitfordialtone setting, not the permanent one. */
p->waitfordialtonetemp = atoi(value);
ast_mutex_unlock(&p->lock);
} else {
res = -1;
}
@ -9152,9 +9093,9 @@ static struct ast_frame *dahdi_read(struct ast_channel *ast)
/* DSP clears us of being pulse */
p->pulsedial = 0;
} else if (p->waitingfordt.tv_sec) {
if (ast_tvdiff_ms(ast_tvnow(), p->waitingfordt) >= p->waitfordialtoneduration) {
if (ast_tvdiff_ms(ast_tvnow(), p->waitingfordt) >= p->waitfordialtone ) {
p->waitingfordt.tv_sec = 0;
ast_log(LOG_NOTICE, "Never saw dialtone on channel %d\n", p->channel);
ast_log(LOG_WARNING, "Never saw dialtone on channel %d\n", p->channel);
ast_frfree(f);
f = NULL;
} else if (f->frametype == AST_FRAME_VOICE) {

View File

@ -654,14 +654,6 @@ struct dahdi_pvt {
* \note Set from the "waitfordialtone" value read in from chan_dahdi.conf
*/
int waitfordialtone;
/*!
* \brief Transient variable. Same as waitfordialtone, but temporarily set for a specific call, rather than permanently for the channel.
*/
int waitfordialtonetemp;
/*!
* \brief Transient variable. Stored off waitfordialtone duration at runtime.
*/
int waitfordialtoneduration;
/*!
* \brief Number of frames to watch for dialtone in incoming calls
* \note Set from the "dialtone_detect" value read in from chan_dahdi.conf

18
configure vendored
View File

@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.71 for asterisk master.
# Generated by GNU Autoconf 2.71 for asterisk 21.
#
# Report bugs to <https://github.com/asterisk/asterisk/issues>.
#
@ -613,8 +613,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='asterisk'
PACKAGE_TARNAME='asterisk'
PACKAGE_VERSION='master'
PACKAGE_STRING='asterisk master'
PACKAGE_VERSION='21'
PACKAGE_STRING='asterisk 21'
PACKAGE_BUGREPORT='https://github.com/asterisk/asterisk/issues'
PACKAGE_URL=''
@ -2067,7 +2067,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures asterisk master to adapt to many kinds of systems.
\`configure' configures asterisk 21 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -2133,7 +2133,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of asterisk master:";;
short | recursive ) echo "Configuration of asterisk 21:";;
esac
cat <<\_ACEOF
@ -2381,7 +2381,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
asterisk configure master
asterisk configure 21
generated by GNU Autoconf 2.71
Copyright (C) 2021 Free Software Foundation, Inc.
@ -3117,7 +3117,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by asterisk $as_me master, which was
It was created by asterisk $as_me 21, which was
generated by GNU Autoconf 2.71. Invocation command line was
$ $0$ac_configure_args_raw
@ -37020,7 +37020,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by asterisk $as_me master, which was
This file was extended by asterisk $as_me 21, which was
generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -37084,7 +37084,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
asterisk config.status master
asterisk config.status 21
configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"

View File

@ -1,6 +1,6 @@
AC_PREREQ(2.60a)
AC_INIT([asterisk], [master], [https://github.com/asterisk/asterisk/issues])
AC_INIT([asterisk], [21], [https://github.com/asterisk/asterisk/issues])
# cross-compile macros
AC_CANONICAL_BUILD

View File

@ -30,7 +30,6 @@ down_revision = None
from alembic import op
import sqlalchemy as sa
from sqlalchemy.sql import quoted_name
from sqlalchemy.dialects.postgresql import ENUM
YESNO_VALUES = ['yes', 'no']
@ -124,7 +123,7 @@ def upgrade():
sa.Column('regexten', sa.String(40)),
sa.Column('fromdomain', sa.String(40)),
sa.Column('fromuser', sa.String(40)),
sa.Column(quoted_name('qualify', True), sa.String(40)),
sa.Column('qualify', sa.String(40)),
sa.Column('defaultip', sa.String(45)),
sa.Column('rtptimeout', sa.Integer),
sa.Column('rtpholdtimeout', sa.Integer),
@ -221,7 +220,7 @@ def upgrade():
sa.Column('disallow', sa.String(200)),
sa.Column('allow', sa.String(200)),
sa.Column('codecpriority', sa.String(40)),
sa.Column(quoted_name('qualify', True), sa.String(10)),
sa.Column('qualify', sa.String(10)),
sa.Column('qualifysmoothing',
sa.Enum(*YESNO_VALUES, name='yes_no_values')),
sa.Column('qualifyfreqok', sa.String(10)),

View File

@ -21,17 +21,20 @@ from sqlalchemy.sql import table, column
COLUMNS = [ ('ps_aors', 'authenticate_qualify'),
('ps_aors', 'remove_existing'),
('ps_aors', 'remove_unavailable'),
('ps_aors', 'support_path'),
('ps_asterisk_publications', 'device_state'),
('ps_asterisk_publications', 'mailbox_state'),
('ps_contacts', 'authenticate_qualify'),
('ps_contacts', 'prune_on_boot'),
('ps_endpoint_id_ips', 'srv_lookups'),
('ps_endpoints', '100rel'),
('ps_endpoints', 'accept_multiple_sdp_answers'),
('ps_endpoints', 'aggregate_mwi'),
('ps_endpoints', 'allow_overlap'),
('ps_endpoints', 'allow_subscribe'),
('ps_endpoints', 'allow_transfer'),
('ps_endpoints', 'allow_unauthenticated_options'),
('ps_endpoints', 'asymmetric_rtp_codec'),
('ps_endpoints', 'bind_rtp_to_media_address'),
('ps_endpoints', 'bundle'),
@ -44,10 +47,12 @@ COLUMNS = [ ('ps_aors', 'authenticate_qualify'),
('ps_endpoints', 'force_rport'),
('ps_endpoints', 'g726_non_standard'),
('ps_endpoints', 'ice_support'),
('ps_endpoints', 'ignore_183_without_sdp'),
('ps_endpoints', 'inband_progress'),
('ps_endpoints', 'media_encryption_optimistic'),
('ps_endpoints', 'media_use_received_transport'),
('ps_endpoints', 'moh_passthrough'),
('ps_endpoints', 'mwi_subscribe_replaces_unsolicited'),
('ps_endpoints', 'notify_early_inuse_ringing'),
('ps_endpoints', 'one_touch_recording'),
('ps_endpoints', 'preferred_codec_only'),
@ -57,31 +62,45 @@ COLUMNS = [ ('ps_aors', 'authenticate_qualify'),
('ps_endpoints', 'rtcp_mux'),
('ps_endpoints', 'rtp_ipv6'),
('ps_endpoints', 'rtp_symmetric'),
('ps_endpoints', 'send_aoc'),
('ps_endpoints', 'send_connected_line'),
('ps_endpoints', 'send_diversion'),
('ps_endpoints', 'send_history_info'),
('ps_endpoints', 'send_pai'),
('ps_endpoints', 'send_rpid'),
('ps_endpoints', 'srtp_tag_32'),
('ps_endpoints', 'stir_shaken'),
('ps_endpoints', 'suppress_q850_reason_headers'),
('ps_endpoints', 't38_bind_udptl_to_media_address'),
('ps_endpoints', 't38_udptl'),
('ps_endpoints', 't38_udptl_ipv6'),
('ps_endpoints', 't38_udptl_nat'),
('ps_endpoints', 'timers'),
('ps_endpoints', 'trust_connected_line'),
('ps_endpoints', 'trust_id_inbound'),
('ps_endpoints', 'trust_id_outbound'),
('ps_endpoints', 'use_avpf'),
('ps_endpoints', 'use_ptime'),
('ps_endpoints', 'user_eq_phone'),
('ps_endpoints', 'webrtc'),
('ps_globals', 'all_codecs_on_empty_reinvite'),
('ps_globals', 'allow_sending_180_after_183'),
('ps_globals', 'disable_multi_domain'),
('ps_globals', 'ignore_uri_user_options'),
('ps_globals', 'mwi_disable_initial_unsolicited'),
('ps_globals', 'norefersub'),
('ps_globals', 'send_contact_status_on_update_registration'),
('ps_globals', 'use_callerid_contact'),
('ps_outbound_publishes', 'multi_user'),
('ps_registrations', 'auth_rejection_permanent'),
('ps_registrations', 'line'),
('ps_registrations', 'support_path'),
('ps_resource_list', 'full_state'),
('ps_resource_list', 'resource_display_name'),
('ps_subscription_persistence', 'prune_on_boot'),
('ps_systems', 'accept_multiple_sdp_answers'),
('ps_systems', 'compact_headers'),
('ps_systems', 'disable_rport'),
('ps_systems', 'disable_tcp_switch'),
('ps_systems', 'follow_early_media_fork'),
('ps_transports', 'allow_reload'),

View File

@ -0,0 +1,41 @@
CREATE TABLE alembic_version (
version_num VARCHAR(32) NOT NULL,
CONSTRAINT alembic_version_pkc PRIMARY KEY (version_num)
);
-- Running upgrade -> 210693f3123d
CREATE TABLE cdr (
accountcode VARCHAR(20),
src VARCHAR(80),
dst VARCHAR(80),
dcontext VARCHAR(80),
clid VARCHAR(80),
channel VARCHAR(80),
dstchannel VARCHAR(80),
lastapp VARCHAR(80),
lastdata VARCHAR(80),
start DATETIME,
answer DATETIME,
end DATETIME,
duration INTEGER,
billsec INTEGER,
disposition VARCHAR(45),
amaflags VARCHAR(45),
userfield VARCHAR(256),
uniqueid VARCHAR(150),
linkedid VARCHAR(150),
peeraccount VARCHAR(20),
sequence INTEGER
);
INSERT INTO alembic_version (version_num) VALUES ('210693f3123d');
-- Running upgrade 210693f3123d -> 54cde9847798
ALTER TABLE cdr MODIFY accountcode VARCHAR(80) NULL;
ALTER TABLE cdr MODIFY peeraccount VARCHAR(80) NULL;
UPDATE alembic_version SET version_num='54cde9847798' WHERE alembic_version.version_num = '210693f3123d';

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,29 @@
BEGIN;
CREATE TABLE alembic_version (
version_num VARCHAR(32) NOT NULL,
CONSTRAINT alembic_version_pkc PRIMARY KEY (version_num)
);
-- Running upgrade -> 4105ee839f58
CREATE TABLE queue_log (
id BIGSERIAL NOT NULL,
time TIMESTAMP WITHOUT TIME ZONE,
callid VARCHAR(80),
queuename VARCHAR(256),
agent VARCHAR(80),
event VARCHAR(32),
data1 VARCHAR(100),
data2 VARCHAR(100),
data3 VARCHAR(100),
data4 VARCHAR(100),
data5 VARCHAR(100),
PRIMARY KEY (id),
UNIQUE (id)
);
INSERT INTO alembic_version (version_num) VALUES ('4105ee839f58');
COMMIT;

View File

@ -0,0 +1,41 @@
CREATE TABLE alembic_version (
version_num VARCHAR(32) NOT NULL,
CONSTRAINT alembic_version_pkc PRIMARY KEY (version_num)
);
-- Running upgrade -> a2e9769475e
CREATE TABLE voicemail_messages (
dir VARCHAR(255) NOT NULL,
msgnum INTEGER NOT NULL,
context VARCHAR(80),
macrocontext VARCHAR(80),
callerid VARCHAR(80),
origtime INTEGER,
duration INTEGER,
recording BLOB,
flag VARCHAR(30),
category VARCHAR(30),
mailboxuser VARCHAR(30),
mailboxcontext VARCHAR(30),
msg_id VARCHAR(40)
);
ALTER TABLE voicemail_messages ADD CONSTRAINT voicemail_messages_dir_msgnum PRIMARY KEY (dir, msgnum);
CREATE INDEX voicemail_messages_dir ON voicemail_messages (dir);
INSERT INTO alembic_version (version_num) VALUES ('a2e9769475e');
-- Running upgrade a2e9769475e -> 39428242f7f5
ALTER TABLE voicemail_messages MODIFY recording BLOB(4294967295) NULL;
UPDATE alembic_version SET version_num='39428242f7f5' WHERE alembic_version.version_num = 'a2e9769475e';
-- Running upgrade 39428242f7f5 -> 1c55c341360f
ALTER TABLE voicemail_messages DROP COLUMN macrocontext;
UPDATE alembic_version SET version_num='1c55c341360f' WHERE alembic_version.version_num = '39428242f7f5';

View File

@ -0,0 +1,45 @@
BEGIN;
CREATE TABLE alembic_version (
version_num VARCHAR(32) NOT NULL,
CONSTRAINT alembic_version_pkc PRIMARY KEY (version_num)
);
-- Running upgrade -> 210693f3123d
CREATE TABLE cdr (
accountcode VARCHAR(20),
src VARCHAR(80),
dst VARCHAR(80),
dcontext VARCHAR(80),
clid VARCHAR(80),
channel VARCHAR(80),
dstchannel VARCHAR(80),
lastapp VARCHAR(80),
lastdata VARCHAR(80),
start TIMESTAMP WITHOUT TIME ZONE,
answer TIMESTAMP WITHOUT TIME ZONE,
"end" TIMESTAMP WITHOUT TIME ZONE,
duration INTEGER,
billsec INTEGER,
disposition VARCHAR(45),
amaflags VARCHAR(45),
userfield VARCHAR(256),
uniqueid VARCHAR(150),
linkedid VARCHAR(150),
peeraccount VARCHAR(20),
sequence INTEGER
);
INSERT INTO alembic_version (version_num) VALUES ('210693f3123d');
-- Running upgrade 210693f3123d -> 54cde9847798
ALTER TABLE cdr ALTER COLUMN accountcode TYPE VARCHAR(80);
ALTER TABLE cdr ALTER COLUMN peeraccount TYPE VARCHAR(80);
UPDATE alembic_version SET version_num='54cde9847798' WHERE alembic_version.version_num = '210693f3123d';
COMMIT;

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,29 @@
BEGIN;
CREATE TABLE alembic_version (
version_num VARCHAR(32) NOT NULL,
CONSTRAINT alembic_version_pkc PRIMARY KEY (version_num)
);
-- Running upgrade -> 4105ee839f58
CREATE TABLE queue_log (
id BIGSERIAL NOT NULL,
time TIMESTAMP WITHOUT TIME ZONE,
callid VARCHAR(80),
queuename VARCHAR(256),
agent VARCHAR(80),
event VARCHAR(32),
data1 VARCHAR(100),
data2 VARCHAR(100),
data3 VARCHAR(100),
data4 VARCHAR(100),
data5 VARCHAR(100),
PRIMARY KEY (id),
UNIQUE (id)
);
INSERT INTO alembic_version (version_num) VALUES ('4105ee839f58');
COMMIT;

View File

@ -0,0 +1,45 @@
BEGIN;
CREATE TABLE alembic_version (
version_num VARCHAR(32) NOT NULL,
CONSTRAINT alembic_version_pkc PRIMARY KEY (version_num)
);
-- Running upgrade -> a2e9769475e
CREATE TABLE voicemail_messages (
dir VARCHAR(255) NOT NULL,
msgnum INTEGER NOT NULL,
context VARCHAR(80),
macrocontext VARCHAR(80),
callerid VARCHAR(80),
origtime INTEGER,
duration INTEGER,
recording BYTEA,
flag VARCHAR(30),
category VARCHAR(30),
mailboxuser VARCHAR(30),
mailboxcontext VARCHAR(30),
msg_id VARCHAR(40)
);
ALTER TABLE voicemail_messages ADD CONSTRAINT voicemail_messages_dir_msgnum PRIMARY KEY (dir, msgnum);
CREATE INDEX voicemail_messages_dir ON voicemail_messages (dir);
INSERT INTO alembic_version (version_num) VALUES ('a2e9769475e');
-- Running upgrade a2e9769475e -> 39428242f7f5
ALTER TABLE voicemail_messages ALTER COLUMN recording TYPE BYTEA;
UPDATE alembic_version SET version_num='39428242f7f5' WHERE alembic_version.version_num = 'a2e9769475e';
-- Running upgrade 39428242f7f5 -> 1c55c341360f
ALTER TABLE voicemail_messages DROP COLUMN macrocontext;
UPDATE alembic_version SET version_num='1c55c341360f' WHERE alembic_version.version_num = '39428242f7f5';
COMMIT;

View File

@ -54,7 +54,7 @@
- \ref manager.c Main manager code file
*/
#define AMI_VERSION "11.0.0"
#define AMI_VERSION "10.0.0"
#define DEFAULT_MANAGER_PORT 5038 /* Default port for Asterisk management via TCP */
#define DEFAULT_MANAGER_TLS_PORT 5039 /* Default port for Asterisk management via TCP */

3456
menuselect/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -567,7 +567,7 @@ static int park_app_exec(struct ast_channel *chan, const char *data)
RAII_VAR(struct ast_bridge *, parking_bridge, NULL, ao2_cleanup);
struct ast_bridge_features chan_features;
int res = 0;
int res;
int silence_announcements = 0;
int blind_transfer;
@ -591,16 +591,15 @@ static int park_app_exec(struct ast_channel *chan, const char *data)
/* Initialize bridge features for the channel. */
res = ast_bridge_features_init(&chan_features);
/* Now for the fun part... park it! */
if (res || ast_bridge_join(parking_bridge, chan, NULL, &chan_features, NULL, 0)) {
if (!silence_announcements && !blind_transfer) {
ast_stream_and_wait(chan, "pbx-parkingfailed", "");
}
if (res) {
ast_bridge_features_cleanup(&chan_features);
publish_parked_call_failure(chan);
return res;
return -1;
}
/* Now for the fun part... park it! */
ast_bridge_join(parking_bridge, chan, NULL, &chan_features, NULL, 0);
/*
* If the bridge was broken for a hangup that isn't real, then
* don't run the h extension, because the channel isn't really

View File

@ -1115,8 +1115,6 @@ static int handle_negotiated_sdp(struct ast_sip_session *session, const pjmedia_
SCOPE_EXIT_RTN_VALUE(-1, "Media stream count mismatch\n");
}
AST_VECTOR_RESET(&session->pending_media_state->read_callbacks, AST_VECTOR_ELEM_CLEANUP_NOOP);
for (i = 0; i < local->media_count; ++i) {
struct ast_sip_session_media *session_media;
struct ast_stream *stream;

View File

@ -2,7 +2,7 @@
"_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.",
"_author": "David M. Lee, II <dlee@digium.com>",
"_svn_revision": "$Revision$",
"apiVersion": "10.0.0",
"apiVersion": "9.0.0",
"swaggerVersion": "1.1",
"basePath": "http://localhost:8088/ari",
"apis": [

View File

@ -1 +0,0 @@
de9feca3e4816b1535f63f9d23c7b45b pjproject-2.14.1.tar.bz2

View File

@ -0,0 +1 @@
d0c0590e6aa8b556a33300e6c709bea4 pjproject-2.14.tar.bz2

View File

@ -2,5 +2,5 @@
# configure script so it must follow 'shell'
# syntax as well as 'make' syntax.
JANSSON_VERSION=2.14
PJPROJECT_VERSION=2.14.1
PJPROJECT_VERSION=2.14
LIBJWT_VERSION=1.15.3