This commit is contained in:
shikong 2025-01-24 03:35:32 +08:00
parent 57e8c460b3
commit 9d8fc031a4
Signed by: Shikong
GPG Key ID: BD85FF18B373C341
2 changed files with 3 additions and 2 deletions

View File

@ -55,7 +55,7 @@ func XMLMarshal(obj interface{}, charset string) ([]byte, error) {
} }
writer := transform.NewWriter(xmlBytes, t) writer := transform.NewWriter(xmlBytes, t)
writer.Write([]byte(xmlStr)) _, _ = writer.Write([]byte(xmlStr))
_ = writer.Close() _ = writer.Close()
} }
}() }()

View File

@ -18,7 +18,8 @@ func TestClient(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second) ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second)
ua, _ := sipgo.NewUA( ua, _ := sipgo.NewUA(
sipgo.WithUserAgentHostname("44050100002000000002@10.10.10.20:5099")) sipgo.WithUserAgent("44050100002000000002"),
sipgo.WithUserAgentHostname("10.10.10.20:5099"))
srv, _ := sipgo.NewServer(ua) // Creating server handle srv, _ := sipgo.NewServer(ua) // Creating server handle