From: Sébastien V. <vi...@cl...> - 2008-09-11 13:39:10
|
Hello Markus, Answers inline. Markus Fischer wrote: > Hallå allihopa, > > > > I have a little problem setting up the server. > > I am right no doing my master thesis. Major topics cover STUN,TURN and ICE. By > > creating an own test bed now, I wanted to give your nice turnserver development > > a try. I am using Opensuse 11 as my server platform. I was able to build and > > install the server so far. Is there any further difference building it as > > "debug-build" than just the ouput? Sorry if I place quite some beginners > > questions, but that's what I am right now. > In debug-build mode, the executable contains debug symbols (use of gcc's -g flag) and debug print. > Another thing is, when I try to connect with my application, e.g. a recent > > PJSUA build (pjsip.org), I get first some DNS resolve issues, which are finally > > solved by looking up the server address. I don't think that is related to your > > turn implementation. it should be PJSUA internal, because it tries to find some > > _turn_udp DNS address, which I can't provide. Then it resolves to the "ordinary" > > address. TurnServer implementation has nothing to deal with DNS. > When now allocating resources for the STUN/TURN, I get an "Unauhtoized" > > error message prompted. Okay, I thought maybe some issue with password, realm, > > etc, so I looked all up again, double checked it. Yes, the client must use the long-term authentication as defined in last STUNbis (RFC3489-bis). > No difference for the outpute. > > Note: I tried both, just the simple default setting untouched and later on my > > own config via "turnusers.txt". > > Another thing is, that I am not really sure about how to use your test clients? > > client, server, peer is a little confusing naming for me though. My "guess" was, > > you mean "caller== client, callee==server and peer==turn-relay". Totally wrong, > > or did I get it? :) > Usage ./src/test_client_udp client_address server_address peer_address peer_port So : - client_address : local address of your machine; - server_address : turn server address; - peer_address : address machine you want to connect throught the TURN server; - peer_port : port of the machine you want to connect. One thing : in all test file the accounting informations are hardcoded => user is "ping6", domain is "domain.org" and password is "password". Be sure tyour turnusers.txt file has these informations (the default template is toto:password:domain.org) You can test it with one computer. Just run TurnServer, the test_client_* and optionnaly a service (http, ...) on peer_port. Then ./src/test_client_udp localhost localhost localhost 80 If all if in place the test_client_* should not block and you can see correct wireshark capture (with the patch in extra/) > I tried instead the pjturn-client software in their PJNATH suite. This one > > couldn't setup the appropriate STUN bindings. It looked like that, although I > > have to acknowledge, I am absolute unfamiliar with this piece of code, so I > > might not be to good in interpreting it. > Not test it. I see it does not support revision 9 of TURN (website). > I had also a little the impression, when I used the debug-build , ehm by the > > way, i am using the latest svn files, that the turnusers.txt had no impact? But > > it was found regarding the output. > See with the example test file. Or you can print the account information in src/turnserver.c find this piece of code : #if 0 list_iterate_safe(get, n, &account_list) { struct account_desc* tmp = list_get(get, struct account_desc, list); printf("%s %s %s\n", tmp->username, tmp->password, tmp->realm); } #endif Replace "#if 0" by "#if 1", and you can see each entry of the account list (in non-daemon mode). > one more not, the debian.init isn't to good for the Opensuse approach, although > > I try to use it. It works, when eliminating the "--background -m" statements. > I don't know OpenSuse very much, so... Maybe you can write a "real" OpenSuse init script ? > > > Here are my descriptions of my config files: > > > > ## > > # TurnServer configuration file. > > # > > > > ## public IPv4 address of any relayed address (if not set, no relay for IPv4) > > listen_address = "nat.xyz.com." > > > > ## listening IPv6 address > > ## public IPv6 address of any relayed address (if not set, no relay for IPv6) > > listen_addressv6 = "::1" > > > > ## UDP listening port. > > udp_port = 6956 > > > > ## TCP listening port. > > tcp_port = 6958 > > > > ## TLS support. > > tls = false > > > > ## Daemon mode. > > daemon = true > > > > ## Max client. > > max_client = 10 > > > > ## Max relay per client. > > max_relay_per_client = 2 > > > > ## Allocation lifetime. > > allocation_lifetime = 1800 > > > > ## Certification Authority file. > > ca_file = "./ca.crt" > > > > ## Server certificate file. > > cert_file = "./server.crt" > > > > ## Private key file. > > private_key_file = "./server.key" > > > > ## Account method. > > account_method = "file" > > > > ## Account file (fi account_method = file). > > account_file = "/etc/turnserver/turnusers.txt" > > > > ######### and the turnusers file ###################### > > turnnat:pwxyz:nat.xyz.com > > > > ######### opensuse init-script ######################## > > > > the original script, word by word placed in init folder as > > "/etc/init.d/turnserver" > > Pointing to the config files in folder "/etc/turnserver/" to "turn...cfg/txt" > > deleted just the "--background" and "-m" commands, as my terminal told me > > daemon-start-stop did not know them. > > ####################################################### > > > > > > So, finally, if you miss real questions above : > > > > What is wrong with my setup? > > Is there something hard coded, I have to change? > > What build is the right to get it running? > production : normal (daemon mode or init.d script) testing / development : debug-build in non-daemon mode > How to start the server, is my changed init script okay? > > > > At last, what you do is great work, and it comes just in time for my work ;) > Thank you very much :). > ... > > Maybe later on, when I understand much more of the material, i am even able to > > put something into the project to aide you folks, but now it's me who needs your > > help. > OK fine, it could be good to have some contributors. > Thanks for all efforts in advance! > > > > Hälsningar / best regards, > > > > Markus > > > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Turnserver-users mailing list > Tur...@li... > https://lists.sourceforge.net/lists/listinfo/turnserver-users > Last things, maybe you know it, we (SIP Communicator and TurnServer project) begin an OpenSource implementation of STUN, STUN2, TURN and ICE called Ice4J (in Java). So again if you want to contribute, you are welcomed :). Thanks again for feedbacks. Regards, -- Sebastien Vincent |