i did the lk cloud auth and have the env variables...
# ask-ai
m
i did the lk cloud auth and have the env variables, how do i now use the dispatch to dispatch the jobs to the livekit cloud and have a worker connected to that cloud which consumes the requests, do we have docs on that, can you tell step by step what do i need to do ? create a project on livekit cloud ..?
t
Thanks for reaching out, Ayush. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I’ll walk you through exactly how to dispatch jobs to LiveKit Cloud and run a worker that consumes those jobs. I’ll keep it step‑by‑step and practical. You mentioned you already completed
lk cloud auth
and have your env variables — great, that means your CLI is authenticated to a project. Below I’ll cover what to do next. Acknowledging what you asked: this covers whether you need a LiveKit Cloud project, how to create API keys / set env vars, how to write/run a worker (agent) that connects to LiveKit Cloud, and how to dispatch jobs to that worker. 1) Create a LiveKit Cloud project (yes — required) • Go to https://cloud.livekit.io/ and create a project (name it something like
my-agent-project
). • From the project dashboard you’ll get the project URL (e.g.,
wss://<your-project>.livekit.cloud
) and you can generate API keys. 2) Ensure API keys / env variables are set • From the project dashboard generate an API key + secret. • Put these in your environment or .env: ◦ LIVEKIT_API_KEY=your_api_key ◦ LIVEKIT_API_SECRET=your_api_secret ◦ LIVEKIT_URL=wss://your-project-subdomain.livekit.cloud • You already ran
lk cloud auth
— that ties your CLI to the project so CLI commands use the right project. 3) Create an agent (worker) that accepts jobs • An agent is the worker process that registers with LiveKit Cloud and accepts dispatched jobs. • Minimal flow for an agent: ◦ Register with LiveKit Cloud as an available agent. ◦ Wait for job dispatches. ◦ Accept a job and run your job handler (e.g., join a room, process audio, run STT/LLM, TTS, etc.). Example (conceptual Python skeleton):
Copy code
# agent.py (conceptual)
from livekit.agents import JobContext, JobRequest, WorkerOptions
from livekit.plugins import cli

async def job_handler(job: JobContext):
    print(f"Job received for room: {job.room.name}")
    # your processing logic here

async def request_handler(req: JobRequest):
    await req.accept(job_handler)

if __name__ == "__main__":
    cli.run_app(WorkerOptions(request_handler=request_handler))
• This agent registers and waits for dispatches. When a job is dispatched it will call
job_handler
. 4) Run the worker locally (dev/test) • Start the worker in dev mode so it connects to LiveKit Cloud and becomes available: ◦ python agent.py dev • You should see logs indicating the worker registered and is ready. 5) Dispatch a job to your worker • Two common ways to dispatch: ◦ Using the CLI: ▪︎ lk dispatch create --room my-test-room --agent-name my-worker ▪︎ This creates the room
my-test-room
and requests an agent named
my-worker
to handle it. ▪︎ If your agent has no explicit name (uses the default pool), omit
--agent-name
and it will dispatch to the default pool. ◦ Programmatically via API (conceptual):
Copy code
from livekit.api import LiveKitAPI
    api = LiveKitAPI()
    api.agent_dispatch.create_dispatch(room="my-test-room", agent_name="my-worker")
• Matching
agent_name
ensures the named agent receives the job. If you use a pool, dispatch without name. 6) (Optional) Use named agents for control • Give your agent an explicit name to target it reliably. When an agent is named it won’t auto-pickup pool dispatches unless you dispatch to that name. • Example: set
agent_name="my-worker"
in your agent server config. 7) Deploy a persistent worker (production) • For a production-ready always-on worker you can deploy the agent instead of running it locally. • You can create a deployed agent (so it runs in the cloud) using the CLI (e.g.,
lk agent create --agent-name my-worker
) or follow the LiveKit deployment docs to run your agent in your infra. Quick checklist summary • Create LiveKit Cloud project ✅ • Generate API key/secret and set LIVEKIT_URL, LIVEKIT_API_KEY, LIVEKIT_API_SECRET ✅ • Implement agent code (job handler + request handler) ✅ • Run agent locally to test (
python agent.py dev
) ✅ • Dispatch jobs via CLI or API (
lk dispatch create ...
) ✅ • Optionally deploy agent for production ✅ If you want, I can: • Provide a complete runnable example (full agent.py) in the language you use (Node/Python/Go). • Show the exact
lk
CLI commands/flags for your setup. • Help you choose between named agents vs. a shared agent pool based on your use case. Which would you like next: a full runnable example in Python or Node, or the exact CLI commands you should run now? Sources: Best practices for managing webhook event streams | LiveKit | Agent dispatch | LiveKit Documentation | Job lifecycle | LiveKit Documentation
m
can i integrate with vobiz for telephony
t
Thanks — good question. I checked what we have: Vobiz is not mentioned in LiveKit’s docs or examples, so we don’t have a documented, out‑of‑the‑box Vobiz integration. What I can tell you and help with next: • LiveKit supports telephony via SIP trunk providers (examples we document include Twilio, Telnyx, Plivo, and Wavix) and also offers LiveKit Phone Numbers as a first‑party telephony option. • If Vobiz exposes standard telephony protocols (for example SIP/SIP trunking) or can interoperate with SIP endpoints, it may be possible to connect it to LiveKit using the existing telephony/SIP integration path. To determine feasibility quickly, can you tell me: 1. Does Vobiz support SIP trunking or provide a SIP endpoint/credentials? 2. Are you aiming for inbound PSTN calls → LiveKit (phones into rooms) or outbound calls from LiveKit → PSTN via Vobiz? 3. Do you need number provisioning (phone numbers) through Vobiz, or is Vobiz purely a SIP carrier for call transport? What I can do next after you reply: • If Vobiz supports SIP, I’ll outline the exact steps to connect it to LiveKit’s telephony layer (what SIP fields/credentials are required and how dispatch/agents interact). • If Vobiz does not support SIP, I’ll propose alternative approaches (use a supported SIP provider, or route through a SIP-capable intermediary) and tradeoffs. Pick one of the three questions above to start (or paste Vobiz’s SIP/API docs if you have them) and I’ll map out the practical next steps. Sources: Introducing LiveKit Phone Numbers: zero to ringing in 60 seconds | Agents telephony integration | LiveKit Documentation
m
How do i setup an outbound trunk id on my livekit project?
t
Thanks — I’ll walk you through how to create an outbound trunk (the trunk ID) on your LiveKit project and how to use it for outbound calls. I’ll keep it step‑by‑step and practical. If you want a command/SDK snippet for a specific language, tell me which one (Python/Node/Go). Prerequisites • You have a LiveKit project and its API credentials (LIVEKIT_API_KEY, LIVEKIT_API_SECRET, LIVEKIT_URL). • You have SIP provider details (host, username, password) or plan to use LiveKit Phone Numbers as your outbound provider. Step 1 — Create the outbound SIP trunk You can create the outbound trunk via the LiveKit CLI or the server SDK. When created, LiveKit returns a generated outbound trunk ID (e.g., ST_xxx) you will use for outbound calls. CLI example: 1. Run: lk sip outbound create --name "My Outbound Trunk" \ --username "your_sip_username" \ --password "your_sip_password" \ --host "sip.provider.com" 1. The command response will include the created
sip_trunk_id
(this is your outbound trunk ID). 2. List trunks: lk sip outbound list Server SDK (conceptual Python example): 1. Use the LiveKit API client to create the trunk:
Copy code
outbound_trunk = await lk_api.sip.create_sip_outbound_trunk(
     api.CreateSIPOutboundTrunkRequest(
       trunk=api.SIPOutboundTrunkInfo(
         name="My Outbound Trunk",
         host="<http://sip.provider.com|sip.provider.com>",
         username="your_sip_username",
         password="your_sip_password"
       )
     )
   )
   print(outbound_trunk.sip_trunk_id)
1. Save the returned
sip_trunk_id
for use in call requests. Step 2 — Use the outbound trunk ID to make outbound calls When you want to place an outbound call from LiveKit to a PSTN number, include the
sip_trunk_id
in the SIP participant creation request. Conceptual example (server-side):
Copy code
await ctx.api.sip.create_sip_participant(
  api.CreateSIPParticipantRequest(
    room_name=ctx.room.name,
    sip_trunk_id="ST_xxxx",       # your outbound trunk ID
    sip_call_to="+1234567890",
    participant_identity="caller",
    wait_until_answered=True
  )
)
The
sip_trunk_id
tells LiveKit which SIP trunk/provider to route the outbound call through. Step 3 — Verify provider capabilities and settings • Make sure your SIP provider allows outbound calls and supports any features you need (caller ID passthrough, specific codecs, auth methods). • If you need to preserve caller ID during transfers or other advanced behaviors, confirm the provider and LiveKit settings support that. Tips and best practices • Store the
sip_trunk_id
in an environment variable (e.g., SIP_OUTBOUND_TRUNK_ID) for reuse. • Use a named trunk for clearer routing and easier debugging. • Test calls in a staging project/room before production. If you’d like, I can: • Provide a full runnable example for Python or Node that creates a trunk and initiates an outbound call, or • Give the exact CLI command set you should run now, tailored to your SIP provider details. Which would you prefer, and do you have your SIP provider details ready (host, username, password)? Sources: Agents telephony integration | LiveKit Documentation | Outbound Calling Script | LiveKit Documentation | examples/voice_agents | livekit/livekit_composite | DeepWiki | Preserving Caller ID During SIP Transfers in LiveKit Agents
m
Copy code
PS C:\Users\Ayush> lk sip outbound create --name "voice_agent_ayush_outbound_trunk" \ --username "voice_agent_ayush" \ --password "****" \ --host "<http://5400ad87.sip.vobiz.ai|5400ad87.sip.vobiz.ai>"
Incorrect Usage: flag provided but not defined: -username

flag provided but not defined: -username
PS C:\Users\Ayush>
t
Thanks — that error is happening because the CLI flag is named differently. I see you used
--username
, but the LiveKit CLI expects
--sip-username
and
--sip-password
. Two quick fixes: 1) Single-line PowerShell command (recommended for Windows):
Copy code
lk sip outbound create --name "voice_agent_ayush_outbound_trunk" --sip-username "voice_agent_ayush" --sip-password "****" --host "<http://5400ad87.sip.vobiz.ai|5400ad87.sip.vobiz.ai>"
2) If you want a multi-line command in PowerShell, use the backtick (`) for continuation (not a backslash):
Copy code
lk sip outbound create `
  --name "voice_agent_ayush_outbound_trunk" `
  --sip-username "voice_agent_ayush" `
  --sip-password "****" `
  --host "<http://5400ad87.sip.vobiz.ai|5400ad87.sip.vobiz.ai>"
Additional tips: • Verify your CLI version with
lk version
if flags still aren't recognized — older/newer CLI builds can differ. • You can also create the trunk programmatically via the server SDK (Python/Node/Go) using the
create_sip_outbound_trunk
API if you prefer. If you run the corrected command and still get an error, paste the full output here and I’ll help troubleshoot further (CLI version, OS, or exact error). Sources: Python SDKs | livekit/livekit_composite | DeepWiki | Server-side | livekit/livekit_composite | DeepWiki
m
{"participant": "+917020480908", "source": "SOURCE_MICROPHONE"} 191456.923 INFO … livekit.agents closing agent session due to participant disconnect (disable via `RoomInputOptions.cl… {"room": "call-2", "participant": "+917020480908", "reason": "CLIENT_INITIATED"} 191456.930 ERROR… __mp_main__ SIP error for call_id=2: twirp error unknown: INVITE failed: sip status: 488: 32208 SIP trunk or domain is required to use secure media (SRTP). (SIP 488 32208 SIP trunk or domain is required to use secure media (SRTP).) 191456.939 DEBUG… livekit.agents stream closed {"participant": "+917020480908", "source": "SOURCE_MICROPHONE"} 191456.946 DEBUG… livekit.agents input stream detached {"participant": "+917020480908", "source": "SOURCE_UNKNOWN", "accepted_sources": ["SOURCE_MICROPHONE"]} 191457.019 INFO … __mp_main__ call_id=2 status getting this error, although i have configugred the sip trunk id with tls
t
Thanks — that error log is helpful. You’re hitting a SIP 488 that says SRTP (secure media) is required but your trunk isn’t configured for it. I’ll summarize why this happened and give exact steps to fix it. What the error means • The SIP response:
488: 32208 SIP trunk or domain is required to use secure media (SRTP)
means LiveKit attempted an INVITE with secure media (SRTP), but the outbound trunk you used is not marked to allow SRTP. • TLS (signaling) and SRTP (media) are separate. Having TLS alone is not enough if your call expects encrypted media. • Common causes: your trunk was created without the
secure
flag, or your agent requested SRTP (e.g.,
krisp_enabled=True
) while the trunk doesn’t support SRTP. Immediate steps to fix 1. Verify current trunk settings • Run:
Copy code
lk sip outbound list
• Check that the trunk entry for your trunk shows
"secure": true
and
"use_tls": true
. If
secure
is false, proceed to step 2. 1. Recreate or update the trunk to enable SRTP • If CLI supports update you can use it; otherwise delete and recreate with
--secure
and
--use-tls
. • For PowerShell (single line):
Copy code
lk sip outbound create --name "voice_agent_ayush_outbound_trunk" --sip-username "voice_agent_ayush" --sip-password "****" --host "<http://5400ad87.sip.vobiz.ai|5400ad87.sip.vobiz.ai>" --use-tls --secure
• Or multi-line with PowerShell backticks:
Copy code
lk sip outbound create `
    --name "voice_agent_ayush_outbound_trunk" `
    --sip-username "voice_agent_ayush" `
    --sip-password "****" `
    --host "<http://5400ad87.sip.vobiz.ai|5400ad87.sip.vobiz.ai>" `
    --use-tls `
    --secure
1. Ensure your agent call request matches trunk capabilities • If you are enabling Krisp or requested secure media in your
create_sip_participant
call, keep it enabled only if trunk has
secure: true
. • Example: if the trunk is secure,
krisp_enabled=True
is OK. If not, set
krisp_enabled=False
or remove it. Example create_sip_participant usage (conceptual):
Copy code
await ctx.api.sip.create_sip_participant(
  api.CreateSIPParticipantRequest(
    room_name=ctx.room.name,
    sip_trunk_id="ST_xxxxxxx",
    sip_call_to="+917020480908",
    participant_identity="caller",
    krisp_enabled=True   # only if trunk has --secure
  )
)
1. Test again and share results • After recreating the trunk with
--secure
, place a test outbound call. • If it still fails, paste: ◦ Output of
lk sip outbound list
◦ The exact
create_sip_participant
request you’re making (redact secrets) ◦ Full INVITE/SDP logs if available Quick checklist • [ ] Trunk has
secure: true
(SRTP enabled) • [ ] Trunk has
use_tls: true
if you want TLS signaling • [ ] Agent call flags (
krisp_enabled
) match trunk SRTP capability If you want, I can: • Walk you through the exact commands to delete + recreate the trunk safely • Inspect the
lk sip outbound list
output you paste and point out the exact field to change Which would you like me to do next? Paste the output of
lk sip outbound list
and your
create_sip_participant
call (with secrets removed) and I’ll pinpoint the remaining changes.
m
okay, i'm creating a new trunk now, i have the data in a file named outbound_trunk.twilio.json, now give the lk command to do so that i can make outbound calls without the above errors
t
Great — since you have the trunk definition in
outbound_trunk.twilio.json
, run this LiveKit CLI command to create the outbound trunk from that file: • PowerShell / CMD (single line):
Copy code
lk sip outbound create outbound_trunk.twilio.json
Notes and quick checks • Ensure your JSON includes
"secure": true
if you need SRTP (secure media). Example minimal structure:
Copy code
{
  "trunk": {
    "name": "voice_agent_ayush_outbound_trunk",
    "host": "<http://5400ad87.sip.vobiz.ai|5400ad87.sip.vobiz.ai>",
    "sip_username": "voice_agent_ayush",
    "sip_password": "your_password",
    "use_tls": true,
    "secure": true
  }
}
• After creation, verify the trunk and confirm
secure: true
with:
Copy code
lk sip outbound list
• Use the returned
sip_trunk_id
in your
create_sip_participant
calls. If your agent uses
krisp_enabled=True
or otherwise requests secure media,
secure
must be
true
on the trunk to avoid the SRTP error you saw. If the command returns an error, paste the CLI output and the top-level keys of your JSON (redact secrets) and I’ll help troubleshoot. Sources: Agents telephony integration | LiveKit Documentation | Making calls overview | LiveKit Documentation | Python SDKs | livekit/livekit_composite | DeepWiki | sip | livekit/livekit_composite | DeepWiki | Building an Automated IVR Menu Caller | LiveKit Documentation
m
PS C:\Users\Ayush\desktop\coding\voice_agent\worker> lk sip outbound create outbound-trunk.twilio.json WARNING: config file C:\Users\Ayush/.livekit/cli-config.yaml should have permissions 600 WARNING: config file C:\Users\Ayush/.livekit/cli-config.yaml should have permissions 600 Using default project [voice-agent] could not read request: proto: (line 10:9): unknown field "use_tls" PS C:\Users\Ayush\desktop\coding\voice_agent\worker>
t
Thanks — I can help get this fixed. You hit two separate issues: (1) your JSON file contains an unrecognized field (
use_tls
) and (2) the CLI complained the file isn’t valid JSON. Let’s resolve both so you can create the trunk and avoid the SRTP error. 1) Fix the JSON fields • Replace the invalid field
use_tls
with
tls_enabled
. • Use the correct property names LiveKit expects. A minimal valid structure looks like this:
Copy code
{
  "trunk": {
    "name": "voice_agent_ayush_outbound_trunk",
    "host": "<http://5400ad87.sip.vobiz.ai|5400ad87.sip.vobiz.ai>",
    "sip_username": "voice_agent_ayush",
    "sip_password": "your_password",
    "tls_enabled": true,
    "secure": true
  }
}
Notes: • `tls_enabled`: enables TLS for signaling (use this instead of
use_tls
). • `secure`: enables SRTP (secure media). Set this true if your agent/flow requests secure media (e.g.,
krisp_enabled=True
). • Make sure keys are exactly quoted and there are no trailing commas. 2) Validate JSON file locally • Use a quick JSON validator or run a PowerShell command to check formatting:
Copy code
Get-Content .\outbound-trunk.twilio.json | ConvertFrom-Json
If that command throws an error, fix the JSON until it parses. 3) Create the trunk from the file • Once the JSON is valid, run:
Copy code
lk sip outbound create outbound-trunk.twilio.json
• Then verify the trunk was created and that
tls_enabled
and
secure
are true:
Copy code
lk sip outbound list
4) If you still see errors • Paste the top-level keys of your JSON file here (redact passwords). I’ll check them for invalid fields. • If
lk sip outbound create
fails again, paste the full CLI error output and the output of
lk sip outbound list
. Optional quick test JSON you can copy/paste (replace credentials):
Copy code
{
  "trunk": {
    "name": "Test Trunk",
    "host": "<http://5400ad87.sip.vobiz.ai|5400ad87.sip.vobiz.ai>",
    "sip_username": "voice_agent_ayush",
    "sip_password": "REPLACE_ME",
    "tls_enabled": true,
    "secure": true
  }
}
If you want, paste your current JSON file contents (with secrets removed) and I’ll correct it for you. Sources: Agents telephony integration | LiveKit Documentation | Making calls overview | LiveKit Documentation | Support data sovereignty in India | LiveKit | Understanding TLS in SIP | LiveKit
m
I recreated the trunk, had tls still gave this error :
Copy code
SIP error for          
                                           call_id=2: twirp       
                                           error unknown: INVITE  
                                           failed: sip status:    
                                           488: 32208 SIP trunk   
                                           or domain is required  
                                           to use secure media    
                                           (SRTP). (SIP 488       
                                           32208 SIP trunk or     
                                           domain is required to  
                                           use secure media       
                                           (SRTP).)
t
Thanks — I know that 488 message is blocking; let’s solve it step‑by‑step. The SIP 488 (32208) means LiveKit attempted an INVITE that requested secure media (SRTP), but the outbound trunk you used is not configured to accept SRTP. TLS for signaling and SRTP for media are separate — both must be enabled when your call requests secure media (for example when
krisp_enabled=True
). What I need from you (quick checks) 1. Run and paste (redact secrets): ◦ lk sip outbound list This shows whether the trunk’s fields include
tls_enabled: true
and
secure: true
. 1. Paste the top-level keys of your trunk JSON (redact passwords). Example keys I need to see: ◦ host / sip_server / sip_username / sip_password / tls_enabled / secure / sip_uri (just the keys/values, not the secrets) What to do now (exact steps) 1) Verify trunk fields • Ensure your trunk shows both: ◦ tls_enabled: true (signaling over TLS) ◦ secure: true (SRTP / secure media) • Command to list trunks:
Copy code
lk sip outbound list
2) If trunk is missing
secure: true
, delete and recreate it with those flags in JSON or CLI. CLI create (single line PowerShell)
Copy code
lk sip outbound create --name "voice_agent_ayush_outbound_trunk" --sip-username "voice_agent_ayush" --sip-password "****" --host "<http://5400ad87.sip.vobiz.ai|5400ad87.sip.vobiz.ai>" --tls-enabled --secure
Notes: • Some CLI versions accept
--tls-enabled
as a boolean flag; if your CLI expects a file, use JSON with exact fields (see below). • If your CLI does not accept `--tls-enabled`/`--secure` flags inline, use a JSON file. JSON format (use this exact shape; replace secrets)
Copy code
{
  "trunk": {
    "name": "voice_agent_ayush_outbound_trunk",
    "host": "<http://5400ad87.sip.vobiz.ai|5400ad87.sip.vobiz.ai>",
    "sip_username": "voice_agent_ayush",
    "sip_password": "REDACTED",
    "tls_enabled": true,
    "secure": true
  }
}
Then create from file:
Copy code
lk sip outbound create outbound-trunk.twilio.json
3) Ensure your call request matches trunk capabilities • If your
create_sip_participant
call sets
krisp_enabled=True
or otherwise requests encrypted media, keep
secure: true
on the trunk. • If you cannot enable SRTP on the trunk (provider limitation), set
krisp_enabled=False
in the call request so media is not forced to SRTP. Example call (only if trunk is secure):
Copy code
await ctx.api.sip.create_sip_participant(
  api.CreateSIPParticipantRequest(
    room_name=ctx.room.name,
    sip_trunk_id="ST_xxxxx",
    sip_call_to="+917020480908",
    participant_identity="caller",
    krisp_enabled=True
  )
)
If trunk is NOT secure, set
krisp_enabled=False
. 4) Confirm your SIP provider supports SRTP/TLS • The provider (Vobiz) must accept SRTP or sRTP-capable endpoints. If the provider does not support SRTP, LiveKit cannot negotiate secure media with it — in that case you must either: ◦ Use a provider that supports SRTP, or ◦ Make the call without SRTP (set
secure:false
and
krisp_enabled:false
) if acceptable. If it still fails, please provide: • Output of
lk sip outbound list
• The top-level contents of your trunk JSON (with secrets redacted) • The exact
create_sip_participant
call you make (redact secrets) I’ll inspect those and tell you exactly what to change next. If you prefer, paste
lk sip outbound list
now and I’ll point to the exact field to update.
m
i did add krisp enabled true, its still giving the same error, the lk outbound list also does not have any information on the secure or tls
t
Thanks — I can see why this is frustrating. You’re still getting the SRTP 488 error because LiveKit is being asked to negotiate secure media (SRTP) but the outbound trunk in your project isn’t showing TLS/SRTP settings. Let’s narrow down the cause and fix it. Quick summary of the problem • SIP 488 (32208) = INVITE requested secure media (SRTP) but the outbound trunk is not configured to accept secure media. • TLS for signaling and SRTP for media are separate. Both must be present when the call requests secure media (for example
krisp_enabled=True
). • Your
lk sip outbound list
not showing `tls`/`secure` fields suggests either the trunk was created without those fields or your CLI/version doesn’t surface them. What I need from you to diagnose quickly 1. Output of: ◦ lk version ◦ lk sip outbound list (Redact secrets; paste the outputs here.) 1. The top-level keys of your trunk JSON file (outbound-trunk.twilio.json). Paste it here with passwords removed. Example I need to see: ◦ host/sip_server or sip_uri ◦ sip_username or username ◦ sip_password (redact value) ◦ Any boolean flags you used (tls_enabled, secure, use_tls, etc.) 1. The exact
create_sip_participant
request you call from your agent (redact secrets). Immediate checks and actions to try now 1) Check CLI version • Run: lk version • If your CLI is out-of-date, flag names and JSON schema can differ. If it’s old, update the CLI and try listing trunks again. 2) Confirm trunk listing • Run: lk sip outbound list • If that output still lacks
tls_enabled
/
secure
, proceed to recreate the trunk using a JSON file with the exact recommended fields below. 3) Recreate trunk from a validated JSON (recommended) • Use this exact JSON shape (replace values, redact password here before pasting):
Copy code
{
  "trunk": {
    "name": "voice_agent_ayush_outbound_trunk",
    "host": "<http://5400ad87.sip.vobiz.ai|5400ad87.sip.vobiz.ai>",
    "sip_username": "voice_agent_ayush",
    "sip_password": "REDACTED",
    "tls_enabled": true,
    "secure": true
  }
}
• Save as outbound-trunk.twilio.json (ensure valid JSON). • Create trunk: lk sip outbound create outbound-trunk.twilio.json • Then immediately run: lk sip outbound list and paste the result here. Notes about flags/field names • Use
tls_enabled
(not
use_tls
) to enable signaling over TLS. • Use
secure: true
to mark the trunk as SRTP-capable (secure media). • If your CLI doesn’t accept these or still hides them, the CLI version likely differs from the docs — tell me
lk version
and I’ll adapt. 4) Align your agent call request • If the trunk is
secure: true
, then
krisp_enabled=True
is OK. • If the trunk cannot be made secure (provider limitation), set
krisp_enabled=False
or remove that flag so LiveKit won’t request SRTP. If the provider cannot support SRTP • You must either: ◦ Use a SIP provider that supports SRTP/TLS, or ◦ Make the call without secure media (set
secure:false
on trunk and
krisp_enabled=false
in call) — accept the tradeoff. If you’d like, I can: • Inspect your JSON and the
lk sip outbound list
output and correct fields for you. • Give the exact removal + recreate commands to ensure a clean trunk. Next step Please paste: • Output of
lk version
• Output of
lk sip outbound list
• Your outbound-trunk JSON top-level (secrets removed) • Your create_sip_participant call (redact keys) I’ll point out exactly which field to change or give the exact commands to delete & recreate the trunk so this SRTP error stops.
m
in my trunk settings currently srtp is disabled, should i enable for it to work ?
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!
m
I want to monitor the session, as soon as it hits a minute, i want to cut the call, how do i do it ?
?
I want to monitor the session, as soon as it hits a minute, i want to cut the call, how do i do it ?