I’m trying to get a minimal example of the Cyber mega phone (https://github.com/asterisk/cyber_mega_phone_2k/) working with Asterisk 16. So far, everything works as expected with my test setup:
Firefox desktop <=> Firefox Android
Chrome desktop <=> Firefox Android
Firefox desktop <=> Chrome Android
Chrome desktop <=> Chrome Android
Both audio and video start almost instantly in all cases. Chrome still has plan-b sdp set as the default. There was a small issue in the demo though: the isChrome check failed, which prevented the demo to work in Chrome(ium). The sdp-interop part seems to be required, otherwise the demo keeps on waiting for video.
After fixing this, I wanted to translate this JSSIP/sdp-interop example to SIP.js, but it is not clear to me how sdp-interop/JSSIP originator translates to SIP.js. I first tried to apply sdp-interop in a modifier(https://sipjs.com/api/0.11.0/sessionDescriptionHandler/#modifiers), but that didn’t work out. I don’t know exactly which sdp message(s) to adjust(no originator as in JSSIP). Couldn’t get this to work, so my next try was to force unified-plan sdp from chrome://flags. My thought was that Chrome would then behave similar to Firefox and all i would need to do is to apply
data.sdp.replace(/actpass/g, 'active');. I checked with Firefox, and this line seems to be mandatory as well. Without it, the video won’t start playing.
So, I adjusted the Cyber mega demo to act as if Chrome was Firefox. Too bad, I get exactly the same result as leaving out the Firefox sdp modification or Chrome sdp modification; the video channel just won’t start. Sometimes, the video starts playing one-sided after a couple of minutes.
- Is Chrome with unified-plan as WebRTC client tested and expected to work with Asterisk 15/16 without using sdp-interop?
- What is the sdp modification
data.sdp.replace(/actpass/g, 'active');part for, why is it only required for Firefox?
- How would I need to apply sdp-interop to SIP.js in case Chrome with unified-plan is a no-go?