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