I'm self hosting. I was placing an outbound call u...
# ask-ai
c
I'm self hosting. I was placing an outbound call using sipparticipantcreaterequest. I pass play dial tone as true. However when the customer is joining - the dial tone doesn't stop ringing. How to fix?
t
Thanks for reaching out, Firebolt. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Hey there! The
playDialtone
parameter in
CreateSIPParticipantRequest
is designed to play a dial tone until the remote party answers the call. If you notice the dial tone keeps playing, it might be due to a few reasons: • The remote party hasn’t picked up yet. You can use
waitUntilAnswered: true
to make sure your application waits for the call to be answered. • The call status might not be getting tracked. It’s a good idea to check the
sip.callStatus
attribute to see if it changes from
dialing
to
active
. • The ringing timeout could have been reached. Setting a
ringingTimeout
(like 60 seconds) helps limit how long it waits. • There might be an issue with the SIP trunk or a call failure. Taking a look at your server logs for any SIP signaling or media setup errors can be really helpful. To get this sorted, please double-check that the remote number is reachable, enable
waitUntilAnswered
, keep an eye on the call status, and review your SIP trunk setup. If you have any questions or need a hand with any of this, I’m here to help! Sources: livekit-api/src/services/sip.rs | rpc/sip_test.go | livekit-agents/livekit/agents/job.py | Docs::Telephony | SIP APIs | LiveKit Docs
c
How do I check the call status? And how the status got changed
t
I'd be happy to help you check the SIP call status! You can do this by keeping an eye on the
sip.callStatus
participant attribute. This attribute updates in real-time as the call moves through different stages: • dialing: The call is dialing and waiting to be picked up. • ringing: The inbound call is ringing for the caller. • active: The call is connected and active. • automation: For outbound calls using DTMF, the call has connected but is still dialing DTMF numbers. • hangup: The call has been ended by a participant. To help you track these status changes smoothly: 1. Listen to participant events to catch updates to the
sip.callStatus
attribute. 2. Identify SIP participants by checking their
kind
field (
Participant.Kind == SIP
) or their identity pattern (
sip_*
). 3. Use the
on_participant_attributes_changed_handler
on the server side to log and respond to status changes automatically. If you'd like, I can provide more details or examples to guide you through the implementation—just let me know! Sources: Docs::Telephony | Making outbound calls | LiveKit Docs | SIP Integration | livekit/livekit_composite | DeepWiki | SIP & Telephony Integration | livekit/livekit_composite | DeepWiki | telephony/sip_lifecycle.py