res_pjsip_maintenance: Add PJSIP endpoint maintenance mode
__STDC_VERSION__ is not attempted for c++.SECURITY.md: Update with additional instructions.
pjsip: Eliminate some unique taskprocessors.
res_pjsip_sdp_rtp: Fix intermittent call drop on reINVITE sdp change
build: Fix unused-but-set-variable warnings with gcc 16.
__STDC_VERSION__ is not attempted for c++.Author: Mike Bradeen Date: 2026-08-05
A reINVITE that changed the offered codec set (e.g. ulaw+alaw -> alaw only) could lead to call teardown when a bridge write still using the old format occurred during the re-negotiation.
This change avoids the termination by making the following changes.
First, Asterisk now holds the lock across both the tx payload update and the channel format update so they commit atomically.
Second, when processing the sdp on the new incoming offer, merge the new offer with the old until the negotiation is complete.
Also adds unit tests for the sdp merge
Fixes: #2059
Author: Joshua C. Colp Date: 2026-07-15
When placing outbound calls each call would get its own taskprocessor for things related to the call. In practice this is overkill as few things actually occur. Inbound calls on the other hand already use one of the fixed number of distributor taskprocessors. This also occurred for OPTIONS requests with each AOR having its own taskprocessor.
This change moves both to using a distributor taskprocessor instead.
Author: Naveen Albert Date: 2026-08-04
stdbool.h is needed now that we use the bool type directly instead of bfd_boolean. See also 1d95b744c06974f0a00c143c6e0fc979af930908.
Resolves: #2061
Author: Naveen Albert Date: 2026-08-03
bfd_boolean has been deprecated for some time and has now been removed in gdb, so use bool directly instead.
See: https://github.com/gnutools/binutils-gdb/commit/1d95b744c06974f0a00c143c6e0fc979af930908
Resolves: #2054
Author: Sean Bright Date: 2026-08-02
A pointer to new is passed to inboxcount(...) which increments the
pointed-to value.
Author: Naveen Albert Date: 2026-02-18
Follow on commit to 27a39cba7e6832cb30cb64edaf879f447b669628 to fix compilation with BETTER_BACKTRACES with gcc 15.2.1.
Resolves: #1781
Author: George Joseph Date: 2026-08-04
Author: Naveen Albert Date: 2026-02-18
Fix discarded-qualifiers errors to compile successfully with gcc 15.2.1.
Associated changes have also been made to libss7; however, for compatibility we cast const char values to char. In the future, these casts could be removed.
Resolves: #1786
Author: Naveen Albert Date: 2026-02-18
Fix or remove a few variables that were being set but not actually used anywhere, causing warnings with gcc 16.
Resolves: #1783
Author: George Joseph Date: 2026-05-21
When openr2 is installed mfcr2_show_links_of() is no longer ifdeffed out which makes gcc-16 complain with 'variable ‘x’ set but not used'.
Resolves: #1947
__STDC_VERSION__ is not attempted for c++.Author: George Joseph Date: 2026-04-27
__STDC_VERSION__ is specific to C but up until gcc 16, the g++ compiler
also defined it. With g++ 16.0 it's no longer defined (which is the correct
behavior) so compiling channelstorage_cpp_map_name_id.cc fails. The
check for __STDC_VERSION__ in compat.h is now skipped if we're compiling
a C++ source file.
Resolves: #1903
Author: Daniel Donoghue Date: 2026-03-10
Introduces res_pjsip_maintenance, a loadable module that allows operators to place individual PJSIP endpoints into maintenance mode at runtime without unregistering or disabling them.
While an endpoint is in maintenance mode: * New inbound INVITE and SUBSCRIBE dialogs are rejected with 503 Service Unavailable and a Retry-After: 300 header. * In-progress dialogs (re-INVITE, UPDATE, BYE, etc.) are unaffected and complete normally. * Outbound originations via Dial() or ARI originate are refused before any SIP session is created.
State is held in-memory only and is cleared on module unload or Asterisk restart.
This module was developed with AI assistance (Claude). All code has been reviewed and tested by the author, who takes full responsibility for the submission.
CLI interface:
pjsip set maintenance
AMI interface:
Action: PJSIPSetMaintenance
Endpoint:
Action: PJSIPShowMaintenance
Endpoint: <name> (optional; omit to list all)
Emits PJSIPMaintenanceStatus events per result, followed by
PJSIPMaintenanceStatusComplete. State changes also emit an
unsolicited PJSIPMaintenanceStatus event.
To support outbound blocking, a new session_create callback is added to ast_sip_session_supplement. Supplements that set this callback are invoked at the start of ast_sip_session_create_outgoing() in res_pjsip_session, before any dialog or invite session resources are allocated. res_pjsip_maintenance registers itself as a session supplement and uses this callback to gate outbound session creation on a per-endpoint basis.
MODULEINFO:
UserNote: New module res_pjsip_maintenance adds runtime maintenance
mode for PJSIP endpoints. Use "pjsip set maintenance
DeveloperNote: ast_sip_session_supplement gains a new optional callback - int (session_create)(struct ast_sip_endpoint endpoint, const char *destination). It is called from the global supplement list (not per-session) at the start of ast_sip_session_create_outgoing() via ast_sip_session_check_supplement_create(). Returning non-zero blocks the outgoing session. Modules that need to gate outbound SIP session creation should register a supplement with this callback set rather than hooking into chan_pjsip directly.
Author: George Joseph Date: 2026-03-19
Also added line breaks for people reading this file directly from the code base.