Okay,
After messing around with it a little this morning I discovered my problem. I did not realize the -W was for the shared secret. If I replace the -W with a -w it works correctly (as I would imagine).
Since there’s a username/password in the DB for that user/password combo, it works more or less as expected.
Now, as for a few of the other questions you had:
1) Yes, I am using the REST API. If only the turn_secret table is needed, where does the username generated in section 2.2 of the DRAFT API come into play? After playing around with this a little bit more, it appears as though it should more or less never get inserted into the database. It is generated on the REST server and stored no where (unless I want to store it for my own purposes), and then the client makes a request with that username/password combo. The TURN server then checks the signature to make sure it’s legit, and if it is the username/password combo is considered “good”.
2) My shared secret is really long. That’s all there is to it.
3) Sorry, that was a mistake. I didn’t have that in there until just before I sent the email. I thought -r was realm for a moment there.
4) Username is odd because it’s generated quasi-randomly currently. While we do want authentication, we don’t want to have to tie the TURN username to the user’s actual username currently.
5) This was the source of all of my issues, I do believe. I did not realize that the -W was the shared secret. Changing -W to -w got it working.
After reading your comments and sleeping on it, I think I have a better idea of what’s going on now. I think I’ll post my REST API up on GitHub and make a blog post about integrating it with the rfc5766-turn-server.
Thanks Oleg!
--
Jessie A. Morris
Sent with Airmail