are there any events that would let us know if our...
# ask-ai
i
are there any events that would let us know if our agent has sent a dtmf tone?
t
Thanks for reaching out, Ed. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks for reaching out! LiveKit doesn’t have a built-in event to notify when an agent sends a DTMF tone, but no worries—we can work around this together. One way is to create a custom detection by wrapping the
publishDtmf
method. For example, you could log the action and even send a data message to let other parts of your system know when a DTMF tone is sent. If you'd like, I’d be happy to guide you through how to set this up in your environment. Just let me know! Sources: Handling DTMF | LiveKit Docs | src/room/events.ts | ivr-nagivator/README.mdoc | complex-agents/ivr-agent/README.md
i
what about when using the dtmf sequence of
create_sip_participant
?
t
When using
create_sip_participant
, LiveKit allows you to send DTMF tones through the
dtmf
field in the request body. I want to let you know that there isn't a specific event emitted for DTMF tones sent during participant creation. The event system is designed to focus on receiving DTMF tones from SIP participants, which triggers the
SipDTMFReceived
event. If you’d like to keep track of the DTMF tones you send, a good approach is to add custom logging or notifications when you call the
create_sip_participant
method. I’m here to help if you want some guidance on how to set that up—just let me know! Sources: agent.py | sip-refer/README.mdoc | Make outbound calls | LiveKit Docs | Handling DTMF | LiveKit Docs | test/lktest/dtmf.go