Some of the sessions don't have egress enabled
# ask-ai
o
Some of the sessions don't have egress enabled
t
Thanks for reaching out, fernando. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I’m looking into why some sessions don’t have egress enabled. To help me pinpoint the cause, please tell me: • Are you on LiveKit Cloud or self‑hosting? • How are you starting egress (Egress API, CLI, AutoEgress/SIP rules, or something else)? • Which egress type do you expect for those sessions (Room Composite, Participant, Track, Web)? • Any error messages, API responses, or logs when egress fails to start? • How many concurrent egress jobs are currently running (your plan may limit concurrency)? Once you share those details I’ll recommend the exact steps to enable or troubleshoot egress. Sources: Observability data hooks | LiveKit docs | examples/bank-ivr | livekit/livekit_composite | DeepWiki | sip | livekit/livekit_composite | DeepWiki | Agents Framework | livekit/livekit_composite | DeepWiki | Quotas and limits | LiveKit docs
o
I'm using livekit cloud user_participant = await ctx.wait_for_participant() await session.start( room=ctx.room, agent=LeadQualifierAgent( _lead_name_=lead_name, _user_metadata_=user_metadata, config=voice_config, ), ) while user_participant.attributes.get("sip.callStatus") != "active": await asyncio.sleep(0.1) # The call is answered at this point lkapi = api.LiveKitAPI() req = api.RoomCompositeEgressRequest( _room_name_=ctx.room.name, _audio_only_=True, _file_outputs_=[ api.EncodedFileOutput( _file_type_=api.EncodedFileType.OGG, filepath=f"{env}/livekit/{ctx.room.name}.ogg", s3=api.S3Upload( bucket="qp-agent-calls", region="us-east-2", _access_key_=_access_key_, secret=secret, ), ) ], ) await lkapi.egress.start_room_composite_egress(req) await lkapi.aclose()
t
Thanks — I looked at your code and your environment (LiveKit Cloud). A few targeted checks and one small change to try next. What to check now • Does
lkapi.egress.start_room_composite_egress(req)
raise an exception or return an error? If yes, paste the error text. • In the LiveKit Cloud console, how many active egress jobs exist when this fails (Build plan limits to 2 concurrent jobs)? • Is the project’s Egress feature enabled in Settings → Features, and does the API key include egress permission? Quick change to try • Wait a short delay after the call becomes active before starting egress. For example, add a 1–3s sleep after your loop that sees
sip.callStatus == "active"
to ensure the room is fully ready for egress. If you share any error response from the API or how many concurrent egresses are running, I’ll give the exact next steps.
o
There were no concurrent jobs, i don't see an error some of the sessions had egress, but others don't
t
Thanks — this is helpful. Since you already confirmed no concurrency limit and no visible API error, try these targeted checks in order: 1. Add a short delay after the SIP answer before starting egress: ◦ After your loop that waits for
sip.callStatus == "active"
, add
await asyncio.sleep(2)
. 1. Verify egress job creation/status: ◦ After calling
start_room_composite_egress
, call:
Copy code
status = await lkapi.egress.list_egress(request=api.ListEgressRequest(room_name=_ctx_.room.name))
     print(status)
Share that output if it shows no job or an error. 1. Confirm Egress feature and API key permission in LiveKit Cloud: ◦ Ensure Egress is enabled in Settings → Features and the API key includes
egress
permission. 1. Check S3 upload credentials and bucket policy: ◦ Test the `_access_key_`/`_secret_` with AWS CLI and confirm
PutObject
is allowed for
qp-agent-calls
in
us-east-2
. 1. Ensure unique room names: ◦ Use a unique room name per session (UUID or timestamp) to avoid collisions. If you add the sleep and run the status check, paste the
list_egress
output here and I’ll tell you the next diagnostic step.