Server side code

Dear All,

I am trying to find the server side code responsible for publishing a
remote stream in a room.
From the client side api, it is possible. I can call the APIs and publish
or subscribe to streams.
But what I want is to find the point in code where the stream gets
published in a particular room.
My exact idea is to extract the video/audio from the server on the server
side itself. I do not want to do it on the client side.

Can anyone please let me know where should I start from? Or the exact point
where I can get the streams from the server side directly?
(without any client side API.)

Thanks & Regards,
Srinivas