]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
18 months agores_rtp_asterisk.c: Fix memory leak in ephemeral certificate creation.
Sean Bright [Wed, 25 Oct 2023 22:19:13 +0000 (18:19 -0400)] 
res_rtp_asterisk.c: Fix memory leak in ephemeral certificate creation.

Fixes #386

(cherry picked from commit 74a5c452de6f78e3182c65603cb8c27fe1287b92)

18 months agores_pjsip_dtmf_info.c: Add 'INFO' to Allow header.
Sean Bright [Tue, 17 Oct 2023 15:33:41 +0000 (11:33 -0400)] 
res_pjsip_dtmf_info.c: Add 'INFO' to Allow header.

Fixes #376

(cherry picked from commit 3af55f14fa351f9e9349289939f7a68df3696c9d)

18 months agoapi.wiki.mustache: Fix indentation in generated markdown
George Joseph [Wed, 25 Oct 2023 11:06:26 +0000 (05:06 -0600)] 
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 443f94b43826470e7b0c92881a1af1c4ec586bc9)

18 months agopjsip_configuration.c: Disable DTLS renegotiation if WebRTC is enabled.
Sean Bright [Mon, 23 Oct 2023 19:53:08 +0000 (15:53 -0400)] 
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 c7afd5357c9e1ec5d779d04391b52e77f2513b59)

18 months agoconfigs: Fix typo in pjsip.conf.sample.
Samuel Olaechea [Thu, 12 Oct 2023 22:15:37 +0000 (18:15 -0400)] 
configs: Fix typo in pjsip.conf.sample.

(cherry picked from commit 4c507d31b93a76c9bd194c10028c900064f37f2b)

18 months agores_pjsip_exten_state,res_pjsip_mwi: Allow unload on shutdown
George Joseph [Thu, 19 Oct 2023 13:40:26 +0000 (07:40 -0600)] 
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 b9ee6644406b6290e4a23eb54d99d69ce48b966b)

18 months agores_pjsip: Expanding PJSIP endpoint ID and relevant resource length to 255 characters
sungtae kim [Fri, 22 Sep 2023 17:32:43 +0000 (02:32 +0900)] 
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 9b70b18dec3e9d788a907867925a5c613cc10e70)

18 months ago.github: PRSubmitActions: Fix adding reviewers to PR
George Joseph [Thu, 19 Oct 2023 15:54:43 +0000 (09:54 -0600)] 
.github: PRSubmitActions: Fix adding reviewers to PR

(cherry picked from commit 79c58451419f182c6fad475f313967d1de325fee)

18 months ago.github: New PR Submit workflows
George Joseph [Tue, 17 Oct 2023 12:59:43 +0000 (06:59 -0600)] 
.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 6389654b2199dcd9eaf7f8dbff87a43c3ec736d4)

18 months ago.github: New PR Submit workflows
George Joseph [Tue, 17 Oct 2023 12:59:43 +0000 (06:59 -0600)] 
.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 d06bb7f2fe2830661f77f28d609e035b2a4d6e60)

18 months agores_stasis: signal when new command is queued
Mike Bradeen [Mon, 2 Oct 2023 18:35:32 +0000 (12:35 -0600)] 
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 7ea0e3bfdaa23aa3d2e9d88b2bf4016179233335)

18 months agoari/stasis: Indicate progress before playback on a bridge
Holger Hans Peter Freyther [Mon, 2 Oct 2023 12:03:03 +0000 (20:03 +0800)] 
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 624c7ac88326e75ae60975d2bbcf5e9d4d03d1ba)

18 months agofunc_curl.c: Ensure channel is locked when manipulating datastores.
Sean Bright [Mon, 9 Oct 2023 13:32:57 +0000 (09:32 -0400)] 
func_curl.c: Ensure channel is locked when manipulating datastores.

(cherry picked from commit 8c1491dda97f4973a3fd0bf8866ce8aa31a38125)

18 months ago.github: Fix job prereqs in PROpenedUpdated
George Joseph [Mon, 9 Oct 2023 13:22:49 +0000 (07:22 -0600)] 
.github: Fix job prereqs in PROpenedUpdated

(cherry picked from commit 9e9037a8aa3015d5f06d1fa93f83a89ae8ad7ff3)

18 months ago.github: Block PR tests until approved
George Joseph [Thu, 5 Oct 2023 16:23:13 +0000 (10:23 -0600)] 
.github: Block PR tests until approved

(cherry picked from commit 29e202085d86507afa4f181d4f2270a798faede4)

18 months ago.github: Use generic releaser
George Joseph [Tue, 15 Aug 2023 19:04:38 +0000 (13:04 -0600)] 
.github: Use generic releaser

(cherry picked from commit ceddfbe7b8b1d7d527249ef38864fea665f8a758)

18 months agologger.h: Add ability to change the prefix on SCOPE_TRACE output
George Joseph [Thu, 5 Oct 2023 14:18:17 +0000 (08:18 -0600)] 
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 f599114ee3749a309f775834be45c4ccdda03e20)

18 months agoAdd libjwt to third-party
George Joseph [Thu, 21 Sep 2023 17:12:31 +0000 (11:12 -0600)] 
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 d7a6116681c28b7c8ccc5733dffbebbbf75f273c)

18 months agores_pjsip: update qualify_timeout documentation with DNS note
Mike Bradeen [Tue, 26 Sep 2023 19:19:27 +0000 (13:19 -0600)] 
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 323a51fd6c0ff18c16702138e5e8aff3529ebf57)

18 months agochan_dahdi: Clarify scope of callgroup/pickupgroup.
Naveen Albert [Mon, 4 Sep 2023 11:58:23 +0000 (07:58 -0400)] 
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 5b89e40541ccf40cb3703cc00ef5fa9815f896ca)

18 months agofunc_json: Fix crashes for some types
Bastian Triller [Thu, 21 Sep 2023 06:24:37 +0000 (08:24 +0200)] 
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 1cbbf36929b47bb6b9c125f630d6bcd03618fcde)

18 months agores_speech_aeap: add aeap error handling
Mike Bradeen [Thu, 21 Sep 2023 18:54:45 +0000 (12:54 -0600)] 
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 e921f5e010accdb1065c4eb6139fd099b8dba93e)

18 months agoapp_voicemail: Disable ADSI if unavailable.
Naveen Albert [Wed, 27 Sep 2023 12:28:50 +0000 (08:28 -0400)] 
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 75620616f46d054aa6a7bbff1753b05c7abc642a)

18 months agocodec_builtin: Use multiples of 20 for maximum_ms
Eduardo [Fri, 28 Jul 2023 18:01:46 +0000 (15:01 -0300)] 
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 ca1ed84820f84416278f770f773aa1fa2b5efc03)

18 months agolock.c: Separate DETECT_DEADLOCKS from DEBUG_THREADS
George Joseph [Wed, 13 Sep 2023 15:18:04 +0000 (09:18 -0600)] 
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 e1050b4add81f3c4ab7e2eb1511747bef1a9321b)

18 months agoasterisk.c: Use the euid's home directory to read/write cli history
George Joseph [Fri, 15 Sep 2023 17:19:18 +0000 (11:19 -0600)] 
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 fc516f5781bbf14ba3c4d3f27d614d6ca564a6cd)

18 months agores_pjsip_transport_websocket: Prevent transport from being destroyed before message...
Tinet-mucw [Wed, 13 Sep 2023 09:12:12 +0000 (17:12 +0800)] 
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 a38add11e687b230d555d81084eca7d74d464f67)

18 months agocel: add publish user event helper
Mike Bradeen [Thu, 14 Sep 2023 17:00:19 +0000 (11:00 -0600)] 
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 4592f97c366ba35515f3a80b9988cebd08ae9fce)

18 months agochan_console: Fix deadlock caused by unclean thread exit.
Naveen Albert [Sat, 9 Sep 2023 15:24:37 +0000 (11:24 -0400)] 
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 5b8fea93d106332bc0faa4b7fa8a6ea71e546cac
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 3b027d1e476a444ec28883417a718ac123362dc1)

18 months agofile.c: Add ability to search custom dir for sounds
George Joseph [Mon, 11 Sep 2023 14:27:41 +0000 (08:27 -0600)] 
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 0e0f99db1d62b7642a51d2552256eece5d435bc8)

18 months agochan_iax2: Improve authentication debugging.
Naveen Albert [Wed, 30 Aug 2023 13:12:38 +0000 (09:12 -0400)] 
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 f93138bcad6f8f43611d210714d79cef4cefd75a)

18 months agores_rtp_asterisk: fix wrong counter management in ioqueue objects
Vitezslav Novy [Tue, 5 Sep 2023 11:51:26 +0000 (13:51 +0200)] 
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 56244a7371fb8c113e7e6b932b8a2dd3b81a2dcc)

18 months agores_pjsip_pubsub: Add body_type to test_handler for unit tests
George Joseph [Fri, 15 Sep 2023 16:17:11 +0000 (10:17 -0600)] 
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 71d75373f9df6b971ac069abfbf39be42a1caf70)

18 months agomake_buildopts_h, et. al. Allow adding all cflags to buildopts.h
George Joseph [Wed, 13 Sep 2023 20:08:02 +0000 (14:08 -0600)] 
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 42f82d55b0f0b546fe50a4684b798edc65ad751c)

18 months agofunc_periodic_hook: Add hangup step to avoid timeout
Mike Bradeen [Tue, 12 Sep 2023 19:24:57 +0000 (13:24 -0600)] 
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 2265eafb3a544d82a26c73afebe64e6804b30a2d)

18 months agores_stasis_recording.c: Save recording state when unmuted.
Sean Bright [Tue, 12 Sep 2023 15:26:45 +0000 (11:26 -0400)] 
res_stasis_recording.c: Save recording state when unmuted.

Fixes #322

(cherry picked from commit b952a8c38d3dec433756da46bcbfa9dff214592b)

18 months agores_speech_aeap: check for null format on response
Mike Bradeen [Fri, 8 Sep 2023 19:04:10 +0000 (13:04 -0600)] 
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 3759d034ccd69508cd311881a0b9b77cee7d2f3d)

18 months agofunc_periodic_hook: Don't truncate channel name
George Joseph [Mon, 11 Sep 2023 16:52:05 +0000 (10:52 -0600)] 
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 cff637a24f42139240318f73b0872fb23a758561)

18 months agosafe_asterisk: Change directory permissions to 755
George Joseph [Mon, 11 Sep 2023 16:19:41 +0000 (10:19 -0600)] 
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 6bd9f9ae81fd3d41b745a38db4a6e43d0c343583)

18 months agochan_rtp: Implement RTP glue for UnicastRTP channels
Maximilian Fridrich [Tue, 5 Sep 2023 07:32:53 +0000 (09:32 +0200)] 
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 1af2ae177c1883d9167c2720b9efbdedd42d72eb)

18 months agoapp_queue: periodic announcement configurable start time.
Jaco Kroon [Tue, 21 Feb 2023 12:24:36 +0000 (14:24 +0200)] 
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 130c3ab792190f8204820431f8f80b366fa36fdd)

18 months agovariables: Add additional variable dialplan functions.
Joshua C. Colp [Thu, 31 Aug 2023 10:31:20 +0000 (07:31 -0300)] 
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 182ad6926bd5469960593be6c222cb40105a983b)

18 months agoRestore CHANGES and UPGRADE.txt to allow cherry-picks to work
George Joseph [Fri, 12 Jan 2024 18:08:07 +0000 (11:08 -0700)] 
Restore CHANGES and UPGRADE.txt to allow cherry-picks to work

19 months agoUpdate for 21.0.2 21.0.2
Asterisk Development Team [Wed, 20 Dec 2023 16:27:02 +0000 (16:27 +0000)] 
Update for 21.0.2

19 months agores_rtp_asterisk: Fix regression issues with DTLS client check
George Joseph [Fri, 15 Dec 2023 16:37:54 +0000 (09:37 -0700)] 
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

19 months agoUpdate for 21.0.1 21.0.1
Asterisk Development Team [Thu, 14 Dec 2023 20:03:39 +0000 (20:03 +0000)] 
Update for 21.0.1

19 months agores_pjsip_header_funcs: Duplicate new header value, don't copy.
Gitea [Mon, 10 Jul 2023 15:43:06 +0000 (12:43 -0300)] 
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.

19 months agores_pjsip: disable raw bad packet logging
Mike Bradeen [Tue, 25 Jul 2023 16:23:12 +0000 (10:23 -0600)] 
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.

19 months agores_rtp_asterisk.c: Check DTLS packets against ICE candidate list
George Joseph [Thu, 9 Nov 2023 16:14:03 +0000 (09:14 -0700)] 
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

19 months agomanager.c: Prevent path traversal with GetConfig.
Ben Ford [Mon, 13 Nov 2023 17:08:50 +0000 (11:08 -0600)] 
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.

21 months agoUpdate for 21.0.0 21.0.0
Asterisk Development Team [Wed, 18 Oct 2023 17:14:20 +0000 (17:14 +0000)] 
Update for 21.0.0

22 months agoUpdate for 21.0.0-rc1 21.0.0-rc1
Asterisk Development Team [Wed, 6 Sep 2023 18:21:42 +0000 (18:21 +0000)] 
Update for 21.0.0-rc1

22 months agoari-stubs: Fix more local anchor references
George Joseph [Tue, 5 Sep 2023 19:02:19 +0000 (13:02 -0600)] 
ari-stubs: Fix more local anchor references

Also allow CreateDocs job to be run manually with default branches.

(cherry picked from commit c457784bd065389154a7796e9e2dbae92cc33434)

22 months agoari-stubs: Fix more local anchor references
George Joseph [Tue, 5 Sep 2023 19:02:19 +0000 (13:02 -0600)] 
ari-stubs: Fix more local anchor references

Also allow CreateDocs job to be run manually with default branches.

(cherry picked from commit b68006f3a1e58f5a716a47547b40910644aee86b)

22 months agoari-stubs: Fix broken documentation anchors
George Joseph [Tue, 5 Sep 2023 15:51:19 +0000 (09:51 -0600)] 
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 c4508accc6aba9593e9cfb5ffb07b78a6f09c678)

22 months agores_pjsip_session: Send Session Interval too small response
Bastian Triller [Mon, 28 Aug 2023 07:16:43 +0000 (09:16 +0200)] 
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 9284dca63611605eae9e4d15609253a888ecfb48)

22 months ago.github: Update workflow-application-token-action to v2
George Joseph [Thu, 31 Aug 2023 13:23:56 +0000 (07:23 -0600)] 
.github: Update workflow-application-token-action to v2

(cherry picked from commit 83964ede1fa62e722936fcbef9ed87f87d7e9283)

22 months agoapp_dial: Fix infinite loop when sending digits.
Naveen Albert [Mon, 28 Aug 2023 17:51:23 +0000 (13:51 -0400)] 
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 c032d38d3f09af4eff8fd601b8ad02ef6dbe058b)

22 months agoapp_voicemail: Fix for loop declarations
Mike Bradeen [Tue, 29 Aug 2023 15:35:46 +0000 (09:35 -0600)] 
app_voicemail: Fix for loop declarations

Resolve for loop initial declarations added in cli changes.

Resolves: #275
(cherry picked from commit e9b269692fcd829f10c3d1e6aa2d10d3d4a8d7a7)

22 months agoalembic: Fix quoting of the 100rel column
George Joseph [Mon, 28 Aug 2023 13:11:27 +0000 (07:11 -0600)] 
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 f8438714cad0d6128c8f61d488fb134d8eb6575e)

22 months agopbx.c: Fix gcc 12 compiler warning.
Naveen Albert [Sun, 27 Aug 2023 10:32:07 +0000 (10:32 +0000)] 
pbx.c: Fix gcc 12 compiler warning.

Resolves: #277
(cherry picked from commit 9e6266e0080be2bab9c36750bcd8bb7f7e840af6)

22 months agoapp_audiosocket: Fixed timeout with -1 to avoid busy loop.
zhengsh [Thu, 24 Aug 2023 09:27:14 +0000 (17:27 +0800)] 
app_audiosocket: Fixed timeout with -1 to avoid busy loop.

Resolves: asterisk#234
(cherry picked from commit eab40e755e156586577bf953ddf419a8ea113995)

22 months agodownload_externals: Fix a few version related issues
George Joseph [Fri, 18 Aug 2023 16:20:47 +0000 (10:20 -0600)] 
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 644ad2f9cd82978abde0668ec7a56882d5484c29)

22 months agomain/refer.c: Fix double free in refer_data_destructor + potential leak
Maximilian Fridrich [Mon, 21 Aug 2023 16:28:42 +0000 (18:28 +0200)] 
main/refer.c: Fix double free in refer_data_destructor + potential leak

Resolves: #267
(cherry picked from commit 48e6a482c2f49719285b7b0c651e1a2bc246481c)

22 months agosig_analog: Add Called Subscriber Held capability.
Naveen Albert [Wed, 9 Aug 2023 22:04:23 +0000 (22:04 +0000)] 
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 cd0bfe193ff3a71ff7f7832e733624864c6c467e)

22 months agoRevert "app_stack: Print proper exit location for PBXless channels."
Matthew Fredrickson [Thu, 10 Aug 2023 16:51:12 +0000 (11:51 -0500)] 
Revert "app_stack: Print proper exit location for PBXless channels."

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
(cherry picked from commit 1d7ae8d2274ba92f2f1b2854e474407d8322f899)

22 months agoinstall_prereq: Fix dependency install on aarch64.
Jason D. McCormick [Fri, 28 Apr 2023 20:14:50 +0000 (16:14 -0400)] 
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 2f02095da8fd35eedfa5e9713863924238c65baa)

22 months agores_pjsip.c: Set contact_user on incoming call local Contact header
MikeNaso [Tue, 8 Aug 2023 14:23:37 +0000 (10:23 -0400)] 
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 720813dc97e1c51f350a735916103d00bb24cfca)

22 months agoextconfig: Allow explicit DB result set ordering to be disabled.
Sean Bright [Wed, 12 Jul 2023 16:03:59 +0000 (12:03 -0400)] 
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 1171beb7e45eff06d473915eaeef840fce842408)

22 months agorest-api: Run make ari-stubs
George Joseph [Wed, 9 Aug 2023 19:10:22 +0000 (13:10 -0600)] 
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 21b0522abd594bfb8caf89a20220a8898427f60d)

22 months agores_pjsip_header_funcs: Make prefix argument optional.
Naveen Albert [Wed, 9 Aug 2023 23:17:26 +0000 (23:17 +0000)] 
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 2179082eafdb328277fcfeed0d6f471e60186d2c)

22 months agopjproject_bundled: Increase PJSIP_MAX_MODULE to 38
George Joseph [Fri, 11 Aug 2023 13:10:18 +0000 (07:10 -0600)] 
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 d3ee0e65163f3dd3720f7f7333ad54e0253c1477)

22 months agomanager: Tolerate stasis messages with no channel snapshot.
Joshua C. Colp [Wed, 9 Aug 2023 10:57:33 +0000 (07:57 -0300)] 
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 a75035be554e05fe39bd50fc669b0b6464a3b8c0)

22 months agoRemove unneeded CHANGES and UPGRADE files
George Joseph [Wed, 9 Aug 2023 17:08:20 +0000 (11:08 -0600)] 
Remove unneeded CHANGES and UPGRADE files

(cherry picked from commit ea7e719d71a9f6b76bfe826aa69d47eb97984f0e)

23 months agoUpdate version for Asterisk 21 21.0.0-pre1
George Joseph [Wed, 9 Aug 2023 17:07:12 +0000 (11:07 -0600)] 
Update version for Asterisk 21

23 months agocore/ari/pjsip: Add refer mechanism
Maximilian Fridrich [Wed, 10 May 2023 13:53:33 +0000 (15:53 +0200)] 
core/ari/pjsip: Add refer mechanism

This change adds support for refers that are not session based. It
includes a refer implementation for the PJSIP technology which results
in out-of-dialog REFERs being sent to a PJSIP endpoint. These can be
triggered using the new ARI endpoint `/endpoints/refer`.

Resolves: #71

UserNote: There is a new ARI endpoint `/endpoints/refer` for referring
an endpoint to some URI or endpoint.

23 months agochan_dahdi: Allow autoreoriginating after hangup.
Naveen Albert [Fri, 4 Aug 2023 17:26:05 +0000 (17:26 +0000)] 
chan_dahdi: Allow autoreoriginating after hangup.

Currently, if an FXS channel is still off hook when
all calls on the line have hung up, the user is provided
reorder tone until going back on hook again.

In addition to not reflecting what most commercial switches
actually do, it's very common for switches to automatically
reoriginate for the user so that dial tone is provided without
the user having to depress and release the hookswitch manually.
This can increase convenience for users.

This behavior is now supported for kewlstart FXS channels.
It's supported only for kewlstart (FXOKS) mainly because the
behavior doesn't make any sense for ground start channels,
and loop start signalling doesn't provide the necessary DAHDI
event that makes this easy to implement. Likely almost everyone
is using FXOKS over FXOLS anyways since FXOLS is pretty useless
these days.

ASTERISK-30357 #close

Resolves: #224

UserNote: The autoreoriginate setting now allows for kewlstart FXS
channels to automatically reoriginate and provide dial tone to the
user again after all calls on the line have cleared. This saves users
from having to manually hang up and pick up the receiver again before
making another call.

23 months agoaudiohook: Unlock channel in mute if no audiohooks present.
Joshua C. Colp [Wed, 9 Aug 2023 08:39:17 +0000 (05:39 -0300)] 
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

2 years agosig_analog: Allow three-way flash to time out to silence.
Naveen Albert [Mon, 10 Jul 2023 18:53:43 +0000 (18:53 +0000)] 
sig_analog: Allow three-way flash to time out to silence.

sig_analog allows users to flash and use the three-way dial
tone as a primitive hold function, simply by never timing
it out.

Some systems allow this dial tone to time out to silence,
so the user is not annoyed by a persistent dial tone.
This option allows the dial tone to time out normally to
silence.

ASTERISK-30004 #close
Resolves: #205

UserNote: The threewaysilenthold option now allows the three-way
dial tone to time out to silence, rather than continuing forever.

2 years agores_prometheus: Do not generate broken metrics
Holger Hans Peter Freyther [Fri, 7 Apr 2023 09:44:44 +0000 (17:44 +0800)] 
res_prometheus: Do not generate broken metrics

In 8d6fdf9c3adede201f0ef026dab201b3a37b26b6 invisible bridges were
skipped but that lead to producing metrics with no name and no help.

Keep track of the number of metrics configured and then only emit these.
Add a basic testcase that verifies that there is no '(NULL)' in the
output.

ASTERISK-30474

2 years agores_pjsip: Enable TLS v1.3 if present.
Sean Bright [Wed, 2 Aug 2023 13:56:49 +0000 (09:56 -0400)] 
res_pjsip: Enable TLS v1.3 if present.

Fixes #221

UserNote: res_pjsip now allows TLS v1.3 to be enabled if supported by
the underlying PJSIP library. The bundled version of PJSIP supports
TLS v1.3.

2 years agofunc_cut: Add example to documentation.
phoneben [Tue, 18 Jul 2023 22:05:15 +0000 (01:05 +0300)] 
func_cut: Add example to documentation.

This adds an example to the XML documentation clarifying usage
of the CUT function to address a common misusage.

2 years agoextensions.conf.sample: Remove reference to missing context.
Sean Bright [Sun, 16 Jul 2023 15:49:53 +0000 (11:49 -0400)] 
extensions.conf.sample: Remove reference to missing context.

c3ff4648 removed the [iaxtel700] context but neglected to remove
references to it.

This commit addresses that and also removes iaxtel and freeworlddialup
references from other config files.

2 years agofunc_export: Use correct function argument as variable name.
Sean Bright [Wed, 12 Jul 2023 18:17:04 +0000 (14:17 -0400)] 
func_export: Use correct function argument as variable name.

Fixes #208

2 years agoapp_queue: Add support for applying caller priority change immediately.
Joshua C. Colp [Fri, 7 Jul 2023 14:29:07 +0000 (11:29 -0300)] 
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.

2 years ago.github: Fix cherry-pick reminder issues
George Joseph [Mon, 17 Jul 2023 15:23:08 +0000 (09:23 -0600)] 
.github: Fix cherry-pick reminder issues

2 years agoapp.h: Move declaration of ast_getdata_result before its first use
George Joseph [Mon, 10 Jul 2023 13:52:32 +0000 (07:52 -0600)] 
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

2 years agochan_iax2.c: Avoid crash with IAX2 switch support.
Sean Bright [Fri, 7 Jul 2023 19:57:39 +0000 (15:57 -0400)] 
chan_iax2.c: Avoid crash with IAX2 switch support.

A change made in 82cebaa0 did not properly handle the case when a
channel was not provided, triggering a crash. ast_check_hangup(...)
does not protect against NULL pointers.

Fixes #180

2 years agores_geolocation: Ensure required 'location_info' is present.
Sean Bright [Fri, 7 Jul 2023 14:11:44 +0000 (10:11 -0400)] 
res_geolocation: Ensure required 'location_info' is present.

Fixes #189

2 years agoAdds manager actions to allow move/remove/forward individual messages
Mike Bradeen [Thu, 29 Jun 2023 18:20:53 +0000 (12:20 -0600)] 
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.

2 years agoapp_voicemail: add CLI commands for message manipulation
Mike Bradeen [Tue, 20 Jun 2023 16:32:14 +0000 (10:32 -0600)] 
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>

2 years agores_rtp_asterisk: Move ast_rtp_rtcp_report_alloc using `rtp->themssrc_valid` into...
zhengsh [Fri, 30 Jun 2023 10:39:20 +0000 (18:39 +0800)] 
res_rtp_asterisk: Move ast_rtp_rtcp_report_alloc using `rtp->themssrc_valid` into the scope of the rtp_instance lock.

From the gdb information, it was found that when calling __ast_free, the size of the
allocated space pointed to by the pointer matches the size created when rtp->themssrc_valid
is equal to 0. However, in reality, when reading the value of rtp->themssrc_valid in gdb,
it is found to be 1.

Within ast_rtcp_write(), the call to ast_rtp_rtcp_report_alloc() uses rtp->themssrc_valid,
which is outside the protection of the rtp_instance lock. However,
ast_rtcp_generate_report(), which is called by ast_rtcp_generate_compound_prefix(), uses
rtp->themssrc_valid within the protection of the rtp_instance lock.

This can lead to the possibility that the value of rtp->themssrc_valid used in the call to
ast_rtp_rtcp_report_alloc() may be different from the value of rtp->themssrc_valid used
within ast_rtcp_generate_report().

Resolves: asterisk#63

2 years agousers.conf: Deprecate users.conf configuration.
Naveen Albert [Fri, 30 Jun 2023 10:21:58 +0000 (10:21 +0000)] 
users.conf: Deprecate users.conf configuration.

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.

2 years ago.github: Minor tweak to Asterisk Releaser
George Joseph [Wed, 12 Jul 2023 12:34:57 +0000 (06:34 -0600)] 
.github: Minor tweak to Asterisk Releaser

2 years ago.github: Suppress cherry-pick reminder for some situations
George Joseph [Tue, 11 Jul 2023 12:31:04 +0000 (06:31 -0600)] 
.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.

2 years agosig_analog: Allow immediate fake ring to be suppressed.
Naveen Albert [Thu, 8 Jun 2023 22:04:31 +0000 (22:04 +0000)] 
sig_analog: Allow immediate fake ring to be suppressed.

When immediate=yes on an FXS channel, sig_analog will
start fake audible ringback that continues until the
channel is answered. Even if it answers immediately,
the ringback is still audible for a brief moment.
This can be disruptive and unwanted behavior.

This adds an option to disable this behavior, though
the default behavior remains unchanged.

ASTERISK-30003 #close
Resolves: #118

UserNote: The immediatering option can now be set to no to suppress
the fake audible ringback provided when immediate=yes on FXS channels.

2 years ago.github: Update AsteriskReleaser for security releases
George Joseph [Fri, 7 Jul 2023 17:06:24 +0000 (11:06 -0600)] 
.github: Update AsteriskReleaser for security releases

2 years agoapply_patches: Use globbing instead of file/sort.
Sean Bright [Thu, 6 Jul 2023 17:51:32 +0000 (13:51 -0400)] 
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.

2 years agoapply_patches: Sort patch list before applying
George Joseph [Thu, 6 Jul 2023 12:37:50 +0000 (06:37 -0600)] 
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

2 years agopjsip: Upgrade bundled version to pjproject 2.13.1
Stanislav Abramenkov [Wed, 5 Jul 2023 08:08:35 +0000 (11:08 +0300)] 
pjsip: Upgrade bundled version to pjproject 2.13.1