Introduces a new `tones` field on `OutputDTMFFrame` and `OutputDTMFUrgentFrame` for sending multi-digit DTMF sequences and deprecates the existing single-key `button` field. When only `button` is set, it is used as a single-character `tones` string for backward compatibility. `DTMFFrame` is kept as an empty marker class so both input and output DTMF frames can still be identified via isinstance. `InputDTMFFrame` keeps its required `button` field (single keypress semantics). The Daily-specific `DailyOutputDTMFFrame` and `DailyOutputDTMFUrgentFrame` frames no longer need to override `button` and simply add `session_id` and `digit_duration_ms`, which are forwarded to Daily's `send_dtmf` as `sessionId` and `digitDurationMs`. The base output audio fallback now iterates `tones` and generates a tone per character; LiveKit's native DTMF path sends `tones[0]` since its API is single-tone.
587 B
587 B
- Added
DailyTransport.send_dtmf()to expose the Daily call client's DTMF sending capability, enabling applications to send tones during a call (e.g. IVR navigation). - Added
tonesfield toOutputDTMFFrameandOutputDTMFUrgentFramefor sending multi-digit DTMF sequences (e.g."123#"). Valid characters are the values ofKeypadEntry. - Added
DailyOutputDTMFFrameandDailyOutputDTMFUrgentFrameframes. In addition to the inheritedtones, they acceptsession_idanddigit_duration_ms, which are forwarded to Daily'ssend_dtmfassessionIdanddigitDurationMs.