Good morning community,
We want to integrate in the website of a client the videos of some of their cameras, taking the video stream from their private network to the server where they have hosted the website (external server) so that they can directly access those streams and show them, without compromising the security of their internal network. We have seen that the way to do it is through webRTC and we are following the following documentation: https://doc.developer.milestonesys.com/html/index.html?base=samples/protocolsamples/webrtc_javascript/readme.html&tree=tree_3.html
For this we have seen that we have to configure the API gateway in the Milestone server, but we don’t have it installed, so we have the following doubts:
1. How do we install the API Gateway in the Milestone server and what things do we have to take into account? Can the installation cause any kind of problem in the Smart Client? This is a critical infrastructure and we cannot afford to have failures in the visualisation of the cameras.
2. For the specific case I am talking about (web page on external server and Milestone on another private network), what specific configurations do we have to do both in the API Gateway (at ce CORS level, TURN and STUN servers, WebRTC, etc.) and in the WebRTC_JavaScript script? Can you offer advice on the step by step to implement this?
Thank you very much in advance!
If you do not have API Gateway installed it means that you do not have the newest version of XProtect. Since 2023R3 it has been mandatory to have at least one API Gateway available in an XProtect VMS site. Since 2023R1 the API Gateway has included support for WebRTC, and if your XProtect is older you will need to upgrade if you want to use WebRTC. For completeness of this historical rundown let me also mention that API Gateway has been a part of the XProtect VMS since 2022R1.
If you have 2023R1 or 2023R2 but does not have the API Gateway installed it should be safe to install it, it shouldn’t disrupt what else is installed and working. Easy way to find the installer: In a browser open - http://[SERVER]/installation/admin/
It would not be possible for us to advise on the setup of TURN and STUN servers, every network might have a different setup. Let me point to the documentation from Milestone that will be most useful, you might require to use other sources to understand the network setup required.
https://doc.developer.milestonesys.com/html/index.html?base=samples/protocolsamples/webrtc_javascript/readme.html&tree=tree_search.html?search=gateway
https://doc.milestonesys.com/latest/en-US/standard_features/apigateway/overview/api_gway_introduction.htm
https://doc.milestonesys.com/latest/en-US/standard_features/apigateway/configuration/api_gway_config-files.htm
https://doc.developer.milestonesys.com/mipvmsapi/content/quickstart/
https://doc.developer.milestonesys.com/mipvmsapi/content/cors/
Thank you for all the information.
Actually, we have 2023R3 as it is shown in the following image.
Maybe it is available but not active? In that case, how should we activate it?
Try Tools->Registered services, see if you have it. (I am not sure the names in your language version.)
Maybe have a look at the “Quick Start” for the API Gateway - https://doc.developer.milestonesys.com/mipvmsapi/content/quickstart/
If you find that API Gateway is there and working but the sample isn’t working -https://doc.developer.milestonesys.com/html/index.html?base=samples/protocolsamples/webrtc_javascript/readme.html&tree=tree_3.html
I guess some observations on how it fails might be helpful.