From 470cab36da388b00d8fa28bbb45e205c588fb8c8 Mon Sep 17 00:00:00 2001 From: pg Date: Thu, 27 Mar 2025 18:15:21 +0800 Subject: [PATCH] fix: gb28181 update source ip,port when recover device --- plugin/gb28181/index.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugin/gb28181/index.go b/plugin/gb28181/index.go index 7b9cc5c..a1ca71e 100644 --- a/plugin/gb28181/index.go +++ b/plugin/gb28181/index.go @@ -44,7 +44,7 @@ type GB28181Plugin struct { m7s.Plugin AutoInvite bool `default:"true" desc:"自动邀请"` Serial string `default:"34020000002000000001" desc:"sip 服务 id"` //sip 服务器 id, 默认 34020000002000000001 - Realm string `default:"3402000000" desc:"sip 服务域"` //sip 服务器域,默认 3402000000 + Realm string `default:"3402000000" desc:"sip 服务域"` //sip 服务器域,默认 3402000000 Username string Password string Sip SipConfig @@ -657,6 +657,9 @@ func (gb *GB28181Plugin) RecoverDevice(d *Device, req *sip.Request) { d.UpdateTime = time.Now() d.RegisterTime = time.Now() d.Online = true + d.IP = hostname + d.Port = port + d.HostAddress = hostname + ":" + portStr if gb.DB != nil { var existing Device