I'm trying to connect Janus and Dialogic's XMS server through WebRTC. I need data to flow both ways, from Janus to XMS and backwards. So far I've only been able to establish the first case. When Janus initiates the call and passes offer to XMS, the server responds with an answer containing candidates (btw, XMS adds this line "a=end-of-candidates" at the end of the candidates in SDP, which segfaults Janus, dunno if this is handled or not, if not, I'd suggest handling this rare case though. Took me some time to figure it out). I add the trickle: "false" to the answer, so Janus knows to parse candidates from SDP itself. Since both peers got the other ones' SDP and candidates (XMS parses the candidates from SDP too), the handshake completes.
Things don't go so smoothly in the second case. XMS creates the offer (again with candidates included in SDP) and passes it to Janus, Janus of course answers with its own SDP. Again, both peers received each others SDP and candidates. However, Janus writes a warning that it is Still waiting for the DTS stack for component 1 in stream 1. Component state is 3 (connected), as revealed by higher debug levels. Does anyone have any experience what could go wrong?
The first case works with and without a TURN or STUN server, the second one doesn't work with or without either. Note that XMS has troubles successfully connecting directly (no gateway) to chrome as well, with XMS being the one to send the offer. The .onicecandidate callback also never triggers this way, so no possible connection. Again, when XMS receives offer from Chrome, the connection works flawlessly.
Another question I have is, if Janus can be the one to initiate the connection (create the offer and send it) only when it already has a rtc connection established. (the demos make me think so, as you need to provide the feed in videoroom demo, or "call" someone in the videocall demo, so you need to provide offer SDP when you call a different peer). What I want is to send data from XMS to Janus, but with Janus being the one to initiate the offer, without the need to provide an already established rtc connection. Not only would this work very well, it is also preferred, as controlling both servers with a single controller is the most optimal option (need to start XMS offer externally). Do I have to write my own plugin for this, or is Janus already capable of doing this (or is Janus incapable of doing it this specific way)?
I'm sorry for any grammar errors I've made.