]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
2 years agoconfigure: Makefile downloader enable follow redirects.
Miguel Angel Nubla [Thu, 1 Jun 2023 00:09:39 +0000 (02:09 +0200)] 
configure: Makefile downloader enable follow redirects.

If curl is used for building, any download such as a sounds package
will fail to follow HTTP redirects and will download wrong data.

Resolves: #136
(cherry picked from commit 4c2f035a353da43e06d4c7b3637b18b9835ab10e)

2 years agores_musiconhold: Add option to loop last file.
Naveen Albert [Thu, 25 May 2023 23:58:41 +0000 (23:58 +0000)] 
res_musiconhold: Add option to loop last file.

Adds the loop_last option to res_musiconhold,
which allows the last audio file in the directory
to be looped perpetually once reached, rather than
circling back to the beginning again.

Resolves: #122
ASTERISK-30462

UserNote: The loop_last option in musiconhold.conf now
allows the last file in the directory to be looped once reached.

(cherry picked from commit 2b302e30e4ddc1230d3b76654833f236bac87896)

2 years agochan_dahdi: Fix Caller ID presentation for FXO ports.
Naveen Albert [Thu, 25 May 2023 23:49:35 +0000 (23:49 +0000)] 
chan_dahdi: Fix Caller ID presentation for FXO ports.

Currently, the presentation for incoming channels is
always available, because it is never actually set,
meaning the channel presentation can be nonsensical.
If the presentation from the incoming Caller ID spill
is private or unavailable, we now update the channel
presentation to reflect this.

Resolves: #120
ASTERISK-30333
ASTERISK-21741

(cherry picked from commit 3260434b962c5f4745a777266e9537f16ed438f5)

2 years agoAMI: Add CoreShowChannelMap action.
Ben Ford [Thu, 18 May 2023 21:00:16 +0000 (16:00 -0500)] 
AMI: Add CoreShowChannelMap action.

Adds a new AMI action (CoreShowChannelMap) that takes in a channel name
and provides a list of all channels that are connected to that channel,
following local channel connections as well.

Resolves: #104

UserNote: New AMI action CoreShowChannelMap has been added.
(cherry picked from commit d6d77dc1fb2d3ae5125756d1488d083f5d1bcd9e)

2 years agosig_analog: Add fuller Caller ID support.
Naveen Albert [Thu, 18 May 2023 16:29:35 +0000 (16:29 +0000)] 
sig_analog: Add fuller Caller ID support.

A previous change, ASTERISK_29991, made it possible
to send additional Caller ID parameters that were
not previously supported.

This change adds support for analog DAHDI channels
to now be able to receive these parameters for
on-hook Caller ID, in order to enhance the usability
of CPE that support these parameters.

Resolves: #94
ASTERISK-30331

UserNote: Additional Caller ID properties are now supported on
incoming calls to FXS stations, namely the
redirecting reason and call qualifier.

(cherry picked from commit f56477a604086ec9cb0966aba3cecf26aa0eb694)

2 years agores_stasis.c: Add new type 'sdp_label' for bridge creation.
Joe Searle [Thu, 25 May 2023 09:58:45 +0000 (10:58 +0100)] 
res_stasis.c: Add new type 'sdp_label' for bridge creation.

Add new type 'sdp_label' when creating a bridge using the ARI. This will
add labels to the SDP for each stream, the label is set to the
corresponding channel id.

Resolves: #91

UserNote: When creating a bridge using the ARI the 'type' argument now
accepts a new value 'sdp_label' which will configure the bridge to add
labels for each stream in the SDP with the corresponding channel id.

(cherry picked from commit d417ab86e1edb7a97f7bcf19644038f57f87e275)

2 years agoapp_queue: Preserve reason for realtime queues
Niklas Larsson [Fri, 5 May 2023 13:30:13 +0000 (15:30 +0200)] 
app_queue: Preserve reason for realtime queues

When Asterisk is restarted it does not preserve paused reason for
members of realtime queues. This was fixed for non-realtime queues in
ASTERISK_25732

Resolves: #66

UpgradeNote: Add a new column to the queue_member table:
reason_paused VARCHAR(80) so the reason can be preserved.

UserNote: Make paused reason in realtime queues persist an
Asterisk restart. This was fixed for non-realtime
queues in ASTERISK_25732.

(cherry picked from commit 12fb5d8589ded5ed8e5827288b8b2fb84d22abdc)

2 years ago.github: Fix issues with cherry-pick-reminder
George Joseph [Mon, 5 Jun 2023 16:37:41 +0000 (10:37 -0600)] 
.github: Fix issues with cherry-pick-reminder

(cherry picked from commit 4128a922e0b8c8ca5eb9787e6b4d7b47e451718a)

2 years agoindications: logging changes
Mike Bradeen [Tue, 16 May 2023 18:43:37 +0000 (12:43 -0600)] 
indications: logging changes

Increase verbosity to indicate failure due to missing country
and to specify default on CLI dump

Resolves: #89
(cherry picked from commit 4aa213d40841307e28af0e11cd3c791c2e3851f2)

2 years ago.github Ignore error when adding reviewrs to PR
George Joseph [Mon, 5 Jun 2023 13:16:17 +0000 (07:16 -0600)] 
.github Ignore error when adding reviewrs to PR

(cherry picked from commit 1ba39efc9eeb006908b386ddb0aff11966df6bb6)

2 years ago.github: Update field descriptions for AsteriskReleaser
George Joseph [Fri, 26 May 2023 14:51:41 +0000 (08:51 -0600)] 
.github: Update field descriptions for AsteriskReleaser

(cherry picked from commit a2280e1767530f2f7deb50f3f29133775ebcd44c)

2 years agocallerid: Allow specifying timezone for date/time.
Naveen Albert [Thu, 18 May 2023 17:31:14 +0000 (17:31 +0000)] 
callerid: Allow specifying timezone for date/time.

The Caller ID generation routine currently is hardcoded
to always use the system time zone. This makes it possible
to optionally specify any TZ-format time zone.

Resolves: #98
ASTERISK-30330

(cherry picked from commit 8a03ed68773e2b637fd7ff8dd410379cbbfe17b0)

2 years agochan_pjsip: Allow topology/session refreshes in early media state
Maximilian Fridrich [Wed, 10 May 2023 14:38:04 +0000 (16:38 +0200)] 
chan_pjsip: Allow topology/session refreshes in early media state

With this change, session modifications in the early media state are
possible if the SDP was sent reliably and confirmed by a PRACK. For
details, see RFC 6337, escpecially section 3.2.

Resolves: #73
(cherry picked from commit a4cd45224628fe36218aec18e6274ea2d4583f7b)

2 years agochan_dahdi: Fix broken hidecallerid setting.
Naveen Albert [Thu, 18 May 2023 17:37:19 +0000 (17:37 +0000)] 
chan_dahdi: Fix broken hidecallerid setting.

The hidecallerid setting in chan_dahdi.conf currently
is broken for a couple reasons.

First, the actual code in sig_analog to "allow" or "block"
Caller ID depending on this setting improperly used
ast_set_callerid instead of updating the presentation.
This issue was mostly fixed in ASTERISK_29991, and that
fix is carried forward to this code as well.

Secondly, the hidecallerid setting is set on the DAHDI
pvt but not carried forward to the analog pvt properly.
This is because the chan_dahdi config loading code improperly
set permhidecallerid to permhidecallerid from the config file,
even though hidecallerid is what is actually set from the config
file. (This is done correctly for call waiting, a few lines above.)
This is fixed to read the proper value.

Thirdly, in sig_analog, hidecallerid is set to permhidecallerid
only on hangup. This can lead to potential security vulnerabilities
as an allowed Caller ID from an initial call can "leak" into subsequent
calls if no hangup occurs between them. This is fixed by setting
hidecallerid to permcallerid when calls begin, rather than when they end.
This also means we don't need to also set hidecallerid in chan_dahdi.c
when copying from the config, as we would have to otherwise.

Fourthly, sig_analog currently only allows dialing *67 or *82 if
that would actually toggle the presentation. A comment is added
clarifying that this behavior is okay.

Finally, a couple log messages are updated to be more accurate.

Resolves: #100
ASTERISK-30349 #close

(cherry picked from commit d496544d7bb0d1b839ae581d9ef2b46cbf1bf9cd)

2 years ago.github: Change title of AsteriskReleaser job
George Joseph [Tue, 23 May 2023 14:04:42 +0000 (08:04 -0600)] 
.github: Change title of AsteriskReleaser job

(cherry picked from commit 714cb0050436bf506db0ddbd9454a82044e61b62)

2 years agoasterisk.c: Fix option warning for remote console.
Naveen Albert [Thu, 18 May 2023 18:57:34 +0000 (18:57 +0000)] 
asterisk.c: Fix option warning for remote console.

Commit 09e989f972e2583df4e9bf585c246c37322d8d2f
categorized the T option as not being compatible
with remote consoles, but they do affect verbose
messages with remote console. This fixes this.

Resolves: #102
(cherry picked from commit 67d20b8fd8774efa86b0271270b0b1785614a592)

2 years ago.github: Don't add cherry-pick reminder if it's already present
George Joseph [Mon, 22 May 2023 18:54:42 +0000 (12:54 -0600)] 
.github: Don't add cherry-pick reminder if it's already present

(cherry picked from commit fd98c6cd10009acc5f37374f522d91f7e775e495)

2 years ago.github: Fix quoting in PROpenedOrUpdated
George Joseph [Tue, 16 May 2023 22:11:08 +0000 (16:11 -0600)] 
.github: Fix quoting in PROpenedOrUpdated

(cherry picked from commit 2c7304e4161c624c3c932c9540313814e38d0e34)

2 years ago.github: Add cherry-pick reminder to new PRs
George Joseph [Mon, 15 May 2023 15:32:15 +0000 (09:32 -0600)] 
.github: Add cherry-pick reminder to new PRs

(cherry picked from commit 1115b327f98e4c7ff7fec65a0b8e4c3015e36d7a)

2 years agoconfigure: fix test code to match gethostbyname_r prototype.
Jaco Kroon [Wed, 10 May 2023 21:13:17 +0000 (23:13 +0200)] 
configure: fix test code to match gethostbyname_r prototype.

This enables the test to work with CC=clang.

Without this the test for 6 args would fail with:

utils.c:99:12: error: static declaration of 'gethostbyname_r' follows non-static declaration
static int gethostbyname_r (const char *name, struct hostent *ret, char *buf,
           ^
/usr/include/netdb.h:177:12: note: previous declaration is here
extern int gethostbyname_r (const char *__restrict __name,
           ^

Fixing the expected return type to int sorts this out.

Signed-off-by: Jaco Kroon <jaco@uls.co.za>
(cherry picked from commit 3067977eac4c9ae7b403ca9f98add23e11adad47)

2 years agores_pjsip_pubsub.c: Use pjsip version for pending NOTIFY check. (#76)
Sean Bright [Thu, 11 May 2023 20:24:30 +0000 (16:24 -0400)] 
res_pjsip_pubsub.c: Use pjsip version for pending NOTIFY check. (#76)

The functionality we are interested in is present only in pjsip 2.13
and newer.

Resolves: #45
(cherry picked from commit 3e2a28fc3d17f2e9c275108753feaa823115d9df)

2 years agores_sorcery_memory_cache.c: Fix memory leak
zhengsh [Tue, 2 May 2023 19:12:38 +0000 (03:12 +0800)] 
res_sorcery_memory_cache.c: Fix memory leak

Replace the original call to ast_strdup with a call to ast_strdupa to fix the leak issue.

Resolves: #55
ASTERISK-30429

(cherry picked from commit 5e16557127fb5e60a6d6b43357afcf663d1751d6)

2 years agoxml.c: Process XML Inclusions recursively.
Sean Bright [Tue, 9 May 2023 13:27:33 +0000 (09:27 -0400)] 
xml.c: Process XML Inclusions recursively.

If processing an XInclude results in new <xi:include> elements, we
need to run XInclude processing again. This continues until no
replacement occurs or an error is encountered.

There is a separate issue with dynamic strings (ast_str) that will be
addressed separately.

Resolves: #65
(cherry picked from commit 573bdbe92416d2055e526f520bb9647c7b4f3925)

2 years ago.github: Tweak improvement issue type language.
Joshua C. Colp [Tue, 9 May 2023 13:47:05 +0000 (10:47 -0300)] 
.github: Tweak improvement issue type language.

(cherry picked from commit 8e562cea88987d29327816be3b18637e28c4ce8a)

2 years ago.github: Tweak new feature language, and move feature requests elsewhere.
Gitea [Tue, 9 May 2023 13:42:45 +0000 (10:42 -0300)] 
.github: Tweak new feature language, and move feature requests elsewhere.

(cherry picked from commit e1b29b636c1b26e809b40d37728891f0b68498fc)

2 years ago.github: Fix staleness check to only run on certain labels.
Joshua C. Colp [Tue, 9 May 2023 09:17:17 +0000 (06:17 -0300)] 
.github: Fix staleness check to only run on certain labels.

(cherry picked from commit d7b647e97f425ef242970ec0247b5ccdd63db61c)

2 years agoUpdate for 18.18.1 18.18.1
Asterisk Development Team [Fri, 7 Jul 2023 19:07:03 +0000 (19:07 +0000)] 
Update for 18.18.1

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

2 years agoUpdate for 18.18.0 18.18.0
Asterisk Development Team [Tue, 23 May 2023 14:10:22 +0000 (14:10 +0000)] 
Update for 18.18.0

2 years agoSet up new ChangeLogs directory
George Joseph [Tue, 9 May 2023 14:27:59 +0000 (08:27 -0600)] 
Set up new ChangeLogs directory

2 years agoUpdate for 18.18.0-rc1 18.18.0-rc1
Asterisk Development Team [Mon, 8 May 2023 17:55:23 +0000 (17:55 +0000)] 
Update for 18.18.0-rc1

2 years ago.github: Add AsteriskReleaser
George Joseph [Fri, 5 May 2023 18:30:08 +0000 (12:30 -0600)] 
.github: Add AsteriskReleaser

(cherry picked from commit 2392a5bb741c44354445db0dcff0d0a9fe1925ee)

2 years agochan_pjsip: also return all codecs on empty re-INVITE for late offers
Henning Westerholt [Wed, 3 May 2023 09:19:35 +0000 (09:19 +0000)] 
chan_pjsip: also return all codecs on empty re-INVITE for late offers

We should also return all codecs on an re-INVITE without SDP for a
call that used late offer (e.g. no SDP in the initial INVITE, SDP
in the ACK). Bugfix for feature introduced in ASTERISK-30193
(https://issues.asterisk.org/jira/browse/ASTERISK-30193)

Migration from previous gerrit change that was not merged.

(cherry picked from commit 8711c84e3c92ac10a62fc412733419bc2ba82400)

2 years agocel: add local optimization begin event
Mike Bradeen [Tue, 2 May 2023 15:20:22 +0000 (09:20 -0600)] 
cel: add local optimization begin event

The current AST_CEL_LOCAL_OPTIMIZE event is and has been
triggered on a local optimization end to serve as a flag
indicating the event occurred.  This change adds a second
AST_CEL_LOCAL_OPTIMIZE_BEGIN event for further detail.

Resolves: #52

UpgradeNote: The existing AST_CEL_LOCAL_OPTIMIZE can continue
to be used as-is and the AST_CEL_LOCAL_OPTIMIZE_BEGIN event
can be ignored if desired.

UserNote: The new AST_CEL_LOCAL_OPTIMIZE_BEGIN can be used
by itself or in conert with the existing
AST_CEL_LOCAL_OPTIMIZE to book-end local channel optimizaion.

(cherry picked from commit fa18f2d71e431a428b4cc3a412fb14184780a2f9)

2 years agocore: Cleanup gerrit and JIRA references. (#40)
Sean Bright [Wed, 3 May 2023 15:39:14 +0000 (11:39 -0400)] 
core: Cleanup gerrit and JIRA references. (#40)

* Remove .gitreview and switch to pulling the main asterisk branch
  version from configure.ac instead.

* Replace references to JIRA with GitHub.

* Other minor cleanup found along the way.

Resolves: #39
(cherry picked from commit 6f218514fb17e468c46dfa955e9659856efeb402)

2 years ago.github: Fix CherryPickTest to only run when it should
George Joseph [Wed, 3 May 2023 15:27:57 +0000 (09:27 -0600)] 
.github: Fix CherryPickTest to only run when it should

Fixed CherryPickTest so it triggers only on the
"cherry-pick-test" label instead of all labels.

(cherry picked from commit 49abb48678bdaf5c753e4bf84690cc76b2a1dc94)

2 years ago.github: Fix reference to CHERRY_PICK_TESTING_IN_PROGRESS
George Joseph [Tue, 2 May 2023 20:09:47 +0000 (14:09 -0600)] 
.github: Fix reference to CHERRY_PICK_TESTING_IN_PROGRESS

(cherry picked from commit f508ae9c636968588818cc371fdd36927b35d7b3)

2 years ago.github: Remove separate set labels step from new PR
George Joseph [Tue, 2 May 2023 18:11:24 +0000 (12:11 -0600)] 
.github: Remove separate set labels step from new PR

(cherry picked from commit 135764959e05939bf7a9932102925d9d2d989bea)

2 years ago.github: Refactor CP progress and add new PR test progress
George Joseph [Tue, 2 May 2023 18:04:22 +0000 (12:04 -0600)] 
.github: Refactor CP progress and add new PR test progress

(cherry picked from commit 0395ee476056c24d1fd7d1b70ec9c3c3e5365c25)

2 years agores_pjsip: mediasec: Add Security-Client headers after 401
Maximilian Fridrich [Tue, 2 May 2023 08:55:39 +0000 (10:55 +0200)] 
res_pjsip: mediasec: Add Security-Client headers after 401

When using mediasec, requests sent after a 401 must still contain the
Security-Client header according to
draft-dawes-sipcore-mediasec-parameter.

Resolves: #48
(cherry picked from commit ecd5f911252e3c86bede4440f9c34392eb703793)

2 years ago.github: Add cherry-pick test progress labels
George Joseph [Tue, 2 May 2023 14:56:37 +0000 (08:56 -0600)] 
.github: Add cherry-pick test progress labels

(cherry picked from commit eece5824aae43fd4d45f501fb88e424640a3c07e)

2 years agoLICENSE: Update link to trademark policy.
Joshua C. Colp [Mon, 1 May 2023 15:37:45 +0000 (12:37 -0300)] 
LICENSE: Update link to trademark policy.

Resolves: #43
(cherry picked from commit f85587815fe189b576fc770fb9d5e43c326d7187)

2 years agochan_dahdi: Add dialmode option for FXS lines. (#36)
InterLinked1 [Tue, 2 May 2023 14:05:12 +0000 (09:05 -0500)] 
chan_dahdi: Add dialmode option for FXS lines. (#36)

Currently, both pulse and tone dialing are always enabled
on all FXS lines, with no way of disabling one or the other.

In some circumstances, it is desirable or necessary to
disable one of these, and this behavior can be problematic.

A new "dialmode" option is added which allows setting the
methods to support on a per channel basis for FXS (FXO
signalled lines). The four options are "both", "pulse",
"dtmf"/"tone", and "none".

Additionally, integration with the CHANNEL function is
added so that this setting can be updated for a channel
during a call.

Resolves: #35
ASTERISK-29992

UserNote: A "dialmode" option has been added which allows
specifying, on a per-channel basis, what methods of
subscriber dialing (pulse and/or tone) are permitted.

Additionally, this can be changed on a channel
at any point during a call using the CHANNEL
function.

(cherry picked from commit 5d1dd11143cf9fc899881476a1898aecf42e95ae)

2 years ago.github: Update issue templates
George Joseph [Mon, 1 May 2023 15:37:29 +0000 (09:37 -0600)] 
.github: Update issue templates

(cherry picked from commit a8a0adcdda5bd0335dfb25f9a45f52977e48674b)

2 years ago.github: Remove unnecessary parameter in CherryPickTest
George Joseph [Mon, 1 May 2023 12:48:32 +0000 (06:48 -0600)] 
.github: Remove unnecessary parameter in CherryPickTest

(cherry picked from commit f4a3012619c48fc0b0d26793eddd413512c422ac)

2 years agoInitial GitHub PRs
George Joseph [Fri, 28 Apr 2023 18:31:03 +0000 (12:31 -0600)] 
Initial GitHub PRs

(cherry picked from commit ac403ec484df307fe31c364be08b3bfbf0e49827)

2 years agoInitial GitHub Issue Templates
George Joseph [Fri, 28 Apr 2023 17:17:21 +0000 (11:17 -0600)] 
Initial GitHub Issue Templates

(cherry picked from commit 790f208c6e8218b2dfac9f04e2f9665f694c77e7)

2 years agopbx_dundi: Fix PJSIP endpoint configuration check.
Joshua C. Colp [Thu, 13 Apr 2023 09:35:17 +0000 (06:35 -0300)] 
pbx_dundi: Fix PJSIP endpoint configuration check.

ASTERISK-28233

Change-Id: I0f11c096b307a6178e22ca49d9c756343f0e1fdc
(cherry picked from commit f5c9f7d3c802a0f504d099274eaad7893ee7bb48)

2 years agoRevert "app_queue: periodic announcement configurable start time."
Joshua Colp [Tue, 11 Apr 2023 23:37:20 +0000 (18:37 -0500)] 
Revert "app_queue: periodic announcement configurable start time."

This reverts commit c405630810bd92ac27d7618d3470dbac11aecced.

Reason for revert: Causes segmentation fault.

Change-Id: Ib0c8c592f8d4f0a5e3889aeadfe8bdcde800ba42
(cherry picked from commit a8ce41b7f7a8e257c8516c0751fc1a2d894bf102)

2 years agopbx_dundi: Add PJSIP support.
Naveen Albert [Fri, 9 Dec 2022 14:18:26 +0000 (14:18 +0000)] 
pbx_dundi: Add PJSIP support.

Adds PJSIP as a supported technology to DUNDi.

To facilitate this, we now allow an endpoint to be specified
for outgoing PJSIP calls. We also allow users to force a specific
channel technology for outgoing SIP-protocol calls.

ASTERISK-28109 #close
ASTERISK-28233 #close

Change-Id: I2e28e5a5d007bd49e3df113ad567b011103899bf
(cherry picked from commit 4e602a1afe511fdcefe01e72f6f0b28059745327)

2 years agores_pjsip_stir_shaken: Fix JSON field ordering and disallowed TN characters.
Naveen Albert [Fri, 17 Feb 2023 13:45:16 +0000 (13:45 +0000)] 
res_pjsip_stir_shaken: Fix JSON field ordering and disallowed TN characters.

The current STIR/SHAKEN signing process is inconsistent with the
RFCs in a couple ways that can cause interoperability issues.

RFC8225 specifies that the keys must be ordered lexicographically, but
currently the fields are simply ordered according to the order
in which they were added to the JSON object, which is not
compliant with the RFC and can cause issues with some carriers.

To fix this, we now leverage libjansson's ability to dump a JSON
object sorted by key value, yielding the correct field ordering.

Additionally, telephone numbers must have any leading + prefix removed
and must not contain characters outside of 0-9, *, and # in order
to comply with the RFCs. Numbers are now properly formatted as such.

ASTERISK-30407 #close

Change-Id: Iab76d39447c4b8cf133de85657dba02fda07f9a2
(cherry picked from commit 1bbcb98558be145c431f3f07cf7d2b9b00ac78b6)

2 years agoinstall_prereq: Add Linux Mint support.
The_Blode [Fri, 17 Mar 2023 15:51:57 +0000 (15:51 +0000)] 
install_prereq: Add Linux Mint support.

ASTERISK-30359 #close

Change-Id: I9c140c7f12ca7dafe65c317f2a26122cf2c72556
(cherry picked from commit e234531f5a3e4eebd409ffcf62795e81d2c0e787)

2 years agochan_pjsip: fix music on hold continues after INVITE with replaces
Henning Westerholt [Tue, 21 Mar 2023 07:48:38 +0000 (07:48 +0000)] 
chan_pjsip: fix music on hold continues after INVITE with replaces

In a three party scenario with INVITE with replaces, we need to
unhold the call, otherwise one party continues to get music on
hold, and the call is not properly bridged between them.

ASTERISK-30428

Change-Id: I5675df11e739be5226b328f8828d4b8d81fbefb4
(cherry picked from commit 91c4d78914cfc8fe5fa25e9fac55f2d5485ba4d9)

2 years agovoicemail.conf: Fix incorrect comment about #include.
Naveen Albert [Tue, 28 Mar 2023 13:37:55 +0000 (13:37 +0000)] 
voicemail.conf: Fix incorrect comment about #include.

A comment at the top of voicemail.conf says that #include
cannot be used in voicemail.conf because this breaks
the ability for app_voicemail to auto-update passwords.
This is factually incorrect, since Asterisk has no problem
updating files that are #include'd in the main configuration
file, and this does work in voicemail.conf as well.

ASTERISK-30479 #close

Change-Id: I3bf7d275849ab83f55f7fb6702a75a3077ee1df3
(cherry picked from commit f5289a5483c5be8bb78cb3dc6ad16a9e6e675003)

2 years agoapp_queue: Fix minor xmldoc duplication and vagueness.
Naveen Albert [Mon, 3 Apr 2023 14:16:59 +0000 (14:16 +0000)] 
app_queue: Fix minor xmldoc duplication and vagueness.

The F option in the xmldocs for the Queue application
was erroneously duplicated, causing it to display
twice on the wiki. The two sections are now merged into one.

Additionally, the description for the d option was quite
vague. Some more details are added to provide context
as to what this actually does.

ASTERISK-30486 #close

Change-Id: I6706cea708b5cc781f59f8652c2cb377e55aed7e
(cherry picked from commit 1ed147ffc11e7a3ed3a93dff0312cead1cc60ab9)

2 years agotest.c: Fix counting of tests and add 2 new tests
George Joseph [Tue, 28 Mar 2023 14:07:09 +0000 (08:07 -0600)] 
test.c: Fix counting of tests and add 2 new tests

The unit test XML output was counting all registered tests as "run"
even when only a subset were actually requested to be run and
the "failures" attribute was missing.

* The "tests" attribute of the "testsuite" element in the
  output XML now reflects only the tests actually requested
  to be executed instead of all the tests registered.

* The "failures" attribute was added to the "testsuite"
  element.

Also added 2 new unit tests that just pass and fail to be
used for CI testing.

Change-Id: Ia137814b5aeb0e1a44c75034bd3615c26021da69
(cherry picked from commit a346fa54a593744b1bfa9a4744301906c6adc309)

2 years agoloader.c: Minor module key check simplification.
Sean Bright [Thu, 23 Mar 2023 15:08:15 +0000 (11:08 -0400)] 
loader.c: Minor module key check simplification.

Change-Id: I65aefd4434a783096165c179b5f94f2e4810dffe
(cherry picked from commit eb495553876add9f9a0bbf74d0e1b84f3ec739e4)

2 years agoael: Regenerate lexers and parsers.
Sean Bright [Tue, 21 Mar 2023 13:24:59 +0000 (09:24 -0400)] 
ael: Regenerate lexers and parsers.

Various changes to ensure that the lexers and parsers can be correctly
generated when REBUILD_PARSERS is enabled.

Some notes:

* Because of the version of flex we are using to generate the lexers
  (2.5.35) some post-processing in the Makefile is still required.

* The generated lexers do not contain the problematic C99 check that
  was being replaced by the call to sed in the respective Makefiles so
  it was removed.

* Since these files are generated, they will include trailing
  whitespace in some places. This does not need to be corrected.

Change-Id: Ibbd343606fcf5c0d285b1599e6e8e59f514f2e4e
(cherry picked from commit ee4278959a4b6f7c4ccbc62d92853665334c28d6)

2 years agores_calendar: output busy state as part of show calendar.
Jaco Kroon [Thu, 23 Mar 2023 08:20:51 +0000 (10:20 +0200)] 
res_calendar: output busy state as part of show calendar.

Change-Id: I894e4ecc3e93db4ff7783d46266ba3c5e6ccda10
Signed-off-by: Jaco Kroon <jaco@uls.co.za>
(cherry picked from commit 3ad6140b169b427d3aa8347df847c920202e7eca)

2 years agobridge_builtin_features: add beep via touch variable
Mike Bradeen [Wed, 1 Mar 2023 22:39:15 +0000 (15:39 -0700)] 
bridge_builtin_features: add beep via touch variable

Add periodic beep option to one-touch recording by setting
the touch variable TOUCH_MONITOR_BEEP or
TOUCH_MIXMONITOR_BEEP to the desired interval in seconds.

If the interval is less than 5 seconds, a minimum of 5
seconds will be imposed.  If the interval is set to an
invalid value, it will default to 15 seconds.

A new test event PERIODIC_HOOK_ENABLED was added to the
func_periodic_hook hook_on function to indicate when
a hook is started.  This is so we can test that the touch
variable starts the hook as expected.

ASTERISK-30446

Change-Id: I800e494a789ba7a930bbdcd717e89d86040d6661
(cherry picked from commit 1ad52a126322f045094b6d32625f4bc27883ab10)

2 years agores_mixmonitor: MixMonitorMute by MixMonitor ID
Mike Bradeen [Mon, 13 Mar 2023 19:27:06 +0000 (13:27 -0600)] 
res_mixmonitor: MixMonitorMute by MixMonitor ID

While it is possible to create multiple mixmonitor instances
on a channel, it was not previously possible to mute individual
instances.

This change includes the ability to specify the MixMonitorID
when calling the manager action: MixMonitorMute.  This will
allow an individual MixMonitor instance to be muted via id.
This id can be stored as a channel variable using the 'i'
MixMonitor option.

As part of this change, if no MixMonitorID is specified in
the manager action MixMonitorMute, Asterisk will set the mute
flag on all MixMonitor spy-type audiohooks on the channel.
This is done via the new audiohook function:
ast_audiohook_set_mute_all.

ASTERISK-30464

Change-Id: Ibba8c7e750577aa1595a24b23316ef445245be98
(cherry picked from commit b2e9419961cd2810e440efc515a38778ee656013)

2 years agoformat_sln: add .slin as supported file extension
Mike Bradeen [Tue, 14 Mar 2023 15:25:12 +0000 (09:25 -0600)] 
format_sln: add .slin as supported file extension

Adds '.slin' to existing supported file extensions:
.sln and .raw

ASTERISK-30465

Change-Id: Ice848addc03a64c8404b87cb5d3b13399c57e496
(cherry picked from commit 71a83c128df16ed1b548750f262f3c8789efc3de)

2 years 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.

ASTERISK-30437 #close
Change-Id: Ia79984b6377ef78f167ad9ea2ac084bec29955d0
Signed-off-by: Jaco Kroon <jaco@uls.co.za>
(cherry picked from commit c405630810bd92ac27d7618d3470dbac11aecced)

2 years agofunc_json: Fix JSON parsing issues.
Naveen Albert [Sun, 26 Feb 2023 15:40:15 +0000 (15:40 +0000)] 
func_json: Fix JSON parsing issues.

Fix issue with returning empty instead of dumping
the JSON string when recursing.

Also adds a unit test to capture this fix.

ASTERISK-30441 #close

Change-Id: If0bde9f3fe84f7af485e0838205cc21e0f752a85
(cherry picked from commit 595fe0f1cc7e7b2800d5bfeafe6bc3759889cd50)

2 years agoapp_dial: Fix DTMF not relayed to caller on unanswered calls.
Naveen Albert [Sat, 4 Mar 2023 00:09:23 +0000 (00:09 +0000)] 
app_dial: Fix DTMF not relayed to caller on unanswered calls.

DTMF frames are not handled in app_dial when sent towards the
caller. This means that if DTMF is sent to the calling party
and the call has not yet been answered, the DTMF is not audible.
This is now fixed by relaying DTMF frames if only a single
destination is being dialed.

ASTERISK-29516 #close

Change-Id: Iafd7430ac2915126d42dc48f0b73b262452ee027
(cherry picked from commit 48e3da5cdf70a5d9cd28eea87ffacb0b778f6b45)

2 years agomake_version: Strip svn stuff and suppress ref HEAD errors
George Joseph [Mon, 13 Mar 2023 19:35:07 +0000 (13:35 -0600)] 
make_version: Strip svn stuff and suppress ref HEAD errors

* All of the code that used subversion has been removed.

* When Asterisk is checked out from a tag or commit instead
  of one of the regular branches, git would emit messages like
  "fatal: ref HEAD is not a symbolic ref" which weren't fatal
  at all.  Those are now suppressed.

Change-Id: I2a11bc9ebbaf6dfa50f53516ede50a6bac65ca3c
(cherry picked from commit f41183e101f0ce453be9a90f40a02705138d844c)

2 years agoconfigure: fix detection of re-entrant resolver functions
Fabrice Fontaine [Wed, 8 Mar 2023 18:26:51 +0000 (19:26 +0100)] 
configure: fix detection of re-entrant resolver functions

uClibc does not provide res_nsearch:
asterisk-16.0.0/main/dns.c:506: undefined reference to `res_nsearch'

Patch coded by Yann E. MORIN:
http://lists.busybox.net/pipermail/buildroot/2018-October/232630.html

ASTERISK-21795 #close

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
[Retrieved from:
https: //git.buildroot.net/buildroot/tree/package/asterisk/0005-configure-fix-detection-of-re-entrant-resolver-funct.patch]
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Change-Id: I79296f19e28ec764bbd1e991bf11c416d0b10563
(cherry picked from commit a10b4f5d2c85a7f6c1fbe5e942fec1eea60cff47)

2 years agocli: increase channel column width
Mike Bradeen [Mon, 6 Mar 2023 20:52:18 +0000 (13:52 -0700)] 
cli: increase channel column width

For 'core show channels', the Channel name field is increased
to 64 characters and the Location name field is increased to
32 characters.

For 'core show channels verbose', the Channel name field is
increased to 80 characters, the Context is increased to 24
characters and the Extension is increased to 24 characters.

ASTERISK-30455

Change-Id: Ibec3742ce360ffc93bc56e9984c2a21dabc4d5e1
(cherry picked from commit f102e81d0faf32120df816d5d7a510a1a416ac30)

2 years agores_agi: RECORD FILE plays 2 beeps.
Sean Bright [Wed, 8 Mar 2023 14:12:48 +0000 (09:12 -0500)] 
res_agi: RECORD FILE plays 2 beeps.

Sending the "RECORD FILE" command without the optional
`offset_samples` argument can result in two beeps playing on the
channel.

This bug has been present since Asterisk 0.3.0 (2003-02-06).

ASTERISK-30457 #close

Change-Id: I95e88aa59378784d7f0eb648843f090e6723b787
(cherry picked from commit bcf0ffd2789c414001f56003292ebd8703b1ae72)

2 years agoapp_senddtmf: Add SendFlash AMI action.
Naveen Albert [Sun, 26 Feb 2023 13:15:50 +0000 (13:15 +0000)] 
app_senddtmf: Add SendFlash AMI action.

Adds an AMI action to send a flash event
on a channel.

ASTERISK-30440 #close

Change-Id: I4707aeecb3cd8f3e63fd0c3fe009798943c369c9
(cherry picked from commit 0c8b42ede3d9d1516540afd732afa3ad2e5f0d14)

2 years agocontrib: rc.archlinux.asterisk uses invalid redirect.
Sean Bright [Thu, 2 Mar 2023 14:59:51 +0000 (09:59 -0500)] 
contrib: rc.archlinux.asterisk uses invalid redirect.

`rc.archlinux.asterisk`, which explicitly requests bash in its
shebang, uses the following command syntax:

  ${DAEMON} -rx "core stop now" > /dev/null 2&>1

The intent of which is to execute:

  ${DAEMON} -rx "core stop now"

While sending both stdout and stderr to `/dev/null`. Unfortunately,
because the `&` is in the wrong place, bash is interpreting the `2` as
just an additional argument to the `$DAEMON` command and not as a file
descriptor and proceeds to use the bashism `&>` to send stderr and
stdout to a file named `1`.

So we clean it up and just use bash's shortcut syntax.

Issue raised and a fix suggested (but not used) by peutch on GitHub¹.

ASTERISK-30449 #close

1. https://github.com/asterisk/asterisk/pull/31

Change-Id: Ie279bf4efb4d95cbf507313483d316e977303d19
(cherry picked from commit 5283d444d9ea4ae85c973b3c4994002a3aebc410)

2 years agomain/iostream.c: fix build with libressl
Fabrice Fontaine [Sat, 25 Feb 2023 10:27:12 +0000 (11:27 +0100)] 
main/iostream.c: fix build with libressl

Fix the following build failure with libressl by using SSL_is_server
which is available since version 2.7.0 and
https://github.com/libressl-portable/openbsd/commit/d7ec516916c5eaac29b02d7a8ac6570f63b458f7:

iostream.c: In function 'ast_iostream_close':
iostream.c:559:41: error: invalid use of incomplete typedef 'SSL' {aka 'struct ssl_st'}
  559 |                         if (!stream->ssl->server) {
      |                                         ^~

ASTERISK-30107 #close

Fixes: - http://autobuild.buildroot.org/results/ce4d62d00bb77ba5b303cacf6be7e350581a62f9
Change-Id: Iea7f34970297f2fb50285d73462d0174ba7e9587
(cherry picked from commit f34d9d56189e9ad9663ddf4e20f350c6321b2993)

2 years agores_http_media_cache: Introduce options and customize
Holger Hans Peter Freyther [Sun, 16 Oct 2022 09:03:53 +0000 (17:03 +0800)] 
res_http_media_cache: Introduce options and customize

Make the existing CURL parameters configurable and allow
to specify the usable protocols, proxy and DNS timeout.

ASTERISK-30340

Change-Id: I2eb02ef44190e026716720419bcbdbcc8125777b
(cherry picked from commit 2048877889797da91e7e1c29af02ede43d758b44)

2 years agoUpdate for 18.17.1 18.17 18.17.1
Asterisk Development Team [Mon, 3 Apr 2023 15:47:51 +0000 (10:47 -0500)] 
Update for 18.17.1

2 years agores_pjsip_pubsub: subscription cleanup changes
Mike Bradeen [Wed, 29 Mar 2023 18:49:51 +0000 (12:49 -0600)] 
res_pjsip_pubsub: subscription cleanup changes

There are two main parts of the change associated with this
commit. These are driven by the change in call order of
pubsub_on_rx_refresh and pubsub_on_evsub_state by pjproject
when an in-dialog SUBSCRIBE is received.

First, the previous behavior was for pjproject to call
pubsub_on_rx_refresh before calling pubsub_on_evsub_state
when an in-dialog SUBSCRIBE was received that changes the
subscription state.

If that change was a termination due to a re-SUBSCRIBE with
an expires of 0, we used to use the call to pubsub_on_rx_refresh
to set the substate of the evsub to TERMINATE_PENDING before
pjproject could call pubsub_on_evsub_state.

This substate let pubsub_on_evsub_state know that the
subscription TERMINATED event could be ignored as there was
still a subsequent NOTIFY that needed to be generated and
another call to pubsub_on_evsub_state to come with it.

That NOTIFY was sent via serialized_pubsub_on_refresh_timeout
which would see the TERMINATE_PENDING state and transition it
to TERMINATE_IN_PROGRESS before triggering another call to
pubsub_on_evsub_state (which now would clean up the evsub.)

The new pjproject behavior is to call pubsub_on_evsub_state
before pubsub_on_rx_refresh. This means we no longer can set
the state to TERMINATE_PENDING to tell pubsub_on_evsub_state
that it can ignore the first TERMINATED event.

To handle this, we now look directly at the event type,
method type and the expires value to determine whether we
want to ignore the event or use it to trigger the evsub
cleanup.

Second, pjproject now expects the NOTIFY to actually be sent
during pubsub_on_rx_refresh and avoids the protocol violation
inherent in sending a NOTIFY before the SUBSCRIBE is
acknowledged by caching the sent NOTIFY then sending it
after responding to the SUBSCRIBE.

This requires we send the NOTIFY using the non-serialized
pubsub_on_refresh_timeout directly and let pjproject handle
the protocol violation.

ASTERISK-30469

Change-Id: I05c1d91a44fe28244ae93faa4a2268a3332b5fd7

2 years agoRevert "pbx_ael: Global variables are not expanded."
Sean Bright [Sun, 19 Mar 2023 21:30:06 +0000 (16:30 -0500)] 
Revert "pbx_ael: Global variables are not expanded."

This reverts commit f67258d17283f245b0d8a34c2288ca290fe679bf.

Reason for revert: Behavior change that breaks existing dialplan.

ASTERISK-30472 #close

Change-Id: Ia03fa7f049f964ed396f6bf6d7ca096b665aa6b3

2 years agoUpdate for 18.17.0 18.17.0
Asterisk Development Team [Thu, 9 Mar 2023 17:12:51 +0000 (12:12 -0500)] 
Update for 18.17.0

2 years agoUpdate for 18.17.0-rc1 18.17.0-rc1
Asterisk Development Team [Thu, 2 Mar 2023 16:41:01 +0000 (11:41 -0500)] 
Update for 18.17.0-rc1

2 years agoUpdate CHANGES and UPGRADE.txt for 18.17.0
Asterisk Development Team [Thu, 2 Mar 2023 16:35:33 +0000 (11:35 -0500)] 
Update CHANGES and UPGRADE.txt for 18.17.0

2 years agores_pjsip: Replace invalid UTF-8 sequences in callerid name
George Joseph [Thu, 16 Feb 2023 16:05:30 +0000 (09:05 -0700)] 
res_pjsip: Replace invalid UTF-8 sequences in callerid name

* Added a new function ast_utf8_replace_invalid_chars() to
  utf8.c that copies a string replacing any invalid UTF-8
  sequences with the Unicode specified U+FFFD replacement
  character.  For example:  "abc\xffdef" becomes "abc\uFFFDdef".
  Any UTF-8 compliant implementation will show that character
  as a � character.

* Updated res_pjsip:set_id_from_hdr() to use
  ast_utf8_replace_invalid_chars and print a warning if any
  invalid sequences were found during the copy.

* Updated stasis_channels:ast_channel_publish_varset to use
  ast_utf8_replace_invalid_chars and print a warning if any
  invalid sequences were found during the copy.

ASTERISK-27830

Change-Id: I4ffbdb19c80bf0efc675d40078a3ca4f85c567d8

2 years agotest.c: Avoid passing -1 to FD_* family of functions.
Sean Bright [Tue, 28 Feb 2023 00:35:11 +0000 (19:35 -0500)] 
test.c: Avoid passing -1 to FD_* family of functions.

This avoids buffer overflow errors when running tests that capture
output from child processes.

This also corrects a copypasta in an off-nominal error message.

Change-Id: Ib482847a3515364f14c7e7a0c0a4213851ddb10d

2 years agotest_crypto.c: Fix getcwd(…) build error.
Sean Bright [Mon, 27 Feb 2023 21:35:57 +0000 (16:35 -0500)] 
test_crypto.c: Fix getcwd(…) build error.

`getcwd(…)` is decorated with the `warn_unused_result` attribute and
therefore needs its return value checked.

Change-Id: Idcccb20a0abf293202c28633d0e9ee0f6a9dbe93

2 years agochan_iax2: Fix jitterbuffer regression prior to receiving audio.
Naveen Albert [Wed, 14 Dec 2022 16:00:51 +0000 (16:00 +0000)] 
chan_iax2: Fix jitterbuffer regression prior to receiving audio.

ASTERISK_29392 (a security fix) introduced a regression by
not processing frames when we don't have an audio format.

Currently, chan_iax2 only calls jb_get to read frames from
the jitterbuffer when the voiceformat has been set on the pvt.
However, this only happens when we receive a voice frame, which
means that prior to receiving voice frames, other types of frames
get stalled completely in the jitterbuffer.

To fix this, we now fallback to using the format negotiated during
call setup until we've actually received a voice frame with a format.
This ensures we're always able to read from the jitterbuffer.

ASTERISK-30354 #close
ASTERISK-30162 #close

Change-Id: Ie4fd1e8e088a145ad89e0427c2100a530e964fe9

2 years agopjproject_bundled: Fix cross-compilation with SSL libs.
Nick French [Sat, 11 Feb 2023 12:58:43 +0000 (06:58 -0600)] 
pjproject_bundled: Fix cross-compilation with SSL libs.

Asterisk makefiles auto-detect SSL library availability,
then they assume that pjproject makefiles will also autodetect
an SSL library at the same time, so they do not pass on the
autodetection result to pjproject.

This normally works, except the pjproject makefiles disables
autodetection when cross-compiling.

Fix by explicitly configuring pjproject to use SSL if we
have been told to use it or it was autodetected

ASTERISK-30424 #close

Change-Id: I8fe2999ea46710e21d1d55a1bed92769c6ebded9

2 years agoapp_read: Add an option to return terminator on empty digits.
Mike Bradeen [Mon, 30 Jan 2023 23:14:30 +0000 (16:14 -0700)] 
app_read: Add an option to return terminator on empty digits.

Adds 'e' option to allow Read() to return the terminator as the
dialed digits in the case where only the terminator is entered.

ie; if "#" is entered, return "#" if the 'e' option is set and ""
if it is not.

ASTERISK-30411

Change-Id: I49f3221824330a193a20c660f99da0f1fc2cbbc5

2 years agores_phoneprov.c: Multihomed SERVER cache prevention
cmaj [Sun, 8 Jan 2023 05:04:57 +0000 (22:04 -0700)] 
res_phoneprov.c: Multihomed SERVER cache prevention

Phones moving between subnets on multi-homed server have their
initially connected interface IP cached in the SERVER variable,
even when it is not specified in the configuration files. This
prevents phones from obtaining the correct SERVER variable value
when they move to another subnet.

ASTERISK-30388 #close
Reported-by: cmaj
Change-Id: I1d18987a9d58e85556b4c4a6814ce7006524cc92

2 years agoapp_directory: Add a 'skip call' option.
Mike Bradeen [Fri, 27 Jan 2023 20:23:59 +0000 (13:23 -0700)] 
app_directory: Add a 'skip call' option.

Adds 's' option to skip calling the extension and instead set the
extension as DIRECTORY_EXTEN channel variable.

ASTERISK-30405

Change-Id: Ib9d9db1ba5b7524594c640461b4aa8f752db8299

2 years agores_pjsip: Prevent SEGV in pjsip_evsub_send_request
Mike Bradeen [Tue, 21 Feb 2023 20:25:28 +0000 (13:25 -0700)] 
res_pjsip: Prevent SEGV in pjsip_evsub_send_request

contributed pjproject - patch to check sub->pending_notify
in evsub.c:on_tsx_state before calling
pjsip_evsub_send_request()

res_pjsip_pubsub - change post pjsip 2.13 behavior to use
pubsub_on_refresh_timeout to avoid the ao2_cleanup call on
the sub_tree. This is is because the final NOTIFY send is no
longer the last place the sub_tree is referenced.

ASTERISK-30419

Change-Id: Ib5cc662ce578e9adcda312e16c58a10b6453e438

2 years agoapp_senddtmf: Add option to answer target channel.
Mike Bradeen [Mon, 6 Feb 2023 15:54:56 +0000 (08:54 -0700)] 
app_senddtmf: Add option to answer target channel.

Adds a new option to SendDTMF() which will answer the specified
channel if it is not already up. If no channel is specified, the
current channel will be answered instead.

ASTERISK-30422

Change-Id: Iddcbd501fcdf9fef0f453b7a8115a90b11f1d085

2 years agoapp_queue: Minor docs and logging fixes for UnpauseQueueMember.
Sean Bright [Thu, 2 Feb 2023 14:19:18 +0000 (09:19 -0500)] 
app_queue: Minor docs and logging fixes for UnpauseQueueMember.

ASTERISK-30417 #close

Change-Id: I7534e7a925bf92a7b5a5347f5f54225768c162fe

2 years agoapp_queue: Reset all queue defaults before reload.
Sean Bright [Tue, 31 Jan 2023 14:40:54 +0000 (09:40 -0500)] 
app_queue: Reset all queue defaults before reload.

Several queue fields were not being set to their default value during
a reload.

Additionally added some sample configuration options that were missing
from queues.conf.sample.

Change-Id: I3a88c7877af91752b1b46a0c087384f7eb9c47e4

2 years agores_pjsip: Upgraded bundled pjsip to 2.13
Mike Bradeen [Fri, 20 Jan 2023 22:50:44 +0000 (15:50 -0700)] 
res_pjsip: Upgraded bundled pjsip to 2.13

Removed multiple patches.

Code chages in res_pjsip_pubsub due to changes in evsub.

Pjsip now calls on_evsub_state() before on_rx_refresh(),
so the sub tree deletion that used to take place in
on_evsub_state() now must take place in on_rx_refresh().

Additionally, pjsip now requires that you send the NOTIFY
from within on_rx_refresh(), otherwise it will assert
when going to send the 200 OK. The idea is that it will
look for this NOTIFY and cache it until after sending the
response in order to deal with the self-imposed message
mis-order. Asterisk previously dealt with this by pushing
the NOTIFY in on_rx_refresh(), but pjsip now forces us
to use it's method.

Changes were required to configure in order to detect
which way pjsip handles this as the two are not
compatible for the reasons mentioned above.

A corresponding change in testsuite is required in order
to deal with the small interal timing changes caused by
moving the NOTIFY send.

ASTERISK-30325

Change-Id: I50b00cac89d950d3511d7b250a1c641965d9fe7f

2 years agoapp_signal: Add signaling applications
Naveen Albert [Thu, 6 Jan 2022 22:11:44 +0000 (22:11 +0000)] 
app_signal: Add signaling applications

Adds the Signal and WaitForSignal
applications, which can be used for inter-channel
signaling in the dialplan.

Signal supports sending a signal to other channels
listening for a signal of the same name, with an
optional data payload. The signal is received by
all channels waiting for that named signal.

ASTERISK-29810 #close

Change-Id: Ic34439de3d60f8609357666a465c354d81f5fef3

2 years agodoxygen: Fix doxygen errors.
Sean Bright [Mon, 30 Jan 2023 21:17:08 +0000 (16:17 -0500)] 
doxygen: Fix doxygen errors.

Change-Id: Ic50e95b4fc10f74ab15416d908e8a87ee8ec2f85

2 years agoapp_directory: add ability to specify configuration file
Mike Bradeen [Wed, 25 Jan 2023 22:27:31 +0000 (15:27 -0700)] 
app_directory: add ability to specify configuration file

Adds option to app_directory to specify a filename from which to
read configuration instead of voicemail.conf ie;

same => n,Directory(,,c(directory.conf))

This configuration should contain a list of extensions using the
voicemail.conf format, ie;

2020=2020,Dog Dog,,,,attach=no|saycid=no|envelope=no|delete=no

ASTERISK-30404

Change-Id: Id58ccb1344ad1e563fa10db12f172fbd104a9d13

2 years agopbx_ael: Global variables are not expanded.
Sean Bright [Thu, 26 Jan 2023 20:18:08 +0000 (15:18 -0500)] 
pbx_ael: Global variables are not expanded.

Variable references within global variable assignments are now
expanded rather than being included literally.

ASTERISK-30406 #close

Change-Id: I136e8d6395e90a4c92d9777a46a7bc3edb08d05d

2 years agofunc_json: Enhance parsing capabilities of JSON_DECODE
Naveen Albert [Sat, 12 Feb 2022 21:59:52 +0000 (21:59 +0000)] 
func_json: Enhance parsing capabilities of JSON_DECODE

Adds support for arrays to JSON_DECODE by allowing the
user to print out entire arrays or index a particular
key or print the number of keys in a JSON array.

Additionally, adds support for recursively iterating a
JSON tree in a single function call, making it easier
to parse JSON results with multiple levels. A maximum
depth is imposed to prevent potentially blowing
the stack.

Also fixes a bug with the unit tests causing an empty
string to be printed instead of the actual test result.

ASTERISK-29913 #close

Change-Id: I603940b216a3911b498fc6583b18934011ef5d5b

2 years agores_pjsip_session: Add overlap_context option.
Naveen Albert [Thu, 13 Oct 2022 13:45:26 +0000 (13:45 +0000)] 
res_pjsip_session: Add overlap_context option.

Adds the overlap_context option, which can be used
to explicitly specify a context to use for overlap
dialing extension matches, rather than forcibly
using the context configured for the endpoint.

ASTERISK-30262 #close

Change-Id: Ibbcd4a8b11402428a187fb56b8d4e7408774a0db