chore: remove set_transferring_call from engine

This commit is contained in:
Abhishek Kumar 2026-02-14 15:41:43 +05:30
parent 71ac4e1b87
commit 0b2437a800
3 changed files with 1 additions and 20 deletions

View file

@ -638,9 +638,6 @@ async def _run_pipeline(
@user_context_aggregator.event_handler("on_user_turn_idle")
async def on_user_turn_idle(aggregator):
if engine._transferring_call:
logger.debug("Not calling user idle since we are transferring call.")
return
await user_idle_handler.handle_idle(aggregator)
@user_context_aggregator.event_handler("on_user_turn_started")

View file

@ -15,7 +15,6 @@ from pipecat.frames.frames import (
from pipecat.pipeline.task import PipelineTask
from pipecat.processors.aggregators.llm_context import LLMContext
from pipecat.services.llm_service import FunctionCallParams
from pipecat.transports.base_transport import BaseTransport
from pipecat.utils.enums import EndTaskReason
if TYPE_CHECKING:
@ -106,9 +105,6 @@ class PipecatEngine:
# Custom tool manager (initialized in initialize())
self._custom_tool_manager: Optional[CustomToolManager] = None
# Tracks whether a call transfer is in progress
self._transferring_call: bool = False
# Embeddings configuration (passed from run_pipeline.py)
self._embeddings_api_key: Optional[str] = embeddings_api_key
self._embeddings_model: Optional[str] = embeddings_model
@ -732,15 +728,6 @@ class PipecatEngine:
logger.debug(f"Setting pipeline mute state to: {mute}")
self._mute_pipeline = mute
def set_transferring_call(self, transferring: bool) -> None:
"""Set the call transfer state.
Args:
transferring: True when a call transfer is in progress, False otherwise
"""
logger.debug(f"Setting transferring call state to: {transferring}")
self._transferring_call = transferring
async def handle_llm_text_frame(self, text: str):
"""Accumulate LLM text frames to build reference text."""
self._current_llm_generation_reference_text += text

View file

@ -365,8 +365,7 @@ class CustomToolManager:
# Compute conference name from original call SID
conference_name = f"transfer-{original_call_sid}"
# Mark transfer in progress and mute the pipeline
self._engine.set_transferring_call(True)
# Mute the pipeline
self._engine.set_mute_pipeline(True)
# Initiate transfer via provider with inline TwiML
@ -443,7 +442,6 @@ class CustomToolManager:
hold_music_stop_event.set()
if hold_music_task:
await hold_music_task
self._engine.set_transferring_call(False)
self._engine.set_mute_pipeline(False)
await call_transfer_manager.remove_transfer_context(transfer_id)
@ -472,7 +470,6 @@ class CustomToolManager:
logger.error(
f"Transfer call tool '{function_name}' execution failed: {e}"
)
self._engine.set_transferring_call(False)
self._engine.set_mute_pipeline(False)
# Handle generic exception with user-friendly message