Commit Graph

33627 Commits

Author SHA1 Message Date
Sean Bright baa4a0669e configure: Remove obsolete and deprecated constructs.
These were uncovered when trying to run `bootstrap.sh` with Autoconf
2.71:

* AC_CONFIG_HEADER() is deprecated in favor of AC_CONFIG_HEADERS().
* AC_HEADER_TIME is obsolete.
* $as_echo is deprecated in favor of AS_ECHO() which requires an update
  to ax_pthread.m4.

Note that the generated artifacts in this commit are from Autoconf 2.69.

Resolves #139
2023-06-12 17:19:58 +00:00
zhou_jiajian 9b8311f9a6 res_fax_spandsp.c: Clean up a spaces/tabs issue 2023-06-12 17:19:28 +00:00
Sean Bright b2c75ea7f3 ast-db-manage: Synchronize revisions between comments and code.
In a handful of migrations, the comment header that indicates the
current and previous revisions has drifted from the identifiers
revision and down_revision variables. This updates the comment headers
to match the code.
2023-06-12 14:40:15 +00:00
George Joseph f5d1f88e8d test_statis_endpoints: Fix channel_messages test again 2023-06-12 08:36:50 -06:00
Sean Bright b4d2e32831 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.
2023-06-12 14:22:52 +00:00
Jaco Kroon 73326fb4e0 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>
2023-06-12 14:07:32 +00:00
Jiajian Zhou 73c5967c2d 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.
2023-06-12 13:56:34 +00:00
George Joseph 297e2cdcfd 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
2023-06-09 23:28:15 +00:00
George Joseph 6b4f49c0df 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
2023-06-09 18:19:53 +00:00
George Joseph a207fe4900 .github: Rework for merge approval 2023-06-08 13:33:53 -06:00
Sean Bright a094620058 ast-db-manage: Fix alembic branching error caused by #122.
Fixes #147.
2023-06-06 04:12:41 -06:00
Sean Bright 88524c9c04 sounds: Update download URL to use HTTPS.
Related to #136
2023-06-05 12:43:45 -06:00
Miguel Angel Nubla 1bf6d02f13 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
2023-06-05 12:37:06 -06:00
Naveen Albert ce7a72d7e2 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.
2023-06-05 12:34:40 -06:00
Naveen Albert 4176f57938 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
2023-06-05 12:33:04 -06:00
Ben Ford cfde21c0c7 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.
2023-06-05 12:29:35 -06:00
Naveen Albert 273ad73d99 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.
2023-06-05 12:27:52 -06:00
Joe Searle 8462154a03 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.
2023-06-05 12:26:11 -06:00
alex2grad 8a6379f36b
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
2023-06-05 12:23:03 -06:00
Niklas Larsson c1f21b6f66 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.
2023-06-05 12:19:07 -06:00
George Joseph a5b9fa09ca .github: Fix issues with cherry-pick-reminder 2023-06-05 10:38:01 -06:00
Mike Bradeen 1f337f6034 indications: logging changes
Increase verbosity to indicate failure due to missing country
and to specify default on CLI dump

Resolves: #89
2023-06-05 07:30:51 -06:00
George Joseph fe59e1f311 .github Ignore error when adding reviewrs to PR 2023-06-05 07:16:17 -06:00
George Joseph e0ed0db41f .github: Update field descriptions for AsteriskReleaser 2023-05-26 08:51:41 -06:00
Naveen Albert 8b864b12cf 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
2023-05-25 10:46:40 -06:00
Naveen Albert 2159ec8532 logrotate: Fix duplicate log entries.
The Asterisk logrotate script contains explicit
references to files with the .log extension,
which are also included when *log is expanded.
This causes issues with newer versions of logrotate.
This fixes this by ensuring that a log file cannot
be referenced multiple times after expansion occurs.

Resolves: #96
ASTERISK-30442
Reported by: EN Barnett
Tested by: EN Barnett
2023-05-25 10:38:50 -06:00
Naveen Albert 5dac935f61 app_sla: Migrate SLA applications out of app_meetme.
This removes the dependency of the SLAStation and SLATrunk
applications on app_meetme, in anticipation of the imminent
removal of the deprecated app_meetme module.

The user interface for the SLA applications is exactly the
same, and in theory, users should not notice a difference.
However, the SLA applications now use ConfBridge under the
hood, rather than MeetMe, and they are now contained within
their own module.

Resolves: #50
ASTERISK-30309

UpgradeNote: The SLAStation and SLATrunk applications have been moved
from app_meetme to app_sla. If you are using these applications and have
autoload=no, you will need to explicitly load this module in modules.conf.
2023-05-25 10:34:35 -06:00
Maximilian Fridrich 18f0b6661a
chan_pjsip: Allow topology/session refreshes in early media state (#74)
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
2023-05-25 09:14:47 -06:00
InterLinked1 200a3f1d68
chan_dahdi: Fix broken hidecallerid setting. (#101)
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
2023-05-25 08:48:54 -06:00
George Joseph 869cb0c260 .github: Change title of AsteriskReleaser job 2023-05-23 08:04:42 -06:00
InterLinked1 ad6ff4cbf2
asterisk.c: Fix option warning for remote console. (#103)
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
2023-05-22 12:59:56 -06:00
George Joseph 57eb7e2c7a .github: Don't add cherry-pick reminder if it's already present 2023-05-22 12:54:42 -06:00
InterLinked1 659f2aae3a
res_pjsip_pubsub: Add new pubsub module capabilities. (#82)
The existing res_pjsip_pubsub APIs are somewhat limited in
what they can do. This adds a few API extensions that make
it possible for PJSIP pubsub modules to implement richer
features than is currently possible.

* Allow pubsub modules to get a handle to pjsip_rx_data on subscription
* Allow pubsub modules to run a callback when a subscription is renewed
* Allow pubsub modules to run a callback for outgoing NOTIFYs, with
  a handle to the tdata, so that modules can append their own headers
  to the NOTIFYs

This change does not add any features directly, but makes possible
several new features that will be added in future changes.

Resolves: #81
ASTERISK-30485 #close

Master-Only: True
2023-05-18 11:41:38 -06:00
George Joseph cd2865175c .github: Fix quoting in PROpenedOrUpdated 2023-05-16 16:11:08 -06:00
George Joseph 7c917618f4 .github: Add cherry-pick reminder to new PRs 2023-05-15 09:37:38 -06:00
Jaco Kroon 0e6295128c
configure: fix test code to match gethostbyname_r prototype. (#75)
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>
2023-05-15 06:50:36 -06:00
Sean Bright ae6b56e357
res_pjsip_pubsub.c: Use pjsip version for pending NOTIFY check. (#47)
The functionality we are interested in is present only in pjsip 2.13
and newer.

Resolves: #45
2023-05-11 14:23:49 -06:00
zhengsh c8ce2c705d
res_sorcery_memory_cache.c: Fix memory leak (#56)
Replace the original call to ast_strdup with a call to ast_strdupa to fix the leak issue.

Resolves: #55
ASTERISK-30429
2023-05-11 14:21:57 -06:00
Sean Bright f414815159
utils.h: Deprecate `ast_gethostbyname()`. (#79)
Deprecate `ast_gethostbyname()` in favor of `ast_sockaddr_resolve()` and
`ast_sockaddr_resolve_first_af()`. `ast_gethostbyname()` has not been
used by any in-tree code since 2021.

This function will be removed entirely in Asterisk 23.

Resolves: #78

UpgradeNote: ast_gethostbyname() has been deprecated and will be removed
in Asterisk 23. New code should use `ast_sockaddr_resolve()` and
`ast_sockaddr_resolve_first_af()`.
2023-05-11 13:05:49 -06:00
Sean Bright d59a8ef59e
xml.c: Process XML Inclusions recursively. (#69)
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
2023-05-11 13:03:33 -06:00
Joshua C. Colp 172a1a9d0c .github: Tweak improvement issue type language. 2023-05-09 10:47:05 -03:00
Gitea 60ca49d288 .github: Tweak new feature language, and move feature requests elsewhere. 2023-05-09 10:42:45 -03:00
Joshua C. Colp eec85c672c .github: Fix staleness check to only run on certain labels. 2023-05-09 06:17:17 -03:00
George Joseph 857bc88d14 .github: Add AsteriskReleaser 2023-05-08 11:01:07 -06:00
Henning Westerholt 1a7866b172
chan_pjsip: also return all codecs on empty re-INVITE for late offers (#59)
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.
2023-05-04 08:55:37 -06:00
Mike Bradeen cd48733353
cel: add local optimization begin event (#54)
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.
2023-05-04 08:51:55 -06:00
Sean Bright 0d6b271831
core: Cleanup gerrit and JIRA references. (#58)
* 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
2023-05-03 09:37:57 -06:00
George Joseph f5168354cb .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.
2023-05-03 09:27:57 -06:00
George Joseph 676cfc3d5a .github: Fix reference to CHERRY_PICK_TESTING_IN_PROGRESS 2023-05-02 14:09:47 -06:00
George Joseph 79a383ebc6 .github: Remove separate set labels step from new PR 2023-05-02 12:11:24 -06:00