WSS and ICE Issues

I’ve been deploying a WebRTC platform based on WSS for several hours, I could have some success but not enough for a proper production environment:

First insight: Is impossible to deploy under Ubuntu 14.04 due to UUID package. I’ve not try to use latest tarball but with default apt repository package ICE does not work

But ICE still brings some of issues:
After 5 seconds of the call establishment ICE detects the route and the audio starts

You can see the RTP debug going back and forth, but the (with ICE) only starts after a few seconds (>5 seconds on average)

In the SIP debug says at that point:
> 0x7f21f003d730 – Probation passed - setting RTP source address to my_client_ip:59861
> 0x7f21f003d730 – Probation passed - setting RTP source address to my_client_ip:59861

I can’t believe this ICE mechanism is so bad under Asterisk.
I have both TURN and STUN configured in the rtp.conf file
And the worst part is that I’ve been testing over 3G mobile phone with Chrome and a public server in the other endpoint, both transmitting over public IP without a NAT in between

Before, I used to play with Kamailio and RTPEngine, and this issues did not happen, far better connectivity.

But since I’m still Asterisk “fan”, I wanted to test, if Asterisk under the 13.1-cert, was better performing than 2 years ago with the 11, but is still frustrating.

Anyone has experienced better performance?

PD: Worst part came after Chrome 42, they forced HTTPS and WSS was a must, so tutorials and troubleshooting guides like navaismo became obsolete:
viewtopic.php?f=1&t=90167

PD2: Is this forum active for complex questions?
I saw this guy
[Asterisk 11.20.0 running with WebRTC (Please Help!))
Trying to solve the first issue I mentioned (about the UUID failure with Debian based distros) and he found -part- of the solution in stackoverflow:
stackoverflow.com/questions/3388 … -attribute

I used to work with webrtc, successfully on Asterisk 13 following the official guide on the Asterisk wiki. but since chrome forced to use https, I had no luck using wss. It seems Asterisk doesn’t work fine using wss or I was missing something I think the second is the answer. I just quit to wasting my time on that , because there is lack of information and I think the solution to this problem is beyond a google search.

Actually I could manage to make it work under TLS and WSS (not with all webrtc sip clients because Asterisk is not following the RFC7118 properly)
tools.ietf.org/html/rfc7118

(and the creators are extremely strict on their implementations)

Fortunately we have Mamadou and Doubango’s team that are doing a great job to adapt their software to Asterisk as far as they can :smile: (thanks to sipml5 team!). Also SIP.JS (JSSIP fork) is doing great (a lot of coding is needed for some functionality like early media but can be achieved)

As you mention, for some reason WebRTC for Asterisk is not something you can google it down, eventually the WebRTC popularity is not high in Asterisk users and as navaismo said, is not something everyone.

I will keep investigating about this. Worst part is managing the NAT issues. More or less the same issue than most of the public Asterisk servers typically face, but worse (because ICE negotiations seem to take far more than using STUN direct connection via TLS instead of WSS…anyway this affects to all websockets servers)

Try to get the new patches and bugs in the JIRA page for WebRTC and Asterisk(without media gateways). As the developers mentioned some months ago WebRTC is not a priority of the project since there is not an official RFC and google changes the structure so devs are not much interested in fix each month an new issue. Although that, there are many patches in JIRA that will help you a lot to hava a “native” connectivity with your stacks and asterisk.

If you don´t want to spend a lot time just use the media gateway is very easy to deploy and the wss configuration is very easy too if you use valid certificates

[quote=“navaismo”]Try to get the new patches and bugs in the JIRA page for WebRTC and Asterisk(without media gateways). As the developers mentioned some months ago WebRTC is not a priority of the project since there is not an official RFC and google changes the structure so devs are not much interested in fix each month an new issue. Although that, there are many patches in JIRA that will help you a lot to hava a “native” connectivity with your stacks and asterisk.

If you don´t want to spend a lot time just use the media gateway is very easy to deploy and the wss configuration is very easy too if you use valid certificates[/quote]

What do you mean with “the media gateway”? Another Media Gateway rather than implementing via Asterisk? I’ve been doing this with RTPEngine + Kamailio. But I wanted to give a go to Asterisk.
I was not aware of Asterisk team decission (But for some reason I was figuring it out, since I saw in the Asterisk 13 updates, webrtc was not a big topic compared to others)

The doubango’s media gateway: WebRTC2SIP which handle the transition between websockets and SIP. It is a life saver and no mather which version of asterisk you are using(I only tested from 1.8 to 13) it connects the websocket and SIP nicely but there are a lot of work to do.