I am getting this do i neeed to update the inbound...
# ask-ai
m
I am getting this do i neeed to update the inbound trunks or the dispatch rules? Rejecting inbound, auth check failed {"nodeID": "NE_ZtQr74xtYd9q", "callID": "SCL_kpLafHjmycrC", "fromIP": "40.69.125.114", "toIP": "72.251.9.188:5060", "fromHost": "40.69.125.114", "fromUser": "12898853050", "toHost": "72.251.9.188", "toUser": "+13438845306", "sipTag": "3-17B7775B-68D445B3000AC4BA-1FDF06C0", "sipCallID": "3-5564A22D-68D445B3000AC4BB-1FDF06C0", "error": "no response from servers"}
t
Thanks for reaching out, Rahib. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
It looks like the error "Rejecting inbound, auth check failed" means that an incoming SIP call was turned away because the authentication didn’t go through successfully. This usually happens when the credentials from your SIP trunking provider don’t quite match what’s set up in LiveKit. Here are some friendly steps to help you sort this out: • Double-check that the username and password in your LiveKit SIP trunk exactly match those from your SIP trunking provider. • Make sure your SIP provider is including the authentication credentials (using the
Proxy-Authorization
header) with every INVITE request. • Take a look at the LiveKit logs for any extra clues, like missing headers or incorrect credentials. • Verify that your dispatch rules are set up correctly, even though this particular error happens before those rules come into play. If you’re still running into trouble, it might be helpful to capture and review the SIP INVITE messages to see if the
Proxy-Authorization
header is there and correct. I’m here to help if you need any further guidance! Sources: .github/ISSUE_TEMPLATE/bug_report.yaml | Accepting inbound calls | LiveKit Docs | pkg/sip/inbound.go | SIP troubleshooting guide | LiveKit Docs | .github/ISSUE_TEMPLATE/bug_report.yaml
m
Can you give me the json format ?
t
I'd love to help! Could you please share a bit more about what you need the JSON format for? For instance, is it for setting up SIP trunk credentials, dispatch rules, or something different? This will help me guide you better.
m
What we just discussed It looks like the error "Rejecting inbound, auth check failed" means that an incoming SIP call was turned away because the authentication didn’t go through successfully. This usually happens when the credentials from your SIP trunking provider don’t quite match what’s set up in LiveKit. Here are some friendly steps to help you sort this out: • Double-check that the username and password in your LiveKit SIP trunk exactly match those from your SIP trunking provider. • Make sure your SIP provider is including the authentication credentials (using the
Proxy-Authorization
header) with every INVITE request. • Take a look at the LiveKit logs for any extra clues, like missing headers or incorrect credentials. • Verify that your dispatch rules are set up correctly, even though this particular error happens before those rules come into play. If you’re still running into trouble, it might be helpful to capture and review the SIP INVITE messages to see if the
Proxy-Authorization
header is there and correct. I’m here to help if you need any further guidance!
t
Thanks for reaching out! Could you please let me know if you're looking for the JSON format to set up SIP trunk credentials, dispatch rules, or something else? That way, I can make sure to give you the exact information you need.
m
yes SIP trunk inbound credentails
t
I'm glad to help you with setting up your SIP trunk inbound credentials in LiveKit! Here's the JSON format you'll need:
Copy code
{
  "trunk": {
    "name": "My inbound trunk",
    "numbers": [
      "+15105550100"
    ],
    "auth_username": "<sip_trunk_username>",
    "auth_password": "<sip_trunk_password>"
  }
}
Key Fields to keep in mind: • `auth_username`: This is the username you'll use to authenticate inbound SIP invites. • `auth_password`: This is the password for authenticating inbound SIP invites. • `numbers`: Here, you list the phone numbers associated with your trunk. The trunk will only accept calls made to these numbers, so be sure to include all relevant ones. You can easily use this JSON with the LiveKit CLI, SDKs, or API to create your inbound trunk. For example, save this JSON in a file named
inbound-trunk.json
and then run:
Copy code
lk sip inbound create inbound-trunk.json
Just a friendly reminder: please double-check that the username and password in this JSON match the credentials you've set up with your SIP provider. If you have any questions or need further clarification, feel free to ask—I'm here to help! Sources: livekit/livekit_sip.pb.go | SIP APIs | LiveKit Docs | Inbound calls with Twilio Voice | LiveKit Docs
m
what about headers where do they fit in the json ?
t
I'd love to help you include headers in the JSON configuration for SIP trunk inbound credentials in LiveKit! You can easily do this by using the
headers
field. This handy field lets you add custom SIP X-* headers that will be included in the 200 OK responses sent back to your SIP provider. Here’s a simple example configuration to get you started:
Copy code
{
  "name": "My Inbound Trunk",
  "numbers": [
    "+1234567890"
  ],
  "auth_username": "username",
  "auth_password": "password",
  "headers": {
    "X-Custom-Header": "value",
    "X-Another-Header": "another_value"
  }
}
Some additional header-related features you might find useful: • `headers_to_attributes`: This maps SIP X-* headers received in the INVITE request to participant attributes, making it easier to manage. • `attributes_to_headers`: This maps LiveKit attributes back to SIP X-* headers when sending follow-up requests like BYE or REFER. • `include_headers`: This lets you specify how SIP headers should be automatically mapped to attributes, with options like
SIP_NO_HEADERS
,
SIP_X_HEADERS
, and
SIP_ALL_HEADERS
. If you have any questions or want me to walk you through any part of this setup, just let me know—I’m here to help! Sources: SIP APIs | LiveKit Docs | livekit/livekit_sip.pb.go | livekit-api/src/services/sip.rs