fix(console): stop coercing plain SIP queue targets into skill groups#227
Open
v0l wants to merge 1 commit into
Open
fix(console): stop coercing plain SIP queue targets into skill groups#227v0l wants to merge 1 commit into
v0l wants to merge 1 commit into
Conversation
reconcileSkillGroupTargets() ran extractSkillGroupId() on every dial target, but that helper returns its input unchanged when there is no "skill-group:" prefix. As a result a plain SIP target such as "sip:1000@localhost" was rewritten to "skill-group:sip:1000@localhost" and rendered as a skill-group dropdown on every (re)load of the queue detail form — even on deployments without the CC addon, where /cc/skill-groups returns 404 and the target can never resolve. Guard the reconciliation so it only applies to targets that are already skill groups (skill-group: URI prefix or an explicit skill_group_id), leaving SIP targets untouched.
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.
When opening the queue detail form,
reconcileSkillGroupTargets()callsextractSkillGroupId()on every dial target:extractSkillGroupId()returns its input unchanged when there is noskill-group:prefix. So a plain SIP target likesip:1000@localhostis rewritten toskill-group:sip:1000@localhostand rendered as a skill-group dropdown on every (re)load — even though it was saved correctly to the DB.This is especially confusing on deployments without the CC addon:
loadSkillGroups()fetches/cc/skill-groups, gets a404, and theres.ok ? res.json() : nullbranch still flows into.then(...)which callsreconcileSkillGroupTargets(). The SIP target then renders as an unresolvable skill-group, and at call time the queue logsNo agent registry available to resolve custom targetand immediately falls through to the fallback.Fix
Guard the reconciliation so it only applies to targets that are actually skill groups (a
skill-group:URI prefix or an explicitskill_group_id). Plain SIP targets are left untouched.Repro
sip:1000@localhost.After
The SIP target renders as a SIP URI field and rings the registered extension as configured.