Limit 2 users in each openvidu session

I want to limit 2 users per each openvidu session…How can i achieve this?
I have deployed openvidu call application into my ubuntu server

Can I get some hint on this?

You have to modify the backend code so when a session has 2 participants, a new token can not be obtained calling REST API.

You will have to review the backend code of OpenVidu Call and understand it.

Then, you will be able to adapt it to your needs.