InnovateAsterisk / Browser-Phone

A fully featured browser based WebRTC SIP phone for Asterisk
https://www.innovateasterisk.com
GNU Affero General Public License v3.0
517 stars 256 forks source link

browser-phone to Grandstream videoconf unit #95

Open vieridipaola opened 4 years ago

vieridipaola commented 4 years ago

Hi,

I have a Grandstream GVC3200 registered on an old Asterisk server. I have a softphone connected to the same SIP server and I can call the videoconf unit, and see its video stream. H.264 is in use.

If I try to call the Grandstream unit from a browser-phone client connected to a newer Asterisk system (both Asterisks are "trunked" with IAX2), I receive a black video stream on the browser-phone.

How can I debug this? Where should I take a SIP trace? How can I tell if the video codec has been allowed?

To make things easier, I will try to register the Grandstream unit on the new Asterisk system so the video call from browser-phone to GVC is within the same system. In the meantime, any pointers would be greatly appreciated.

InnovateAsterisk commented 4 years ago

I haven't actually tried the browser phone with many hardware phones.... I have tested it in: Linphone, Zoiper and Groundwire - they all work fine (with varying degrees of quality). (Groundwire seems to be the best so far.)

Hardware device wise, the only one im actually testing with is a little project i'm busy with that is; building a 3D printed desktop phone with PJSIP, Python and of course a Raspberry Pi. With this however, video also works fine.

Video codec is possibly the only issue - I have noticed that VP9 is not yet supported fully, and that VP8 should rather be used, with H264 as a fallback. It seems the preference now days is to use VP8/9. And of course video cannot be transcoded (unlike audio).

InnovateAsterisk commented 4 years ago

How can I debug this?

There is SIP debugging on the Asterisk CLI

Where should I take a SIP trace?

In the browser phone, go to development tools, Network Tab, then select the ws entry, can go to Frames. This shows the SIP trace between Asterisk and the Browser. Tracing the other parts of the call would need to be done on the server.

How can I tell if the video codec has been allowed?

Firstly, if you receive a call on the browser phone and the answer window says "Answer With Video", then you should expect a video stream and the browser will do what it needs to and show the video. If not, for each leg of the call, check the video codec is enabled and consistent, especially the IAX trunk. (Make sure videosupport = yes)

InnovateAsterisk commented 4 years ago

Worth a read: https://www.researchgate.net/publication/322409522_Drawbacks_of_inter-asterisk_exchange_protocol_in_V_VoIP

vieridipaola commented 4 years ago

Thank you very much for the heads up on IAX2 trunking. I haven't had the time to dig into this, but a quick test shows me that if I try to dial through IAX2 (even within LAN), video fails. So I registered the Grandstream unit on the same Asterisk server where the Browser-Phones are (so SIP2SIP com only) and it worked (video&audio). Even in this scenario (with the GVC available at PJSIP/GrandstreamUnit), if I run Dial(PJSIP/GrandstreamUnit&IAX2/whatever/GrandstreamUnit) I still get a black video stream. So the mere fact of calling IAX2 even though it is not effectively used is enough to cause this, ie. removing "&IAX2/whatever/GrandstreamUnit" in the above Dial() works for video... Odd enough. I grabbed some SIP traces, but I might not dwell too much on this because I might not need to use the IAX2 trunk for video calls. I might also try to set up a SIP trunk instead.

BTW, I went to "development tools, Network Tab, then select the ws entry, can go to Frames", but I didn't find the " can go to Frames" part -- not sure what you meant by that. I'm using Chrome for now. Anyway, if I select "WS" websockets, nothign is displayed during an active call. Other filters do show the network activity, but not for WS. Anyway, I'll try this on another browser.

Thanks again!

vieridipaola commented 4 years ago

Oh and yes, I enabled video support in IAX2, of course.

InnovateAsterisk commented 4 years ago

My bad... its called "Messages"

image

InnovateAsterisk commented 4 years ago

I would suggest using SIP trunking for the video calls - unless you are using some overly complicated Natting scenarios that SIP cannot manage, im not sure if there are any advantages to using IAX. IMHO