So I've been using our production setup with Kurento and Numb (
numb.viagenie.ca) TURN servers for a little while now. About 10% of our recordings end up empty, and this got me thinking that I really need to make our production environment more solid. Firstly by swapping out our free Numb TURN server with a production-ready one from Twilio. We really need to hit a margin where almost every recording goes through properly (although, to be fair, I'm not sure this is an issue with the TURN server - that is simply my guess).
So in order to integrate with Twilio's TURN/STUN servers, you have to generate TURN credentials that expire within a TTL like so:
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "{{ auth_token }}";
var client = require('twilio')(accountSid, authToken);
client.tokens.create({}, function(err, token) {
process.stdout.write(token);
});
After you send the token to your client, they use the iceServers set on that object to establish the RTCPeerconnection object. I can easily do this on our Node app server to the web client, but the trouble arises when supplying Kurento with these credentials on an ongoing basis (since they expire and must be regenerated). Right now I think I'll probably settle for generating new credentials before each deploy that expire in a week and hope that we don't go more than a week without a deploy.
This is obviously brittle, so I was wondering if there was planned support on being able to supply dynamic TURN credentials to the KMS on an ongoing basis during its life cycle.