meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
sw:nextcloud:talk:spreed [2020/11/18 10:31] – created niziaksw:nextcloud:talk:spreed [2020/11/19 08:40] (current) niziak
Line 1: Line 1:
 ====== Spreed standalone signaling server ====== ====== Spreed standalone signaling server ======
 +
 +aka HPB (High Performance Backend) is now available as OpenSource.
 +
  
 It is composed from following services: It is composed from following services:
   * Spreed backend (it is REST api service) which control everything   * Spreed backend (it is REST api service) which control everything
   * NATS (Messaging server)   * NATS (Messaging server)
-  * Janus WebRTC server+    can be message broker to connect cluster of signaling servers 
 +  * [[https://janus.conf.meetecho.com/|Janus WebRTC server]] 
 +    * [[https://github.com/meetecho/janus-gateway|github]] 
 +    * [[https://archive.fosdem.org/2020/schedule/event/janus/attachments/audio/3993/export/events/attachments/janus/audio/3993/fosdem2020_janus_rtp_forwarders.pdf|Janus as a WebRTC “enabler”]]
   * CoTURN server (act as STUN/TURN)   * CoTURN server (act as STUN/TURN)
  
Line 11: Line 17:
   * It is using direct ''host'' network because large ranges of ports are needed (RTP/TURN) and Docker port forwarding proxy performance is poor.   * It is using direct ''host'' network because large ranges of ports are needed (RTP/TURN) and Docker port forwarding proxy performance is poor.
   * Using one shared ''host'' network let detect already used ports when 2 services can opens ports with overlaping ranges:   * Using one shared ''host'' network let detect already used ports when 2 services can opens ports with overlaping ranges:
-    * Janus WebRTC opens listening ports 10000-60000 +    * Janus WebRTC opens listening ports on any range (it can be limited in janus.jcfg or cmd line argument) 
-    * TURN also opens listening ports 49152-65535+    * TURN also opens listening ports 49152-65535 (range required by RFC)
  
 ===== behind NAT ===== ===== behind NAT =====
Line 19: Line 25:
   * Spreed backend HTTP port 3080 (set in server.conf) neeeds to be rev proxied with SSL to external IP with attached domain   * Spreed backend HTTP port 3080 (set in server.conf) neeeds to be rev proxied with SSL to external IP with attached domain
   * STUN/TURN UDP/TCP port 3478   * STUN/TURN UDP/TCP port 3478
-  * RTP/TURN range: 10000-65535 +  * CoTURN UDP/TCP ports 49152-65535 (range required by RFC) 
-    * CoTURN UDP/TCP ports 49152-65535 +  * Janus WebRTC ports 20000-40000 (set by cmd line argument ''-r 20000-40000''
-    * Janus WebRTC+ 
-      * ''nice_agent_set_port_range(handle->agent, handle->stream_id1, rtp_range_min, rtp_range_max);''+ 
 +===== Verify and debug ====== 
 + 
 +Check if web frontend for signaling server is working: 
 +<code bash> 
 +curl -k -i https://signaling.example.com/standalone-signaling/api/v1/welcome 
 +</code> 
 + 
 +During NC Talk callopen WebRTC diagnose page in browser: 
 +    * Firefox [[about:webrtc]] 
 +    * Chrome [[chrome://webrtc-internals]] 
 +and check what is **Remote Candidate** column. It should be only external configured IP of signaling server. 
 +If TURN or JANUS is incorrectly configured (especially if it is running behind NATit can offer some wrong local IPs collected from all interfaces of machine on which is running (it can be some local LAN addresses like 192.168.x.x or Docker virtual interfaces like 172.17.x.x). 
 + 
 + 
 +===== NextCloud setup ===== 
 + 
 +   * **Settigns** --> **Talk** 
 +       * **STUN servers** 
 +         * ''signaling.example.com:3478'' 
 +       * **TURN servers** 
 +         * ''signaling.example.com:3478'' 
 +         * set [Turn API KEY] (set in ''server.conf'' in section ''[turn]'' ''secret='' 
 +       * **Signaling servers** 
 +         * ''https://signaling.example.com/standalone-signaling/''  
 +         * check ''Validate SSL certificate'' 
 +         * Shared secret: [Nextcloud-Secret-Key] (set in ''server.conf'' in section ''[backend]'' ''secret=''
  
  
-/* RTP/RTCP port range */ 
-uint16_t rtp_range_min = 0; 
-uint16_t rtp_range_max = 0;