Commit Graph

33384 Commits

Author SHA1 Message Date
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
Sean Bright
42d3038141 alembic: Make 'revises' header comment match reality.
(cherry picked from commit 13d38eeabe)
2024-09-05 17:05:53 +00:00
Mike Bradeen
03b72fae96 res_pjsip_notify: add dialplan application
Add dialplan application PJSIPNOTIFY to send either pre-configured
NOTIFY messages from pjsip_notify.conf or with headers defined in
dialplan.

Also adds the ability to send pre-configured NOTIFY commands to a
channel via the CLI.

Resolves: #799

UserNote: A new dialplan application PJSIPNotify is now available
which can send SIP NOTIFY requests from the dialplan.

The pjsip send notify CLI command has also been enhanced to allow
sending NOTIFY messages to a specific channel. Syntax:

pjsip send notify <option> channel <channel>

(cherry picked from commit 8e97266810)
2024-09-05 17:05:53 +00:00
George Joseph
d46bc45df9 manager.c: Fix FRACK when doing CoreShowChannelMap in DEVMODE
If you run an AMI CoreShowChannelMap on a channel that isn't in a
bridge and you're in DEVMODE, you can get a FRACK because the
bridge id is empty.  We now simply return an empty list for that
request.

(cherry picked from commit 0778c95e37)
2024-09-05 17:05:53 +00:00
Ben Ford
240597fb26 channel: Add multi-tenant identifier.
This patch introduces a new identifier for channels: tenantid. It's
a stringfield on the channel that can be used for general purposes. It
will be inherited by other channels the same way that linkedid is.

You can set tenantid in a few ways. The first is to set it in the
dialplan with the Set and CHANNEL functions:

exten => example,1,Set(CHANNEL(tenantid)=My tenant ID)

It can also be accessed via CHANNEL:

exten => example,2,NoOp(CHANNEL(tenantid))

Another method is to use the new tenantid option for pjsip endpoints in
pjsip.conf:

[my_endpoint]
type=endpoint
tenantid=My tenant ID

This is considered the best approach since you will be able to see the
tenant ID as early as the Newchannel event.

It can also be set using set_var in pjsip.conf on the endpoint like
setting other channel variable:

set_var=CHANNEL(tenantid)=My tenant ID

Note that set_var will not show tenant ID on the Newchannel event,
however.

Tenant ID has also been added to CDR. It's read-only and can be accessed
via CDR(tenantid). You can also get the tenant ID of the last channel
communicated with via CDR(peertenantid).

Tenant ID will also show up in CEL records if it has been set, and the
version number has been bumped accordingly.

Fixes: #740

UserNote: tenantid has been added to channels. It can be read in
dialplan via CHANNEL(tenantid), and it can be set using
Set(CHANNEL(tenantid)=My tenant ID). In pjsip.conf, it is recommended to
use the new tenantid option for pjsip endpoints (e.g., tenantid=My
tenant ID) so that it will show up in Newchannel events. You can set it
like any other channel variable using set_var in pjsip.conf as well, but
note that this will NOT show up in Newchannel events. Tenant ID is also
available in CDR and can be accessed with CDR(tenantid). The peer tenant
ID can also be accessed with CDR(peertenantid). CEL includes tenant ID
as well if it has been set.

UpgradeNote: A new versioned struct (ast_channel_initializers) has been
added that gets passed to __ast_channel_alloc_ap. The new function
ast_channel_alloc_with_initializers should be used when creating
channels that require the use of this struct. Currently the only value
in the struct is for tenantid, but now more fields can be added to the
struct as necessary rather than the __ast_channel_alloc_ap function. A
new option (tenantid) has been added to endpoints in pjsip.conf as well.
CEL has had its version bumped to include tenant ID.

(cherry picked from commit 9ee00e0d60)
2024-09-05 17:05:53 +00:00
George Joseph
5283b32993 res_resolver_unbound: Test for NULL ub_result in unbound_resolver_callback
The ub_result pointer passed to unbound_resolver_callback by
libunbound can be NULL if the query was for something malformed
like `.1` or `[.1]`.  If it is, we now set a 'ns_r_formerr' result
and return instead of crashing with a SEGV.  This causes pjproject
to simply cancel the transaction with a "No answer record in the DNS
response" error.  The existing "off nominal" unit test was also
updated to check this condition.

Although not necessary for this fix, we also made
ast_dns_resolver_completed() tolerant of a NULL result.

Resolves: GHSA-v428-g3cw-7hv9
2024-09-05 10:40:47 -06:00
Asterisk Development Team
fce1a9b823 Update for certified-18.9-cert11 certified-18.9-cert11 2024-08-08 13:25:25 +00:00
Mike Bradeen
6b8d8a9823 res_stasis: fix intermittent delays on adding channel to bridge
Previously, on command execution, the control thread was awoken by
sending a SIGURG. It was found that this still resulted in some
instances where the thread was not immediately awoken.

This change instead sends a null frame to awaken the control thread,
which awakens the thread more consistently.

Resolves: #801
(cherry picked from commit f974ea2810)
2024-08-08 13:25:21 +00:00
George Joseph
6a2aad1d41 .github: Allow testing an Asterisk PR against a testsuite PR
(cherry picked from commit a47f92c2f8)
2024-08-08 13:25:21 +00:00
George Joseph
e1962c0911 .github: Add params to Releaser for FPBX issue creation
(cherry picked from commit 74328a7bfe)
2024-08-08 13:25:21 +00:00
George Joseph
a89e9ca13e res_pjsip_config_wizard.c: Refactor load process
The way we have been initializing the config wizard prevented it
from registering its objects if res_pjsip happened to load
before it.

* We now use the object_type_registered sorcery observer to kick
things off instead of the wizard_mapped observer.

* The load_module function now checks if res_pjsip has been loaded
already and if it was it fires the proper observers so the objects
load correctly.

Resolves: #816

UserNote: The res_pjsip_config_wizard.so module can now be reloaded.
(cherry picked from commit 9e56766cde)
2024-08-08 13:25:21 +00:00