Video cloud gateway platform EasyCVR cascade channel front end does not display the national standard number of the device

Video networking cloud platform EasyCVR integrates key technologies such as traditional security technology, video intelligent analysis, multimedia communication, distributed storage, and alarm linkage, fully integrates and utilizes video security information resources, and provides users with unified and efficient services and speeds up The development of digital and intelligent video network surveillance leads the new direction of the technical architecture of security software platforms.

EasyCVR architecture diagram 2.5D.png

The front end of the EasyCVR cascade channel does not display the national standard number of the device

EasyCVR can cascade upper-level platforms, including national standard GB28181 protocol equipment and RTSP protocol equipment. This article is about EasyCVR cascading national standard equipment. When the cascading channel selects the channel list, the national standard number of the front-end display device is empty.

1077.png

Solution

We press F12 to call up the developer mode, debug and troubleshoot front-end problems, and find that the DeviceID returned by the back-end is empty.

When RTSP and hksdk channels are cascaded, the national standard device number where the channel is located should be consistent with the SIP authentication user in the current cascading object. If it is empty, it is consistent with the SIP service serial in the ini configuration file.

1078.png

1079.png

solution

In response to this problem, we modify the front-end code as follows:

//Oscar:rtsp,sdk通道级联
serial := utils.Conf().Section("sip").Key("serial").MustString("34020000002000000001")
cascade := make([]*models.Cascade, 0)
q := db.SQLite.Model(models.Cascade{}).Where("[id]=?",id)
q.Find(&cascade)
if len(cascade) == 1{
   serial = cascade[0].Username
}

Then modify the back-end code as follows:

//Oscar:rtsp,sdk通道级联
serial := utils.Conf().Section("sip").Key("serial").MustString("34020000002000000001")
cascade := make([]*models.Cascade, 0)
q = db.SQLite.Model(models.Cascade{}).Where("[id]=?",id)
q.Find(&cascade)
if len(cascade) == 1{
   if cascade[0].Username != ""{
      serial = cascade[0].Username
   }
}

After the modification is completed, the problem is solved.

Note: This code is only test code, developers can refer to it, or write another code according to their own needs.

Guess you like

Origin blog.csdn.net/EasyNVS/article/details/107662164