asterisk/res
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
..
ael ael: Regenerate lexers and parsers. 2023-04-03 07:58:23 -05:00
ari res_ari: Ensure read-only users are properly authorized via REST Over WebSocket. 2026-06-25 08:21:09 -06:00
cdrel_custom cdrel_custom: fix SQLite compatibility for versions < 3.20.0 2026-04-22 19:03:29 +00:00
parking chan_local: Update chan_local references for Local channels. 2026-06-05 14:37:26 +00:00
prometheus build: Fix unused-but-set-variable warnings with gcc 16. 2026-02-25 13:25:21 +00:00
res_aeap WebSocket Enhancements: Proxies and Keepalives for ARI and Media Outbound Websockets. 2026-06-09 14:23:06 +00:00
res_geolocation res_geolocation: Fix multiple issues with XML generation. 2026-01-05 12:45:14 +00:00
res_pjsip pjsip: Eliminate some unique taskprocessors. 2026-07-27 11:48:48 +00:00
res_pjsip_session Stir/Shaken Refactor 2024-02-28 18:39:03 +00:00
res_stir_shaken res_stir_shaken: avoid direct ASN1_STRING accesses 2026-06-02 16:15:39 +00:00
snmp app_macro: Remove deprecated module. 2023-01-10 14:07:44 -06:00
srtp res_srtp: Add support for libsrtp2 with AES-GCM. 2017-10-18 03:34:56 -05:00
stasis ARI: Make ARI applications respect live_dangerously. 2026-06-25 08:21:09 -06:00
stasis_recording build: Fix GCC discarded-qualifiers const errors. 2026-02-18 13:43:42 +00:00
ari.make
Makefile CDR/CEL Custom Performance Improvements 2026-03-02 16:43:30 +00:00
res.xml Add res_pjsip_config_sangoma external module. 2024-11-04 15:12:42 +00:00
res_adsi.c res_adsi: Fix major regression caused by media format rearchitecture. 2022-12-08 11:19:07 -06:00
res_aeap.c docs: Indent <since> tags. 2025-01-29 14:18:25 +00:00
res_aeap.exports.in res_aeap & res_speech_aeap: Add Asterisk External Application Protocol 2022-04-26 14:26:48 -05:00
res_ael_share.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
res_ael_share.exports.in
res_agi.c build: Fix GCC discarded-qualifiers const errors. 2026-02-18 13:43:42 +00:00
res_agi.exports.in
res_ari.c res_ari: Ensure read-only users are properly authorized via REST Over WebSocket. 2026-06-25 08:21:09 -06:00
res_ari.exports.in
res_ari_applications.c res_ari: Fix for Doxygen. 2021-11-18 16:25:51 -06:00
res_ari_asterisk.c res_ari: Fix for Doxygen. 2021-11-18 16:25:51 -06:00
res_ari_bridges.c res ari: Add attachable states to Channels and Bridges 2026-06-03 22:54:50 +00:00
res_ari_channels.c res ari: Add attachable states to Channels and Bridges 2026-06-03 22:54:50 +00:00
res_ari_device_states.c res_ari: Fix for Doxygen. 2021-11-18 16:25:51 -06:00
res_ari_endpoints.c core/ari/pjsip: Add refer mechanism 2023-08-09 15:10:46 +00:00
res_ari_events.c stasis_broadcast: Add optional ARI broadcast with first-claim-wins 2026-04-22 18:05:08 +00:00
res_ari_mailboxes.c res_ari: Fix for Doxygen. 2021-11-18 16:25:51 -06:00
res_ari_model.c modules: change module LOAD_FAILUREs to LOAD_DECLINES 2017-04-12 15:57:21 -06:00
res_ari_model.exports.in
res_ari_playbacks.c res_ari: Fix for Doxygen. 2021-11-18 16:25:51 -06:00
res_ari_recordings.c res_ari: Fix for Doxygen. 2021-11-18 16:25:51 -06:00
res_ari_sounds.c res_ari: Fix for Doxygen. 2021-11-18 16:25:51 -06:00
res_audiosocket.c res_audiosocket: Tolerate non-audio frame types 2026-04-22 17:58:25 +00:00
res_audiosocket.exports.in feat: AudioSocket channel, application, and ARI support. 2020-01-14 09:36:44 -06:00
res_calendar.c docs: Indent <since> tags. 2025-01-29 14:18:25 +00:00
res_calendar.exports.in
res_calendar_caldav.c res_calendar: Fix build with libical 4.X 2026-06-01 16:41:12 +00:00
res_calendar_ews.c res_calendar: Resolve memory leak on calendar destruction 2019-10-24 09:18:38 -05:00
res_calendar_exchange.c res_calendar: Resolve memory leak on calendar destruction 2019-10-24 09:18:38 -05:00
res_calendar_icalendar.c res_calendar: Fix build with libical 4.X 2026-06-01 16:41:12 +00:00
res_cdrel_custom.c res_cdrel_custom: Resolve several formatting issues. 2026-04-01 19:16:21 +00:00
res_cdrel_custom.exports.in CDR/CEL Custom Performance Improvements 2026-03-02 16:43:30 +00:00
res_chan_stats.c res: Fix for Doxygen. 2021-12-03 10:38:39 -06:00
res_clialiases.c Reduce startup/shutdown verbose logging 2024-02-12 18:46:32 +00:00
res_cliexec.c res_cliexec: Remove unnecessary casts to char*. 2025-09-11 14:19:46 +00:00
res_clioriginate.c manager: Restore Originate failure behavior from Asterisk 11 2017-02-10 18:04:41 -05:00
res_config_curl.c res_config_curl.c: Remove unnecessary warnings. 2025-03-18 14:28:02 +00:00
res_config_ldap.c res_config_ldap: Escape LDAP filter values per RFC 4515 2026-06-25 08:21:09 -06:00
res_config_odbc.c build: Fix GCC discarded-qualifiers const errors. 2026-02-18 13:43:42 +00:00
res_config_pgsql.c build: Fix GCC discarded-qualifiers const errors. 2026-02-18 13:43:42 +00:00
res_config_sqlite3.c general: Remove obsolete SVN references. 2022-08-01 11:06:37 -05:00
res_convert.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
res_corosync.c res: Spelling fixes 2021-11-15 16:37:34 -06:00
res_crypto.c res_crypto.c: Gracefully handle potential key filename truncation. 2023-06-12 17:20:31 +00:00
res_crypto.exports.in
res_curl.c Remove redundant module checks and references. 2018-01-24 13:37:29 -05:00
res_endpoint_stats.c loader: Add dependency fields to module structures. 2018-01-15 13:25:51 -05:00
res_fax.c build: Fix GCC discarded-qualifiers const errors. 2026-02-18 13:43:42 +00:00
res_fax.exports.in
res_fax_spandsp.c res_fax_spandsp.c: Clean up a spaces/tabs issue 2023-06-12 17:19:28 +00:00
res_format_attr_celt.c res_format_attr_*: Parameter Names are Case-Insensitive. 2021-03-10 04:22:36 -06:00
res_format_attr_g729.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
res_format_attr_h263.c res_format_attr_*: Parameter Names are Case-Insensitive. 2021-03-10 04:22:36 -06:00
res_format_attr_h264.c res_format_attr_h264.c: Make sure profile-level-id fmtp attribute is set 2018-12-13 17:03:59 -05:00
res_format_attr_ilbc.c menuselect: Fix description of several modules. 2021-06-10 16:30:28 -05:00
res_format_attr_opus.c res_format_attr_*: Parameter Names are Case-Insensitive. 2021-03-10 04:22:36 -06:00
res_format_attr_silk.c res_format_attr_*: Parameter Names are Case-Insensitive. 2021-03-10 04:22:36 -06:00
res_format_attr_siren7.c res_format_attr_*: Parameter Names are Case-Insensitive. 2021-03-10 04:22:36 -06:00
res_format_attr_siren14.c res_format_attr_*: Parameter Names are Case-Insensitive. 2021-03-10 04:22:36 -06:00
res_format_attr_vp8.c res_format_attr_*: Parameter Names are Case-Insensitive. 2021-03-10 04:22:36 -06:00
res_geolocation.c Geolocation: Core Capability Preview 2022-07-12 07:52:12 -05:00
res_geolocation.exports.in Geolocation: Core Capability Preview 2022-07-12 07:52:12 -05:00
res_hep.c docs: Indent <since> tags. 2025-01-29 14:18:25 +00:00
res_hep.exports.in
res_hep_pjsip.c loader: Sync load- and build-time deps. 2020-11-20 13:51:02 -06:00
res_hep_rtcp.c stasis: Add internal filtering of messages. 2018-11-18 15:08:16 -05:00
res_http_media_cache.c build: Fix GCC discarded-qualifiers const errors. 2026-02-18 13:43:42 +00:00
res_http_post.c build: Fix GCC discarded-qualifiers const errors. 2026-02-18 13:43:42 +00:00
res_http_websocket.c res_http_websocket: Unref session when it fails to establish. 2026-07-09 16:50:08 +00:00
res_http_websocket.exports.in
res_limit.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
res_manager_devicestate.c docs: Indent <since> tags. 2025-01-29 14:18:25 +00:00
res_manager_presencestate.c docs: Indent <since> tags. 2025-01-29 14:18:25 +00:00
res_musiconhold.c res_musiconhold: Fix mohclass reference leak on answeredonly early return. 2026-08-04 17:24:47 +00:00
res_mutestream.c docs: Indent <since> tags. 2025-01-29 14:18:25 +00:00
res_mwi_devstate.c mwi core: Move core MWI functionality into its own files 2019-04-23 17:40:15 -05:00
res_mwi_external.c res: Fix for Doxygen. 2021-12-03 10:38:39 -06:00
res_mwi_external.exports.in
res_mwi_external_ami.c docs: Indent <since> tags. 2025-01-29 14:18:25 +00:00
res_odbc.c res_odbc: Use SQL_SUCCEEDED() macro where applicable. 2025-12-29 18:33:09 +00:00
res_odbc.exports.in
res_odbc_transaction.c docs: Indent <since> tags. 2025-01-29 14:18:25 +00:00
res_odbc_transaction.exports.in
res_parking.c docs: Indent <since> tags. 2025-01-29 14:18:25 +00:00
res_phoneprov.c build: Fix GCC discarded-qualifiers const errors. 2026-02-18 13:43:42 +00:00
res_phoneprov.exports.in
res_pjproject.c Bundled pjproject: Make it easier to override options in config_site.h. 2026-07-07 15:57:04 +00:00
res_pjproject.exports.in res_pjproject: Add utility functions to convert between socket structures 2018-09-06 13:30:12 -05:00
res_pjsip.c Bundled pjproject: Make it easier to override options in config_site.h. 2026-07-07 15:57:04 +00:00
res_pjsip.exports.in res_pjsip: Add utils for checking media types 2022-01-17 08:25:58 -06:00
res_pjsip_acl.c docs: Indent <since> tags. 2025-01-29 14:18:25 +00:00
res_pjsip_aoc.c res_pjsip_aoc: Don't assume a body exists on responses. 2022-12-13 10:52:10 -06:00
res_pjsip_authenticator_digest.c res_pjsip_authenticator_digest: Fix SEGV if get_authorization_hdr returns NULL. 2025-08-28 14:19:49 +00:00
res_pjsip_caller_id.c res_pjsip_caller_id: Also parse URI parameters for ANI2. 2025-04-30 12:47:39 +00:00
res_pjsip_config_wizard.c res_pjsip_config_wizard: Trigger reloads from a pjsip servant thread 2026-04-08 17:03:11 +00:00
res_pjsip_dialog_info_body_generator.c res_pjsip: Add TEL URI support for basic calls. 2022-09-13 04:51:10 -05:00
res_pjsip_diversion.c res_pjsip_diversion: resolve race condition between Diversion header processing and redirect 2025-08-11 13:58:11 +00:00
res_pjsip_dlg_options.c chan_sip: Remove deprecated module. 2023-01-03 09:00:42 -06:00
res_pjsip_dtmf_info.c res_pjsip_dtmf_info.c: Add 'INFO' to Allow header. 2023-10-27 15:52:44 +00:00
res_pjsip_empty_info.c res_pjsip: Sync load- and build-time deps. 2020-04-20 11:03:26 -05:00
res_pjsip_endpoint_identifier_anonymous.c res_pjsip: Add TEL URI support for basic calls. 2022-09-13 04:51:10 -05:00
res_pjsip_endpoint_identifier_ip.c docs: Indent <since> tags. 2025-01-29 14:18:25 +00:00
res_pjsip_endpoint_identifier_user.c res_pjsip: Expanding PJSIP endpoint ID and relevant resource length to 255 characters 2023-10-20 12:18:59 +00:00
res_pjsip_exten_state.c res_pjsip_exten_state,res_pjsip_mwi: Allow unload on shutdown 2023-10-20 12:39:09 +00:00
res_pjsip_exten_state.exports.in
res_pjsip_geolocation.c res_pjsip_geolocation: Add support for Geolocation loc-src parameter 2025-09-30 13:53:45 +00:00
res_pjsip_header_funcs.c res_pjsip_header_funcs: Add new PJSIP_INHERITABLE_HEADER dialplan function 2026-01-27 16:49:57 +00:00
res_pjsip_history.c time: add support for time64 libcs 2022-03-24 12:00:58 -05:00
res_pjsip_logger.c build: Fix GCC discarded-qualifiers const errors. 2026-02-18 13:43:42 +00:00
res_pjsip_maintenance.c res_pjsip_maintenance: Add PJSIP endpoint maintenance mode 2026-04-16 18:25:44 +00:00
res_pjsip_messaging.c res_pjsip_messaging: Update To URI only if it is a SIP(S) URI 2026-05-12 16:27:48 +00:00
res_pjsip_mwi.c res_pjsip_mwi: Fix off-nominal endpoint ao2 ref leak in mwi_get_notify_data 2025-12-30 15:28:52 +00:00
res_pjsip_mwi_body_generator.c Remove redundant module checks and references. 2018-01-24 13:37:29 -05:00
res_pjsip_nat.c res_pjsip: Add external_signaling_hostname transport option 2026-06-09 14:57:27 +00:00
res_pjsip_notify.c build: Fix GCC discarded-qualifiers const errors. 2026-02-18 13:43:42 +00:00
res_pjsip_one_touch_record_info.c res_pjsip: Sync load- and build-time deps. 2020-04-20 11:03:26 -05:00
res_pjsip_outbound_authenticator_digest.c Add SHA-256 and SHA-512-256 as authentication digest algorithms 2025-01-10 16:21:24 +00:00
res_pjsip_outbound_publish.c res_pjsip_outbound_publish.c: Add more verbose documentation for outbound_proxy usage 2026-05-07 15:40:31 +00:00
res_pjsip_outbound_publish.exports.in
res_pjsip_outbound_registration.c res_pjsip_outbound_registration: only update the Expires header if the value has changed 2026-04-13 14:15:14 +00:00
res_pjsip_path.c res_pjsip_path.c: Fix path when dialing using PJSIP_DIAL_CONTACTS() 2024-07-10 17:02:12 +00:00
res_pjsip_phoneprov_provider.c docs: Indent <since> tags. 2025-01-29 14:18:25 +00:00
res_pjsip_pidf_body_generator.c Remove redundant module checks and references. 2018-01-24 13:37:29 -05:00
res_pjsip_pidf_digium_body_supplement.c res_pjsip_pidf_digium_body_supplement: Support Sangoma user agent. 2020-12-16 08:01:11 -06:00
res_pjsip_pidf_eyebeam_body_supplement.c Remove redundant module checks and references. 2018-01-24 13:37:29 -05:00
res_pjsip_publish_asterisk.c docs: Indent <since> tags. 2025-01-29 14:18:25 +00:00
res_pjsip_pubsub.c res/res_pjsip_pubsub.c: Fix buffer over-read in MWI body parser 2026-06-25 08:21:09 -06:00
res_pjsip_pubsub.exports.in
res_pjsip_refer.c res_pjsip_refer: Fix issues with Refer-Sub:false and ARI. 2026-07-21 12:11:16 +00:00
res_pjsip_registrar.c res_pjsip_registrar: Resolve AOR for identified endpoints 2026-07-13 15:15:39 +00:00
res_pjsip_rfc3326.c pjsip: Move from threadpool to taskpool 2025-12-16 17:03:49 +00:00
res_pjsip_rfc3329.c pjsip: Move from threadpool to taskpool 2025-12-16 17:03:49 +00:00
res_pjsip_sdp_rtp.c res_pjsip_sdp_rtp: Fix intermittent call drop on reINVITE sdp change 2026-08-06 15:45:49 +00:00
res_pjsip_send_to_voicemail.c Remove redundant module checks and references. 2018-01-24 13:37:29 -05:00
res_pjsip_session.c pjsip: Eliminate some unique taskprocessors. 2026-07-27 11:48:48 +00:00
res_pjsip_session.exports.in Stir/Shaken Refactor 2024-02-28 18:39:03 +00:00
res_pjsip_sips_contact.c Remove redundant module checks and references. 2018-01-24 13:37:29 -05:00
res_pjsip_stir_shaken.c res_stir_shaken: Add STIR_SHAKEN_ATTESTATION dialplan function. 2025-10-28 13:56:16 +00:00
res_pjsip_t38.c res_pjsip_t38.c: Permit IPv6 SDP connection addresses. 2024-01-30 19:06:40 +00:00
res_pjsip_transport_websocket.c res_pjsip_transport_websocket: Prevent transport from being destroyed before message finishes. 2023-09-21 14:47:58 +00:00
res_pjsip_xpidf_body_generator.c Remove redundant module checks and references. 2018-01-24 13:37:29 -05:00
res_prometheus.c docs: Indent <since> tags. 2025-01-29 14:18:25 +00:00
res_prometheus.exports.in Add core Prometheus support to Asterisk 2019-05-20 20:33:58 -05:00
res_realtime.c res_realtime: Fix 'realtime update2' argument handling 2020-01-14 10:07:20 -06:00
res_remb_modifier.c xml: Embed module information into core XML documentation. 2021-03-16 10:30:43 -05:00
res_resolver_unbound.c docs: Indent <since> tags. 2025-01-29 14:18:25 +00:00
res_rtp_asterisk.c res_rtp_asterisk: Avoid two lock inversion deadlocks with pj project 2026-07-27 11:56:30 +00:00
res_rtp_multicast.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
res_rtp_multicast.exports.in
res_security_log.c stasis: Add internal filtering of messages. 2018-11-18 15:08:16 -05:00
res_smdi.c docs: Indent <since> tags. 2025-01-29 14:18:25 +00:00
res_smdi.exports.in
res_snmp.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
res_sorcery_astdb.c sorcery: Prevent duplicate objects and ensure missing objects are created on update 2025-08-27 16:56:19 +00:00
res_sorcery_config.c res: Spelling fixes 2021-11-15 16:37:34 -06:00
res_sorcery_memory.c sorcery: Prevent duplicate objects and ensure missing objects are created on update 2025-08-27 16:56:19 +00:00
res_sorcery_memory_cache.c res_sorcery_memory_cache: Reduce cache lock time for sorcery memory cache populate command 2026-01-08 13:26:25 +00:00
res_sorcery_realtime.c sorcery: Prevent duplicate objects and ensure missing objects are created on update 2025-08-27 16:56:19 +00:00
res_speech.c Reduce startup/shutdown verbose logging 2024-02-12 18:46:32 +00:00
res_speech.exports.in
res_speech_aeap.c res_speech_aeap: add aeap error handling 2023-10-05 10:42:18 -06:00
res_srtp.c res_srtp: Add menuselect options to enable AES_192, AES_256 and AES_GCM 2025-08-06 15:40:02 +00:00
res_srtp.exports.in
res_stasis.c res ari: Add attachable states to Channels and Bridges 2026-06-03 22:54:50 +00:00
res_stasis.exports.in
res_stasis_answer.c loader: Add dependency fields to module structures. 2018-01-15 13:25:51 -05:00
res_stasis_answer.exports.in
res_stasis_broadcast.c stasis_broadcast: Add optional ARI broadcast with first-claim-wins 2026-04-22 18:05:08 +00:00
res_stasis_device_state.c res_stasis_device_state: Fix delete ARI Devicestates after asterisk restart. 2025-08-18 14:53:23 +00:00
res_stasis_device_state.exports.in
res_stasis_mailbox.c Remove redundant module checks and references. 2018-01-24 13:37:29 -05:00
res_stasis_mailbox.exports.in
res_stasis_playback.c res: Spelling fixes 2021-11-15 16:37:34 -06:00
res_stasis_playback.exports.in
res_stasis_recording.c res_stasis_recording.c: Save recording state when unmuted. 2023-09-13 17:34:37 +00:00
res_stasis_recording.exports.in
res_stasis_snoop.c Disable device state caching for ephemeral channels 2025-12-16 14:56:09 +00:00
res_stasis_snoop.exports.in
res_stasis_test.c optional_api: Remove unused nonoptreq fields 2018-09-12 12:34:54 -05:00
res_stasis_test.exports.in
res_statsd.c docs: Indent <since> tags. 2025-01-29 14:18:25 +00:00
res_statsd.exports.in
res_stir_shaken.c res_stir_shaken: Add STIR_SHAKEN_ATTESTATION dialplan function. 2025-10-28 13:56:16 +00:00
res_stir_shaken.exports.in res_stir_shaken: Add inbound INVITE support. 2020-06-08 10:50:16 -05:00
res_stun_monitor.c res: Fix for Doxygen. 2021-12-03 10:38:39 -06:00
res_timing_dahdi.c general: Fix broken links. 2023-12-08 13:11:54 +00:00
res_timing_kqueue.c main, res, tests: Fix compilation errors on FreeBSD. 2024-10-01 14:22:53 +00:00
res_timing_pthread.c Use non-blocking socket() and pipe() wrappers 2018-12-11 12:29:09 -05:00
res_timing_timerfd.c
res_tonedetect.c res_tonedetect: Fix formatting of XML documentation. 2025-10-06 15:41:22 +00:00
res_websocket_client.c WebSocket Enhancements: Proxies and Keepalives for ARI and Media Outbound Websockets. 2026-06-09 14:23:06 +00:00
res_websocket_client.exports.in res_websocket_client: Create common utilities for websocket clients. 2025-06-02 15:15:15 +00:00
res_xmpp.c res_xmpp: Fix stack buffer overflow in namespace prefix handling 2026-06-25 08:21:09 -06:00
res_xmpp.exports.in