TEL-6718: Fix transfer_extension CRIT log spam in switch_channel.c:1580 - #538
Open
minhtuan1407-telnyx wants to merge 2 commits into
Open
Conversation
The ENGDESK-43915 commit (6d3c0ea) added transfer event tracking variables using switch_channel_set_variable() which defaults to var_check=SWITCH_TRUE. When the transfer extension contains unexpanded ${...} references (e.g. from ESL uuid_transfer commands), switch_string_var_check_const() detects the pattern and logs a CRIT at switch_channel.c:1580, accounting for 97.67% of all CRIT logs in b2bua. Fix: Use switch_channel_set_variable_var_check() with SWITCH_FALSE for the transfer tracking variables (transfer_extension, transfer_dialplan, transfer_context). These are informational values stored for transfer event tracking and do not need variable content validation. This is consistent with the existing pattern two lines above where SWITCH_TRANSFER_SOURCE_VARIABLE uses SWITCH_FALSE for the same reason.
…riable expansion during channel transfer
damirn
approved these changes
Jun 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes TEL-6718 —
[CRIT] switch_channel.c:1580 Invalid data (${transfer_extension} contains a variable)log spam.Root Cause
Commit
6d3c0eaf7c(ENGDESK-43915: Fire FS Events for IVR Transfer) added transfer tracking variables inswitch_ivr_session_transfer()usingswitch_channel_set_variable(), which defaults tovar_check=SWITCH_TRUE.When
extensioncontains unexpanded FreeSWITCH${...}references (legitimately passed via ESLuuid_transfer),switch_string_var_check_const()detects${and emits the CRIT atswitch_channel.c:1580.Fix
Change the transfer tracking variable writes to use
switch_channel_set_variable_var_check(..., SWITCH_FALSE)so the metadata is stored as-is:Why this is safe
SWITCH_TRANSFER_SOURCE_VARIABLEalready usesSWITCH_FALSEin the same function.Test Plan
uuid_transferwith an extension containing${var}.switch_channel.c:1580.Transfer-Extension,Transfer-Dialplan, andTransfer-Context.— 🦀 Analysis by Council of Claws (Dev, Orchestrator)