0

I have established rfc5766-turnserver and tested success in web browser. IP:192.168.1.111, port:3478. Now I want to get JSON response from server.

in here says the request format should be like

GET /?service=turn&username=mbzrxpgjys

and response should be JSON like

{
     "username" : "12334939:mbzrxpgjys",
     "password" : "adfsaflsjfldssia",
     "ttl" : 86400,
     "uris" : [
       "turn:1.2.3.4:9991?transport=udp",
       "turn:1.2.3.4:9992?transport=tcp",
       "turns:1.2.3.4:443?transport=tcp"
     ]
}

in WebRTC demo Apprtc, file constans.py make the configuration:

TURN_BASE_URL="http://192.168.1.111"

TURN_URL_TEMPLATE="%s/turn.php?username=%s&key=%s"

CEOD_KEY="4080218913"

when the application send a request:"http://192.168.1.111/turn.php?username=xxx&key=4080218913"

nothing returned but a 404 error. if I changed the request as "http://192.168.1.111:3478/turn.php?username=xxx&key=4080218913" I get a html response not a JSON. So I want to know where is the problem? the configuration error or request format?

Sorry for such naive question but it does confused me many days.

Thanks

Community
  • 1
  • 1
LoveLxr
  • 391
  • 1
  • 3
  • 3
  • 1
    Are you trying to get Relay candidates through that REST APIs? That draft and REST API is to get the TURN credentials and service URLs not candidates. So check if the TURN server running has that support of providing TURN credentials and service URLs. – Palash Borhan Uddin Mar 02 '16 at 18:37
  • @Palash Borhan Uddin I just want to get the TURN credentials and service URLs exactly. but how could I check the TURN server has that support? I have make the configuration in turnserver.conf as "use-auth-secret","static-auth-secret=4080218913" – LoveLxr Mar 03 '16 at 04:11
  • Did you find any success with this one? – Muhammad Hassaan Jul 26 '18 at 10:16

0 Answers0