IPCAM streaming over firewall (NAT)

Hi, I am new to openvidu.

Recently, I am developing an IP camera streaming web application that uses webrtc.
Openvidu Deployment CE was installed in a server where public IP is attached and,
I added IPCAM connection of remote ipcamera to a session like below.

body = {
‘type’: ‘IPCAM’,
‘data’: ‘Left’,
‘record’: False,
‘rtspUri’: “id:password@192.168.0.100:554/stream=1”,
‘adaptativeBitrate’: False,
‘onlyPlayWithSubscribers’: True
}
response = requests.post(url=OPENVIDU_URL + ‘openvidu/api/sessions/’ + sessionId + ‘/connection’,
verify=False,
auth=(“OPENVIDUAPP”, OPENVIDU_SECRET),
headers={‘Content-type’: ‘application/json’},
json=body
)
The above code was executed in a remote host which is in the same network with the camera.

but when I tried to enter the session and subscribe the stream in browser, the video is not shown.

Executing “./openvidu logs” shows INVALID_URI error.

openvidu-openvidu-server-1 | [ERROR] 2024-04-04 12:52:51,698 [AbstractJsonRpcClientWebSocket-reqResEventExec-e2-t2987] io.openvidu.server.kurento.core.KurentoParticipantEndpointConfig - KMS event [ERROR]: → endpoint: str_IPC_Yafp_ipc_IPCAM_rtsp_4U4Y_192_168_13_100_554_stream=1 (publisher) | errorCode: 0 | description: Invalid URI | timestamp: 1712235171698

I suspect that the rtspUri of the connection is not a valid since it is a private ip address which openvidu deployment cannot see. maybe I misunderstood the usage of IPCAM.

In summary, I want my ip cameras behind a firewall(NAT) to be streamed over Openvidu webrtc. How can I stream ip cameras to openvidu deployment so that browser clients can subscribe it?

Please give me any feedback.
Thank you in advance.

Best regards,
Jiseong Heo

Your IP Camera needs to be reachable by OpenVidu Server, it does not use WebRTC. Kurento connects via RTSP to your IP camera, and it expose it through a session created in OpenVidu via WebRTC to other users in that session.

TLDR: OpenVidu Server needs to reach your IP Camera rtsp uri.