# Room-composite egress migrates mid-call, finalizes early, and silently truncates the recording (captured ~30% of the call) + fires \`egress\_ended\` while the call is still live

**URL:** <https://community.livekit.io/t/room-composite-egress-migrates-mid-call-finalizes-early-and-silently-truncates-the-recording-captured-30-of-the-call-fires-egress-ended-while-the-call-is-still-live/1459>\
**Category:** Getting Started\
**Created:** [June 18, 2026, 5:43pm UTC](https://community.livekit.io/t/room-composite-egress-migrates-mid-call-finalizes-early-and-silently-truncates-the-recording-captured-30-of-the-call-fires-egress-ended-while-the-call-is-still-live/1459 "2026-06-18T17:43:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zaheer\_Abbas](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/zaheer_abbas/32/268_2.png) [@Zaheer\_Abbas](https://community.livekit.io/u/Zaheer_Abbas)\
**Post date:** [June 18, 2026, 5:43pm UTC](https://community.livekit.io/t/room-composite-egress-migrates-mid-call-finalizes-early-and-silently-truncates-the-recording-captured-30-of-the-call-fires-egress-ended-while-the-call-is-still-live/1459/1 "2026-06-18T17:43:46Z")

</div>

**Setup:** voice agents on `livekit-agents 1.4.6` / `livekit 1.1.2` / `livekit-api 1.0.7` (Python 3.11), inbound SIP telephony, LiveKit Cloud (project `p_3tqm7ro6kbs`). At job entry we start a **room-composite audio egress** (`RoomCompositeEgressRequest`, `audio_only=True`, dual-channel) with an S3 file output, and let it run for the whole call.

**What happened (one inbound call):** a normal ~ **6 min 14 s** call was recorded by egress `EG_NbMbijFpqtZz`. Partway through, the **egress participant migrated twice within ~5 seconds and never rejoined** , the egress **finalized early (~1 min 52 s in)**, and its `egress_ended` webhook fired **while the call was still active**. Net result: the saved recording contains only the first **1 min 52 s** of a 6 min 14 s call — **~4 min 20 s (≈70%) is missing** — and the egress output was also incomplete.

**Room session events (LiveKit dashboard, UTC):**

| Time (UTC) | Participant | Event |
| --- | --- | --- |
| 16:45:37 | — | Room created |
| 16:45:37 | `sip_+1719XXXXXXX` | joining → active |
| 16:45:37–38 | `agent-AJ_N852nz42MQcc` | joining → active |
| 16:45:38 | `EG_NbMbijFpqtZz` (egress) | joining → active |
| **16:46:20** | `EG_NbMbijFpqtZz` | **left (MIGRATION) → joining → active** |
| **16:46:25** | `EG_NbMbijFpqtZz` | **left (MIGRATION)** — no rejoin afterward |
| 16:52:05 | `sip_+1719XXXXXXX` | left (CLIENT\_INITIATED) |
| 16:52:19 | `agent-AJ_N852nz42MQcc` | left (ROOM\_DELETED) → Room ended → API.DeleteRoom |

So the egress stopped ~1 min after the second migration and finalized at `duration_ms=111880` (1 min 52 s), even though the call ran until ~16:51:53. There was **no second/complete egress** — the early-finalized partial file is the only recording.

**IDs (LiveKit Cloud, project `p_3tqm7ro6kbs`):**

- room: `RM_ZfCnFwRSMXRZ`
- egress: `EG_NbMbijFpqtZz`
- agent job: `AJ_N852nz42MQcc`
- window: ~16:45:37 – 16:52:19 UTC, 2026-06-18

Please help investigate this.

cc: @Milos_Pesic 🙏

---

<div class="post-metadata">

**Author:** ![darryncampbell](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/darryncampbell/32/20_2.png) [@darryncampbell](https://community.livekit.io/u/darryncampbell)\
**Post date:** [June 19, 2026, 7:57am UTC](https://community.livekit.io/t/room-composite-egress-migrates-mid-call-finalizes-early-and-silently-truncates-the-recording-captured-30-of-the-call-fires-egress-ended-while-the-call-is-still-live/1459/2 "2026-06-19T07:57:30Z")

</div>

Hi Zaheer, I checked the server logs for this and there are all sorts of connection issues and media loss reports.

This will be due to this issue:

> **[Investigating connection failure and SIP transfer error reports in US East](https://status.livekit.io/incidents/859j8gd6ct54)**
>
> LiveKit's Status Page - Investigating connection failure and SIP transfer error reports in US East.

---

<div class="post-metadata">

**Author:** ![Zaheer\_Abbas](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/zaheer_abbas/32/268_2.png) [@Zaheer\_Abbas](https://community.livekit.io/u/Zaheer_Abbas)\
**Post date:** [June 19, 2026, 8:02am UTC](https://community.livekit.io/t/room-composite-egress-migrates-mid-call-finalizes-early-and-silently-truncates-the-recording-captured-30-of-the-call-fires-egress-ended-while-the-call-is-still-live/1459/3 "2026-06-19T08:02:39Z")

</div>

> [@Room-composite egress completes ("Source closed") before the room is deleted](https://community.livekit.io/t/room-composite-egress-completes-source-closed-before-the-room-is-deleted/1291):
>
> We started a room-composite, audio-only egress recording for a room. While the room was still active (participants still connected, not yet deleted), the egress finished on its own with status: EGRESS\_COMPLETE and details: "End reason: Source closed" — so the recording stopped early and only captured part of the session. Trying to understand why an egress’s source would close / why the egress completes while the room is still live. Identifiers (LiveKit Cloud): Egress ID: EG\_uQZWiVdrzcrv Room…

@darryncampbell - I don’t think the issue is related to the incident. My hunch is the above issue is related to the post I raised a few weeks ago. BTW still no root cause identified for that too.

Will wait on your further findings for these issues.

---

<div class="post-metadata">

**Author:** ![Milos\_Pesic](https://avatars.discourse-cdn.com/v4/letter/m/a183cd/32.png) [@Milos\_Pesic](https://community.livekit.io/u/Milos_Pesic)\
**Post date:** [June 19, 2026, 2:58pm UTC](https://community.livekit.io/t/room-composite-egress-migrates-mid-call-finalizes-early-and-silently-truncates-the-recording-captured-30-of-the-call-fires-egress-ended-while-the-call-is-still-live/1459/4 "2026-06-19T14:58:55Z")

</div>

Hey @Zaheer_Abbas - thanks for the report as always! I took a look - the issue you experienced was caused by the incident @darryncampbell linked. Internal routing algorithm routed egress participant to a different region. Agent and the caller were in the same region (different than egress) so the live communication between them kept working and was unaffected. Apologies for the inconvenience - this case will definitively inform our efforts to build more robust retry logic. We will also check to see if we could make this signaling better so that if the recording didn’t end naturally you also get some feedback that could be checked.

---

<div class="post-metadata">

**Author:** ![Zaheer\_Abbas](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/zaheer_abbas/32/268_2.png) [@Zaheer\_Abbas](https://community.livekit.io/u/Zaheer_Abbas)\
**Post date:** [June 20, 2026, 7:21am UTC](https://community.livekit.io/t/room-composite-egress-migrates-mid-call-finalizes-early-and-silently-truncates-the-recording-captured-30-of-the-call-fires-egress-ended-while-the-call-is-still-live/1459/5 "2026-06-20T07:21:20Z")

</div>

Thanks for the response Milos.

If this is related to the incident, how can we find if more such cases occurred. There is no way in livekit currently to filter what calls or sessions ran into issue during an incident and how much were our project impacted - Live Sessions, Egress, Webhooks etc.

It would be really helpful to add that in the dashboard.

Appreciate your help and response

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/system/32/26_2.png) [@system](https://community.livekit.io/u/system)\
**Post date:** [July 5, 2026, 7:21am UTC](https://community.livekit.io/t/room-composite-egress-migrates-mid-call-finalizes-early-and-silently-truncates-the-recording-captured-30-of-the-call-fires-egress-ended-while-the-call-is-still-live/1459/6 "2026-07-05T07:21:46Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
