Replaces the string-based `tones` field with a type-safe `buttons: list[KeypadEntry]` on `OutputDTMFFrame` and `OutputDTMFUrgentFrame`, matching the existing singular `button` field on `InputDTMFFrame`. A `from_string` classmethod builds the list from a dial string like `"123#"` (invalid characters raise ValueError from the `KeypadEntry` constructor). The base output audio fallback now iterates `frame.buttons` directly, LiveKit sends `frame.buttons[0].value`, and the Daily transport joins the button values into the single string Daily's `send_dtmf` expects.
235 B
235 B
- Deprecated the
buttonfield onOutputDTMFFrameandOutputDTMFUrgentFrame. Use the newbuttonsfield (alist[KeypadEntry]) instead. When onlybuttonis set, it is wrapped in a single-entry list for backward compatibility.