Connecting and disconnecting IPCAM with passing parameters to the URL

When connecting the IP camera with the transfer of parameters to the URL, then openly cuts off everything that is transmitted after the “?” After a lot of trying, I replaced this character in the string with “%3F”, and it worked. BUT there was another problem. Now, when you disconnect the connection of this camera with the transmission of the CONNECTIONID, which contains the character codes, it gives a 404 error, but if you replace these characters back, it immediately truncates, which leads to the same 404 error.
Therefore, I can turn off the camera only by turning off the conference.

I’ll show it differently

NOT Video URL
rtsp://user:pZ4yBZ873r@192.168.50.17:554/cam/realmonitor?channel=1&subtype=0

Logs on connect
openvidu-server_1 | [INFO] 2020-07-28 08:14:57,923 [http-nio-0.0.0.0-5443-exec-5] io.openvidu.server.rest.SessionRestController - REST API: POST /api/sessions/conference_23/connection {rtspUri=rtsp://user:pZ4yBZ873r@192.168.50.17:554/cam/realmonitor?channel=1&subtype=0, data={“clientData”:“user_62”,“operator”:false}}
————
openvidu-server_1 | [WARN] 2020-07-28 08:14:58,122 [AbstractJsonRpcClientWebSocket-reqResEventExec-e2-t1791] io.openvidu.server.kurento.core.KurentoParticipant - PARTICIPANT ipc_IPCAM_rtsp_BU0Z_user_pZ4yBZ873r@192_168_50_17_554_cam_realmonitor: Media error encountered: INVALID_URI: Invalid URI(errCode=0)
openvidu-server_1 | [ERROR] 2020-07-28 08:14:58,122 [AbstractJsonRpcClientWebSocket-reqResEventExec-e2-t1791] io.openvidu.server.kurento.core.KurentoParticipantEndpointConfig - KMS event [ERROR]: -> endpoint: str_IPC_Kr6c_ipc_IPCAM_rtsp_BU0Z_user_pZ4yBZ873r@192_168_50_17_554_cam_realmonitor (publisher) | errorCode: 0 | description: Invalid URI | timestamp: 1595924098088

Logs on disconnect
openvidu-server_1 | [INFO] 2020-07-28 08:19:40,482 [http-nio-0.0.0.0-5443-exec-8] io.openvidu.server.rest.SessionRestController - REST API: DELETE /api/sessions/conference_23/connection/ipc_IPCAM_rtsp_BU0Z_user_pZ4yBZ873r@192_168_50_17_554_cam_realmonitor
openvidu-server_1 | [INFO] 2020-07-28 08:19:40,482 [http-nio-0.0.0.0-5443-exec-8] io.openvidu.server.kurento.core.KurentoSessionManager - Request [LEAVE_ROOM] for participant ipc_IPCAM_rtsp_BU0Z_user_pZ4yBZ873r@192_168_50_17_554_cam_realmonitor of session conference_23 with reason forceDisconnectByServer
openvidu-server_1 | [INFO] 2020-07-28 08:19:40,482 [http-nio-0.0.0.0-5443-exec-8] io.openvidu.server.kurento.core.KurentoSession - PARTICIPANT ipc_IPCAM_rtsp_BU0Z_user_pZ4yBZ873r@192_168_50_17_554_cam_realmonitor: Leaving session conference_23
openvidu-server_1 | [INFO] 2020-07-28 08:19:40,482 [http-nio-0.0.0.0-5443-exec-8] io.openvidu.server.kurento.core.KurentoParticipant - PARTICIPANT con_U0BKpEsZh7: cancel receiving media from ipc_IPCAM_rtsp_BU0Z_user_pZ4yBZ873r@192_168_50_17_554_cam_realmonitor
openvidu-server_1 | [INFO] 2020-07-28 08:19:40,489 [http-nio-0.0.0.0-5443-exec-8] io.openvidu.server.kurento.core.KurentoParticipant - IP Camera stream str_IPC_Kr6c_ipc_IPCAM_rtsp_BU0Z_user_pZ4yBZ873r@192_168_50_17_554_cam_realmonitor feed is now disabled because there are no subscribers
openvidu-server_1 | [INFO] 2020-07-28 08:19:40,489 [http-nio-0.0.0.0-5443-exec-8] io.openvidu.server.kurento.core.KurentoParticipant - PARTICIPANT con_U0BKpEsZh7: stopped receiving media from ipc_IPCAM_rtsp_BU0Z_user_pZ4yBZ873r@192_168_50_17_554_cam_realmonitor in room conference_23
openvidu-server_1 | [INFO] 2020-07-28 08:19:40,490 [AbstractJsonRpcClientWebSocket-reqResEventExec-e2-t1801] io.openvidu.server.kurento.core.KurentoParticipantEndpointConfig - KMS event [UriEndpointStateChangedEvent]: -> endpoint: str_IPC_Kr6c_ipc_IPCAM_rtsp_BU0Z_user_pZ4yBZ873r@192_168_50_17_554_cam_realmonitor (publisher) | state: STOP | timestamp: 1595924380489

Yes Video URL
rtsp://user:pZ4yBZ873r@192.168.50.17:554/cam/realmonitor%3Fchannel=1%26subtype=0

Logs on connect
openvidu-server_1 | [INFO] 2020-07-28 08:25:46,441 [http-nio-0.0.0.0-5443-exec-6] io.openvidu.server.rest.SessionRestController - REST API: POST /api/sessions/conference_23/connection {rtspUri=rtsp://user:pZ4yBZ873r@192.168.50.17:554/cam/realmonitor%3Fchannel=1%26subtype=0, data={“clientData”:“user_62”,“operator”:false}}

Logs on disconnect
openvidu-server_1 | [INFO] 2020-07-28 08:28:35,278 [http-nio-0.0.0.0-5443-exec-10] io.openvidu.server.rest.SessionRestController - REST API: DELETE /api/sessions/conference_23/connection/ipc_IPCAM_rtsp_FQ0W_user_pZ4yBZ873r@192_168_50_17_554_cam_realmonitor?channel=1&subtype=0
Return 404 error

You hit a bug when camera URL contains ? character.

We will take a look…