Commit Graph

33612 Commits

Author SHA1 Message Date
Sean Bright
b2e1bcd07b res_crypto.c: Avoid using the non-portable ALLPERMS macro.
ALLPERMS is not POSIX and it's trivial enough to not jump through
autoconf hoops to check for it.

Fixes #149.

(cherry picked from commit 0642f4cb1d)
2023-07-10 11:49:31 +00:00
Jaco Kroon
4cc8497c61 tcptls: when disabling a server port, we should set the accept_fd to -1.
If we don't set this to -1 if the structure can be potentially re-used
later then it's possible that we'll issue a close() on an unrelated file
descriptor, breaking asterisk in other interesting ways.

I believe this to be an unlikely scenario, but it costs nothing to be
safe.

Signed-off-by: Jaco Kroon <jaco@uls.co.za>
(cherry picked from commit 4e657b6181)
2023-07-10 11:49:31 +00:00
Jiajian Zhou
5156156443 AMI: Add parking position parameter to Park action
Add a parking space extension parameter (ParkingSpace) to the Park action.
Park action will attempt to park the call to that extension.
If the extension is already in use, then execution will continue at the next priority.

UserNote: New ParkingSpace parameter has been added to AMI action Park.
(cherry picked from commit 84b48b6af1)
2023-07-10 11:49:31 +00:00
George Joseph
b59f9cbab7 test_stasis_endpoints.c: Make channel_messages more stable
The channel_messages test was assuming that stasis would return
messages in a specific order.  This is an incorrect assumption as
message ordering was never guaranteed.  This was causing the test
to fail occasionally.  We now test all the messages for the
required message types instead of testing one by one.

Resolves: #158
(cherry picked from commit 833543df0d)
2023-07-10 11:49:31 +00:00
George Joseph
a9da65d838 build: Fix a few gcc 13 issues
* gcc 13 is now catching when a function is declared as returning
  an enum but defined as returning an int or vice versa.  Fixed
  a few in app.h, loader.c, stasis_message.c.

* gcc 13 is also now (incorrectly) complaining of dangling pointers
  when assigning a pointer to a local char array to a char *. Had
  to change that to an ast_alloca.

Resolves: #155
(cherry picked from commit acb18c1fc4)
2023-07-10 11:49:31 +00:00
George Joseph
dc19ddfee0 .github: Rework for merge approval
(cherry picked from commit b3ded75e17)
2023-07-10 11:49:31 +00:00
Sean Bright
dd246737ac ast-db-manage: Fix alembic branching error caused by #122.
Fixes #147.

(cherry picked from commit 84d266d4f4)
2023-07-10 11:49:31 +00:00
alex2grad
cf2f3a1516 app_followme: fix issue with enable_callee_prompt=no (#88)
* app_followme: fix issue with enable_callee_prompt=no

If the FollowMe option 'enable_callee_prompt' is set to 'no' then Asterisk
incorrectly sets a winner channel to the channel from which any control frame was read.

This fix sets the winner channel only to the answered channel.

Resolves: #87

ASTERISK-30326

(cherry picked from commit 591351d4ad)
2023-07-10 11:49:31 +00:00
Sean Bright
fdec2a05de sounds: Update download URL to use HTTPS.
Related to #136

(cherry picked from commit ade23d24a0)
2023-07-10 11:49:31 +00:00
Miguel Angel Nubla
aec2e3b910 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 4c2f035a35)
2023-07-10 11:49:31 +00:00
Naveen Albert
503217f049 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 2b302e30e4)
2023-07-10 11:49:31 +00:00
Naveen Albert
88fd0ccd63 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 3260434b96)
2023-07-10 11:49:31 +00:00
Ben Ford
f02725de98 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 d6d77dc1fb)
2023-07-10 11:49:31 +00:00
Naveen Albert
0dbcc9370c 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 f56477a604)
2023-07-10 11:49:30 +00:00
Joe Searle
08053123f1 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 d417ab86e1)
2023-07-10 11:49:30 +00:00
Niklas Larsson
5fe7fd5577 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 12fb5d8589)
2023-07-10 11:49:30 +00:00
George Joseph
32eda5dd8b .github: Fix issues with cherry-pick-reminder
(cherry picked from commit 4128a922e0)
2023-07-10 11:49:30 +00:00
Mike Bradeen
289d242f51 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 4aa213d408)
2023-07-10 11:49:30 +00:00
George Joseph
5a9758afc9 .github Ignore error when adding reviewrs to PR
(cherry picked from commit 1ba39efc9e)
2023-07-10 11:49:30 +00:00
George Joseph
168712bee5 .github: Update field descriptions for AsteriskReleaser
(cherry picked from commit a2280e1767)
2023-07-10 11:49:30 +00:00
Naveen Albert
c3b04a314c 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 8a03ed6877)
2023-07-10 11:49:30 +00:00
Maximilian Fridrich
8b81c5a16b 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 a4cd452246)
2023-07-10 11:49:30 +00:00
Naveen Albert
6ea755eea1 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 d496544d7b)
2023-07-10 11:49:30 +00:00
George Joseph
84a3581e9b .github: Change title of AsteriskReleaser job
(cherry picked from commit 714cb00504)
2023-07-10 11:49:30 +00:00
Naveen Albert
f7c800e3c4 asterisk.c: Fix option warning for remote console.
Commit 09e989f972
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 67d20b8fd8)
2023-07-10 11:49:30 +00:00
George Joseph
4a1127f09a .github: Don't add cherry-pick reminder if it's already present
(cherry picked from commit fd98c6cd10)
2023-07-10 11:49:30 +00:00
George Joseph
0540e21567 .github: Fix quoting in PROpenedOrUpdated
(cherry picked from commit 2c7304e416)
2023-07-10 11:49:30 +00:00
George Joseph
3d9be8b2f9 .github: Add cherry-pick reminder to new PRs
(cherry picked from commit 1115b327f9)
2023-07-10 11:49:30 +00:00
Jaco Kroon
9a6402ad2d 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 3067977eac)
2023-07-10 11:49:30 +00:00
Sean Bright
0e92662c29 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 3e2a28fc3d)
2023-07-10 11:49:30 +00:00
zhengsh
9223da73a6 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 5e16557127)
2023-07-10 11:49:30 +00:00
Sean Bright
a33eecfb41 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 573bdbe924)
2023-07-10 11:49:30 +00:00
Joshua C. Colp
44f7d62f02 .github: Tweak improvement issue type language.
(cherry picked from commit 8e562cea88)
2023-07-10 11:49:30 +00:00
Gitea
a6c742dbf6 .github: Tweak new feature language, and move feature requests elsewhere.
(cherry picked from commit e1b29b636c)
2023-07-10 11:49:30 +00:00
Joshua C. Colp
5723db8a44 .github: Fix staleness check to only run on certain labels.
(cherry picked from commit d7b647e97f)
2023-07-10 11:49:30 +00:00
Asterisk Development Team
c0d6dac258 Update for 18.18.1 18.18.1 2023-07-07 19:07:03 +00:00
Sean Bright
7b55312ca0 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.
2023-07-07 10:00:18 -06:00
George Joseph
f0a6e84f16 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
2023-07-07 10:00:00 -06:00
Stanislav Abramenkov
8c31fd2de3 pjsip: Upgrade bundled version to pjproject 2.13.1 2023-07-07 09:59:47 -06:00
Asterisk Development Team
e08f691e28 Update for 18.18.0 18.18.0 2023-05-23 14:10:22 +00:00
George Joseph
83418725e7 Set up new ChangeLogs directory 2023-05-09 08:28:18 -06:00
Asterisk Development Team
00d6a999d6 Update for 18.18.0-rc1 18.18.0-rc1 2023-05-08 17:55:23 +00:00
George Joseph
3976b1997c .github: Add AsteriskReleaser
(cherry picked from commit 2392a5bb74)
2023-05-08 17:55:17 +00:00
Henning Westerholt
ebee6f38f0 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 8711c84e3c)
2023-05-08 17:55:17 +00:00
Mike Bradeen
1cba481518 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 fa18f2d71e)
2023-05-08 17:55:17 +00:00
Sean Bright
a7f1dbc462 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 6f218514fb)
2023-05-08 17:55:17 +00:00
George Joseph
4d62b4c988 .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 49abb48678)
2023-05-08 17:55:17 +00:00
George Joseph
54d872a10f .github: Fix reference to CHERRY_PICK_TESTING_IN_PROGRESS
(cherry picked from commit f508ae9c63)
2023-05-08 17:55:17 +00:00
George Joseph
819e642c31 .github: Remove separate set labels step from new PR
(cherry picked from commit 135764959e)
2023-05-08 17:55:17 +00:00
George Joseph
06867f0705 .github: Refactor CP progress and add new PR test progress
(cherry picked from commit 0395ee4760)
2023-05-08 17:55:17 +00:00