What is WebRTC
WebRTC is an open source project and we can use it for real-time communication of audio and video. It can be used in browsers like Firefox, Chrome and Opera. It is a components running in the browser and not a separate process. It use secure protocols such as DTLS and SRTP it will encrypt the signal and media stream.
How WebRTC works
WebRTC is designed to work peer to peer, so users can connect by the most direct route possible.
It uses SIP protocol for negotiation and ICE for network traversal.
1) SIP
SIP is a protocol use to establish a dialog. It uses SDP to negotiation the codec and media transmission address.
2) ICE
In reality, most devices live behind one or more layers of NAT or firewalls, the firewall will blocks certain ports or protocols. They usually implemented by the router. WebRTC app can use the ICE framework to overcome the complexities of real-world networking.
ICE is a protocol which defines a way to try the best find the best path to connect peers. The application will use STUN server to get the public IP address and also allocate the relay address from the TURN server.
It will use a relay server(TURN) to help to transmit the data when it fails to find a direct route.
At least an application will have its local IP address, public IP address and relay address, it will use the STUN binding request to do the connectivity check between two endpoints. The application will use the first success candidate to communicate.
So WebRTC sometimes still needs servers.
The steps for establishing WebRTC connection
- Caller side:
1. Get audio and video data.
2. Get network information such as IP addresses and ports.
3. Initial the SIP negotiation.
- Callee side:
4. Get the video and audio data.
5. Get network information such as IP addresses and ports.
6. Finish SIP negotiation.
7. start media transmission.
TURN server is a STUN server with added relaying functionality built in, so TURN server supports STUN.
How WebRTC work with Yeastar Cloud PBX
Yeastar Cloud PBX now support WebRTC click to call feature, you can communicate with someone else which not registered on the Cloud PBX via the browser.
1. Get audio data.
2. Initialize SIP signaling with the SBC.
3. SBC initial SIP signaling with the Cloud PBX.
4. Cloud PBX establish SIP dialog with the SBC.
5. SBC establish SIP dialog with the Browser.
6. Data transmission from the Browser to the Cloud PBX via SBC.
About how to setup webrtc click to call on Cloud PBX please refer to the link:
And you can try it free on our Cloud PBX.
0 Comments