You should also check pagerRoom here before creating the endpoint. Not specifying the room would be the easiest way to use this script without the endpoint.