sipsorcery
sipsorcery copied to clipboard
WebSocket Server - ERR: The IP Address of the host is not a local IP Address - SipSorcery WebRTC Receiver
In SipSorcery's WebRTCViewer, when running the application on the localhost, all seems fine. However when I try to switch to a non-local wss address, I tend to get the following error
Exception Unhandled: SystemAugmentException 'The host part could not be converted to an IP address. (Parameter 'url')'
Referencing code: https://github.com/sipsorcery-org/sipsorcery/tree/master/examples/WebRTCExamples/WebRTCReceiver
The only part replaced in the code is wss and stun address strings in program.cs. The addresses belong to a live server streaming through Amazon Kinesis.
The address in the WebSocketServer constructor is the address you want to listen on and not the one you want to connect to.
If you want to connect to your web socket server from the Internet you'll need to make sure your firewall(s) allow it and that if you're using IPv4 you've set up a NAT forward. If you have a public IPv6 address that makes things a lot easier.
Thanks for your response, very much appreciated.
I understood that I'll need to provide the address of my own system in order to actively listen on it. I've configured my Adapter settings to use only ipv6 address. And starting the application from cmd WebRTCReceiver --ipv6=24**:40**:20**:fb**:95**:e2**:ed**:d9** starts the winform too.
But I still don't know the ws/wss address its listening on. In the cmd output it says Waiting for web socket connections on ws://:::8081.... Wouldn't I need this address specified in the host/master.
You would attempt to connect to your machine using:
ws://[24**:40**:20**:fb**:95**:e2**:ed**:d9**]:8081
Thanks, I was missing the square brackets, that did the trick.
But I was wondering, if there was a way to integrate Amazon Kinesis Webrtc Video Streaming Service with the sipsorcery receiver. I am provided a wss endpoint for master and viewer both from kinesis. Along with the wss endpoint, I also have a https endpoint , stun and turn urls. However, I was unable to find a way to establish a connection from kinesis to sipsorcery receiver.
I don't think it's that straight forward to integrate with Amazon's Kinesis. I took a quick look a while ago and it seems the signalling to set up the WebRTC session required the use of their SDK. I only had a very quick look though so could be wrong.
Your best bet would be to try and find another open source project that has intgegrated with Kinesis and use or copy that. Pion WebRTC would be worth checking.
Thanks a lot for your assistance, it helped me a lot with my project and I really appreciate it. Another thing that I encountered while doing my tests was weird numbers when considering latency over different devices.
Another last thing that I wanted to clarify was does webrtc depend on how far the streamer and the receiver are located? How does this affect SipSorcery WebRTC Receiver, if it does at all?