Browser-Phone icon indicating copy to clipboard operation
Browser-Phone copied to clipboard

Speaker issue

Open prathibhacdac opened this issue 2 years ago • 24 comments

Speaker is not working at both ends.

prathibhacdac avatar Apr 25 '22 04:04 prathibhacdac

There are a number of reason, you will have to explain further - could be as simple as not having interacting with the page yet.

InnovateAsterisk avatar Apr 28 '22 07:04 InnovateAsterisk

video is also not working now.

prathibhacdac avatar Apr 29 '22 07:04 prathibhacdac

This issue occurs when connected through mobile data(4G network). In the company's wifi its working fine.

prathibhacdac avatar Apr 29 '22 07:04 prathibhacdac

Some carriers block voip traffic, or firewall the connection. You can try request a voip APN, but first make sure that STUN is setup (On the Asterisk side) working correctly.

InnovateAsterisk avatar Apr 29 '22 13:04 InnovateAsterisk

How to check STUN server?

prathibhacdac avatar Apr 29 '22 14:04 prathibhacdac

https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/

InnovateAsterisk avatar Apr 29 '22 14:04 InnovateAsterisk

0.002 rtp host 1204296370 udp b0085051-30aa-4002-9f17-eab24e2acd62.local 55271 126 | 30 | 255 0 0 VhTn
0.518 rtp srflx 842163049 udp 111.92.32.12 55271 100 | 30 | 255 0 0 VhTn
39.827 Done

prathibhacdac avatar Apr 29 '22 14:04 prathibhacdac

Time Component Type Foundation Protocol Address Port Priority Mid MLine Index Username Fragment
0.023 rtp host 0 udp 4b10b754-9d4b-415f-83ea-50950913d681.local 57316 126 | 32512 | 255 0 0 3cd2b7ef
0.024 rtp host 2 tcp 4b10b754-9d4b-415f-83ea-50950913d681.local 9 125 | 32704 | 255 0 0 3cd2b7ef
0.024 rtcp host 0 udp 4b10b754-9d4b-415f-83ea-50950913d681.local 57317 126 | 32512 | 254 0 0 3cd2b7ef
0.024 rtcp host 2 tcp 4b10b754-9d4b-415f-83ea-50950913d681.local 9 125 | 32704 | 254 0 0 3cd2b7ef
0.115 rtp srflx 1 udp 111.92.32.21 57316 100 | 32543 | 255 0 0 3cd2b7ef
0.153 rtcp srflx 1 udp 111.92.32.21 57317 100 | 32543 | 254 0 0 3cd2b7ef
0.155 Done

prathibhacdac avatar Apr 30 '22 02:04 prathibhacdac

[Intervention] Slow network is detected. See https://www.chromestatus.com/feature/5636954674692096 for more details. Fallback font will be used while loading: https://dtd6jl0d42sve.cloudfront.net/lib/fonts/font_roboto/d-6IYplOFocCacKzxwXSOFtXRa8TVwTICgirnJhmVJw.woff2

prathibhacdac avatar May 03 '22 05:05 prathibhacdac

Will this happen due to slow network?

prathibhacdac avatar May 03 '22 05:05 prathibhacdac

   Unable to play audio file. DOMException: play() failed because the user didn't interact with the document first.

prathibhacdac avatar May 03 '22 05:05 prathibhacdac

Some carriers block voip traffic, or firewall the connection. You can try request a voip APN, but first make sure that STUN is setup (On the Asterisk side) working correctly.

But whatsapp audio and video calls are working fine. Google meet is also working.

prathibhacdac avatar May 03 '22 05:05 prathibhacdac

which audio and video encoding are used in Browser phone?

prathibhacdac avatar May 03 '22 05:05 prathibhacdac

srflx | udp | 111.92.32.12

This is a good result, you are able to determine the IP address from within your browser.

Also make sure that Asterisk is able to do the same (ICE setting must be applied to rtp.conf). I would assume that your Asterisk box is hosted via VPC or something. This NAT arrangement must be known to Asterisk, so that the Media address can be advertised.

Will this happen due to slow network?

https://stackoverflow.com/questions/40143098/why-does-this-slow-network-detected-log-appear-in-chrome

Unable to play audio file. DOMException: play() failed because the user didn't interact with the document first.

It is required that a user clicks or interacts with the page before the <audio> elements are able to play out. For example clicking "answer" will activate the audio. (however the inbound ring tone may not be able to play without a user clicking on the page). (Both iOS and Android have a flag to disable this requirement)

But whatsapp audio and video calls are working fine. Google meet is also working.

They probably don't use SIP.

which audio and video encoding are used in Browser phone?

It depends on the browser, and you should be able to see each type in the offer - Typically, Chrome will offer ULAW, ALAW and OPUS for audio and for video it it will be VP8 and VP9. (I know that Firefox prefers MP4)

InnovateAsterisk avatar May 03 '22 08:05 InnovateAsterisk

Also make sure that Asterisk is able to do the same (ICE setting must be applied to rtp.conf). I would assume that your Asterisk box is hosted via VPC or something. This NAT arrangement must be known to Asterisk, so that the Media address can be advertised.

ICE Setting is included in rtp.conf How to check this?

stunaddr=stun.l.google.com:19302

prathibhacdac avatar May 03 '22 10:05 prathibhacdac

stunaddr=stun.l.google.com:19302

This should be fine, but also check the nat settings especially this:

https://github.com/asterisk/asterisk/blob/892c06564f667ea438815afdac9ace929a346bab/configs/samples/rtp.conf.sample#L131

InnovateAsterisk avatar May 04 '22 12:05 InnovateAsterisk

I'm getting this issue in firefox:

WebRTC: ICE failed, add a TURN server and see about:webrtc for more details

prathibhacdac avatar May 06 '22 04:05 prathibhacdac

Added turn server in rtp.conf and the issue is now resolved.

prathibhacdac avatar May 06 '22 04:05 prathibhacdac

peer connection undefined. How to resolve this?

prathibhacdac avatar May 06 '22 09:05 prathibhacdac

audio is also not working.

prathibhacdac avatar May 06 '22 10:05 prathibhacdac

So, it was working, now its not?

What changed?

Do you have a console log of the "peer connection undefined" error. This is typically an issue if the offer fails to apply.

audio will probably not work if the peer connection is undefined.

InnovateAsterisk avatar May 06 '22 10:05 InnovateAsterisk

STUN is not working and what is the reason TURN server is required?

prathibhacdac avatar May 06 '22 10:05 prathibhacdac

So, it was working, now its not?

What changed?

Do you have a console log of the "peer connection undefined" error. This is typically an issue if the offer fails to apply.

audio will probably not work if the peer connection is undefined.

When I tested with vi network it worked. When tested with BSNL network this issue happens.

prathibhacdac avatar May 06 '22 11:05 prathibhacdac

How is connection getting established even without the STUN/TURN server?

prathibhacdac avatar May 06 '22 11:05 prathibhacdac