Commit Graph

33366 Commits

Author SHA1 Message Date
George Joseph
d1cde2a864 make_buildopts_h: Always include DETECT_DEADLOCKS
Since DETECT_DEADLOCKS is now split from DEBUG_THREADS, it must
always be included in buildopts.h instead of only when
ADD_CFLAGS_TO_BUILDOPTS_H is defined.  A SEGV will result otherwise.

Resolves: #719
(cherry picked from commit 558d0a8033)
2024-05-09 17:35:59 +00:00
George Joseph
76f922cd1f rtp_engine and stun: call ast_register_atexit instead of ast_register_cleanup
rtp_engine.c and stun.c were calling ast_register_cleanup which
is skipped if any loadable module can't be cleanly unloaded
when asterisk shuts down.  Since this will always be the case,
their cleanup functions never get run.  In a practical sense
this makes no difference since asterisk is shutting down but if
you're in development mode and trying to use the leak sanitizer,
the leaks from both of those modules clutter up the output.

(cherry picked from commit 00940e2abd)
2024-05-09 17:35:59 +00:00
George Joseph
5e46323179 manager.c: Add missing parameters to Login documentation
* Added the AuthType and Key parameters for MD5 authentication.

* Added the Events parameter.

Resolves: #689
(cherry picked from commit d214c72c2a)
2024-05-09 17:35:59 +00:00
George Joseph
4dcdded687 Fix incorrect application and function documentation references
There were a few references in the embedded documentation XML
where the case didn't match or where the referenced app or function
simply didn't exist any more.  These were causing 404 responses
in docs.asterisk.org.

(cherry picked from commit 0e0a56a0ca)
2024-05-09 17:35:59 +00:00
George Joseph
06e319b15a .github: Add PAT to PRSubmitActions/Add Reviewers
(cherry picked from commit a7e4c193fc)
2024-05-09 17:35:59 +00:00
George Joseph
b11158b852 .github: Remove timeout-minutes from gatetests
(cherry picked from commit 18f3c355f7)
2024-05-09 17:35:59 +00:00
George Joseph
f7fe5a7ac3 .github: Pass only single GATETEST_COMMAND to AsteriskGateComposite
(cherry picked from commit f841ae8e62)
2024-05-09 17:35:59 +00:00
Mark Murawski
84bf0a4d17 Remove files that are no longer updated
Fixes: #360
(cherry picked from commit 81c400a1c2)
2024-05-09 17:35:59 +00:00
Asterisk Development Team
949533f9a9 Update for certified-18.9-cert8 certified-18.9-cert8 2024-03-12 15:51:22 +00:00
Asterisk Development Team
1ae51f1e1a Update for certified-18.9-cert8-rc2 certified-18.9-cert8-rc2 2024-02-26 23:34:17 +00:00
George Joseph
ca897dd37f Rename dialplan_functions.xml to dialplan_functions_doc.xml
When using COMPILE_DOUBLE, dialplan_functions.xml is mistaken
for the source for an embedded XML document and gets compiled
to dialplan_functions.o.  This causes dialplan_functions.c to
be ignored making its functions unavailable and causing chan_pjsip
to fail to load.
2024-02-26 16:25:52 -07:00
Sean Bright
c8d4ad1286 openssl: Supress deprecation warnings from OpenSSL 3.0
There is work going on to update our OpenSSL usage to avoid the
deprecated functions but in the meantime make it possible to compile
in devmode.

Change-Id: Ib082eb8b3751f0185d8aa8fe127da664c93f0726
2024-02-26 16:25:39 -07:00
Asterisk Development Team
378e010902 Update for certified-18.9-cert8-rc1 certified-18.9-cert8-rc1 2024-02-21 13:35:10 +00:00
George Joseph
8735277a4a .github: Add force_cherry_pick option to Releaser
(cherry picked from commit 031703c596)
2024-02-21 13:35:04 +00:00
George Joseph
5988bb529e .github: Remove start_version from Releaser
(cherry picked from commit 7d65b0ad80)
2024-02-21 13:35:04 +00:00
Mike Bradeen
33e95dfb8b 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 e0be8be337)
2024-02-21 13:35:04 +00:00
George Joseph
6d29836274 .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 be9b5bf0a9)
2024-02-21 13:35:04 +00:00
Naveen Albert
a26faa9ac5 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 3ff081e581)
2024-02-21 13:35:04 +00:00
George Joseph
4d512e643f doc: Remove obsolete CHANGES-staging directrory
This should have been removed after the last release but
was missed.

(cherry picked from commit 85fc4ce712)
2024-02-21 13:35:03 +00:00
George Joseph
2d62f1fd05 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 0f20f39db8)
2024-02-21 13:35:03 +00:00
George Joseph
9c950f4889 SECURITY.md: Update with correct documentation URL
(cherry picked from commit c53cd1c82d)
2024-02-21 13:35:03 +00:00
George Joseph
e5f3c646e5 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 8e012faf9e)
2024-02-21 13:35:03 +00:00
Mark Murawski
eb173479df Remove files that are no longer updated
Fixes: #360
(cherry picked from commit 81c400a1c2)
2024-02-21 13:35:03 +00:00
Mike Bradeen
3bacb722a8 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 db5767f19d)
2024-02-21 13:35:03 +00:00
George Joseph
8d6ed8285a .github: PRSubmitActions: Fix adding reviewers to PR
(cherry picked from commit 05d26994af)
2024-02-21 13:35:03 +00:00
George Joseph
c170e84a4b .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 cd640dc67b)
2024-02-21 13:35:03 +00:00
George Joseph
ee5f3461a8 .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 5eb676bab5)
2024-02-21 13:35:03 +00:00
Mike Bradeen
24c2aa50c9 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 5342562892)
2024-02-21 13:35:03 +00:00
George Joseph
7ea61acfde 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 20b06e7bb5)
2024-02-21 13:35:03 +00:00
George Joseph
4ba842ad5a .github: Fix job prereqs in PROpenedUpdated
(cherry picked from commit d0a1c2b026)
2024-02-21 13:35:03 +00:00
George Joseph
f1fb1a406f .github: Block PR tests until approved
(cherry picked from commit 825d3b981a)
2024-02-21 13:35:03 +00:00
George Joseph
503d8cc2c6 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 733ab35848)
2024-02-21 13:35:03 +00:00
Mike Bradeen
d6592f038d 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 7369de127a)
2024-02-21 13:35:03 +00:00
George Joseph
6415562a14 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 04183eb246)
2024-02-21 13:35:03 +00:00
Mike Bradeen
a669ccbc3d 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 5c58a6fd56)
2024-02-21 13:35:03 +00:00
George Joseph
ed02f1c737 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 7b42ebb90d)
2024-02-21 13:35:03 +00:00
George Joseph
ddd78228f5 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 8d506370f5)
2024-02-21 13:35:03 +00:00
Mike Bradeen
5e8702f557 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 cf623753a9)
2024-02-21 13:35:03 +00:00
George Joseph
4e606d018b 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 2e59f9fd6a)
2024-02-21 13:35:03 +00:00
George Joseph
32bb90e11f 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 4e43b9d308)
2024-02-21 13:35:03 +00:00
Joshua C. Colp
ce130d74e3 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 405a08aaed)
2024-02-21 13:35:03 +00:00
George Joseph
db0594af83 ari-stubs: Fix more local anchor references
Also allow CreateDocs job to be run manually with default branches.

(cherry picked from commit 3d01cbaae9)
2024-02-21 13:35:03 +00:00
George Joseph
2809429b08 ari-stubs: Fix more local anchor references
Also allow CreateDocs job to be run manually with default branches.

(cherry picked from commit 2f1d12b7dc)
2024-02-21 13:35:03 +00:00
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