asterisk/main
Mike Bradeen f0c1c1a7b7 res_pjsip_sdp_rtp: Fix intermittent call drop on reINVITE sdp change
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
2026-08-06 15:45:49 +00:00
..
stdtime docs: Fix various typos in main/ 2025-02-20 21:46:35 +00:00
.gitignore
abstract_jb.c abstract_jb.c: Remove timerfd from channel when disabling jitter buffer 2026-06-01 16:08:02 +00:00
acl.c docs: Fix various typos in main/ 2025-02-20 21:46:35 +00:00
adsi.c
alaw.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
alertpipe.c utils: Wrap socket() and pipe() to reduce syscalls 2018-12-07 09:06:08 -05:00
aoc.c docs: Fix various typos in main/ 2025-02-20 21:46:35 +00:00
app.c build: Fix GCC discarded-qualifiers const errors. 2026-02-18 13:43:42 +00:00
ast_expr2.c docs: Fix various typos in main/ 2025-02-20 21:46:35 +00:00
ast_expr2.fl general: Fix broken links. 2023-12-08 13:11:54 +00:00
ast_expr2.h ael: Regenerate lexers and parsers. 2023-04-03 07:58:23 -05:00
ast_expr2.y docs: Fix various typos in main/ 2025-02-20 21:46:35 +00:00
ast_expr2f.c general: Fix broken links. 2023-12-08 13:11:54 +00:00
asterisk.c extension_state: Add new extension state API. 2026-06-11 18:31:03 +00:00
asterisk.dynamics res_monitor: Remove deprecated module. 2023-01-13 08:32:33 -06:00
asterisk.exports.in Scope Tracing: A new facility for tracing scope enter/exit 2020-06-02 11:35:07 -05:00
astfd.c astfd.c: Avoid calling fclose with NULL argument. 2024-09-25 18:27:20 +00:00
astmm.c docs: Fix various typos in main/ 2025-02-20 21:46:35 +00:00
astobj2.c main: Fix for Doxygen. 2021-12-02 15:02:09 -06:00
astobj2_container.c docs: Fix various typos in main/ 2025-02-20 21:46:35 +00:00
astobj2_container_private.h main: Fix for Doxygen. 2021-12-02 15:02:09 -06:00
astobj2_global.c core: Fix ABI mismatch of ao2_global_obj. 2019-09-23 07:35:48 -04:00
astobj2_hash.c main: Fix for Doxygen. 2021-12-02 15:02:09 -06:00
astobj2_private.h
astobj2_rbtree.c main: Fix for Doxygen. 2021-12-02 15:02:09 -06:00
audiohook.c Audiohooks: Allow whisper audiohooks to work without an underlying stream 2026-07-15 15:39:56 +00:00
autochan.c autochan/mixmonitor/chanspy: Fix unsafe channel locking and references. 2017-03-15 17:18:55 -06:00
autoservice.c autoservice: Do not sleep if autoservice_stop is called within autoservice thread 2024-09-09 23:17:20 +00:00
backtrace.c backtrace.c: Include stdbool.h 2026-08-05 12:48:38 +00:00
bridge.c res ari: Add attachable states to Channels and Bridges 2026-06-03 22:54:50 +00:00
bridge_after.c main: Fix for Doxygen. 2021-12-02 15:02:09 -06:00
bridge_basic.c main: Explicitly mark case statement fallthrough as such. 2025-11-12 22:10:51 +00:00
bridge_channel.c docs: Fix various typos in main/ 2025-02-20 21:46:35 +00:00
bridge_roles.c main: Fix for Doxygen. 2021-12-02 15:02:09 -06:00
bucket.c docs: Various XML fixes 2025-01-16 15:32:54 +00:00
buildinfo.c
callerid.c callerid: fix signed char causing crash in MDMF parser 2026-03-31 16:55:05 +00:00
ccss.c build: Fix GCC discarded-qualifiers const errors. 2026-02-18 13:43:42 +00:00
cdr.c cdr: add CANCEL dispostion in CDR 2025-08-06 15:37:52 +00:00
cel.c CDR/CEL Custom Performance Improvements 2026-03-02 16:43:30 +00:00
channel.c res ari: Add attachable states to Channels and Bridges 2026-06-03 22:54:50 +00:00
channel_internal_api.c res ari: Add attachable states to Channels and Bridges 2026-06-03 22:54:50 +00:00
channel_private.h res ari: Add attachable states to Channels and Bridges 2026-06-03 22:54:50 +00:00
channelstorage.c channelstorage_cpp_map_name_id: Fix get_by_name_prefix prefix match 2026-01-23 15:25:43 +00:00
channelstorage.h channelstorage: Allow storage driver read locking to be skipped. 2025-11-12 21:27:24 +00:00
channelstorage_ao2_legacy.c channelstorage: Allow storage driver read locking to be skipped. 2025-11-12 21:27:24 +00:00
channelstorage_cpp_map_name_id.cc channelstorage_cpp_map_name_id: Fix get_by_name_prefix prefix match 2026-01-23 15:25:43 +00:00
channelstorage_makeopts.xml channelstorage_makeopts.xml: Remove errant XML character. 2025-07-01 14:02:39 +00:00
chanvars.c core: Remove ABI effects of MALLOC_DEBUG. 2018-03-01 13:13:55 -06:00
cli.c cli.c: Allow 'channel request hangup' to accept patterns. 2026-01-13 16:03:31 +00:00
codec.c Reduce startup/shutdown verbose logging 2024-02-12 18:46:32 +00:00
codec_builtin.c codec_builtin.c: Adjust some of the quality scores to reflect reality. 2025-10-06 15:46:30 +00:00
config.c build: Fix GCC discarded-qualifiers const errors. 2026-02-18 13:43:42 +00:00
config_options.c config_options.c: Improve misleading warning. 2025-10-02 14:43:06 +00:00
conversions.c conversions.c: Specify that we only want to parse decimal numbers. 2022-03-23 17:13:03 -05:00
core_local.c ccss: Add option to ccss.conf to globally disable it. 2025-12-01 14:06:00 +00:00
core_unreal.c ccss: Add option to ccss.conf to globally disable it. 2025-12-01 14:06:00 +00:00
crypt.c main: Fix for Doxygen. 2021-12-02 15:02:09 -06:00
cygload.c
data_buffer.c res_rtp_asterisk: Free payload when error on insertion to data buffer 2020-04-15 13:56:40 -05:00
datastore.c Geolocation: Base Asterisk Prereqs 2022-07-07 08:19:14 -05:00
db.c docs: Fix various typos in main/ 2025-02-20 21:46:35 +00:00
devicestate.c devicestate: Don't publish redundant device state messages. 2025-10-22 15:47:21 +00:00
dial.c main/dial.c: Set channel hangup cause on timeout in handle_timeout_trip 2025-12-29 19:37:38 +00:00
dns.c docs: Fix various typos in main/ 2025-02-20 21:46:35 +00:00
dns_core.c res_rtp_asterisk: Add option to control stun host resolution when TTL = 0 2026-05-19 21:11:33 +00:00
dns_naptr.c build: Fix GCC discarded-qualifiers const errors. 2026-02-18 13:43:42 +00:00
dns_query_set.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
dns_recurring.c res_rtp_asterisk: Add option to control stun host resolution when TTL = 0 2026-05-19 21:11:33 +00:00
dns_srv.c Compiler fixes for gcc 10 2020-06-10 09:33:28 -05:00
dns_system_resolver.c main: Fix for Doxygen. 2021-12-02 15:02:09 -06:00
dns_test.c progdocs: Fix for Doxygen, the hidden parts. 2021-12-02 10:37:38 -06:00
dns_tlsa.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
dns_txt.c core/dns: Add system include required on FreeBSD 2020-04-28 13:05:55 -05:00
dnsmgr.c dnsmgr.c: dnsmgr_refresh() incorrectly flags change with DNS round-robin 2024-10-10 15:34:31 +00:00
dsp.c dsp.c: Add support for detecting R2 signaling tones. 2026-03-03 22:07:26 +00:00
ecdisa.h
editline_compat.c asterisk.c: Allow multi-byte characters on the Asterisk CLI. 2026-01-05 14:46:27 +00:00
editline_compat.h asterisk.c: Allow multi-byte characters on the Asterisk CLI. 2026-01-05 14:46:27 +00:00
endpoints.c endpoints: Allow access to latest snapshot directly. 2026-02-17 13:31:31 +00:00
enum.c build: Fix GCC discarded-qualifiers const errors. 2026-02-18 13:43:42 +00:00
event.c channel: Add multi-tenant identifier. 2024-08-12 15:21:35 +00:00
extension_state.c extension_state: Add new extension state API. 2026-06-11 18:31:03 +00:00
extension_state_autohints.c extension_state: Add new extension state API. 2026-06-11 18:31:03 +00:00
extension_state_legacy.c extension_state: Add new extension state API. 2026-06-11 18:31:03 +00:00
features.c Fix some doxygen, typos and whitespace 2025-09-22 17:39:24 +00:00
features_config.c bridging: Add support for TOUCH_MIXMONITOR_OPTIONS 2026-07-21 12:11:33 +00:00
features_config.h loader: Convert reload_classes to built-in modules. 2018-03-14 05:20:12 -04:00
file.c file.c: Ensure opening a stream opens at most one file 2026-07-27 11:49:02 +00:00
fixedjitterbuf.c docs: Fix various typos in main/ 2025-02-20 21:46:35 +00:00
fixedjitterbuf.h abstract/fixed/adpative jitter buffer: disallow frame re-inserts 2017-01-17 17:08:53 -06:00
format.c Reduce startup/shutdown verbose logging 2024-02-12 18:46:32 +00:00
format_cache.c Reduce startup/shutdown verbose logging 2024-02-12 18:46:32 +00:00
format_cap.c format_cap: guard against NULL src in *_from_cap helpers 2026-06-25 23:39:45 +00:00
format_compatibility.c codecs: Remove test-law. 2021-01-04 05:00:58 -06:00
frame.c frame.c: validate frame data length is less than samples when adjusting volume 2025-05-20 13:54:08 +00:00
framehook.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
fskmodem.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
fskmodem_float.c build: Fix unused-but-set-variable warnings with gcc 16. 2026-02-25 13:25:21 +00:00
fskmodem_int.c main: Spelling fixes 2021-11-15 17:33:27 -06:00
global_datastores.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
hashtab.c core: Remove ABI effects of MALLOC_DEBUG. 2018-03-01 13:13:55 -06:00
heap.c core: Remove ABI effects of MALLOC_DEBUG. 2018-03-01 13:13:55 -06:00
http.c http: Escape error page text to prevent reflected XSS 2026-06-25 08:21:09 -06:00
image.c Reduce startup/shutdown verbose logging 2024-02-12 18:46:32 +00:00
indications.c Reduce startup/shutdown verbose logging 2024-02-12 18:46:32 +00:00
io.c main: Fix for Doxygen. 2021-12-02 15:02:09 -06:00
iostream.c res_http_websocket: Add timeout to client handshakes. 2026-06-16 14:17:49 +00:00
jitterbuf.c Fix Common Typo's. 2017-12-20 12:40:01 -05:00
json.c ARI: REST over Websocket 2025-04-02 12:16:41 +00:00
libasteriskpj.c PJPROJECT logging: Fix detection of max supported log level. 2017-01-24 11:25:19 -06:00
libasteriskssl.c libasteriskssl: Allow OpenSSL 1.0.2 configured with no-deprecated. 2018-05-20 13:55:26 +02:00
libasteriskssl.exports.in
loader.c options: Change ast_options from ast_flags to ast_flags64. 2025-07-30 16:04:01 +00:00
lock.c docs: Indent <since> tags. 2025-01-29 14:18:25 +00:00
logger.c Logger: Don't discard WARNING or ERROR messages. 2026-07-13 16:49:45 +00:00
logger_category.c Logging: Add debug logging categories 2020-10-02 12:58:18 -05:00
logger_doc.xml docs: Indent <since> tags. 2025-01-29 14:18:25 +00:00
Makefile build: remove pjsua, pjsystest, Python bindings and asterisk_malloc_debug stubs from pjproject dev build 2026-04-07 17:18:45 +00:00
manager.c manager: Move away from shared linked list for events. 2026-07-07 15:36:25 +00:00
manager_bridges.c docs: Indent <since> tags. 2025-01-29 14:18:25 +00:00
manager_channels.c chan_pjsip: Add technology-specific off-nominal hangup cause to events. 2025-10-20 13:19:22 +00:00
manager_doc.xml docs: Fix various typos in main/ 2025-02-20 21:46:35 +00:00
manager_endpoints.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
manager_mwi.c docs: Indent <since> tags. 2025-01-29 14:18:25 +00:00
manager_system.c Remove constant conditionals (dead-code). 2017-12-19 09:42:19 -05:00
max_forwards.c
md5.c Prequisites for ARI Outbound Websockets 2025-04-21 13:29:33 +00:00
media_cache.c main: Fix for Doxygen. 2021-12-02 15:02:09 -06:00
media_index.c media_index.c: Refactored so it doesn't cache the index 2019-01-28 12:26:58 -07:00
message.c docs: Fix various typos in main/ 2025-02-20 21:46:35 +00:00
mixmonitor.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
mwi.c main: Fix for Doxygen. 2021-12-02 15:02:09 -06:00
named_acl.c docs: Indent <since> tags. 2025-01-29 14:18:25 +00:00
named_locks.c core: Use macros to generate ao2_container callbacks where possible. 2017-12-30 13:20:16 -05:00
netsock2.c netsock2: Add ast_sockaddr_resolve_first_af to netsock2 public API 2018-05-21 11:03:10 -05:00
optional_api.c progdocs: Fix for Doxygen, the hidden parts. 2021-12-02 10:37:38 -06:00
options.c options: Change ast_options from ast_flags to ast_flags64. 2025-07-30 16:04:01 +00:00
parking.c stasis: Improve topic/subscription names and statistics. 2019-03-11 11:39:35 -03:00
pbx.c extension_state: Add new extension state API. 2026-06-11 18:31:03 +00:00
pbx_app.c docs: Add "Provided-by" to doc XML and CLI output. 2026-03-03 18:55:56 +00:00
pbx_builtins.c pbx_builtins: Allow custom tone for WaitExten. 2025-09-04 15:03:45 +00:00
pbx_functions.c pbx_functions: Save module pointer before calling read and write callbacks. 2026-04-22 17:50:32 +00:00
pbx_hangup_handler.c main: Fix for Doxygen. 2021-12-02 15:02:09 -06:00
pbx_ignorepat.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
pbx_include.c aelparse: Accept an included context with timings. 2021-08-06 09:04:28 -05:00
pbx_private.h extension_state: Add new extension state API. 2026-06-11 18:31:03 +00:00
pbx_sw.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
pbx_switch.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
pbx_timing.c main: Fix for Doxygen. 2021-12-02 15:02:09 -06:00
pbx_variables.c build: Fix GCC discarded-qualifiers const errors. 2026-02-18 13:43:42 +00:00
pickup.c docs: Fix various typos in main/ 2025-02-20 21:46:35 +00:00
plc.c options: Change ast_options from ast_flags to ast_flags64. 2025-07-30 16:04:01 +00:00
poll.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
presencestate.c docs: Indent <since> tags. 2025-01-29 14:18:25 +00:00
privacy.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
refer.c ari/pjsip: Make it possible to control transfers through ARI 2025-02-11 22:05:28 +00:00
rtp_engine.c res_pjsip_sdp_rtp: Fix intermittent call drop on reINVITE sdp change 2026-08-06 15:45:49 +00:00
say.c build: Fix unused-but-set-variable warnings with gcc 16. 2026-02-25 13:25:21 +00:00
sched.c sched: fix and test a double deref on delete of an executing call back 2022-01-21 10:06:57 -06:00
sdp_srtp.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
security_events.c docs: Indent <since> tags. 2025-01-29 14:18:25 +00:00
sem.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
serializer.c taskpool: Add taskpool API, switch Stasis to using it. 2025-09-16 17:21:30 +00:00
serializer_shutdown_group.c taskpool: Add taskpool API, switch Stasis to using it. 2025-09-16 17:21:30 +00:00
sha1.c main: Fix for Doxygen. 2021-12-02 15:02:09 -06:00
sip_api.c
slinfactory.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
smoother.c main: Spelling fixes 2021-11-15 17:33:27 -06:00
sorcery.c sorcery: Move from threadpool to taskpool. 2025-09-30 13:50:37 +00:00
sounds.c sounds: Sort 'core show sounds' output 2019-02-04 14:40:35 -06:00
srv.c main: Fix for Doxygen. 2021-12-02 15:02:09 -06:00
stasis.c extension_state: Add new extension state API. 2026-06-11 18:31:03 +00:00
stasis_bridges.c res ari: Add attachable states to Channels and Bridges 2026-06-03 22:54:50 +00:00
stasis_cache.c stasis: Fix for Doxygen. 2021-11-18 14:46:42 -06:00
stasis_cache_pattern.c stasis: Improve topic/subscription names and statistics. 2019-03-11 11:39:35 -03:00
stasis_channels.c res_pjsip_refer: Fix issues with Refer-Sub:false and ARI. 2026-07-21 12:11:16 +00:00
stasis_endpoints.c docs: Indent <since> tags. 2025-01-29 14:18:25 +00:00
stasis_message.c build: Fix a few gcc 13 issues 2023-06-09 18:19:53 +00:00
stasis_message_router.c taskpool: Fix some references to threadpool that should be taskpool. 2025-10-13 15:34:18 +00:00
stasis_state.c GCC12: Fixes for 18+. state_id_by_topic comparing wrong value 2022-05-09 08:20:46 -05:00
stasis_system.c docs: Indent <since> tags. 2025-01-29 14:18:25 +00:00
strcompat.c fix: Add macOS (Darwin) compatibility for building Asterisk 2026-02-26 15:51:08 +00:00
stream.c core_unreal.c: Fix memory leak in ast_unreal_new_channels() 2024-10-17 15:20:44 +00:00
stringfields.c stringfields: Remove MALLOC_DEBUG fields from struct ast_string_field_mgr. 2018-03-13 16:24:06 -04:00
strings.c ARI Outbound Websockets 2025-06-02 16:35:34 +00:00
stun.c docs: Fix various typos in main/ 2025-02-20 21:46:35 +00:00
syslog.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
taskpool.c pjsip: Move from threadpool to taskpool 2025-12-16 17:03:49 +00:00
taskprocessor.c build: Fix GCC discarded-qualifiers const errors. 2026-02-18 13:43:42 +00:00
tcptls.c tcptls: Don't inhibit escalations for outbound client connections. 2026-07-27 12:01:00 +00:00
tdd.c main: Fix for Doxygen. 2021-12-02 15:02:09 -06:00
term.c term.c: Add support for extended number format terminfo files. 2021-09-08 19:10:54 -05:00
test.c Add ability to pass arguments to unit tests from the CLI 2025-01-02 14:52:18 +00:00
threadpool.c taskprocessors: Improve logging and add new cli options 2025-12-04 16:13:08 +00:00
threadstorage.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
time.c time: add support for time64 libcs 2022-03-24 12:00:58 -05:00
timing.c loader: Create ast_module_running_ref. 2018-01-03 17:23:36 -05:00
translate.c translate.c: implement different sample_types for translation computation. 2026-04-22 19:02:40 +00:00
udptl.c docs: Fix various typos in main/ 2025-02-20 21:46:35 +00:00
ulaw.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
uri.c uri.c: Simplify ast_uri_make_host_with_port() 2023-11-14 20:51:40 +00:00
utf8.c res_pjsip: Replace invalid UTF-8 sequences in callerid name 2023-03-01 09:50:02 -06:00
utils.c build: Fix unused-but-set-variable warnings with gcc 16. 2026-02-25 13:25:21 +00:00
uuid.c main: Fix for Doxygen. 2021-12-02 15:02:09 -06:00
xml.c fix: Add macOS (Darwin) compatibility for building Asterisk 2026-02-26 15:51:08 +00:00
xmldoc.c xmldoc.c: Fix memory leaks in handling of provided_by. 2026-03-19 16:41:30 +00:00