I am initiating a outbound call using lk sip parti...
# ask-ai
d
I am initiating a outbound call using lk sip participant create and i see these errors in the log -
Copy code
{"message": "process initialized", "level": "INFO", "name": "livekit.agents", "pid": 159, "elapsed_time": 0.28, "timestamp": "2025-09-06T10:59:52.493903+00:00"}
{"message": "closing agent session due to participant disconnect (disable via `RoomInputOptions.close_on_disconnect=False`)", "level": "INFO", "name": "livekit.agents", "room": "room-RdiGAfy4hYcy", "participant": "phone_user", "reason": "CLIENT_INITIATED", "pid": 93, "job_id": "AJ_KnbVTmmMpCL6", "timestamp": "2025-09-06T11:00:10.620749+00:00"}
{"message": "process exiting", "level": "INFO", "name": "livekit.agents", "reason": "", "pid": 93, "job_id": "AJ_KnbVTmmMpCL6", "timestamp": "2025-09-06T11:00:29.374910+00:00"}
{"message": "livekit::rtc_engine:453:livekit::rtc_engine - received session close: \"signal client closed: \\\"stream closed\\\"\" UnknownReason Resume", "level": "WARNING", "name": "livekit", "room": "room-RdiGAfy4hYcy", "pid": 93, "job_id": "AJ_KnbVTmmMpCL6", "timestamp": "2025-09-06T11:00:29.376942+00:00"}
{"message": "Usage: UsageSummary(llm_prompt_tokens=0, llm_prompt_cached_tokens=0, llm_input_audio_tokens=0, llm_completion_tokens=0, llm_output_audio_tokens=0, tts_characters_count=0, tts_audio_duration=0.0, stt_audio_duration=0.0)", "level": "INFO", "name": "agent", "room": "room-RdiGAfy4hYcy", "pid": 93, "job_id": "AJ_KnbVTmmMpCL6", "timestamp": "2025-09-06T11:00:29.385646+00:00"}
{"message": "received job request", "level": "INFO", "name": "livekit.agents", "job_id": "AJ_JKREsjUuroBX", "dispatch_id": "", "room_name": "room-RdiGAfy4hYcy", "agent_name": "", "resuming": false, "timestamp": "2025-09-06T11:03:38.934103+00:00"}
{"message": "initializing process", "level": "INFO", "name": "livekit.agents", "pid": 225, "timestamp": "2025-09-06T11:03:39.025478+00:00"}
{"message": "process initialized", "level": "INFO", "name": "livekit.agents", "pid": 225, "elapsed_time": 0.37, "timestamp": "2025-09-06T11:03:39.395991+00:00"}
{"message": "closing agent session due to participant disconnect (disable via `RoomInputOptions.close_on_disconnect=False`)", "level": "INFO", "name": "livekit.agents", "room": "room-RdiGAfy4hYcy", "participant": "phone_user", "reason": "CLIENT_INITIATED", "pid": 97, "job_id": "AJ_JKREsjUuroBX", "timestamp": "2025-09-06T11:04:15.437014+00:00"
t
Thanks for reaching out, Harsha. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Hey there! That error message
closing agent session due to participant disconnect (disable via RoomInputOptions.close_on_disconnect=False)
basically means the LiveKit agent ended its session because the SIP participant left the room. This happens because of the
close_on_disconnect
setting in
RoomInputOptions
. By default, this option is set to
True
, so the agent session will close if the participant disconnects for reasons like: • CLIENT_INITIATED: The participant left on purpose • ROOM_DELETED: The room was deleted through the API • USER_REJECTED: The SIP callee declined the call If you want to keep the agent session open even after the participant disconnects—maybe for things like post-call processing or warm transfers—you can just set
RoomInputOptions.close_on_disconnect = False
when you start the agent session. Hope this helps! Sources: examples/warm-transfer/warm_transfer.py | livekit-rtc/livekit/rtc/_proto/participant_pb2.pyi
d
but i did not get the call, how do i get the call?
t
Hey there! Just to make sure I’m on the right track, could you let me know if this issue is happening with an inbound call (like receiving a call from a SIP trunk) or an outbound call (like dialing out to a SIP participant)? That way, I can give you the best advice to get things sorted out. Sources: SIP troubleshooting guide | LiveKit Docs | protobufs/livekit_sip.proto | SIP Integration | livekit/livekit_composite | DeepWiki | Getting Help | livekit/livekit_composite | DeepWiki
d
outbound call
t
Hey there! If you're having trouble with outbound calls where the SIP participant isn’t picking up, no worries—let’s walk through some easy steps together: 1. Double-check the SIP endpoint address: Make sure the SIP endpoint address in your outbound trunk setup matches exactly what your SIP trunking provider gave you. For example, Telnyx uses
sip.telnyx.com
. Try to avoid using subdomains like
myproject.sip.telnyx.com
since that can sometimes cause hiccups. 2. Verify your SIP credentials: Take a moment to confirm that the username and password you put into LiveKit for the SIP trunk are the same ones your SIP provider gave you. 3. Keep an eye on the call status: You can check the
sip.callStatus
attribute of the SIP participant to see how the call is going. If it says
dialing
, the call’s on its way but not answered yet. When it switches to
active
, that means you’re connected! 4. Check your network setup: Make sure your network is configured properly, including NAT traversal, because network issues can sometimes block SIP calls from connecting. If you want a hand with any of these steps or want to share more about your setup and logs, just let me know—I’m here to help!
d
I have this as SIP URI, is it correct - livekit-1.pstn.twilio.com
t
Hey there! The domain
livekit-1.pstn.twilio.com
isn’t automatically confirmed as a valid SIP URI for outbound calls in LiveKit. It does look like it follows the usual format for Twilio-based SIP trunks, but whether it works depends on if you’ve actually set it up in your Twilio account. Here’s a quick way to double-check: 1. Take a peek in your Twilio console to see if there’s a trunk with the domain
livekit-1.pstn.twilio.com
. 2. Make sure that trunk has the right authentication details and is connected to a phone number. 3. Confirm that your LiveKit outbound trunk configuration is using this domain with matching credentials. If you didn’t set up this domain in your Twilio account, it might not work the way you expect. Just give me a shout if you want a hand verifying things or setting up the right SIP trunk—I’m here to help! Sources: SIP outbound trunk | LiveKit Docs | Making calls using SIP | LiveKit Docs | test/cloud/config.go | Create and configure a Twilio SIP trunk | LiveKit Docs
d
• what does this error mean and how do i fix it - update room failed: identity cannot be empty
t
Hey there! That pesky error
update room failed: identity cannot be empty
pops up when you try to update a room or participant without giving a required participant identity. Think of the identity as a unique name tag for each participant in a room — it can’t be left blank. Here’s how you can get past this: 1. Make Sure You Provide an Identity: Whenever you use methods like
updateParticipant
, double-check that you’re passing a valid, non-empty
identity
string. For example:
await roomService.updateParticipant(roomName, identity, options);
2. Check Your Token Claims: Take a moment to verify that the access token you’re using to connect to the room actually includes a non-empty identity claim. 3. Validate Your Input: Before making any server calls, ensure the
identity
field in your app isn’t null, undefined, or just an empty string. If you want to chat more about this or need a hand troubleshooting, just let me know—I’m here to help! Sources: config-sample.yaml | agent-console/app/api/room/update-participant/route.ts | Connecting to LiveKit | LiveKit Docs
d
how do i add the identity in my python code, I am using agentsession and this is my command for the sip - lk sip participant create --trunk --call --room "room-RdiGAfy4hYcy" --identity phone_user
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!