Why would I get a 403 when sip forwarding to livek...
# ask-ai
n
Why would I get a 403 when sip forwarding to livekit cloud?
t
Thanks for reaching out, Stephen. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Running into a 403 error when using SIP forwarding to LiveKit Cloud can be frustrating, but it usually happens for a few common reasons: • Authentication or Permission Errors: Double-check that your username and password in the SIP trunk settings are spot on and match what your SIP trunking provider has set up. • Regional Compliance Violations: Some regions have rules that calls must stay within national borders. If your calls are going international, that could trigger a 403 error. Try using region pinning and set the
destination_country
parameter for outbound calls to keep things compliant. • Insufficient Token Permissions: Since LiveKit server version 1.7.0, SIP features need specific permissions in your access token. Make sure your token includes the
sip.admin
grant to manage trunks and dispatch rules, and the
sip.call
grant to make outbound calls. Give these a look, and hopefully, that clears things up! If you need a hand or have more questions, just let me know—I’m here to help. Sources: SIP troubleshooting guide | LiveKit Docs | CHANGELOG.md
n
My sip provider doesn't support setting username and password. Can it still work?
t
Hey there! Good news—SIP forwarding in LiveKit Cloud can work without needing a username and password. You can simply leave the
auth_username
and
auth_password
fields empty when you set up your trunk. That said, it really depends on your SIP provider’s rules: • Some providers, like Twilio, don’t use username/password authentication and instead rely on things like IP whitelisting. • For outbound SIP, since LiveKit doesn’t have static IPs, IP-based authentication might not be the best fit. In those cases, if your provider supports it, using username/password authentication is usually the way to go. It’s a good idea to check with your SIP provider to see if they’re cool with unauthenticated SIP forwarding. And if you want, I’m here to help you with the setup anytime! Sources: livekit/livekit_sip.pb.go | SIP inbound trunk | LiveKit Docs | SIP trunk setup | LiveKit Docs | SIP outbound trunk | LiveKit Docs
n
so if my provider doesn't use username password and we're using US numbers, why might I be getting a 403 when trying to forward to livekit? The provider I'm using is called Bandwidth.
t
Getting a 403 error when forwarding SIP calls to LiveKit with Bandwidth can be a bit frustrating, but it usually happens for a couple of common reasons: • Regional Compliance: If your calls are going internationally, Bandwidth might block them because of domestic anchoring rules. A good tip is to use region pinning and make sure you set the
destination_country
parameter in your outbound trunk configuration to keep calls within the US. • Authentication Issues: Even though Bandwidth doesn’t use username/password authentication, it’s important to double-check that your SIP trunk setup in LiveKit aligns with what Bandwidth expects, like IP-based authentication or other supported methods. Take a look at these settings, and if you want, I’m here to help you sort it out! Sources: SIP troubleshooting guide | LiveKit Docs