Pre accept state in SIP plugin?

We are trying to connect our janus instance to a 3rd party media server which is using ice-lite.

With ice lite, the media server is only required to respond to STUN requests but not to make them, which is exactly what they are doing.

We receive an “incomingcall” event from SIP plugin and forward the offer to them.
They receive this offer and respond with their answer, they are currently in “ringing” state.

We have no way of using this SDP without establishing the connection, but the call is not yet established. We have to store it in our own session data and use it later when the call is actually accepted. This then yields further delays because the connection is just now starting to be negotiated between the media servers, and that’s assuming that both media servers are willing to hold on these sessions for long enough.

Furthermore, in our specific scenario, this isn’t the case and we are actually not able to connect to the MS in question since they won’t even notify their users of ringing until the media servers are connected, basically ignoring our call.

A common solution for this kind of problem is to implement a preanswer, which they seem to expect us to do here.

I’m wondering why SIP doesn’t have this already? I would give it a go to add it myself and make a PR, if there is no reason why janus wouldn’t support this?

I don’t know what you mean by pre answer. If you mean early media (183) I think it’s currently supported in one direction (incoming calls for the Janus user) but not the other way around.

Thats pretty much what I mean, preanswer is the term used by other tools who support this action (based on my brief search), but basically it means 183 with SDP.

We need to establish the connection with the 3rd party MS in order for the user to even notice the call and then later accept/decline.

Hey, sorry for bumping, but any thoughts on this? :slight_smile:

The issue again in TLDR:

  • We receive an “incomingcall” from janus with an SDP
  • We send that SDP to the 3rd party
  • 3rd party won’t connect to janus and won’t notify their end user for ringing, they are waiting for us to initiate connection
  • We can’t connect to their media server until we accept the call

We have two options here:

  • accept the call and treat “established” from janus as the actual “ringing” state (somewhat dirty fix)
  • add a new action in janus to perform a “pre_answer”, equivalent to 183 with SDP