Skip to content

fix: busy/not-answered calls stay in agent worklist after call closure#135

Merged
snehar-nd merged 2 commits into
release-3.7.0from
vb/ecd-call-fix
May 22, 2026
Merged

fix: busy/not-answered calls stay in agent worklist after call closure#135
snehar-nd merged 2 commits into
release-3.7.0from
vb/ecd-call-fix

Conversation

@vishwab1

Copy link
Copy Markdown
Member

📋 Description

JIRA ID: AMM-2315

Please provide a summary of the change and the motivation behind it. Include relevant context and details.

Summary

  • When an agent closes a call with reason "Number busy", "No reply",
    "Switched off" etc., the record was disappearing from their worklist.
  • Root cause: a previous change unallocated ALL disconnected calls
    unconditionally, including busy/not-answered ones.
  • Fix: unallocation is now skipped when reasonForCallNotAnswered is
    a not-answered reason (busy, switched off, no reply, etc.).

Changes

  • CallClosureImpl.java: Added condition in disconnected block —
    unallocation only happens when reason is NOT a busy/not-answered type.
  • Removed redundant re-allocation lines from the busy block
    (no longer needed after fixing root cause).

Test Plan

  • Close call with "Number busy" → record stays in worklist
  • Close call with "Switched off" → record stays in worklist
  • Disconnect call (genuine disconnect, no reason) → record goes to unallocated pool
  • Max attempts reached → record removed from worklist as before

✅ Type of Change

  • 🐞 Bug fix (non-breaking change which resolves an issue)
  • New feature (non-breaking change which adds functionality)
  • 🔥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 🛠 Refactor (change that is neither a fix nor a new feature)
  • ⚙️ Config change (configuration file or build script updates)
  • 📚 Documentation (updates to docs or readme)
  • 🧪 Tests (adding new or updating existing tests)
  • 🎨 UI/UX (changes that affect the user interface)
  • 🚀 Performance (improves performance)
  • 🧹 Chore (miscellaneous changes that don't modify src or test files)

ℹ️ Additional Information

Please describe how the changes were tested, and include any relevant screenshots, logs, or other information that provides additional context.

vishwab1 and others added 2 commits May 22, 2026 11:34
When a call is closed with a not-answered reason (Number busy, Switched off,
No reply, etc.), the call was being unallocated from the agent due to
isCallDisconnected being forced true. This fix restores the agent allocation
so the record stays visible in the agent's worklist for retry.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Roshini's change unallocated ALL disconnected calls including busy ones.
Fixed at root cause - unallocation now skipped when reason is a
not-answered type (busy, switched off, no reply etc).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented May 22, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 601aeaa0-96da-40da-bcdc-30ed81c1d05e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch vb/ecd-call-fix

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud

Copy link
Copy Markdown

@snehar-nd snehar-nd merged commit 01601c2 into release-3.7.0 May 22, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants