Commit Graph

33394 Commits

Author SHA1 Message Date
Asterisk Development Team
2d47ed093f Update for certified-18.9-cert16 certified-18.9-cert16 2025-07-31 16:32:51 +00:00
ThatTotallyRealMyth
03841b9fb3 safe_asterisk: Add ownership checks for /etc/asterisk/startup.d and its files.
UpgradeNote: The safe_asterisk script now checks that, if it was run by the
root user, the /etc/asterisk/startup.d directory and all the files it contains
are owned by root.  If the checks fail, safe_asterisk will exit with an error
and Asterisk will not be started.  Additionally, the default logging
destination is now stderr instead of tty "9" which probably won't exist
in modern systems.

Resolves: #GHSA-v9q8-9j8m-5xwp
2025-07-31 08:43:47 -06:00
Asterisk Development Team
754fb5fa4f Update for certified-18.9-cert15 certified-18.9-cert15 2025-06-02 13:37:30 +00:00
George Joseph
27d283c93c res_pjsip: Backport pjsip uri utilities.
The following utilities have been backported:

ast_sip_is_uri_sip_sips
ast_sip_is_allowed_uri
ast_sip_pjsip_uri_get_username
ast_sip_pjsip_uri_get_hostname
ast_sip_pjsip_uri_get_other_param

They were originally included in the commit for supporting TEL uris.
Support for TEL uris is NOT included here however.

(cherry picked from commit e1a205074b)
2025-06-02 13:37:25 +00:00
George Joseph
2afd523fc4 build_tools: Backport from 18
There are several build fixes that never made it into certified/18.9.
Unfortunately the commits that contained the fixes also contained other
stuff that won't cherry-pick into cert so the build files had to be
just copied from 18.

(cherry picked from commit fb966116fa)
2025-06-02 13:37:25 +00:00
Sean Bright
329eaf6874 chan_sip.c: Fix __sip_reliable_xmit build error
Fixes #954

(cherry picked from commit 47c498bc72)
2025-06-02 13:37:25 +00:00
Sean Bright
83c6d73aad chan_dahdi.c: Resolve a format-truncation build warning.
With gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0:

> chan_dahdi.c:4129:18: error: ‘%s’ directive output may be truncated
>   writing up to 255 bytes into a region of size between 242 and 252
>   [-Werror=format-truncation=]

This removes the error-prone sizeof(...) calculations in favor of just
doubling the size of the base buffer.

Change-Id: I2d276785286730d3d5d0a921bcea2e065dbf27c5
(cherry picked from commit 0b0f284684)
2025-06-02 13:37:25 +00:00
Sean Bright
140e87e660 xml.c: Update deprecated libxml2 API usage.
Two functions are deprecated as of libxml2 2.12:

  * xmlSubstituteEntitiesDefault
  * xmlParseMemory

So we update those with supported API.

Additionally, `res_calendar_caldav` has been updated to use libxml2's
xmlreader API instead of the SAX2 API which has always felt a little
hacky (see deleted comment block in `res_calendar_caldav.c`).

The xmlreader API has been around since libxml2 2.5.0 which was
released in 2003.

Fixes #725

(cherry picked from commit ed12e22ad9)
2025-06-02 13:37:25 +00:00
Ben Ford
f6cc391a71 documentation: Update Gosub, Goto, and add new documentationtype.
Gosub and Goto were not displaying their syntax correctly on the docs
site. This change adds a new way to specify an optional context, an
optional extension, and a required priority that the xml stylesheet can
parse without having to know which optional parameters come in which
order. In Asterisk, it looks like this:

  parameter name="context" documentationtype="dialplan_context"
  parameter name="extension" documentationtype="dialplan_extension"
  parameter name="priority" documentationtype="dialplan_priority" required="true"

The stylesheet will ignore the context and extension parameters, but for
priority, it will automatically inject the following:

  [[context,]extension,]priority

This is the correct oder for applications such as Gosub and Goto.

(cherry picked from commit 53766c5a74)
2025-06-02 13:37:25 +00:00
George Joseph
8b74f35fda README.md: Updates and Fixes
* Outdated information has been removed.
* New links added.
* Placeholder added for link to change logs.

Going forward, the release process will create HTML versions of the README
and change log and will update the link in the README to the current
change log for the branch...

* In the development branches, the link will always point to the current
  release on GitHub.
* In the "releases/*" branches and the tarballs, the link will point to the
  ChangeLogs/ChangeLog-<version>.html file in the source directory.
* On the downloads website, the link will point to the
  ChangeLog-<version>.html file in the same directory.

Resolves: #1131
(cherry picked from commit 7b54359793)
2025-06-02 13:37:25 +00:00
Shyju Kanaprath
c6887ce02e 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 eca57e71fb)
2025-06-02 13:37:25 +00:00
Naveen Albert
354536e6d0 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 dc7b14dc88)
2025-06-02 13:37:25 +00:00
Marcel Wagner
600d1b069a documentation: Add information on running install_prereq script in readme
Adding information in the readme about running the install_preqreq script to install components that the ./configure script might indicate as missing.

ASTERISK-29976 #close

Change-Id: Ic287b46300168729838bddd8f9265e98fc22bce6
(cherry picked from commit bd5cd70c56)
2025-06-02 13:37:24 +00:00
George Joseph
c565390c91 .github: Change concurrency group ids so they're unique.
GitHub strikes again.  Apparently the github.ref context variable only
contains the PR number if the workflow is triggered by "pull_request" so
since we just changed the trigger to "pull_request_target" the variable
no longer contains the PR number and is therefore not unique and can't be
used as a concurrency group id.  We now use
`github.triggering_actor-github.head_ref`.

(cherry picked from commit 8f16bf9c8a)
2025-06-02 13:37:24 +00:00
George Joseph
4c577b7c11 .github: Refactor Releaser to use reusable workflow
(cherry picked from commit bff012d32a)
2025-06-02 13:37:24 +00:00
George Joseph
9be2dbff73 .github: Change branch of reusable workflows to main.
(cherry picked from commit 5f4a828056)
2025-06-02 13:37:24 +00:00
George Joseph
de874740a1 .github: Refactor to use pull_request_target trigger.
After careful review, we believe we can now use the "pull_request_target"
workflow trigger instead of "pull_request" which required a separate
privliged workflow to add labels and comments to PRs when they are submitted
or updated.  This allows us to greatly streamline our workflows and remove
unneeded ones.

* The OnPRChanged workflow was...
  * Renamed to OnPRCheck
  * Changed to trigger on pull_request_target and the "recheckpr" label.
  * Changed to simply call reusable workflows in asterisk-ci-actions.
  * Changed to use better concurrency groups.
* The OnPRCPCheck and OnPRMergeApproved workflows were also...
  * Changed to simply call reusable workflows in asterisk-ci-actions.
  * Changed to use better concurrency groups.
* The NightlyTest and CreateDocs were also tweaked

(cherry picked from commit c2c7d64538)
2025-06-02 13:37:24 +00:00
George Joseph
fea936f4a4 .github: Remove concurrency check in on-labelled workflows.
Apparently you can't use `${{ github.event.number }}` in a concurrency
block in a job that calls a reusable workflow. :(

(cherry picked from commit f5f50b29e6)
2025-06-02 13:37:24 +00:00
George Joseph
9612ddda1d .github: Move PRChanged,PRChangedPriv,PRCPCheck,PRReCheck,PRMerge logic.
Moved to asterisk-ci-actions reusable workflows.

(cherry picked from commit d83b5be7dd)
2025-06-02 13:37:24 +00:00
George Joseph
8d0bd39fef .github: OnPRCherryPickTest,OnPRStateChanged,OnPRRecheck: Add job summaries.
...and refactor environment variables.

(cherry picked from commit 3356a52fa0)
2025-06-02 13:37:24 +00:00
George Joseph
c05262600f .github: Clean up CreateDocs
(cherry picked from commit bd163881d4)
2025-06-02 13:37:24 +00:00
Joshua C. Colp
6c00e88cf4 LICENSE: Update company name, email, and address.
(cherry picked from commit eb3ee8bca4)
2025-06-02 13:37:24 +00:00
George Joseph
304be94466 README.md, asterisk.c: Update Copyright Dates
(cherry picked from commit b4d8170101)
2025-06-02 13:37:24 +00:00
Sean Bright
913557e7d2 manager.c: Rename restrictedFile to is_restricted_file.
Also correct the spelling of 'privileges.'

(cherry picked from commit 27cc5f5071)
2025-06-02 13:37:24 +00:00
George Joseph
0cae901c97 .github: Set exit 0 in CherryPick and Recheck workflow Cleanup steps
(cherry picked from commit ff94f597c0)
2025-06-02 13:37:24 +00:00
George Joseph
3c5c986d76 gcc14: Fix issues caught by gcc 14
* reqresp_parser.c: Fix misuse of "static" with linked list definitions
* test_message.c: Fix segfaults caused by passing NULL as an sprintf fmt

(cherry picked from commit d80361d6de)
2025-06-02 13:37:24 +00:00
George Joseph
c53acca6ab .github: Change the run name for OnPRStateChangedPriv
(cherry picked from commit bfce4ed473)
2025-06-02 13:37:24 +00:00
George Joseph
9fe8d8d1db res_pjsip: Change suppress_moh_on_sendonly to OPT_BOOL_T
The suppress_moh_on_sendonly endpoint option should have been
defined as OPT_BOOL_T in pjsip_configuration.c and AST_BOOL_VALUES
in the alembic script instead of OPT_YESNO_T and YESNO_VALUES.

Also updated contrib/ast-db-manage/README.md to indicate that
AST_BOOL_VALUES should always be used and provided an example.

Resolves: #995
(cherry picked from commit b14fe81a4f)
2025-06-02 13:37:24 +00:00
George Joseph
b25c90e1f4 res_pjsip: Add new endpoint option "suppress_moh_on_sendonly"
Normally, when one party in a call sends Asterisk an SDP with
a "sendonly" or "inactive" attribute it means "hold" and causes
Asterisk to start playing MOH back to the other party. This can be
problematic if it happens at certain times, such as in a 183
Progress message, because the MOH will replace any early media you
may be playing to the calling party. If you set this option
to "yes" on an endpoint and the endpoint receives an SDP
with "sendonly" or "inactive", Asterisk will NOT play MOH back to
the other party.

Resolves: #979

UserNote: The new "suppress_moh_on_sendonly" endpoint option
can be used to prevent playing MOH back to a caller if the remote
end sends "sendonly" or "inactive" (hold) to Asterisk in an SDP.

(cherry picked from commit 1eb7d5258b)
2025-06-02 13:37:24 +00:00
George Joseph
8ed6423660 res_pjsip: Move tenantid to end of ast_sip_endpoint
The tenantid field was originally added to the ast_sip_endpoint
structure at the end of the AST_DECLARE_STRING_FIELDS block.  This
caused everything after it in the structure to move down in memory
and break ABI compatibility.  It's now at the end of the structure
as an AST_STRING_FIELD_EXTENDED.  Given the number of string fields
in the structure now, the initial string field allocation was
also increased from 64 to 128 bytes.

Resolves: #982
(cherry picked from commit 5a335b880d)
2025-06-02 13:37:24 +00:00
Ben Ford
b9fe6ef7f3 app_mixmonitor: Add 'D' option for dual-channel audio.
Adds the 'D' option to app_mixmonitor that interleaves the input and
output frames of the channel being recorded in the monitor output frame.
This allows for two streams in the recording: the transmitted audio and
the received audio. The 't' and 'r' options are compatible with this.

Fixes: #945

UserNote: The MixMonitor application now has a new 'D' option which
interleaves the recorded audio in the output frames. This allows for
stereo recording output with one channel being the transmitted audio and
the other being the received audio. The 't' and 't' options are
compatible with this.

(cherry picked from commit 47ce55885b)
2025-06-02 13:37:24 +00:00
George Joseph
397b4a1de7 .github: Redirect NightlyAdmin to AsteriskNightlyAdmin
(cherry picked from commit 69a2bc15b5)
2025-06-02 13:37:24 +00:00
George Joseph
f8516eaca4 .github: NightlyAdmin now calls external CloseStaleIssuesAndPRs
(cherry picked from commit 3b51b1b294)
2025-06-02 13:37:24 +00:00
George Joseph
eb8c55d3e2 core_unreal.c: Fix memory leak in ast_unreal_new_channels()
When the channel tech is multistream capable, the reference to
chan_topology was passed to the new channel.  When the channel tech
isn't multistream capable, the reference to chan_topology was never
released.  "Local" channels are multistream capable so it didn't
affect them but the confbridge "CBAnn" and the bridge_media
"Recorder" channels are not so they caused a leak every time one
of them was created.

Also added tracing to ast_stream_topology_alloc() and
stream_topology_destroy() to assist with debugging.

Resolves: #938
(cherry picked from commit eecc0469c1)
2025-06-02 13:37:24 +00:00
George Joseph
eecce274d8 geolocation.sample.conf: Fix comment marker at end of file
Resolves: #937
(cherry picked from commit cb2b263756)
2025-06-02 13:37:24 +00:00
George Joseph
99fabb6ee6 manager.c: Add unit test for Originate app and appdata permissions
This unit test checks that dialplan apps and app data specified
as parameters for the Originate action are allowed with the
permissions the user has.

(cherry picked from commit b53034cf41)
2025-06-02 13:37:24 +00:00
Sean Bright
b38327654c alembic: Drop redundant voicemail_messages index.
The `voicemail_messages_dir` index is a left prefix of the table's
primary key and therefore unnecessary.

(cherry picked from commit 74df82e71c)
2025-06-02 13:37:24 +00:00
Mike Bradeen
4b03427c3a app_voicemail: add NoOp alembic script to maintain sync
Adding a NoOp alembic script for the voicemail database to maintain
version sync with other branches.

Fixes: #527
(cherry picked from commit 96d20e92bf)
2025-06-02 13:37:24 +00:00
Sean Bright
1ee3e62439 res_pjsip_pubsub: Persist subscription 'generator_data' in sorcery
Fixes #895

(cherry picked from commit 8bdc2304bb)
2025-06-02 13:37:24 +00:00
George Joseph
f8221401c8 Fix application references to Background
The app is actually named "BackGround" but several references
in XML documentation were spelled "Background" with the lower
case "g".  This was causing documentation links to return
"not found" messages.

(cherry picked from commit 9f73bba6f4)
2025-06-02 13:37:24 +00:00
George Joseph
33a5ddfd03 .github: Fix realtime param on Weekly and Nightly tests and...
Rename the "Cleanup" job in the cherry-pick and recheck jobs
to "Summary".

(cherry picked from commit 1892234069)
2025-06-02 13:37:24 +00:00
George Joseph
37dd70e445 .github: Add WeeklyTests and make Nightlies Monday-Saturday
...and add "realtime" option.

(cherry picked from commit c9450b49f5)
2025-06-02 13:37:24 +00:00
George Joseph
69bcb3857f .github: Changes required to use cached builds and shorten names
(cherry picked from commit a444430a76)
2025-06-02 13:37:24 +00:00
Asterisk Development Team
aa7d07fd56 Update for certified-18.9-cert14 certified-18.9-cert14 2025-05-22 15:41:14 +00:00
George Joseph
adcc756d08 asterisk.c: Add option to restrict shell access from remote consoles.
UserNote: A new asterisk.conf option 'disable_remote_console_shell' has
been added that, when set, will prevent remote consoles from executing
shell commands using the '!' prefix.

Resolves: #GHSA-c7p6-7mvq-8jq2
2025-05-22 09:00:35 -06:00
George Joseph
86a78eab9c res_pjsip_messaging.c: Mask control characters in received From display name
Incoming SIP MESSAGEs will now have their From header's display name
sanitized by replacing any characters < 32 (space) with a space.

Resolves: #GHSA-2grh-7mhv-fcfw
2025-05-22 08:30:41 -06:00
Asterisk Development Team
514f8c3c7e Update for certified-18.9-cert13 certified-18.9-cert13 2025-01-09 20:21:51 +00:00
Ben Ford
818dd29a80 manager.c: Restrict ListCategories to the configuration directory.
When using the ListCategories AMI action, it was possible to traverse
upwards through the directories to files outside of the configured
configuration directory. This action is now restricted to the configured
directory and an error will now be returned if the specified file is
outside of this limitation.

Resolves: #GHSA-33x6-fj46-6rfh

UserNote: The ListCategories AMI action now restricts files to the
configured configuration directory.
2025-01-09 13:11:30 -06:00
Asterisk Development Team
d03864911e Update for certified-18.9-cert12 certified-18.9-cert12 2024-09-05 17:05:58 +00:00
Jean-Denis Girard
ecd1a14793 app_voicemail: Fix sql insert mismatch caused by cherry-pick
When commit e8c9cb80 was cherry-picked in from master, the
fact that the 20 and 18 branches still had the old "macrocontext"
column wasn't taken into account so the number of named parameters
didn't match the number of '?' placeholders.  They do now.

We also now use ast_asprintf to create the full mailbox query SQL
statement instead of trying to calculate the proper length ourselves.

Resolves: #831
(cherry picked from commit f5845b7d7d)
2024-09-05 17:05:54 +00:00