Is there a way to get “direct media” between 2 zulu endpoints ? WebRTC should normally provide end-to-end RTP to both endpoints, but this is not the case for Zulu : The FreePBX server stays in the middle for the RTP streams.
If there is a way to solve this, then I have a second question : how to get direct media between a SIP and a Zulu (WebRTC) client ?
The reason for my question is that end-to-end RTP is needed for hosted environments. For an on-premise service this is less important, but for a hosted service it is mandatory to keep RTP local. So like for SIP clients also WebRTC clients and mix of both types need direct media for a hosted PBX service.
You can’t do this with Zulu. Also inside the PBX you loose lots of features when asterisk is not in the media.
That’s really bad news ! The loss of features like recording and in-band dtmf invoked services are becoming less important compared to chat, presence and collaboration in the UC world. And this world is evolving more and more to a hosted service, implying that direct media is a must I order to avoid excessive and unnecessary RTP bandwidth on the WAN link. So I think that the end to end RTP possibility - that is normally standard for Web RTC - should at least be an option as it is for SIP, and even for SIP to WebRTC.
You can go play with the device under devices and see if you can get it to work the way you want.
You won’t be able to do SIP to WebRTC. Something has to mediate those two different standards. WebRTC to WebRTC may be possible but once it’s Zulu to a SIP phone it would have to use asterisk until SIP phones can talk all the codecs that webrtc uses. You could i guess force it all to ulaw. Also not sure how SRTP would play a role here. Never tried direct media when SRTP.
WebRTC to WebRTC is indeed the first step. I can bring up the SIP to WebRTC in the Asterisk community.
For the WebRTC part - do you mean that I need to change to user device mode in stead of extension mode ? Currently I use extension mode and then I do not find any WebRTC settings.
You don’t need to change to device mode. You can view devices in extension mode. Just tack on display=devices
is that a tab under applications/extensions ? I do not see a devices tab…
It’s not a tab. You must type it manually like I said “just tack on”
Do note that webrtc rfc (and asterisk) only supports G.711, OPUS and VP8 for codecs. Which is where tony is coming from saying you won’t get it to work. But if your provider supports any of those it’s worth a go. RTP media travels the same way as a normal sip phone. It’s not over the websocket. The websocket is for signaling only. You are just significant limited by codec support.
I didn’t know you could switch this way between extension, user and device mode - thanks for that.
Regarding my intention to use direct media for a Zulu to Zulu call I’m still in the dark. Even with display=devices I don’t see any WebRTC parameter comparable to the “canreinvite” for chan-sip.
In fact I’m using PJSIP for all my extensions, and have configured 2 of them with Zulu as well. I noticed that even for PJSIP there is no “canreinvite” parameter like for chan-sip, but nevertheless for PJSIP direct media is working if dial options are empty and no NAT and no recording is set.
Note that my FreePBX is not installed on-premise but in a remote Data Center, and I would like to get direct media for all local calls between extensions at the customer site. That is possible for chan-sip of PJSIP devices, but would like the same for Zulu softclients.
Regarding codecs I’m ok with G.711 - as this is the preferred one for extension to extension calling.
I will try to get a solution first via the Asterisk community, because even adding “direct_media=yes” in the pjsip.endpoint.conf file does not resolve the issue. As long as Asterisk does not provide a solution then FreePBX can’t do anything. Probably the assumption is that Asterisk needs to stay in the middle for SIP to WebRTC media conversion, although they both use RTP for media, so in theory it should be possible if direct media is accepted by both endpoint types and if the codec set for both endpoints is matching (and even only G.711 would be fine).
You’re going to have more trouble with the fact that strp is a requirement than the codecs.
I had indeed the same issue with PJSIP or chan-SIP using SRTP : due to 2-leg key negotiation (endpoint-server for each leg) it was not possible to use Direct Media when media encryption is needed.
I hope that some day there will be a solution - maybe ZRTP ?
For the time being I would already be happy if WebRTC could work with normal RTP as well.
I created a topic in the Asterisk community : https://community.asterisk.org/t/webrtc-and-direct-media-for-hosted-pbx-topology/72571
Looks like there is not much interest from Asterisk community in hosting.
I’m afraid that Asterisk will miss the cloud/SAAS train and lose market share in the near furture …
Not sure how you came to that conclusion. Asterisk has gone to great lengths to make itself cloud service friendly.
Now, it isn’t going to bend itself to any specific company’s Cloud Services.
Note that I personally hate cloud services for telephony, but I come from a military background, so the long, circuitous supply train from the service provider to the end user make me immediately wary. Also, direct media makes things like fiduciary call monitoring and call recording impossible.
If I was running a drug cartel or terrorist cell, I’d love for Asterisk to support these technologies, but since I don’t, I’m not going to get too concerned about it.
Well, there are hundreds of webrtc communication products and services out there. I don’t think Digium wants to compete with them. Asterisk is a PBX, first, with strong interop capabilities. If your core business is webrtc then use a product that focuses there, and attach Asterisk to it if you also want some pbx features.
In my opinion Direct Media is more important than recording and some other outdated PBX features. In fact monitoring is still possible if signalling remains hooked, and even recording can still be done for exceptional situations - but normal PBX applications do not record by default anyway…
Without Direct Media all calls - even local extension to extension calls - will flow over the WAN interface in double direction, and that’s killing the benefitl of cost reduction via virtualization + hosting.
As said, for SIP+RTP (non-encrypted media) this is possible with Asterisk, but not for WebRTC and SIP+SRTP (encrypted media), and that’s a pitty as it obstructs hosting by increasing WAN cost (+ QOS !!!)
Simple answer, if you don’t need PBX features , then just don’t rely on one (asterisk is a B2BUA and always will be, so no directmedia, that would go for all b2bua’s) apparently you just do not need that PBX facility, so use a more appropriate sip proxy for routing. Maybe start with
Agreed; it sounds like your needs are far enough from Asterisk’s functionality and goals that you should be looking for a different solution.
Also agreed it is very often the lack of understanding of why trying to fit a square peg into a round hole rarely works well.