coturn: Need help configurating my server correctly
I am trying to set up a STUN/TURN server on my local computer for a webrtc application of me. I decided to use coturn. Note that my server is running behind a NAT.
So i fired up my Ubuntu VM and installed it. After reading through the wiki I got it working, atleast on my local network. For testing purposes, i use this site. Therefore, when i try it there with 192.168.178.25:3478, it works. When i try it with "public-ip":3478, it doesnt.
This told me, it is working locally and it should be a port/NAT issue. What i did:
1) I set the VM to Bridging
2) I opened the port 3478 on my router. To test if this is really working, i used telnet on a remote machine and it worked. Another test was that i set up a quick apache server on my local machine on port 3478 and it could be accessed from the outside. This told me that there is, or should be, not port/NAT issue and my turn server should be working.
I am running my server with the following command:
"sudo turnserver -X "public-ip" -listening-port=3478 -v
The turnserver.conf looks something like this:
As telnet and apache server are both working, i am pretty sure i have a configuration issue. I basically spent the weekend trying and im really lost on what could be wrong.
Thanks for any help!
See also questions close to this topic
webRTC: How to control Opus bandwidth in Firefox? (57+)
I'm trying to increase the bandwidth allowance for the Opus codec, when sending audio from Firefox with webRTC. It appears the "maxaveragebitrate" fmtp option is not accepted, but removed from the SDP. "b=TIAS" only has a limiting affect on bandwidth.
Is there currently a way to increase audio bandwidth with webRTC in Firefox?
WebRTC how i can bypass write_settings permission on android 6.0.1
In my android application, I use WebRTC. However, on version 6.0.1, the application crashes due to the lack of write_settings permission. None of the manuals say it's necessary, but without it, the application does not work. I have to request this permission through the content, which consequently causes quite a lot of questions from users. Tell me how to use WebRTC without this permission or as an implicit grant write_settings permission. Thank you in advance
WebRTC iOS: Audio/Video stream recording
I am trying to record incoming/outgoing audio/video streams in my iOS app that uses GoogleWebRTC pod. so far I haven't found any api that allows us to record Audio/Video streams. I tried to record local video feed from the camera using AVCaptureSession, but doing this freezes the outgoing video stream. this happens probably because multiple AVCaptureSession instances cannot use the same input device.
Is there any other way to record local and/or remote streams from WebRTC in iOS?
How to send Application Originated (AO) SMS over a SIP (or generic IP) connection
Back in the days of ISDN, I had a piece of software which could send SMS to mobile phones using the ISDN card in the PC. To send a message, I needed to specify the number of the SMSC for the recipient (in addition to the recipient’s phone number)—presumably the software would connect directly to the SMSC and transmit the message. The message would then show on the recipient handset with my ISDN landline number as the sender. I don’t remember how this was billed, but I presume I would have paid a fee for a short (few seconds) ISDN connection to the SMSC.
I have thought of harnessing this for a system monitoring solution: when something on my home network goes down, an SMS message will be sent to my phone.
However, I have since migrated to a full-IP DSL line, where all voice telephony happens over SIP.
My use case pretty much rules out any gateway services (other than the telco which manages my SIP number).
I there a way I can send SMS in a similar manner, i.e. by directly connecting to the “correct” SMSC for the recipient? Does the SIP protocol provide a capability for that? Or is there any other IP-based protocol which would do that?
How to return back to lockscreen after launch app when receive notification?
I'm working on a VOIP app, I want to improve the user experience for my application.
Functionally expected: When the device is locked (app still running), When receiving a notification for an incoming call I want my app to wake up and show incoming call screen, after ending this call the device should be locked again. The same behavior with Whatsapp, Skype, ...
At present: I can wake up my app and show incoming call screen by using start an
FLAG_ACTIVITY_REORDER_TO_FRONT. Still, I cannot redirect to lock screen after ending the call.
Is there any way to go back to lock screen after end call?
VoIP, PushKit and app wake up
I'm developing a VoIP app using PushKit and CallKit. I'm aware that similar questions have been asked quite often on different forums but unfortunately have never really been answered. Also most of these posts are from around 2015 so i assume chances are a lot has been changed in terms of someone might have figured meanwhile how to get this working.
What's working: - When the app is running in foreground or sent to background it receives push notifications using the sandbox server as well is the production server.
I'm on iOS 11 and Xcode 9 and needed to enable the regular push notifications in 'capabilities' as well as manually adding the voip background mode to the info.plist for the delegate methods to get called. Linking CallKit and PushKit alone was not enough to receive notifications. I also enabled Background Audio, Background fetch and Remote Notifications. I also created a background task before doing the push registry registration and i end that task after receiving the push token.
What's not working: - Waking up the app after reboot or force quit on incoming calls.
I see the process launching on incoming calls in the Instruments activity monitor though but it looks like something's not working from there since i don't get the incoming call ui.
Questions: 1) When the app is not running what's the entry point on an incoming notification? pushRegistry:didReceiveIncomingPushWith:payload:for type: or maybe (only) application:didFinishLaunchingWithOptions: ? 2) i stored my credentials to register with the server in the keychain. is it possible that there's a point during application launch when it's too early to query the keychain for something?
Any help is highly appreciated. Thanks a lot!
In WebRTC, which ICE candidate created a successful connection?
I want to know which ICE candidate created a successful connection and is being used to transfer data between peers. I want to be able to differentiate a local (host) connection from a server reflexive to a TURN connection.
I am currently using the WebRTC native API and don't see any public APIs that allow me to know which ICE candidate successfully created a connection.
Installing CoTurn 220.127.116.11 on Ubuntu 16.04.3 x64 TLS not working
I am trying to install CoTurn 18.104.22.168 on a Digital Ocean Ubuntu 16.04.3 LTS. I can't use
sudo apt-get install coturnsince it installs version 22.214.171.124. Also I can't install Ubuntu 17.10 since I need long term support (TLS).
I create a droplet on Digital Ocean with Ubuntu 16.04.3 LTS. Then I downloaded CoTurn:
I unpack it:
tar xvfz 126.96.36.199.tar.gz
Go inside the folder:
Install Libraries & Utilities needed:
sudo apt-get install libssl-dev sudo apt-get install sqlite3 sudo apt-get install libsqlite3-dev sudo apt-get install libevent-dev sudo apt-get install libpq-dev sudo apt-get install mysql-client sudo apt-get install libmysqlclient-dev sudo apt-get install libhiredis-dev
The last one gives an error:
E: Unable to locate package libhiredis-dev.
After that running:
I get error messages:
ginstall: not found install is /usr/bin/install pkill is /usr/bin/pkill sqlite3 is /usr/bin/sqlite3 Use TMP dir /var/tmp Compiler: unknown ERROR: cannot use compiler unknown properly
Can someone give me a step by step instructions to install CoTurn?
WebRTC: Does it matter where my TURN server is?
Context: I am going to be setting up a support app for global customers. All my customers are going to be connecting to our support agents who are in one location.
Question: Is there any advantage to also having TURN servers closer to the customers, or is it just as well to have all my TURN servers near my support agents?
Current Understanding: If I understand it right, the connection between Peer 1 and Peer 2 is linear through the TURN servers, i.e.
Peer 1 -> TURN 1 -> TURN 2 -> Peer 2
It seems that it wouldn't matter which leg of that journey is longer unless there's some non-linear behavior leading to a lengthier round-trip leg.
Configuration CoTurn on Ubuntu not working
I don't get any candidates while testing my STUN & TURN server (CoTurn) with Trickle ICE on a MacBook 10.12.6 using Chrome 62.0.3202.89:
stun:<ip-adres>:3478 turn:<ip-adres>:3478 [username:test]
On Digital Ocean I created a droplet Ubuntu 16.04.3 x64 and installed CoTurn version 188.8.131.52 doing:
sudo apt-get update sudo apt-get install coturn
By default the firewall is inactive.
Next, I edited
sudo vi /etc/turnserver.confand give the following options:
fingerprint lt-cred-mech user=username:test realm=<ip-adres> listening-ip=<ip-adres> relay-ip=<ip-adres> external-ip=<ip-adres>
Then I start the Coturn daemon:
sudo systemctl start coturn sudo systemctl status coturn
To check configuration I type:
Everything looks fine:
0: log file opened: /var/log/turn_3249_2017-11-08.log 0: RFC 3489/5389/5766/5780/6062/6156 STUN/TURN Server Version Coturn-184.108.40.206 'dan Eider' 0: Max number of open files/sockets allowed for this process: 1048576 0: Due to the open files/sockets limitation, max supported number of TURN Sessions possible is: 524000 (approximately) 0: ==== Show him the instruments, Practical Frost: ==== 0: TLS supported 0: DTLS supported 0: DTLS 1.2 supported 0: TURN/STUN ALPN supported 0: Third-party authorization (oAuth) supported 0: GCM (AEAD) supported 0: OpenSSL compile-time version: OpenSSL 1.0.2g-fips 1 Mar 2016 0: 0: SQLite supported, default database location is /var/lib/turn/turndb 0: Redis supported 0: PostgreSQL supported 0: MySQL supported 0: MongoDB is not supported 0: 0: Default Net Engine version: 3 (UDP thread per CPU core) ===================================================== 0: Config file found: /root/../etc/turnserver.conf 0: Listener address to use: <ip-adres> 0: Relay address to use: <ip-adres> 0: Config file found: /root/../etc/turnserver.conf 0: Domain name: 0: Default realm: <ip-adres> 0: WARNING: cannot find certificate file: turn_server_cert.pem (1) 0: WARNING: cannot start TLS and DTLS listeners because certificate file is not set properly 0: WARNING: cannot find private key file: turn_server_pkey.pem (1) 0: WARNING: cannot start TLS and DTLS listeners because private key file is not set properly 0: pid file created: /var/run/turnserver.pid 0: IO method (main listener thread): epoll (with changelist) 0: WARNING: I cannot support STUN CHANGE_REQUEST functionality because only one IP address is provided 0: Wait for relay ports initialization... 0: relay <ip-adres> initialization... 0: relay <ip-adres> initialization done 0: Relay ports initialization done 0: IO method (general relay thread): epoll (with changelist) 0: turn server id=1 created 0: IO method (general relay thread): epoll (with changelist) 0: turn server id=0 created 0: Total General servers: 2 0: IO method (admin thread): epoll (with changelist) 0: IO method (auth thread): epoll (with changelist) 0: IO method (auth thread): epoll (with changelist) 0: SQLite DB connection success: /var/lib/turn/turndb
Please help me, what is still needed here to let it work?