acoustic-animal-88525
08/21/2025, 8:42 PMtransfer_sip_participant.
• I pass the target as:
• sip:14238947522@<carrier-ip>:5060;transport=udp
• The API call succeeds, LiveKit reports call transferred, but the call hangs up immediately.
• When monitoring with sngrep on the remote server, no new INVITE is generated toward the carrier.
transfer_request = proto_sip.TransferSIPParticipantRequest(
participant_identity=caller_participant_identity,
room_name=userdata.ctx.room.name,
transfer_to="sip:14238947522@<carrier-ip>:5060;transport=udp",
play_dialtone=True
)
res = await userdata.livekit_api.sip.transfer_sip_participant(transfer_request)tall-airline-16756
08/21/2025, 8:42 PMtall-airline-16756
08/21/2025, 8:44 PMsip:+15105550100@sip.provider.com.
3. Take a moment to review your SIP trunk setup with your carrier to ensure it supports call transfers to your intended destination.
4. If you’re using providers like Telnyx or Twilio, confirm that features like SIP REFER are enabled on your account.
5. Use tools like sngrep to watch the transfer process. This helps you see if the REFER request is sent and how the carrier responds.
6. Don’t forget to check the LiveKit SIP service logs for any error messages that pop up during the transfer attempt.
If you’re still stuck after these steps, just let me know! I’m here to help with any part of this, and if you can share more about your SIP trunk setup and provider settings, that’d be great too.
Sources: SIP troubleshooting guide | LiveKit Docs | pkg/sip/service_test.go | Transferring calls | LiveKit Docs | sipclient.goacoustic-animal-88525
08/21/2025, 8:51 PMsip:+15105550100@IP+PORT, I get the error:
Failed to connect live agent sip:+14238947522@IP:5060;transport=udp: TwirpError(code=canceled, message=twirp error unknown: call transfer failed, status=408).tall-airline-16756
08/21/2025, 8:52 PMTwirpError(code=canceled, message=twirp error unknown: call transfer failed, status=408) usually means there was a timeout because the transfer destination didn’t accept the call transfer request, or the system just waited too long for a response.
Here are some friendly steps to help you sort it out:
1. Double-check that your SIP URI is formatted correctly and that the destination is reachable. For example, it should look like sip:+15105550100@IP:PORT.
2. Take a look at your SIP trunk settings to make sure it allows call transfers to where you want to send them.
3. Make sure your network setup lets SIP REFER messages get through to the destination. Sometimes firewalls or NAT can block these, so it’s good to check.
4. Try testing the transfer destination with a simple SIP client outside of LiveKit to see if it can receive calls properly.
5. Peek at your SIP provider’s documentation for any special steps needed for call transfers, like enabling SIP REFER.
If you’re still stuck after trying these, just send over your SIP trunk details and any logs from your SIP provider or remote server. I’m here to help dig into it with you!
Sources: SIP troubleshooting guide | LiveKit Docs | pkg/sip/inbound.go | sipclient.goacoustic-animal-88525
08/21/2025, 8:59 PMFailed to connect live agent sip:+14238947522@X.X.X.X:5060: TwirpError(code=canceled, message=twirp error unknown: call transfer failed, status=408 the sip uri is fine, It's sip to sip transfer no carrier is involved in the middle, I am sending call directly to Asterisk from livekit. The remote asterisk server is accessible i can send call to it from other servers but not from livekit and also it's not reflecting in sngreptall-airline-16756
08/21/2025, 9:00 PMtransfer_to URI format. It should look something like sip:extension@asterisk-server or sip:+1234567890@IP:PORT.
4. Network Setup: Make sure LiveKit and Asterisk are on the same network segment, or that any NAT/firewall in between is letting SIP traffic pass through smoothly.
5. Check LiveKit Logs: Peek at LiveKit’s logs to see if there are any errors or confirmations related to the transfer. This can tell you if the transfer request is even being sent.
6. Verify Asterisk Configuration: Confirm that your Asterisk server is set up to accept SIP REFER requests from outside sources.
If you’re still stuck, no problem! Just share with me:
• The exact transfer_to URI format you’re using.
• A bit about how your network is set up between LiveKit and Asterisk.
• Any relevant logs from LiveKit or Asterisk when you try the transfer. Sources: pkg/sip/inbound.go | SIP Integration | livekit/livekit_composite | DeepWiki | SIP troubleshooting guide | LiveKit Docsacoustic-animal-88525
08/21/2025, 9:19 PMsip:+14238947522@148.251.121.001:5060
the issue is the invite request is not getting generating getting error of Failed to connect live agent sip:+14238947522@148.251.121.201:5060: TwirpError(code=canceled, message=twirp error unknown: call transfer failed, status=408)tall-airline-16756
08/21/2025, 9:20 PMTwirpError(code=canceled, message=twirp error unknown: call transfer failed, status=408) usually means the REFER request is either timing out or being rejected by the remote endpoint.
Here’s what you can try to get this sorted out:
1. Double-check that the transfer_to URI (sip:+14238947522@148.251.121.001:5060) is formatted correctly and that it’s reachable.
2. Make sure your Asterisk server is set up to accept and handle SIP REFER requests coming from LiveKit.
3. Look out for any network hiccups—like firewalls or NAT—that might be blocking those SIP REFER messages between LiveKit and Asterisk.
4. Take a peek at the Asterisk logs to see if the REFER request is actually arriving and being processed. If it’s not, the problem might be with network routing or how Asterisk is configured.
5. Also, check the LiveKit logs for any extra info about the transfer attempt.
If the REFER request isn’t making it to Asterisk, it’s probably a network setup issue or something with Asterisk’s ability to handle REFER requests. Feel free to reach out if you want a hand walking through any of these steps—I’m here to help!
Sources: pkg/sip/service_test.go | SIP troubleshooting guide | LiveKit Docsacoustic-animal-88525
08/21/2025, 9:23 PMtall-airline-16756
08/21/2025, 9:24 PMacoustic-animal-88525
08/21/2025, 9:41 PMtall-airline-16756
08/21/2025, 9:43 PMtransfer_to URI is correctly formatted and reachable.
5. Test Outside LiveKit: Try using your SIP provider’s native tools or a simple SIP client to transfer calls to the same destination. This can help pinpoint if the issue is with LiveKit or the network setup.
If you’ve gone through these steps and still need help, feel free to share details about your SIP trunk provider and any relevant logs from LiveKit or your SIP provider. We’re here to help you get this sorted out!
Sources: SIP troubleshooting guide | LiveKit Docs | Transferring calls | LiveKit Docs | pkg/sip/outbound.go | Secure trunking | LiveKit Docs | Agents telephony integration | LiveKit Docsacoustic-animal-88525
08/21/2025, 9:44 PMtall-airline-16756
08/21/2025, 9:45 PMtransfer_to value looks like sip:extension@vicidial-server. Try to avoid the tel:+number format since Vicidial prefers SIP URIs.
2. IP Authentication: Double-check that your LiveKit server’s IP is whitelisted on the Vicidial server so SIP traffic can flow smoothly.
3. Call State: Make sure the call is fully connected before you try transferring. SIP REFER requests won’t work if the call isn’t active yet.
4. Provider Configuration: Confirm that SIP REFER is turned on with your SIP trunk provider — this is essential for the transfer_sip_participant API to do its job right.
5. Monitor NOTIFY Responses: Vicidial needs to send proper NOTIFY responses to confirm the transfer. Take a peek at the LiveKit logs to see if there are any errors related to NOTIFY handling.
If you’re still running into trouble, feel free to share the transfer_to URI format you’re using along with any relevant logs from LiveKit or Vicidial. I’m here to help you figure this out!
Sources: SIP troubleshooting guide | LiveKit Docs | Transferring calls | LiveKit Docs | Secure trunking | LiveKit Docs | Agents telephony integration | LiveKit Docs | test/integration/sip_test.go