Open skullboypl opened 7 months ago
There is no "team" or anyone to pay. This library is an open source project without any support options other than what interested volunteers contribute.
Your logs are showing that STUN messages are able to get through to the remote peer, and the ICE connection is established. The DTLS connection attempt then timesout. It can be very tricky to track down these types of issues unless there is some telltale log message, which in this case there does not appear to be. The next best option is to use WireShark on the remote peer to determine what's going on with the DTLS connection attempt.
Did you ever try to make "VOIP" using C# WPF (.NET or .NET Framework) on WebRTC? And have time to help? i will check that WireShark but i never use it
Did you ever try to make "VOIP" using C# WPF (.NET or .NET Framework) on WebRTC?
No. The softphone app is WPF but it's SIP rather than WebRTC,
Here is ss of filtred by ip of my friend that i try to connect to.
Any possibity to make a meet and you will help me with config for my project?
i even change project to .NET 8 and still same
Looks like a NAT issue. The remote connection is not getting any of your connection's STUN responses which suggests they are being blocked.
You could try a TURN server if you can find a public one or are able to run your own on a public IP address. Coturn is one I have installed in the past.
How I can connect TRUN in SIPSorcery?
i have my own Coturn on dedicated server
When creating the RTCPeerConnection you can specify TURN servers. Search the code for RTCIceServer:
var iceServers = new List<RTCIceServer> {
new RTCIceServer
{
urls = $"turn:{mockTurnServer.ListeningEndPoint}",
}
};
i have tested this like that"
private const string STUN_URL = "stun:stun.sipsorcery.com"; private const string TURN_URL = "turn:m.vxh.pl:3478";
and then RTCConfiguration config = new RTCConfiguration { iceServers = new List<RTCIceServer> { new RTCIceServer { urls = STUN_URL }, new RTCIceServer // TURN server { urls = TURN_URL, // Adres serwera TURN credential = "MYPASSWORDHERE", // Hasło/sekret dla serwera TURN } } };
and still same problem
Unusual for your TURN server not to have a username. Either way you should be getting a response from it even if it's unauthorised.
Can you post the logs with the TURN server attempt?
i create an user now and set iceServers = new List<RTCIceServer> { new RTCIceServer { urls = STUN_URL }, new RTCIceServer // TURN server { urls = TURN_URL, // Adres serwera TURN username = TURN_USERNAME, // Nazwa użytkownika credential = TURN_PASSWORD // Hasło } }
i will check it now
Still same issue: Zgłoszony wyjątek: „System.TimeoutException” w SIPSorcery.dll Zgłoszony wyjątek: „Org.BouncyCastle.Crypto.Tls.TlsFatalAlert” w BouncyCastle.Crypto.dll Peer connection state changed to closed. Zgłoszony wyjątek: „System.Net.Sockets.SocketException” w System.Net.Sockets.dll Current connection status: closed Peer connection state changed to failed. Current connection status: failed Connection failed. failed
in coturn status: " Feb 08 23:08:58 m turnserver[3883098]: 422: : session 003000000000000008: realm <m.vxh.pl> user <>: incoming packet BINDING processed, success "
I tested TURN server here: "https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/" and works fine
I will leave turn server with:
private const string TURN_URL = "turn:m.vxh.pl:3478"; private const string TURN_USERNAME = "skullboypl"; private const string TURN_PASSWORD = "asvdasvw12431v51";
so you can help me. Later i will change data
@sipsorcery
Do we have integration tests that help us to understand what are needed to tests to get a working VOIP basic app based on WebRTC?
My logs below. If somebody from your team can help me with that i will pay.
Received: Text Received: {"type":"ICE_CANDIDATE","candidate":{"IceServer":null,"candidate":"1345532226 1 udp 2113937663 192.168.100.89 58940 typ host generation 0","sdpMid":null,"sdpMLineIndex":0,"foundation":"1345532226","component":1,"priority":2113937663,"address":"192.168.100.89","protocol":0,"port":58940,"type":0,"tcpType":0,"relatedAddress":null,"relatedPort":0,"usernameFragment":"DGQV","DestinationEndPoint":null},"targetId":"46","fromId":"47"} Received ICE candidate: { "IceServer": null, "candidate": "1345532226 1 udp 2113937663 192.168.100.89 58940 typ host generation 0", "sdpMid": null, "sdpMLineIndex": 0, "foundation": "1345532226", "component": 1, "priority": 2113937663, "address": "192.168.100.89", "protocol": 0, "port": 58940, "type": 0, "tcpType": 0, "relatedAddress": null, "relatedPort": 0, "usernameFragment": "DGQV", "DestinationEndPoint": null } Adding ICE candidate. 47 Received: Text Received: {"type":"ICE_CANDIDATE","candidate":{"IceServer":{"TurnTimeToExpiry":"0001-01-01T00:00:00","Protocol":17},"candidate":"2980029153 1 udp 1677730047 MYIPADRESS 58940 typ srflx raddr 0.0.0.0 rport 0 generation 0","sdpMid":"0","sdpMLineIndex":0,"foundation":"2980029153","component":1,"priority":1677730047,"address":"MYIPADRESS","protocol":0,"port":58940,"type":2,"tcpType":0,"relatedAddress":null,"relatedPort":0,"usernameFragment":"DGQV","DestinationEndPoint":null},"targetId":"46","fromId":"47"} Received ICE candidate: { "IceServer": { "TurnTimeToExpiry": "0001-01-01T00:00:00", "Protocol": 17 }, "candidate": "2980029153 1 udp 1677730047 MYIPADRESS 58940 typ srflx raddr 0.0.0.0 rport 0 generation 0", "sdpMid": "0", "sdpMLineIndex": 0, "foundation": "2980029153", "component": 1, "priority": 1677730047, "address": "MYIPADRESS ", "protocol": 0, "port": 58940, "type": 2, "tcpType": 0, "relatedAddress": null, "relatedPort": 0, "usernameFragment": "DGQV", "DestinationEndPoint": null } Adding ICE candidate. 47 STUN BindingRequest sent to 108.177.14.127:19302. STUN BindingSuccessResponse received from 108.177.14.127:19302. Received: Text Received: {"type":"ICE_CANDIDATE","candidate":{"IceServer":{"TurnTimeToExpiry":"0001-01-01T00:00:00","Protocol":17},"candidate":"2980029153 1 udp 1677730047 MYIPADRESS 58940 typ srflx raddr 0.0.0.0 rport 0 generation 0","sdpMid":"0","sdpMLineIndex":0,"foundation":"2980029153","component":1,"priority":1677730047,"address":"MYIPADRESS","protocol":0,"port":58940,"type":2,"tcpType":0,"relatedAddress":null,"relatedPort":0,"usernameFragment":"DGQV","DestinationEndPoint":null},"targetId":"46","fromId":"47"} Received ICE candidate: { "IceServer": { "TurnTimeToExpiry": "0001-01-01T00:00:00", "Protocol": 17 }, "candidate": "2980029153 1 udp 1677730047 MYIPADRESS 58940 typ srflx raddr 0.0.0.0 rport 0 generation 0", "sdpMid": "0", "sdpMLineIndex": 0, "foundation": "2980029153", "component": 1, "priority": 1677730047, "address": "MYIPADRESS", "protocol": 0, "port": 58940, "type": 2, "tcpType": 0, "relatedAddress": null, "relatedPort": 0, "usernameFragment": "DGQV", "DestinationEndPoint": null } Adding ICE candidate. 47 STUN BindingRequest received from 192.168.100.89:58940. STUN BindingSuccessResponse sent to 192.168.100.89:58940. STUN BindingRequest received from 192.168.100.89:58940. ICE connection state changed to connected. ICE connection state changed to connected. Current ice connection status: connected Peer connection state changed to connecting. Current connection status: connecting STUN BindingSuccessResponse sent to 192.168.100.89:58940. STUN BindingRequest sent to 192.168.100.89:58940. STUN BindingErrorResponse received from 192.168.100.89:58940. STUN BindingRequest received from 192.168.100.89:58940. STUN BindingSuccessResponse sent to 192.168.100.89:58940. STUN BindingRequest received from 192.168.100.89:58940. STUN BindingSuccessResponse sent to 192.168.100.89:58940. STUN BindingRequest sent to 192.168.100.89:58940. STUN BindingErrorResponse received from 192.168.100.89:58940. STUN BindingRequest received from 192.168.100.89:58940. STUN BindingSuccessResponse sent to 192.168.100.89:58940. STUN BindingRequest sent to 192.168.100.89:58940. STUN BindingErrorResponse received from 192.168.100.89:58940. STUN BindingRequest received from 192.168.100.89:58940. STUN BindingSuccessResponse sent to 192.168.100.89:58940. STUN BindingRequest sent to 192.168.100.89:58940. STUN BindingErrorResponse received from 192.168.100.89:58940. Wątek 0x24b0 zakończył działanie z kodem 0 (0x0). STUN BindingRequest received from 192.168.100.89:58940. STUN BindingSuccessResponse sent to 192.168.100.89:58940. STUN BindingRequest sent to 192.168.100.89:58940. STUN BindingErrorResponse received from 192.168.100.89:58940. STUN BindingRequest received from 192.168.100.89:58940. STUN BindingSuccessResponse sent to 192.168.100.89:58940. STUN BindingRequest sent to 192.168.100.89:58940. STUN BindingErrorResponse received from 192.168.100.89:58940. Zgłoszony wyjątek: „System.TimeoutException” w SIPSorcery.dll Zgłoszony wyjątek: „Org.BouncyCastle.Crypto.Tls.TlsFatalAlert” w BouncyCastle.Crypto.dll Peer connection state changed to closed. Current connection status: closed Peer connection state changed to failed. Current connection status: failed"