proud-lawyer-39815
10/13/2025, 6:34 PMtall-airline-16756
10/13/2025, 6:34 PMproud-lawyer-39815
10/13/2025, 6:35 PMtall-airline-16756
10/13/2025, 6:36 PMpublish_dtmf method on the LocalParticipant object. Here's a simple way to do it:
await ctx.room.local_participant.publish_dtmf(
code=1, # Numeric DTMF signal code (e.g., 1 for digit '1')
digit="1" # String representation of the DTMF digit
)
For special characters like '*' and '#', you can use these codes:
• code=10 for '*'
• code=11 for '#'
Here's an example for you:
# Send '*'
await ctx.room.local_participant.publish_dtmf(code=10, digit="*")
# Send '#'
await ctx.room.local_participant.publish_dtmf(code=11, digit="#")
Also, it's a good idea to wrap this in a try-except block to gracefully catch any PublishDTMFError exceptions. If you run into any issues or have more questions, feel free to reach out—I'm here to help!
Sources: Handling DTMF | LiveKit Docs | README.md | livekit-android-sdk/src/main/java/io/livekit/android/room/participant/Local... | livekit/src/room/participant/local_participant.rs | sip-refer/README.mdocproud-lawyer-39815
10/13/2025, 6:37 PMconversation_item_added?tall-airline-16756
10/13/2025, 6:37 PM