When I call create_sip_participant my SIP provider...
# ask-ai
k
When I call create_sip_participant my SIP provider never dialed, and the livekit cloud error said "cancelled"
t
Thanks for reaching out, Ethan. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Could you share a bit more about the error you're seeing? Like, what SIP status code or any other error messages pop up? Also, just to double-check, is the SIP trunk active and set up correctly for outbound calls? I'm here to help! Sources: complex-agents/ivr-agent/flask_livekit/extension.py | livekit-api/livekit/api/sip_service.py | Making outbound calls | LiveKit Docs | livekit/livekit_sip.twirp.go | pkg/sip/inbound.go
k
No logs on telephony side at all. On Livekit Cloud I see the error saying "cancelled" and it seems that no session was created
t
Hey there! The 'cancelled' error usually pops up when the SIP participant creation doesn’t go through, so no session gets started. Let’s walk through a few things you can check to get this sorted: 1. Double-check your SIP Trunk Configuration: Make sure your SIP trunk is active, set up correctly, and authenticated. Sometimes, issues here can stop calls from being accepted. 2. Look at the Call Format: Make sure the number you’re dialing is in the right E.164 format (like +1234567890). 3. Review SIP Call Limits: Check if your SIP trunk might be rejecting calls because it’s hit the max number of concurrent calls. 4. Take a peek at LiveKit Configuration: Confirm that LiveKit is properly configured for SIP calls, including settings like media encryption and timeouts. If you can verify these or share a bit more about your setup, I’d be happy to help you dig deeper and get this fixed! Sources: Making outbound calls | LiveKit Docs | Making outbound calls | LiveKit Docs | pkg/sip/inbound.go
k
the sip invite never seems to make it out of LiveKit, as Telnyx didn't register that it received any invite
t
Hey there! If the SIP INVITE isn’t making its way from LiveKit to Telnyx, no worries—let’s walk through some troubleshooting steps together: 1. Double-check your Telnyx SIP Trunk Configuration: Make sure the SIP trunk is set up just right, including turning on HD Voice and using the G.711U codec so everything plays nicely. 2. Look over your SIP Trunk Connection Details: Confirm that the FQDN settings in Telnyx match your LiveKit SIP endpoint, and don’t forget to verify the transport protocol (TCP/UDP) and port (5060). 3. Take a peek at your LiveKit SIP Configuration: Ensure your SIP trunk is properly configured there, with the right authentication credentials and header mappings in place. 4. Check your Network and Connectivity: Make sure firewalls or NAT aren’t blocking SIP and RTP traffic, and that the SIP port (5060) is open and ready. 5. Review the API Call: Have a look at the
CreateSIPParticipant
API call to confirm it’s correctly formed and authorized. If you can confirm these settings or share a bit more about your setup, I’m happy to help dig deeper and get this sorted out with you! Sources: Create and configure Telnyx SIP trunk | LiveKit Docs | SIP APIs | LiveKit Docs | SIP Integration | livekit/livekit_composite | DeepWiki | Configuring HD Voice for SIP | LiveKit Docs | Configuring HD Voice for SIP | LiveKit Docs
k
It doesn't happen every time though. I've only seen this once and the error on the livekit side said "cancelled" and no session was attached to the sip call
t
Sometimes, those intermittent SIP INVITE failures with the 'cancelled' error pop up for a few common reasons. Let’s walk through some friendly steps to help you figure it out and get things running smoothly: 1. Timeout Settings: Take a peek at your
ringingTimeout
and
maxCallDuration
in the SIP settings. If they’re set too low, calls might get cancelled earlier than you’d like. 2. Network Connectivity: Make sure your NAT traversal is set up right and that nothing’s blocking or slowing down your SIP traffic on the network side. 3. Authentication and Configuration: Double-check that your SIP trunk credentials and configuration are spot on and consistent. 4. Server-Side Rejection: See if the SIP server might be rejecting INVITE requests because of invalid headers or some mismatch in the setup. 5. Log Analysis: Have a look at the SIP client and server logs—they often hold clues or patterns around when the failure happens. If you can share a bit more about when and how this error shows up, like details about your network or SIP setup, I’d be happy to help you dig deeper and get to the bottom of it. Sources: PipelineTTSMetrics | LiveKit Agents | pkg/sip/inbound.go | SIP Integration | livekit/livekit_composite | DeepWiki | ResponseStatusDetails | LiveKit Agents
k
what are the defaults for ringing_timeout and max_call_duration
t
The default values for ringing_timeout and max_call_duration aren’t clearly documented. Are you thinking about changing these settings, or would you like a hand figuring out what their current values are in your setup? Sources: protobufs/rpc/sip.proto | livekit-protocol/livekit/protocol/sip.pyi | livekit-protocol/src/livekit.rs