Detect when meeting ends in a docker

Is there a possibility to detect when a user ends the meeting by pressing the end meeting button?
He gets redirected to jitsi page, I want to redirect the user to a different URL. I am using Docker and currently using API to do it, but I want to avoid using the API:

api.addListener('readyToClose', () => {
        
});

You could use a close page and have a redirect there. Not sure we have an env var for enableClosePage but you coul duse a custom config file.