diff --git a/api/services/pipecat/run_pipeline.py b/api/services/pipecat/run_pipeline.py index 764b8c8..191e6cc 100644 --- a/api/services/pipecat/run_pipeline.py +++ b/api/services/pipecat/run_pipeline.py @@ -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") diff --git a/api/services/workflow/pipecat_engine.py b/api/services/workflow/pipecat_engine.py index 8949608..56d24d2 100644 --- a/api/services/workflow/pipecat_engine.py +++ b/api/services/workflow/pipecat_engine.py @@ -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 diff --git a/api/services/workflow/pipecat_engine_custom_tools.py b/api/services/workflow/pipecat_engine_custom_tools.py index fa69d5d..5518f0d 100644 --- a/api/services/workflow/pipecat_engine_custom_tools.py +++ b/api/services/workflow/pipecat_engine_custom_tools.py @@ -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