How to enable TLS-transport using Janus Sip plugin?

Hi everyone,

We use the Janus Sip Plugin to make an audio connection
between a browser and some legacy hardware.
This works nice for Udp and Tcp.
We want to enable tls-transport to,
but do not succeed and can’t find any examples or hints on the forum.

Case:
We have sip uri like this:

sipUri = "sip:ext1@192.168.0.228;transport=tls?Cinfo=Xxx:1.01&CsessionID=79e616e9"

We translate this to a janus json-message like this:

{
	"janus": "message",
	"body": {
		"request": "call",
		"uri": "sip:ext1@192.168.0.228;transport=tls",
		"srtp": "sdes_optional",
		"rtpType": " (SDES-SRTP optional)",
		"headers": {
			"Cinfo": "Xxx:1.01",
			"CSession": "79e616e9"
		}
	},
}

Janus creates a SIP-Invite like this
(NB: Is TCP not TLS)

INVITE sip:ext1@192.168.0.228 SIP/2.0
Via: SIP/2.0/*TCP* 172.18.0.3:42247;received=192.168.0.193;branch=z9hG4bKep3cKgZNSH1gD
From: "100" <sip:100@pbx.traefik.me>;tag=c4rS6gXccFSDQ
To: <sip:ext1@192.168.0.228>;transport=tls
CSeq: 976073589 INVITE
Contact: <sip:ext1@192.168.0.228:5060;transport=*TCP*>
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS

How to enable TLS on sip invite like this?

Via: SIP/2.0/*TLS* 172.18.0.3:42247;received=192.168.0.193;branch=z9hG4bKep3cKgZNSH1gD
Contact: <sip:ext1@192.168.0.228:5060;transport=*TLS*>

Try passing sips: true to the register request.

We already tried, but that did not work onfortunately.

You probably have to use sips: as the prefix in the SIP URI to call as well, or Sofia won’t know that’s what you want to do. That said, I never tested TURN/TLS myself, so I don’t know if it will work. Others may have better tips for you.

We tried the sips uri too, but we still did not get tls-transport.
Any suggestions are welcome.