average-architect-28889
07/25/2025, 12:31 PMtall-airline-16756
07/25/2025, 12:31 PMtall-airline-16756
07/25/2025, 12:32 PMsend_dtmf_code function from earlier versions or custom implementations can be replaced with the official publish_dtmf method. This method is available across multiple SDKs and is the standard way to send DTMF tones. Below are examples for different languages:
Python:
await room.local_participant.publish_dtmf(
code=code,
digit=str(code)
)
JavaScript/TypeScript:
await localParticipant.publishDtmf(code, digit);
Node.js:
await localParticipant.publishDtmf(code, digit);
Android:
localParticipant.publishDtmf(code, digit)
If you were using a custom send_dtmf_code function, you can directly call publish_dtmf with the numeric code and its string representation. This ensures compatibility with various SIP implementations.
Sources: Building an Automated IVR Menu Caller | LiveKit Docs | src/room/participant/LocalParticipant.ts | packages/livekit-rtc/src/participant.ts | livekit-android-sdk/src/main/java/io/livekit/android/room/participant/Local... | Handling DTMF | LiveKit Docs