sipgo
sipgo copied to clipboard
[bug] ws connect to opensips failed.
Hi, I have a test with example/register via ws, opensips failed log:
proto_ws:ws_parse_req_handshake: Origin header not present!
Jan 16 16:47:06 [115] ERROR:proto_ws:ws_read_req: cannot complete WebSocket handshake
register log:
ERR TransactionRequest error="transport<WS> dial err=unexpected HTTP response status: 400"
the header should add Origin param like this: header := http.Header{} header.Add("Origin", "http://172.16.4.113:8443") conn, _, err := dialer.Dial(url.String(), header)
Thanks for reporting. Seems like this is not currently easy to fix unless header are fixed.