publishDtmf

suspend fun publishDtmf(code: Int, digit: String): Result<Unit>

This suspend function allows you to publish DTMF (Dual-Tone Multi-Frequency) signals within a LiveKit room. The publishDtmf function constructs a SipDTMF message using the provided code and digit, then encapsulates it in a DataPacket before sending it via the engine.

Return

A Result that succeeds if the publish succeeded, or a failure containing the exception.

Parameters

code

an integer representing the DTMF signal code

digit

the string representing the DTMF digit (e.g., "1", "#", "*")