-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Description
If you got SIP clients to join a meeting, to communicate with WebRTC clients, how to do that?
Because SIP clients only support 1 video and 1 audio stream, some might suport 1 extra screen stream, so you should use MCU to merge all streams in a room.
FS or Freeswitch is a MCU for SIP clients and also supports WebRTC clients, so you can use FS instead.
Sometimes, the vast majority of rooms have no SIP clients, only a small group of rooms should support SIP client. In this situation, SFU is better solution, because MCU requires a huge resource of CPU for encoding.
If you get only one SIP client, others are WebRTC clients like Chrome browsers, you can also use FS as a SIP to WebRTC proxy to connect to SRS like a WebRTC client.
The bellow is the full architecture:
To do this, FS should support pulling WebRTC stream from SRS by WHIP protocol, please see Unity: Player. I think the workflow should be this:
- Chrome A push WebRTC stream to SRS.
- SRS call FS HTTP server by HTTP Callback.
- FS pulls WebRTC stream from SRS by WHIP.
- FS publish a mixed stream to SRS, which contains both WebRTC clients and SIP clients.
- Chrome A pull the mixed stream from SRS.
Besides this solution, SRS also clould forward or push WebRTC stream to FS by WHIP, the workflow should be:
- Chrome A push WebRTC stream to SRS.
- A SIP client connect to FS, and notify your HTTP server about this event.
- Your HTTP server notify SRS to start forwarding.
- SRS forward the WebRTC stream to FS by WHIP.
Note: We highly recommend that MCU pull stream from SRS by WHIP or WHEP, which is a common solution for MCU and SFU architecture.
要点翻译下:
a. Chrome A 推流到SRS后,回调到FS。
b. FS通过recvonly WHIP从SRS拉Chrome A的流。
c. Chrome B和C和A一样,FS都会把流拉过去。
1.1. FS应该会有一个混流,通过sendonly WHIP送到SRS,这个不一定是同一个SRS,可以是另外一个SRS。
1.2. Chrome A/B/C可以拉这个混流,也可以互相拉流,看用户的策略了。
2.1 FS应该还可以送一个RTMP出来,这就是连麦的直播流了。
