DailyTransport: remove send_dtmf() and write_dtmf()

This commit is contained in:
Aleix Conchillo Flaqué
2025-08-28 15:37:41 -07:00
parent 0e01ac8ef6
commit f03deb6ecc
2 changed files with 8 additions and 35 deletions

View File

@@ -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

View File

@@ -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.