Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to intergrate coturn with REST API #52

Closed
haithanhnguyen opened this issue Jul 19, 2016 · 1 comment
Closed

How to intergrate coturn with REST API #52

haithanhnguyen opened this issue Jul 19, 2016 · 1 comment

Comments

@haithanhnguyen
Copy link

Hi team,

I'm using turnhttp for TURN REST API (https://github.com/dataarts/turnhttp).

So, I don't know how to config coturn with turnhttp. I find some config in turnserver.conf like below:

This option is used with timestamp:

usercombo -> "timestamp:userid"

turn user -> usercombo

turn password -> base64(hmac(secret key, usercombo))

What should I do with this config? And what's usercombo?

In my case: coturn server is 1.2.3.4:3478, and turnhttp is: A.B.C.D:8080. Please show me how to intergrate them.

Thanks!

@misi
Copy link
Contributor

misi commented Aug 16, 2016

Hi,

The turnhttp code last update was about 2 years ago.
My guess that it is outdated.
I think the code is outdated and will not work without modification.

e.g.
https://github.com/dataarts/turnhttp/blob/master/turnhttp-server/turnhttp-server.go
turn/secret/*
but in
https://github.com/coturn/coturn/blob/master/turndb/schema.userdb.redis
the
turn/realm//secret

So I guess turnhttp has been written to earlier version of coturn.

Please read this: https://www.ietf.org/proceedings/87/slides/slides-87-behave-10.pdf

Please understand that there are many ways to implement REST API with coturn.
e.g.

  • Static secret from config file or command line, or
  • Dynamical from database e.g redis, mysql, etc.

AFAIU turnhttp using redis. It updates (stores) secrets dynamically in redis database. And coturn is using this shared redis DB for authentication.

So you need to update turnhttp to work with actual coturn.

I hope I answered your questions.
Please let me know if I could help you in anything more ..

P.S.
(I have also made a not well documented rest API, but if you like the idea, I could work on it to make it workable for you.

See: https://github.com/misi/stun-api/
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants