The '''Video Call Services''' fieldset says which relays an audio or video call between two Yioop users may use. A call runs directly between the two browsers; Yioop only carries the offer, the answer, and the candidate addresses each browser finds for itself. Two people at home usually cannot reach each other directly, since each sits behind a router that lets nothing in unasked, so a relay has to stand somewhere both of them can reach. This fieldset says which relays that is, and what the page hands the browser when a call starts.
Two kinds of server do this work, and the addresses written here name one or the other:
Yioop ships a relay of its own, '''TurnSite''', which answers both kinds of question on one port. It is started and stopped from the '''Name Server Services''' part of the [[Manage_Machines|Manage Machines]] activity, where it appears as '''Video Call Relay''' with its own log and On/Off switch.
==Calling uses==
The dropdown chooses which relays a browser is handed when a call starts. A fresh install has this set to '''Disable Calling'''.
in '''TURN/STUN Servers''' below. Choose this where a relay is already running beside the site, such as a coturn server or one rented from a provider, and Yioop's own relay is not wanted.
servers come first and the site's own relay after them, so a browser tries each in turn. Choose this to run a relay of your own and still have another to fall back on.
The '''TURN/STUN Servers''' controls are shown only under the two choices that use them. Under '''Disable Calling''' and '''TurnSite''' a listed server is never handed to a browser, so the list is hidden.
==TURN/STUN Servers==
;TURN/STUN Servers: The servers a browser should try, one to a line. Add one by typing it into the box and pressing the '''+''' button, or the Enter key; take one off with the '''×''' button beside it. Nothing is saved until '''Save''' is pressed at the foot of the screen.
Write each server as a browser dials it: the kind, the host, and the port, as in '''turn:relay.example.com:3478''' or '''stun:stun.example.com:3478'''. A server that asks a caller to prove who it is carries the name and the secret after the address, with a space between each part:
turn:relay.example.com:3478 callers s3cret
A STUN server asks for nothing, so it carries an address alone. Most TURN servers ask for a name and secret, and a TURN server given none will refuse the call. The name and secret written here are sent to the browser of anyone who starts a call, so they are shared with every user of this site; use a name a relay hands out for this purpose rather than one that opens anything else.
==What TurnSite listens on==
The site's own relay reads its settings from '''Config.php''' rather than from this screen, since they are what the program is started with:
;TURN_BIND: The address the relay listens on. It defaults to '''127.0.0.1''', which is reachable only from the machine Yioop runs on and so serves a test but no real call. A relay meant to carry calls between people outside the machine listens on an address they can reach.
;TURN_PORT: The port the relay listens on, 3478 by default, which is the port RFC 5766 gives for this. The address a browser is handed names the host the site is being reached at and this port.
;TURN_REALM: The name the relay gives itself when it asks a caller to prove who it is.
;TURN_USER: The name a browser gives the relay.
;TURN_SECRET: The secret a browser gives the relay with that name. Where this is left empty, Yioop hands each browser a token of its own instead: a name that says when it stops being good and a secret worked out from that name and the site key, which is the same key the relay checks it against. Such a token lasts a day, so one taken from a page is no use to anyone later. Setting a secret here turns that off and uses the written pair as it stands.
;TURN_RELAY_PORTS: The range of ports the relay hands out, one per call it carries, written as the lowest and the highest with a dash between. A router or firewall in front of the machine has to let these through for a relayed call to work.
==Checking that calling works==
Set '''Calling uses''' to '''TurnSite''', save, then start '''Video Call Relay''' in the '''Name Server Services''' part of [[Manage_Machines|Manage Machines]]. Open a conversation in the '''Messages''' screen and press the call symbol in its header. Where a call rings but never connects, read the relay's log from the same screen the switch is on: a call that never reaches the relay points at '''TURN_BIND''' or at a router in front of the machine, and a call the relay refuses points at the name and secret.