happy-mouse-590
09/11/2025, 8:05 PMtall-airline-16756
09/11/2025, 8:05 PMtall-airline-16756
09/11/2025, 8:07 PMauth_username
and auth_password
in your LiveKit setup exactly match the credentials listed in Twilio's SIP credential list.
• Missing or unlinked SIP credentials list in Twilio: Make sure you have a credential list created in Twilio and that it’s properly linked to your SIP trunk.
• Improperly set environment variables: Verify that TWILIO_SIP_USERNAME
and TWILIO_SIP_PASSWORD
are correctly set in your LiveKit environment.
• Digest authentication mismatch: Confirm that LiveKit is responding correctly to Twilio’s authentication challenge.
To get this sorted, I recommend checking the credentials on both sides, reviewing your environment variables, and taking a look at the LiveKit server logs for more detailed authentication info. If you’d like, I’m here to help you step-by-step—just let me know!
Sources: test/lktest-sip-outbound/README.md | packages/sip--um-actually/src/setup-twilio.ts | src/setup-livekit.ts | Create and configure a Twilio SIP trunk | LiveKit Docs | Making calls using SIP | LiveKit Docshappy-mouse-590
09/11/2025, 8:10 PMtall-airline-16756
09/11/2025, 8:10 PMhappy-mouse-590
09/11/2025, 8:14 PMtall-airline-16756
09/11/2025, 8:14 PMTWILIO_SIP_USERNAME
and TWILIO_SIP_PASSWORD
environment variables. You’ll usually find these in your .env.local
file or as environment variables passed to your LiveKit server.
4. Double-check that the username and password in Twilio’s credential list exactly match what’s in your LiveKit setup. Remember, they’re case sensitive, and even an extra space can cause issues.
If you spot any differences, just update the credentials in either Twilio or LiveKit so they match perfectly. And please don’t hesitate to reach out if you’d like me to walk you through any part of this—I’m here to help!happy-mouse-590
09/11/2025, 8:17 PMtall-airline-16756
09/11/2025, 8:18 PMhappy-mouse-590
09/11/2025, 8:20 PMtall-airline-16756
09/11/2025, 8:20 PMTWILIO_SIP_USERNAME
and TWILIO_SIP_PASSWORD
in your LiveKit setup exactly match the credentials listed in Twilio's SIP credential list.
• Missing or unlinked SIP credentials list in Twilio: Make sure that the credential list has been created and properly linked to your SIP trunk in Twilio.
• Digest authentication mismatch: Take a look at the LiveKit logs for more clues, such as whether the Proxy-Authorization header is missing or if there’s a response mismatch.
I understand this can be a bit tricky, so I recommend going over the credentials again in both Twilio and LiveKit to ensure they match perfectly. If you’d like, I’m here to help you through the next steps—just let me know!happy-mouse-590
09/11/2025, 8:28 PMtall-airline-16756
09/11/2025, 8:29 PMrequest_fnc
isn’t defined, the system will automatically accept all job requests sent to the worker, which makes things simpler for you.
That said, if you’d like to have more control over which jobs your agent accepts—maybe based on room metadata or other specific conditions—you can definitely define a request_fnc
function. This way, you can decide whether to accept or reject a job based on what you need. Here’s a quick example:
async def request_fnc(req: JobRequest):
await req.accept(name="agent", identity="identity", attributes={"myagent": "rocks"})
This step is totally optional and only necessary if you want that fine-grained control over job acceptance. If you have any questions or want me to walk you through it more, just let me know—I’m here to help!
Sources: Worker options | LiveKit Docs | livekit-agents/livekit/agents/worker.pytall-airline-16756
09/11/2025, 8:29 PMrequest_fnc
is set up, the system kindly accepts all job requests sent to the worker automatically.
That said, if you'd like to have more control over which jobs your agent accepts—maybe based on room metadata or specific agent conditions—you can create a request_fnc
function. This lets you decide whether to accept or reject each job. For example:
async def request_fnc(req: JobRequest):
await req.accept(name="agent", identity="identity", attributes={"myagent": "rocks"})
This step is totally optional and only necessary if you want to customize how jobs are accepted. If you have any questions or want me to walk you through it, just let me know—I’m here to help!