Can I have a caller create a room with an agent th...
# ask-ai
m
Can I have a caller create a room with an agent then I need to dial another number send dtmf tones to that second number then transfer the caller to the outbound call
t
Thanks for reaching out, Matt. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I'm happy to let you know that this workflow is definitely possible in LiveKit. Let me walk you through how it can be done: 1. Creating a room with an agent: When a caller dials a number connected to a LiveKit SIP trunk, a room is created automatically, and an agent can join the room alongside the caller. 2. Dialing another number and sending DTMF tones: The agent can place an outbound call using the
CreateSIPParticipant
API. This API lets you include a
dtmf
field to send DTMF tones right after the connection. For example,
dtmf: "*123#ww456"
sends
*123#
, waits 1 second (each 'w' adds 0.5 seconds), and then sends
456
. 3. Transferring the caller to the outbound call: After the outbound call connects, the agent can use the
TransferSIPParticipant
API to transfer the original caller to the new number. This will forward the caller out of the LiveKit room and end their session there. If you have any questions or need more help with setting this up, please don’t hesitate to reach out—I’m here to assist you! Sources: README.md | README.md | Agents telephony integration | LiveKit docs | Make outbound calls | LiveKit docs | Call forwarding | LiveKit docs