does create_sip_participant (making outbound calls...
# ask-ai
i
does create_sip_participant (making outbound calls) support using an extension in the destination phone number?
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.
Absolutely! The
create_sip_participant
function does support using an extension in the destination phone number for outbound calls by making use of the
dtmf
parameter. This handy parameter lets you send Dual-Tone Multi-Frequency (DTMF) digits, like extension codes, right after the call connects. For instance, if you set
dtmf = "*123#ww456"
, here’s what happens: • It dials
*123#
• Waits for 1 second (each
w
adds a 0.5-second pause, so two
w
characters equal 1 second) • Then sends
456
Just to clarify, the
sip_call_to
field is where you put the main destination number, and the
dtmf
field takes care of sending the extra tones for extensions afterwards. Sources: lib/livekit/sip_service_client.rb | Make outbound calls | LiveKit Docs | rpc/sip_test.go
i
what is defined as "after the call connects", when the participant becomes active?
t
Let me help clarify what "After the call connects" means in the context of
create_sip_participant
. It refers to the moment when the participant's
sip.callStatus
changes to
active
. This status shows that the participant is successfully connected and the call is live. For outbound calls, the
active
status happens when the person you’re calling picks up. For inbound calls, it switches to
active
once the SIP participant subscribes to any remote audio tracks. When you create a SIP participant, you can use the
wait_until_answered
parameter to have the API wait until the call is answered (meaning the status is
active
) before it responds. This way, you can be confident that the participant is fully connected and ready to engage in the LiveKit room. Sources: pkg/sip/inbound.go | Make outbound calls | LiveKit Docs | pkg/service/sip.go | livekit/attrs.go | Making outbound calls | LiveKit Docs
i
is w the only pause character thats supported or are commas supported as well?
t
Hi there! Just to help clarify, the
create_sip_participant
function supports using the character
w
as a pause for DTMF tones. Each
w
adds a 0.5-second delay. So, for example, if you use
*123#w456
, it will send
*123#
, pause for 0.5 seconds, and then send
456
. You can even stack multiple
w
characters for longer pauses, like
ww
for a full 1-second delay. Just a quick note: commas (
,
) aren’t supported as pause characters here. If you have any more questions or need further help, feel free to ask—I’m here for you! Sources: rpc/sip.pb.go | lib/livekit/sip_service_client.rb | Make outbound calls | LiveKit Docs
i
why dont livekit recordings here the beep from the dtmf tones
t
Thank you for reaching out with your question! I’d love to help clarify why LiveKit recordings don’t capture the beep from DTMF tones. The reason is that DTMF events are sent as signaling data rather than audio. LiveKit follows the RFC 4733 standard, which means it uses out-of-band signaling to send these tones as separate data packets instead of including them in the audio stream. This method actually helps keep your recordings nice and clear, without those DTMF beeps interrupting. At the same time, it still lets you access the DTMF events programmatically, so you can handle inputs smoothly. I hope this explanation helps, and please feel free to ask if you have any more questions! Sources: dtmf/dtmf.go | test/lktest/livekit.go | src/room/events.ts | livekit/livekit_models.pb.go | Handling DTMF | LiveKit Docs
i
is there a function that would allow me to play a beep, that would be caught by the recording
t
I'm glad you're looking to play a beep sound that gets captured in your recordings! You can achieve this by using the
BackgroundAudioPlayer
class in the LiveKit Agents Python SDK. This handy feature lets you publish audio on a separate track in the room, so it’s included in Room Composite or Web Egress recordings. Here’s a simple example to get you started:
Copy code
background_audio.play("beep.ogg", loop=False)
You can also choose from built-in sound clips or use your own custom audio files. This approach is quite reliable and ensures your beep will be part of the recorded media stream. If you’re working on platforms other than Python, there isn’t a direct equivalent just yet. However, you might consider client-side playback—like using an
<audio>
element in the Web SDK—though keep in mind that this method may not always be captured in recordings. Sources: examples/voice_agents/background_audio.py | Sources/LiveKit/Support/AudioMixRecorder.swift | complex-agents/drive-thru/session_setup.py | Agent speech and audio | LiveKit Docs