Skip to content

fix: Fix warm transfer not working#762

Merged
swaroopvarma1 merged 1 commit into
juspay:releasefrom
manas-narra:fix-warm-transfer-not-working
May 15, 2026
Merged

fix: Fix warm transfer not working#762
swaroopvarma1 merged 1 commit into
juspay:releasefrom
manas-narra:fix-warm-transfer-not-working

Conversation

@manas-narra
Copy link
Copy Markdown
Collaborator

@manas-narra manas-narra commented May 15, 2026

Summary by CodeRabbit

  • Bug Fixes
    • Fixed an issue where callers could be unexpectedly disconnected during warm transfers to live agents with certain VoIP providers.

Review Change Stack

Copilot AI review requested due to automatic review settings May 15, 2026 03:28
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 15, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b6a3fa2b-84ce-454f-83d6-8f28d87692f0

📥 Commits

Reviewing files that changed from the base of the PR and between df477de and 205783c.

📒 Files selected for processing (1)
  • app/ai/voice/agents/breeze_buddy/handlers/internal/warm_transfer.py

Walkthrough

The change adds Plivo-specific handling to the warm transfer handler. After a successful conference transfer is created, the code now checks if the call provider is Plivo and attempts to suppress the serializer's automatic hang-up logic by setting an internal flag, with graceful error handling.

Changes

Plivo Serializer Hang-up Prevention

Layer / File(s) Summary
Plivo serializer hang-up suppression
app/ai/voice/agents/breeze_buddy/handlers/internal/warm_transfer.py
After successful conference transfer, the handler checks for CallProvider.PLIVO, accesses the Plivo serializer via context.bot.transport.output()._params.serializer, and sets _hangup_attempted = True to prevent automatic hang-up from disconnecting the caller; failures are caught and logged as warnings.

Estimated Code Review Effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 A transfer so warm, a conference born,
Plivo's hang-up no longer will mourn,
Set the flag, let callers stay,
No premature drops today!
The serializer now keeps the thread,
Friends together, never misled. ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly describes the main change: fixing warm transfer functionality by preventing automatic hang-up during agent transfer.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes warm transfer functionality for Plivo-based calls. Previously, when transferring to a live agent, the Pipecat EndFrame would cause the Plivo serializer to invoke _hang_up_call() and drop the caller from the conference. The fix preemptively sets _hangup_attempted=True on the Plivo serializer so it skips its automatic hang-up API call, allowing the customer leg to stay connected in the conference.

Changes:

  • Before ending the AI conversation on a successful transfer, set the Plivo serializer's _hangup_attempted flag to suppress its auto hang-up.
  • Wrapped in try/except with warning-level logging so any failure to access the serializer is non-fatal.
  • Only applied when context.provider == CallProvider.PLIVO.

@swaroopvarma1 swaroopvarma1 merged commit 8c19455 into juspay:release May 15, 2026
7 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.

3 participants