From f03deb6eccd6d2d1a55cb6a55328c39b0e2f3ba4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Conchillo=20Flaqu=C3=A9?= Date: Thu, 28 Aug 2025 15:37:41 -0700 Subject: [PATCH] DailyTransport: remove send_dtmf() and write_dtmf() --- CHANGELOG.md | 7 +++++ src/pipecat/transports/services/daily.py | 36 +----------------------- 2 files changed, 8 insertions(+), 35 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 661921f30..5396a1eb7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `pipecat.frames.frames.KeypadEntry` is deprecated and has been moved to `pipecat.audio.dtmf.types.KeypadEntry`. +## Removed + +- `DailyTransport.write_dtmf()` has been removed in favor of the generic + `BaseOutputTransport.write_dtmf()`. + +- Remove deprecated `DailyTransport.send_dtmf()`. + ## Deprecated - `pipecat.frames.frames.KeypadEntry` is deprecated use diff --git a/src/pipecat/transports/services/daily.py b/src/pipecat/transports/services/daily.py index b8ffe2383..cfc7998ef 100644 --- a/src/pipecat/transports/services/daily.py +++ b/src/pipecat/transports/services/daily.py @@ -31,8 +31,6 @@ from pipecat.frames.frames import ( InputAudioRawFrame, InterimTranscriptionFrame, OutputAudioRawFrame, - OutputDTMFFrame, - OutputDTMFUrgentFrame, OutputImageRawFrame, SpriteFrame, StartFrame, @@ -1676,7 +1674,7 @@ class DailyInputTransport(BaseInputTransport): class DailyOutputTransport(BaseOutputTransport): """Handles outgoing media streams and events to Daily calls. - Manages sending audio, video, DTMF tones, and other data to Daily calls, + Manages sending audio, video and other data to Daily calls, including audio destination registration and message transmission. """ @@ -1783,19 +1781,6 @@ class DailyOutputTransport(BaseOutputTransport): """ await self._client.register_audio_destination(destination) - async def write_dtmf(self, frame: OutputDTMFFrame | OutputDTMFUrgentFrame): - """Write DTMF tones to the call. - - Args: - frame: The DTMF frame containing tone information. - """ - await self._client.send_dtmf( - { - "sessionId": frame.transport_destination, - "tones": frame.button.value, - } - ) - async def write_audio_frame(self, frame: OutputAudioRawFrame): """Write an audio frame to the Daily call. @@ -2022,25 +2007,6 @@ class DailyTransport(BaseTransport): """ await self._client.stop_dialout(participant_id) - async def send_dtmf(self, settings): - """Send DTMF tones during a call (deprecated). - - .. deprecated:: 0.0.69 - Push an `OutputDTMFFrame` or an `OutputDTMFUrgentFrame` instead. - - Args: - settings: DTMF settings including tones and target session. - """ - import warnings - - with warnings.catch_warnings(): - warnings.simplefilter("always") - warnings.warn( - "`DailyTransport.send_dtmf()` is deprecated, push an `OutputDTMFFrame` or an `OutputDTMFUrgentFrame` instead.", - DeprecationWarning, - ) - await self._client.send_dtmf(settings) - async def sip_call_transfer(self, settings): """Transfer a SIP call to another destination.