Janus Sip Plugin Early Media Signalling

Hi everyone,

I’m using Janus Sip plugin and it’s working flawlessly so far.
I’m developing an application and I would like to see who’s in front of the door before a call is answered. I thought this could be achived via early media.
Here’s the Linphone’s implementation.
[Intercom-System-Solutions-2020 (linphone.org)]
The only proper action for this to accept incoming-call request. But this allows a bi-directional flow of media and both parties became aware of that connection has been established. I know this issue also covers other parties as well (Asterisk, Intercom company)
Is there any solution for this?

We do support early media using 183, but I think that’s only for INVITE we send ourselves, meaning the plugin can handle an incoming 183 with early media in it, in order to establish a PeerConnection nevertheless. It looks like what you have here is an incoming INVITE, and you wanting to reply with a 183 before accepting the call with a 200: if so, the plugin doesn’t currently support it, and you indeed have to accept the call or decline it right away.

1 Like

As a side note, though:

That’s not necessarily true. You can accept the incoming call, but without providing media yourself, and so replying with a recvonly SDP: this way, even if the call was accepted, you will see them and they won’t see you. A renegotiation after that can be used to add your audio/video too: the same would need to happen anyway even with early-media.

1 Like

@lorenzo Thank you for detailed explanation. I’ve had the change to test recvonly with my setup and it actually didn’t work for me. The intercom device already doesn’t have a LCD screen so the person in front of the door has no chance to see me. If I mute the microphone of phone, it will have the same effect as recvonly
I think the problem is handshake here. When handshake is completed (with only recvonly also), visual changes occur on the intercom’s LED lights. The person easily understands that their call has been answered. What I want is the person should still hear ringing voice even the handshake is completed. This is probably not a concern of WebRTC. I should contact with the Intercom producer to check if they offer another solution.

In that case, as I said this would require changes to the plugin, which doesn’t support answering with a 183 at the moment.

Is there any chance you’re going to add this functionality soon?

Not in the short term, no.

Hi, I’m new to Janus I was looking into using it because I’m too looking for a sip webrtc solution for early media coming from doorbells. I was disappointed to see that it isn’t yet possible.

Answering with a recvonly in the SDP isn’t ideal because the doorbells ringback stops when the call is answered…

I’m not sure how Janus works so my question might sound stupid. If I can stream the doorbell video through RTSP can I use the sip and streaming plugins together, so when call is in early media I’ll use RTSP once in the 200 I’ll stop the RTSP and send the media through the sip plugin?

Early media from doorbell to Janus is supported. What’s not supported, and what the previous user wanted, was early media from the WebRTC user to the SIP peer.

Edit: to clarify, what we support is indeed the 183 in response to our own INVITEs, not sending a 183 in response to an INVITE.

I’m looking for Doorbell → SIP server → Janus → Webrtc client

So the doorbell sends an invite with early media to the sip server, and the sip server sends it to Janus. At this point, Janus responds with a 180, so early media is not established (as you said, it isn’t possible in Janus). My question is if I can send the early media in an RTSP stream to Janus, and Janus will send the stream to the webrtc client till the call is answered.

RTSP is supported in the Streaming plugin.

I was trying to fiddle with the streaming plugin but couldn’t figure it out. Can the streaming module listen for an incoming RTSP stream? I would like to send the RTSP from an external source like ffmpeg.

FYI, someone contributed a patch to add early media support to the SIP plugin:

We plan to merge this soon, so if you’re interested in this feature, please test it and provide feedback on the PR page.