I keep getting status code 408 and Twilio fails to...
# ask-ai
c
I keep getting status code 408 and Twilio fails to forward my call to a another number. I get the dial tone and can see the call in Twilio but it does not show any error or PCAP
t
Thanks for reaching out, Mads. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I understand how frustrating it can be to encounter the status code 408 ("Request Timeout") during SIP call transfers. This usually happens when the remote endpoint rejects the transfer or when the system times out waiting for a response. Let’s walk through some steps together to help resolve this: 1. Verify the SIP URI: Please double-check that the SIP URI for the transfer destination is correctly formatted and reachable. Sometimes a small typo can cause issues. 2. Check trunk permissions: It’s important to confirm that the trunk configured with your SIP trunking provider has the right permissions to transfer calls to your target destination. 3. Provider-specific settings: If you’re using Telnyx as your SIP provider, make sure that SIP REFER is enabled for your account. If it’s already enabled but transfers are still not working, try testing call transfers outside of LiveKit using Telnyx’s API to see if that helps pinpoint the issue. Please don’t hesitate to reach out if you’d like me to guide you through any of these steps or if you have any other questions. I’m here to help! Sources: SIP troubleshooting guide | LiveKit Docs | livekit/livekit_room.twirp.go
c
I use Twilio and have checked the permissions
t
Thank you for sharing that you’re using Twilio and have already checked permissions. Let’s go through a few more settings together to help get this issue sorted out: 1. Enable SIP REFER and PSTN Transfer: Please make sure that SIP REFER and "Enable PSTN Transfer" are turned on in your Twilio SIP trunk. These settings are essential for making call transfers via SIP REFER work smoothly. 2. Disable TLS: Since SIP REFER doesn’t work with TLS for secure trunking, if you have TLS enabled, try disabling it to see if that helps with compatibility. 3. Use Elastic SIP Trunking: If you’re currently using Twilio Programmable Voice with TwiML Bins, switching over to Twilio Elastic SIP Trunking might do the trick, as SIP REFER isn’t supported with TwiML Bins. 4. Verify Trunk Configuration: It’s always good to double-check that your outbound trunk is set up correctly in LiveKit and that the SIP URI for the transfer destination is formatted properly and reachable. If you try these steps and still face issues, please feel free to reach out. I’m here to help and we can explore other troubleshooting options together. Sources: Getting Help | livekit/livekit_composite | DeepWiki | Agents telephony integration | LiveKit Docs | Transferring calls | LiveKit Docs | Secure trunking | LiveKit Docs | Inbound calls with Twilio Voice | LiveKit Docs
c
I Use elastic sip trunking and have SIP refer and PSTN transfer enabled
t
Thank you so much for confirming that! Just to help us get to the bottom of this, could you please let me know if TLS is enabled on your SIP trunk? Sometimes, SIP REFER doesn’t work when TLS is turned on, so turning it off might just do the trick. Also, have you been able to transfer calls outside of LiveKit using Twilio's API without any issues? I'm here to help you through this!
c
TLS is not enabled
t
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!