# Don't end session when everyone leaves the call

**URL:** <https://devforum.zoom.us/t/dont-end-session-when-everyone-leaves-the-call/118372>\
**Category:** Video SDK\
**Tags:** recording, video-sdk\
**Created:** [September 30, 2024, 6:40pm UTC](https://devforum.zoom.us/t/dont-end-session-when-everyone-leaves-the-call/118372 "2024-09-30T18:40:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![nilo.drumond](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nilo.drumond/32/49713_2.png) [@nilo.drumond](https://devforum.zoom.us/u/nilo.drumond)\
**Post date:** [September 30, 2024, 6:40pm UTC](https://devforum.zoom.us/t/dont-end-session-when-everyone-leaves-the-call/118372/1 "2024-09-30T18:40:16Z")

</div>

**Video SDK Type and Version**  
Javascript 1.12.5

**Description**  
We have our own Call/Meeting API and use Zoom as the video provider. We only want Zoom to end the session when we call `action: end` on the Zoom Video SDK API “inSessionEventsControl”

However, the current behavior is that when all participants leave, the session is immediately ended. Is it possible to change this behavior? We want the session to stay alive even if all members have disconnected.

---

<div class="post-metadata">

**Author:** ![ekaansh.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ekaansh.zoom/32/55004_2.png) [@ekaansh.zoom](https://devforum.zoom.us/u/ekaansh.zoom)\
**Post date:** [October 7, 2024, 10:51am UTC](https://devforum.zoom.us/t/dont-end-session-when-everyone-leaves-the-call/118372/2 "2024-10-07T10:51:46Z")

</div>

Sessions are created on-demand for Video SDK, so as soon as all users leave a channel the session is ended. You can use the same session name to start the session again, what’s your use-case for wanting to keep the session alive?

---

<div class="post-metadata">

**Author:** ![alanc](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/alanc/32/49397_2.png) [@alanc](https://devforum.zoom.us/u/alanc)\
**Post date:** [November 4, 2024, 8:34pm UTC](https://devforum.zoom.us/t/dont-end-session-when-everyone-leaves-the-call/118372/4 "2024-11-04T20:34:56Z")

</div>

Not related to the OP, but I can share my use case:

We have a 1 to 1 mapping with our own callId and zoom.sessionId and we don’t want to end the call unless we manually PATCH /sessions/:id with { “action”: “end” }.  
This is because we’ve observed that if all participants leave session and rejoin later a new session\_id is created in zoom but we don’t follow that ID in our records.  
@ekaansh.zoom

---

<div class="post-metadata">

**Author:** ![ekaansh.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ekaansh.zoom/32/55004_2.png) [@ekaansh.zoom](https://devforum.zoom.us/u/ekaansh.zoom)\
**Post date:** [November 5, 2024, 11:51am UTC](https://devforum.zoom.us/t/dont-end-session-when-everyone-leaves-the-call/118372/5 "2024-11-05T11:51:11Z")

</div>

Hey @alanc, why not use the session name for the mapping?

---

<div class="post-metadata">

**Author:** ![alanc](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/alanc/32/49397_2.png) [@alanc](https://devforum.zoom.us/u/alanc)\
**Post date:** [November 5, 2024, 6:50pm UTC](https://devforum.zoom.us/t/dont-end-session-when-everyone-leaves-the-call/118372/6 "2024-11-05T18:50:59Z")

</div>

@ekaansh.zoom  
Because we are unable to fetch the recordings based on the sessionName based on the api documentation. Please let me know if I am missing something here.

Also “patching” the sessions doesn’t work using sessionName:  
developers-zoom-us/docs/video-sdk/apis/#operation/sessionStatus

(sorry not able to post links)

---

<div class="post-metadata">

**Author:** ![ekaansh.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ekaansh.zoom/32/55004_2.png) [@ekaansh.zoom](https://devforum.zoom.us/u/ekaansh.zoom)\
**Post date:** [November 6, 2024, 11:33am UTC](https://devforum.zoom.us/t/dont-end-session-when-everyone-leaves-the-call/118372/7 "2024-11-06T11:33:26Z")

</div>

Following up here: [Fetching recordings using session\_name - #2 by ekaansh.zoom](https://devforum.zoom.us/t/fetching-recordings-using-session-name/120138/2)
