diff --git a/README.webrtc b/README.webrtc index 0cce247..f2d7c4a 100644 --- a/README.webrtc +++ b/README.webrtc @@ -1,171 +1,200 @@ SylkServer WebRTC gateway ------------------------- The WebRTC gateway application enables web based clients to communicate transparently with SIP endpoints using WebRTC suite of standards and protocols. To perform this function SylkServer must run on a computer with a public reachable IP adddress. A ready to go client is available, see Sylk WebRTC client for more information. Architecture ------------ +--------+ +---------+ +-------------+ +----------+ | | | | | Janus | RTP | SIP | | WebRTC | SylkRTC | Sylk | | SFU +<----->| A/V | | client +<-------->+ Server | | Server | | client | | | WebAPI | webrtc | +-------------+ +----------+ +--------+ | gateway | SIP +----------+ +---->| app | <---------------------| SIP | | | | <---+ | Message | | +---------+ | | client | | +---------------+-----+ MSRP +----------+ SIP | | Sylk MSRP switch |<------+ +----------+ | | Conference | | | SIP | | | application |<--+ +---+ Chat | | +---------------------+ | | client | +--------+ | +---------------------+ | MUC +----------+ | XMPP | +-----| Sylk XMPP |---+ +----------+ | chat | XMPP | Server 2 Server | SIP | SIP | | client |--------->| gateway application |---------->| Message | +--------+ +---------------------+ +----------+ End-point requirements ---------------------- WebRTC gateway doesn't do media transcoding, so after taking care of the WebRTC-specific media features (ICE and DTLS mainly), endpoints will exchange plain RTP media between them, therefore SIP end-points must have a set of compatible audio (Opus) and video codecs (H.264 and VP8). As a WebRTC client, a standard browser with WebRTC support can be used (e.g. Firefox or Google Chrome). Features -------- * SIP account registration * One-to-One Audio / video calling between SIP and Web clients * Multi-party conferencing (WebRTC end-points only) * One-to-one messaging between end-points + * Real time message synchronization between multiple devices + * Offline storage for messaging * Codec agnostic SylkRTC API ----------- Desktop API A JavaScript library implementing SylkRTC API is available at: https://github.com/AGProjects/sylkrtc.js Mobile API A React native API is available at: https://github.com/AGProjects/react-native-sylkrtc.js SIP Proxy --------- -A SIP Proxy is required for one-to-one calls. +A SIP Proxy is required for one-to-one calls and messages. A guide for setting up a SIP Proxy is available here: https://sylkserver.com/download/#sip-proxy-setup +To benefit of offline messaging functions, the SIP Proxy must fork all SIP +Messages to SylkServer. + + +SIP Messaging +------------- + +External SIP devices can be synchronized in real time with webrtc end-points. + +The devices can poll a web server resource served by SylkServer web server +component. The web server will return a journal with all messages and +operations related to them since the timestamp of a given message id. + +Authorization is performed by the means of a token generated by SylkServer +for each SIP client. To request an authorization token and the +correspondent web server address, a SIP device must send via the trusted SIP +Proxy, a SIP Message with the Content Type application/sylk-api-token to +SylkServer. A message will be returned back with the token and URL, that +can be stored and used for future requests. + +Several operations are available like, message deletion, delivery and +display information. + +See Blink SIP client implementation as an example: + +https://github.com/AGProjects/blink-cocoa/blob/master/SMSWindowManager.py + Janus ----- For implementing WebRTC capabilities, SylkServer uses an external component called Janus. https://github.com/meetecho/janus-gateway Janus can be installed by following the instructions on its README file: https://github.com/meetecho/janus-gateway/blob/master/README.md The only requirement is that Janus is compiled with WebSocket supports, since that's the transport SylkServer uses in order to communicate with Janus. To configure janus the following settings are relevant for WebRTC gateway (read their description in the janus configuration files): 1. janus.cfg [general] api_secret = some_secret_key_shared_with_sylkserver ;debug_level = 5 [nat] ice_lite = true ice_tcp = true ;ice_enforce_list = ip_or_interface ;ice_ignore_list = vmnet [media] force-bundle = true force-rtcp-mux = true [plugins] disable = libjanus_voicemail.so,libjanus_recordplay.so,libjanus_streaming.so,libjanus_echotest.so,libjanus_videocall.so,libjanus_textroom.so [transports] disable = libjanus_http.so,libjanus_rabbitmq.so,libjanus_pfunix.so 2. janus.plugin.sip.cfg [general] ;local_ip = ip_for_sip keepalive_interval = 0 user_agent = SylkServer (WebRTC gateway) register_ttl = 600 ;rtp_port_range = 20000-40000 3. janus.plugin.videoroom.cfg ; comment out the rooms defined in this file to prevent janus from ; creating some static rooms (having an empty file for it is fine) 4. janus.transport.websockets.cfg [general] ws = yes ws_interface = lo ws_port = 8188 wss = no [admin] admin_ws = no Running ------- After installing SylkServer with WebRTC capability, start the server and point your web browser to: https://hostname:10888/webrtcgateway/ It's recommended to change the API secret used between SylkServer and Janus, check the webrtcgateway.ini and janus.cfg configuration files. Configuration ------------- See webrtcgateway.ini.sample sample file for available options and their meaning. \ No newline at end of file