Hi Boris,
I have also checked your HMAC/SHA1. It is calculated correctly. I have checked HMAC/SHA1 using the following nodejs code
var crypto = require('crypto');
function getTURNCredentials(name, secret){
// var unixTimeStamp = parseInt(Date.now()/1000) + 24*3600, // this credential would be valid for the next 24 hours
var unixTimeStamp = 1504755388,
username = [unixTimeStamp, name].join(':'),
password,
hmac = crypto.createHmac('sha1', secret);
hmac.setEncoding('base64');
hmac.write(username);
hmac.end();
password = hmac.read();
return {
username: username,
password: password
};
}
var user = getTURNCredentials("user","secret");
console.log(user.username+ " "+ user.password);
Your configuration for PeerConnection is also fine.
I think you have configured server properly to use "TURN REST API". As you have configured the mandatory config options to use "TURN REST API"
lt-cred-mech
use-auth-secret
static-auth-secret
You are right. You don't need the database at all when using these configurations.
I think you are not giving proper timestamp while creating users. Please generate the timestamp with enough validation period. You should generate the timestamp on server's instance so that both server and client are using same time or any other instance
which time is same as the server instance. If it is not solved by using proper timestamp then please attach your configuration file and server's log for more investigation.
Thanks,
Shakeeb