Commit Graph

33373 Commits

Author SHA1 Message Date
George Joseph
3de5740fbf 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 e54d867f25)
2024-02-21 13:35:03 +00:00
George Joseph
cd95c0f9c9 rest-api: Updates for new documentation site
The new documentation site uses traditional markdown instead
of the Confluence flavored version.  This required changes in
the mustache templates and the python that generates the files.

(cherry picked from commit d2172582f7)
2024-02-21 13:35:03 +00:00
George Joseph
4cd5e2cc37 .github: Update workflow-application-token-action to v2
(cherry picked from commit 56e592248d)
2024-02-21 13:35:03 +00:00
Mike Bradeen
f9c52ea676 app_voicemail: Fix for loop declarations
Resolve for loop initial declarations added in cli changes.

Resolves: #275
(cherry picked from commit 8f5fb2af23)
2024-02-21 13:35:03 +00:00
George Joseph
c8373ce5e4 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 bebf843253)
2024-02-21 13:35:03 +00:00
George Joseph
34acfac3b8 Remove .lastclean and .version from source control
Historically these were checked in for certified releases but
since the move to github and the unified release process,
they are no longer needed and cause issues.

(cherry picked from commit 87773dc11f)
2024-02-21 13:35:03 +00:00
George Joseph
ed7a57c959 .github: Use generic releaser
(cherry picked from commit a95f98f8bb)
2024-02-21 13:35:03 +00:00
Joshua C. Colp
b0ec10f9da 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 c83c14ba2d)
2024-02-21 13:35:03 +00:00
Joshua C. Colp
e14b1d7a3c audiohook: Unlock channel in mute if no audiohooks present.
In the case where mute was called on a channel that had no
audiohooks the code was not unlocking the channel, resulting
in a deadlock.

Resolves: #233
(cherry picked from commit b37b28e071)
2024-02-21 13:35:03 +00:00
Joshua C. Colp
034ac1a407 app_queue: Add support for applying caller priority change immediately.
The app_queue module provides both an AMI action and a CLI command
to change the priority of a caller in a queue. Up to now this change
of priority has only been reflected to new callers into the queue.

This change adds an "immediate" option to both the AMI action and
CLI command which immediately applies the priority change respective
to the other callers already in the queue. This can allow, for example,
a caller to be placed at the head of the queue immediately if their
priority is sufficient.

Resolves: #202

UserNote: The 'queue priority caller' CLI command and
'QueueChangePriorityCaller' AMI action now have an 'immediate'
argument which allows the caller priority change to be reflected
immediately, causing the position of a caller to move within the
queue depending on the priorities of the other callers.

(cherry picked from commit 82c0971e6e)
2024-02-21 13:35:03 +00:00
George Joseph
fc64d2a8da .github: Fix cherry-pick reminder issues
(cherry picked from commit 8aba4a4f88)
2024-02-21 13:35:03 +00:00
George Joseph
cf31de0d9b app.h: Move declaration of ast_getdata_result before its first use
The ast_app_getdata() and ast_app_getdata_terminator() declarations
in app.h were changed recently to return enum ast_getdata_result
(which is how they were defined in app.c).  The existing
declaration of ast_getdata_result in app.h was about 1000 lines
after those functions however so under certain circumstances,
a "use before declaration" error was thrown by the compiler.
The declaration of the enum was therefore moved to before those
functions.

Resolves: #200
(cherry picked from commit e46f7892a6)
2024-02-21 13:35:03 +00:00
George Joseph
e4cbf94170 doc: Remove obsolete CHANGES-staging and UPGRADE-staging
(cherry picked from commit 7c84bf40e0)
2024-02-21 13:35:03 +00:00
Sean Bright
f144a772fa res_geolocation: Ensure required 'location_info' is present.
Fixes #189

(cherry picked from commit 836f0bed18)
2024-02-21 13:35:03 +00:00
Mike Bradeen
3e762943fb Adds manager actions to allow move/remove/forward individual messages
in a particular mailbox folder. The forward command can be used
to copy a message within a mailbox or to another mailbox. Also adds
a VoicemailBoxSummarry, required to retrieve message ID's.

Resolves: #181

UserNote: The following manager actions have been added

VoicemailBoxSummary - Generate message list for a given mailbox

VoicemailRemove - Remove a message from a mailbox folder

VoicemailMove - Move a message from one folder to another within a mailbox

VoicemailForward - Copy a message from one folder in one mailbox
to another folder in another or the same mailbox.

(cherry picked from commit 4929a2c419)
2024-02-21 13:35:03 +00:00
Mike Bradeen
c0ed7b023b app_voicemail: add CLI commands for message manipulation
Adds CLI commands to allow move/remove/forward individual messages
from a particular mailbox folder. The forward command can be used
to copy a message within a mailbox or to another mailbox. Also adds
a show mailbox, required to retrieve message ID's.

Resolves: #170

UserNote: The following CLI commands have been added to app_voicemail

voicemail show mailbox <mailbox> <context>
Show contents of mailbox <mailbox>@<context>

voicemail remove <mailbox> <context> <from_folder> <messageid>
Remove message <messageid> from <from_folder> in mailbox <mailbox>@<context>

voicemail move <mailbox> <context> <from_folder> <messageid> <to_folder>
Move message <messageid> in mailbox <mailbox>&<context> from <from_folder> to <to_folder>

voicemail forward <from_mailbox> <from_context> <from_folder> <messageid> <to_mailbox> <to_context> <to_folder>
Forward message <messageid> in mailbox <mailbox>@<context> <from_folder> to
mailbox <mailbox>@<context> <to_folder>

(cherry picked from commit 8f8413b494)
2024-02-21 13:35:03 +00:00
George Joseph
673d3ef945 .github: Minor tweak to Asterisk Releaser
(cherry picked from commit 3bb5cef959)
2024-02-21 13:35:03 +00:00
George Joseph
4850ab66e7 .github: Suppress cherry-pick reminder for some situations
In PROpenedOrUpdated, the cherry-pick reminder will now be
suppressed if there are already valid 'cherry-pick-to' comments
in the PR or the PR contained a 'cherry-pick-to: none' comment.

(cherry picked from commit e1e294a5e3)
2024-02-21 13:35:03 +00:00
George Joseph
a168011319 Cleanup deleted files 2024-02-20 05:47:54 -07:00
Asterisk Development Team
b5979e2cb4 Update for certified-18.9-cert7 certified-18.9-cert7 2023-12-20 16:19:20 +00:00
George Joseph
390a994e6c 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:48:11 -07:00
Asterisk Development Team
35e0c6c0f4 Update for certified-18.9-cert6 certified-18.9-cert6 2023-12-14 20:04:12 +00:00
Gitea
22ae979dfc 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:03:39 -07:00
George Joseph
096819ec8a 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:03:28 -07:00
Ben Ford
11e772c642 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:03:20 -07:00
Mike Bradeen
c4c0007b70 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:03:11 -07:00
Asterisk Development Team
b2a1aa2d10 Update for certified-18.9-cert5 certified-18.9-cert5 2023-07-07 19:38:32 +00:00
Sean Bright
58b865a6f3 apply_patches: Use globbing instead of file/sort.
This accomplishes the same thing as a `find ... | sort` but with the
added benefit of clarity and avoiding a call to a subshell.

Additionally drop the -s option from call to patch as it is not POSIX.
2023-07-07 13:31:53 -06:00
George Joseph
3a045074ff apply_patches: Sort patch list before applying
The apply_patches script wasn't sorting the list of patches in
the "patches" directory before applying them. This left the list
in an indeterminate order. In most cases, the list is actually
sorted but rarely, they can be out of order and cause dependent
patches to fail to apply.

We now sort the list but the "sort" program wasn't in the
configure scripts so we needed to add that and regenerate
the scripts as well.

Resolves: #193
2023-07-07 13:31:53 -06:00
George Joseph
7aaa1884ac bundled_pjproject: Backport security fixes from pjproject 2.13.1
Merge-pull-request-from-GHSA-9pfh-r8x4-w26w.patch
Merge-pull-request-from-GHSA-cxwq-5g9x-x7fr.patch
Locking-fix-so-that-SSL_shutdown-and-SSL_write-are-n.patch
Don-t-call-SSL_shutdown-when-receiving-SSL_ERROR_SYS.patch

Resolves: #188
2023-07-07 13:31:53 -06:00
George Joseph
72310e6b5d .github: Updates for AsteriskReleaser 2023-07-07 13:31:53 -06:00
Mike Bradeen
9a4a097b37 res_musiconhold: avoid moh state access on unlocked chan
Move channel unlock to after moh state access to avoid
potential unlocked access to state.

Resolves: #133
2023-07-07 13:31:53 -06:00
Mike Bradeen
2915ce3cb9 utils: add lock timestamps for DEBUG_THREADS
Adds last locked and unlocked timestamps as well as a
counter for the number of times the lock has been
attempted (vs locked/unlocked) to debug output printed
using the DEBUG_THREADS option.

Resolves: #110
2023-07-07 13:31:53 -06:00
George Joseph
a46456ef44 .github: Back out triggering PROpenedOrUpdated by label 2023-07-07 13:31:53 -06:00
George Joseph
03c83527e5 .github: Move publish docs to new file CreateDocs.yml 2023-07-07 13:31:53 -06:00
George Joseph
5cc2629bf2 .github: Remove result check from PROpenUpdateGateTests 2023-07-07 13:31:53 -06:00
George Joseph
1e020207d1 .github: Fix use of 'contains' 2023-07-07 13:31:53 -06:00
George Joseph
ac53428da1 .github: Add recheck label test to additional jobs 2023-07-07 13:31:53 -06:00
George Joseph
7159cd2ad3 .github: Fix recheck label typos 2023-07-07 13:31:53 -06:00
George Joseph
6c9c68cb86 .github: Fix recheck label manipulation 2023-07-07 13:31:53 -06:00
George Joseph
af2abdbae6 .github: Allow PR submit checks to be re-run by label 2023-07-07 13:31:53 -06:00
Ben Ford
aba7168abe res_pjsip_session: Added new function calls to avoid ABI issues.
Added two new functions (ast_sip_session_get_dialog and
ast_sip_session_get_pjsip_inv_state) that retrieve the dialog and the
pjsip_inv_state respectively from the pjsip_inv_session on the
ast_sip_session struct. This is due to pjproject adding a new field to
the pjsip_inv_session struct that caused crashes when trying to access
fields that were no longer where they were expected to be if a module
was compiled against a different version of pjproject.

Resolves: #145
2023-07-07 13:31:53 -06:00
George Joseph
818e53184c test_statis_endpoints: Fix channel_messages test again 2023-07-07 13:31:53 -06:00
George Joseph
53d3f8892d test_stasis_endpoints.c: Make channel_messages more stable
The channel_messages test was assuming that stasis would return
messages in a specific order.  This is an incorrect assumption as
message ordering was never guaranteed.  This was causing the test
to fail occasionally.  We now test all the messages for the
required message types instead of testing one by one.

Resolves: #158
2023-07-07 13:31:53 -06:00
George Joseph
86bad8f550 build: Fix a few gcc 13 issues
* gcc 13 is now catching when a function is declared as returning
  an enum but defined as returning an int or vice versa.  Fixed
  a few in app.h, loader.c, stasis_message.c.

* gcc 13 is also now (incorrectly) complaining of dangling pointers
  when assigning a pointer to a local char array to a char *. Had
  to change that to an ast_alloca.

Resolves: #155
2023-07-07 13:31:53 -06:00
George Joseph
aa87a29100 .github: Rework for merge approval 2023-07-07 13:31:53 -06:00
Ben Ford
0799c3d099 AMI: Add CoreShowChannelMap action.
Adds a new AMI action (CoreShowChannelMap) that takes in a channel name
and provides a list of all channels that are connected to that channel,
following local channel connections as well.

Resolves: #104

UserNote: New AMI action CoreShowChannelMap has been added.
2023-07-07 13:31:53 -06:00
George Joseph
c857cbc8f1 .github: Fix issues with cherry-pick-reminder 2023-07-07 13:31:53 -06:00
Mike Bradeen
79e4c7e370 indications: logging changes
Increase verbosity to indicate failure due to missing country
and to specify default on CLI dump

Resolves: #89
2023-07-07 13:31:53 -06:00
George Joseph
348228565d .github Ignore error when adding reviewrs to PR 2023-07-07 13:31:53 -06:00