Hi Daniel,

I have in ksr_xhttp_event callback function:
KSR.xlog.xinfo("TLS="..KSR.pv.gete("$tls_version")..", proto="..KSR.pv.gete("$proto"));
Log show:
INFO: TLS=TLSv1.3, proto=tls

But in main ksr_request_route function:
KSR.xlog.xinfo("TLS="..KSR.pv.gete("$tls_version")..", proto="..KSR.pv.gete("$proto"));
Log show:
ERROR: tls [tls_select.c:129]: get_cur_connection(): Transport protocol is not TLS (bug in config)
INFO: tls [tls_select.c:301]: get_version(): TLS connection not found in select_version
INFO: TLS=, proto=wss

My workaround was to try to store the tls_version in avp() before calling websocket.handle_handshake(), but that doesn't work.

Thank you for the directions

Michal

čt 16. 2. 2023 v 10:03 odesílatel Daniel-Constantin Mierla <miconda@gmail.com> napsal:
Hello,

On 15.02.23 17:53, Michal Hajek wrote:
> Hi,
> I can log incoming SIPS TLS version and cipher with PV $tls_version
> and $tls_cipher_info.
> How can I log these variables on incoming HTTP/WebSocket.

same variables should be available also for https/websocket. Have you
tried and got any errors?

Cheers,
Daniel

--
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - June 5-7, 2023 - www.kamailioworld.com
Kamailio Advanced Training - Online - March 27-30, 2023 - www.asipto.com