meetecho / janus-gateway

Janus WebRTC Server
https://janus.conf.meetecho.com
GNU General Public License v3.0
8.17k stars 2.47k forks source link

Simultaneous SIP calls #981

Closed iclems closed 4 years ago

iclems commented 7 years ago

I've been investigating managing simultaneous SIP calls. It seems reasonable to attach another SIP plugin as soon as you're on an active call to be able to receive incoming call requests separately during the current call. But it could actually be interesting to have an option for Janus SIP to not decline incoming calls if there's an active call but rather notify of "incoming call" to give us the opportunity to attach another plugin when this happens and not preventively in advance.

lminiero commented 7 years ago

I'm not sure how this would work. Even if we just notified the user about the incoming call, the new handle would not be associated with the SIP stack of the original handle, and so couldn't accept the call. Even registering again from the new handle wouldn't work, as any forked call would have preceded that.

iclems commented 7 years ago

Indeed that would need to be tested. I believed that's how CallKit works on iOS for instance: receive a notification, re-register and get a RE INVITE

andresico commented 7 years ago

The way a solved the simultaneous SIP calls issue is by registering a new handler whenever I do or receive a new call. This way, you have always an available and registered handler for new incoming and outgoing calls. Busy handlers can be detached once the call is finished, but that forces you to create a new handler and register it, because detaching a handler unregisters the SIP peer. It would be great if we could detach a handler without unregistering the SIP peer.

shrhoads commented 7 years ago

Right you just start a new instance of janus with a new server side session.

jmordica commented 5 years ago

Is there a way to initiate the new instance without registering again?

Using this: https://github.com/meetecho/janus-gateway/issues/274

lminiero commented 5 years ago

Hi all, it took a while but we finally started working on this. Please read the PR above to learn how to use it, test and provide feedback. The sooner I know it works, the sooner I can merge.

lminiero commented 5 years ago

@iclems @andresico @shrhoads @jmordica have you all given up on Janus, or you just don't care about the feature anymore? :innocent:

jmordica commented 5 years ago

Sorry for the late response here. I had to use frafos but now that this feature exists I’d like to try it and hopefully swap back over to Janus.

lminiero commented 5 years ago

Cool! Looking forward to your feedback, if you'll start playing with this. There's some more updates coming to the SIP plugin as well, that I hope to be able to publish soon.

jmordica commented 5 years ago

This may not be the best place to ask this but what other sip updates are you planning?

lminiero commented 5 years ago

SIP transfer support, mostly.

lminiero commented 5 years ago

Plus some other things I'll discuss at JanusCon next week.

jmordica commented 5 years ago

Sweet! That will be awesome to have instead of having to use the PBX/Asterisk to handle it.

Thanks!

lminiero commented 5 years ago

I haven't received any feedback these past few weeks on the feature. Unless someone stops me with a good reason why not, I'll merge on Monday.

jmordica commented 4 years ago

This tested fine for me. Did this PR not get merged yet?

lminiero commented 4 years ago

Not merged yet as nobody gave me feedback.

lminiero commented 4 years ago

Just merged in 0.7.6.