orange-mechanic-67255
05/14/2026, 6:59 PMtall-airline-16756
05/14/2026, 6:59 PMtall-airline-16756
05/14/2026, 7:00 PMctx.room participant-disconnected event fires whenever a participant leaves the room (connection loss, client-initiated disconnect, room deletion, duplicate identity, node migration, etc.). I cannot find any documented waitUntilAnswered option or method, so I can’t confirm it or compare its behavior.
If by "waitUntilAnswered" you mean a flow that waits for a SIP/phone caller or agent to join, a comparable approach is to wait for the specific participant to arrive (e.g., ctx.wait_for_participant() patterns described in telephony workflows). Do you mean that, or can you share where you saw waitUntilAnswered (code snippet or docs) so I can compare exact behavior?
Sources: Tasks and task groups | LiveKit Documentation | Job lifecycle | LiveKit Documentation | Agent dispatch | LiveKit Documentation, with interactive elementsorange-mechanic-67255
05/14/2026, 7:02 PMtall-airline-16756
05/14/2026, 7:03 PMwait_until_answered=true on createSipParticipant, telephony failures like USER_UNAVAILABLE and USER_REJECTED are surfaced via the same participant_disconnected event (the reason appears in the event payload).
So you can rely on a single flow:
• Listen for participant_disconnected.
• Inspect the reason field (e.g., USER_UNAVAILABLE, USER_REJECTED, CLIENT_INITIATED, etc.) and handle each case.
If you'd like, tell me which disconnect reasons you want to handle specially and I can suggest concise handling logic or a small snippet for your event handler.
Sources: Understanding the STATE_MISMATCH Disconnect Reason | https://docs.livekit.io/agents/logic/sessions.md| | Why is my Agent insights data missing? | LiveKit | Job lifecycle | LiveKit Documentation, with interactive elementsorange-mechanic-67255
05/15/2026, 7:16 PMsip.createSipParticipant(call.trunk_id, call.phone_number, room_name, {
participantIdentity: call.phone_number,
participantName: `C-${call.call_id}`,
participantAttributes: {
...
},
krispEnabled: true,
})
And livekit receives the call but no participant ever connects, no call gets to my phone or anything.
here’s the logs I see:
19:13:40.069 INFO livekit.agents received job request
{"job_id": "AJ_2PTKNgVeiQi3",
"dispatch_id": "AD_4H5maaQnTfCp", "room":
"out-call-00000000-0000-4000-8000-00000000ac01", "room_id": "RM_MjAAbp2JdDTw",
"agent_name": "", "resuming": false, "enable_recording": false}
19:13:40.080 DEBUG livekit.agents received assignment
{"agent_name": "", "room_id":
"RM_MjAAbp2JdDTw", "room": "out-call-00000000-0000-4000-8000-00000000ac01",
"job_id": "AJ_2PTKNgVeiQi3", "dispatch_id": "AD_4H5maaQnTfCp",
"enable_recording": false}
WARNING livekit.agents no warmed process available for
job, waiting for one to be
created
{"job_id": "AJ_2PTKNgVeiQi3"}
19:13:40.085 INFO livekit.agents initializing process {"pid": 75}
19:13:40.357 INFO livekit.agents process initialized
{"pid": 75, "elapsed_time": 0.27}
DEBUG asyncio Using selector: EpollSelector
{"pid": 75, "job_id": "AJ_2PTKNgVeiQi3",
"room_id": "RM_MjAAbp2JdDTw"}tall-airline-16756
05/15/2026, 7:17 PMwait_until_answered set for these calls? If not, set it to true to surface telephony failure reasons via participant_disconnected.
3. Can you confirm the sip_trunk_id is correct and the trunk is healthy (credentials, IP whitelist, transport)?
4. Is the destination number formatted in E.164 (e.g. +12223334444)?
5. Do you see any SIP signaling from your provider (INVITE / 1xx / 2xx / 4xx / 5xx) in provider logs when the dispatch happens?
6. Are you listening for participant_joined / participant_disconnected in the room and logging the reason field? (Check for USER_UNAVAILABLE, USER_REJECTED, etc.)
7. Try these quick diagnostics:
◦ Temporarily enable verbose signaling/logging on the SIP trunk and inspect whether the INVITE leaves LiveKit and what response returns.
◦ Use a known-working test number or SIP softphone as the target to verify call path.
◦ Ensure participantIdentity is unique per call to avoid collisions.
If you can share:
• The createSipParticipant call including whether wait_until_answered was used,
• Any SIP provider signaling logs (INVITE/response codes),
• Whether participant_joined or participant_disconnected events ever appear,
I’ll walk through the next steps and pinpoint likely causes.
Sources: https://docs.livekit.io/agents/start/telephony.md| | Making calls overview | LiveKit Documentation | https://docs.livekit.io/agents/prebuilt/tasks/warm-transfer.md| | Preserving Caller ID During SIP Transfers in LiveKit Agents | Job lifecycle | LiveKit Documentation, with interactive elementsorange-mechanic-67255
05/15/2026, 7:20 PMtall-airline-16756
05/15/2026, 7:20 PMcreateSipParticipant call (redact secrets). Include sip_trunk_id, sip_call_to, and the full options object (you already said wait_until_answered: true — confirm).
◦ Ensure participantIdentity is unique for this call.
1. LiveKit agent / process readiness
◦ The logs show a warmed process being initialized. After that, do you see any log lines indicating the SIP call attempt (INVITE) or a SIP client creation? Search LiveKit logs for “INVITE”, “SIP”, createSipParticipant, or any telephony-related debug messages around the job_id.
1. Trunk configuration & connectivity
◦ Verify the trunk’s outbound settings (authentication, transport, destination, IP ACLs). Even if no explicit blockers exist, confirm the trunk is provisioned/active in the provider console.
◦ Confirm LiveKit’s outbound IPs (or host) are permitted by the trunk provider if IP restriction is required.
1. Provider visibility
◦ Twilio shows nothing — check the provider’s SIP logs/console for any requests or blocked attempts at the exact timestamp of dispatch. If Twilio truly has nothing, LiveKit didn’t reach Twilio.
1. Increase debug logging
◦ Enable verbose signaling/logs on LiveKit agents (or set log level to DEBUG) and re-dispatch. Capture logs from job start through process initialization to see any telephony call attempt lines.
1. Quick functional test
◦ Try calling a known-working test SIP endpoint or softphone as sip_call_to to rule out trunk-to-destination issues.
◦ Alternatively, try a second trunk/provider if available.
1. Share these artifacts
◦ The exact createSipParticipant call (redact tokens)
◦ LiveKit agent logs (full lines) from job start → ~30s after (include job_id)
◦ Any provider logs for the same timestamps (Twilio console or SIP provider)
If you share those three items, I’ll inspect the flow and point to the exact failure (no INVITE, auth failure, transport issue, etc.) and give the exact next steps.
, with interactive elementsorange-mechanic-67255
05/15/2026, 7:41 PM{"trunk":"ST_4hhUEZPHwKeD","phone":"<tel:+51982347605|+51982347605>","room_name":"out-call-00000000-0000-4000-8000-00000000ac01","options":{"participantIdentity":"<tel:+51982347605|+51982347605>","participantName":"C-00000000-0000-4000-8000-00000000ac01","participantAttributes":{"call_id":"00000000-0000-4000-8000-00000000ac01","org_slug":"test","service_key":"..."},"krispEnabled":true}}
2. no logs mentioning an invite
3. it’s provisioned and active. i saw call logs in livekit said invite return anuthorized so i changed the authUsername and authPassword in the outbound trunk but i’m getting the same thing now
4. twilio shows absolutely nothing, nothing in the logs
{"pid": 32, "job_id":
"AJ_eD3fVsbbGovz", "room_id": "RM_frpfeW5k2H3A"}
16:11:44.052 INFO livekit.agents received job request
{"job_id": "AJ_zYfbsaaFYui8",
"dispatch_id": "AD_xTjdXRy3yg7C", "room": "test-dev-_+40770801933_r7xZgrYSTaib",
"room_id": "RM_LJtk3suapwXc", "agent_name": "", "resuming": false,
"enable_recording": false}
16:11:44.063 DEBUG livekit.agents received assignment
{"agent_name": "", "room_id":
"RM_LJtk3suapwXc", "room": "test-dev-_+40770801933_r7xZgrYSTaib", "job_id":
"AJ_zYfbsaaFYui8", "dispatch_id": "AD_xTjdXRy3yg7C", "enable_recording": false}
16:11:44.064 WARNING livekit.agents no warmed process available for
job, waiting for one to be
created
{"job_id": "AJ_zYfbsaaFYui8"}
16:11:44.069 INFO livekit.agents initializing process {"pid": 52}
16:11:44.345 INFO livekit.agents process initialized
{"pid": 52, "elapsed_time": 0.28}
DEBUG asyncio Using selector: EpollSelector
{"pid": 52, "job_id": "AJ_zYfbsaaFYui8",
"room_id": "RM_LJtk3suapwXc"}
16:11:44.765 ERROR omnicare Unexpected error starting web
session: [Errno -2] Name or
service not known
{"pid": 52, "job_id": "AJ_zYfbsaaFYui8",
"room_id": "RM_LJtk3suapwXc"}
16:11:44.766 DEBUG livekit.agents http_session(): creating a new
httpclient ctx
{"pid": 52, "job_id":
"AJ_zYfbsaaFYui8", "room_id": "RM_LJtk3suapwXc"}
16:11:45.603 DEBUG livekit.agents shutting down job task
{"reason": "room disconnected",
"user_initiated": false, "pid": 52, "job_id": "AJ_zYfbsaaFYui8", "room_id":
"RM_LJtk3suapwXc"}
16:11:45.604 INFO livekit.agents process exiting
{"reason": "room disconnected", "pid":
52, "job_id": "AJ_zYfbsaaFYui8", "room_id": "RM_LJtk3suapwXc"}
16:11:45.603 DEBUG livekit.agents http_session(): closing the
httpclient ctxtall-airline-16756
05/15/2026, 7:41 PMtelnet sip.example.com 5060 (or curl to the provider’s SIP API host).
◦ If name resolution fails, fix DNS for those hosts or use the provider’s IPs/hosts.
1. Confirm trunk endpoint/URL
◦ Verify the trunk’s configured outbound domain/host is correct (no typo, correct port and transport). The name error often comes from an incorrect host string in the trunk config.
1. Check agent network egress
◦ Ensure your LiveKit agent processes can egress to the internet and to the provider host (no proxy, firewall, or NAT blocking).
◦ If your environment requires a proxy or specific routes, ensure agents are configured accordingly.
1. Re-check auth only after connectivity is fixed
◦ You mentioned previously seeing “invite returned unauthorized” — that was after a DNS/host was reachable. Right now there’s no INVITE reaching Twilio, so fix connectivity first, then re-test. Once INVITE reaches the provider, an auth failure will appear in provider logs.
1. Increase agent logging & reproduce
◦ Set agent log level to DEBUG and reproduce. Capture logs from job start → failure. Look for lines mentioning SIP host, INVITE attempts, or HTTP session creation successes/failures.
1. Quick functional tests
◦ Replace trunk with a known-working trunk or a public test SIP endpoint (softphone SIP URI) to check if the issue is trunk-specific or network/DNS-related.
◦ Try using the trunk host IP (if provider supports) to confirm DNS is the blocker.
What I need from you to confirm the root cause:
• The SIP trunk outbound host/domain as configured (redact creds).
• Results of a DNS lookup (dig/nslookup) from the agent host at the timestamp you run a test.
• A short snippet of DEBUG logs (job start → error) after you enable debug logging.
If you share those three items I’ll point to the exact fix (DNS entry, host typo, network rule) and the next steps to get INVITEs flowing.
, with interactive elementsorange-mechanic-67255
05/15/2026, 7:48 PMtall-airline-16756
05/15/2026, 7:48 PMnc -vz <trunk-host> <port>)
Share outputs and timestamps.
3) Confirm agent egress & DNS settings
• Ensure the agent host(s) can egress to the internet and are using a working DNS resolver (no internal DNS override that can’t resolve provider hosts).
• If your environment requires a proxy, ensure agents are configured to use it.
4) Re-enable verbose agent logging and reproduce
• Set agent logs to DEBUG, then dispatch the call. Capture logs from job start → process initialization → until failure (include job_id). Look for lines referencing SIP host, SIP client creation, INVITE, or DNS errors.
5) Quick functional tests
• Replace your trunk with a known-working test SIP target (softphone SIP URI or public SIP echo) as sip_call_to. If that connects, problem is trunk/provider-specific.
• If possible, test using the trunk’s IP (if provider supports) to bypass DNS.
6) If you previously saw “INVITE returned unauthorized” after fixing creds:
• Wait until connectivity is fixed first. After that, an AUTH failure will show in the provider logs — then re-check authUsername/authPassword and transport (TCP/UDP/TLS) and caller ID policies.
What I need from you next to pinpoint the root cause:
• The trunk outbound host/domain as configured (redact creds).
• Outputs of the reachability tests (nslookup/dig/ping/telnet) from the agent host.
• DEBUG agent logs for one failed attempt (job_id included).
Share those three items and I’ll identify whether it’s DNS, network egress, trunk host typo, or an auth/transport issue and give exact fix steps.
, with interactive elementsorange-mechanic-67255
05/15/2026, 7:54 PMtall-airline-16756
05/15/2026, 7:54 PMsip.createSipParticipant. In your payload you used trunk — the API expects the trunk identifier field name used by your SDK version (e.g., sip_trunk_id vs trunk). Please paste the call site so I can verify the right param name.
2) Ensure telephony/SIP plugin is present in the worker image
• Some worker images require the telephony/SIP plugin or package included. Confirm your agent runtime includes the telephony plugin (or show your worker/agent image/runtime details).
3) Enable TRACE for telephony components and reproduce once
• With DEBUG showed nothing, enable TRACE or the most verbose logging for SIP/omnicare/telephony components, reproduce, and send the logs (job_id). Look for any lines about SIP client initialization, SIP host resolution, or "creating SIP client" — absence of these indicates the SIP path never initialized.
4) Check for early exceptions suppressing SIP init
• You previously saw DNS errors; now you see only “room disconnected while waiting for participant.” Search earlier logs (a few seconds before init) for any exception stacktrace or "unexpected error starting web session" — share those lines if present.
5) Quick local test to prove INVITE path
• From an environment where you can run the SDK call (or from the agent host), replace trunk with a known public SIP target (softphone SIP URI) or another working trunk and see if an INVITE shows up in provider logs. If INVITE appears for the test target but not for your trunk, it narrows to trunk config or plugin mapping.
What I need now to proceed:
• The exact createSipParticipant call code (including imports) you’re executing.
• The worker/agent runtime/image details (how the agent is run).
• TRACE/DEBUG log dump for one reproduce (include job_id).
Share those three items and I’ll pinpoint whether it’s a wrong param name, missing plugin, suppressed exception, or another runtime issue and give the exact fix.
Sources: Agent dispatch | LiveKit Documentation | Why is my Agent insights data missing? | LiveKit | Why is my Agent insights data missing? | LiveKit, with interactive elements