InnovateAsterisk / Browser-Phone

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

video is not getting displayed #329

Open prathibhacdac opened 1 year ago

prathibhacdac commented 1 year ago

console log: Begin MixMonitor Recording SIP/10100-00000010 == DTLS ECDH initialized (automatic), faster PFS enabled == DTLS ECDH initialized (automatic), faster PFS enabled == Using SIP VIDEO CoS mark 6 == Using SIP RTP TOS bits 184 == Using SIP RTP CoS mark 5 -- Called SIP/6282223525 -- SIP/6282223525-00000011 is ringing [Oct 4 12:21:37] WARNING[18158][C-00000008]: translate.c:407 framein: no samples for opustolin -- SIP/6282223525-00000011 answered SIP/10100-00000010 -- Channel SIP/6282223525-00000011 joined 'simple_bridge' basic-bridge <2571318a-2563-4fda-991d-5cde46f6649b> -- Channel SIP/10100-00000010 joined 'simple_bridge' basic-bridge <2571318a-2563-4fda-991d-5cde46f6649b>

0x7f01780564d0 -- Strict RTP learning after ICE completion 0x7f0178020420 -- Strict RTP learning after ICE completion 0x7f0178020420 -- Strict RTP switching to RTP target address 10.176.17.207:54799 as source 0x7f01780564d0 -- Strict RTP switching to RTP target address 10.176.17.207:54789 as source 0x7f0178020420 -- Strict RTP learning complete - Locking on source address 10.176.17.207:54799 0x7f01780564d0 -- Strict RTP learning complete - Locking on source address 10.176.17.207:54789 0x7f0188040ea0 -- Strict RTP learning after ICE completion 0x7f0188019410 -- Strict RTP learning after ICE completion -- Channel SIP/10100-00000010 left 'simple_bridge' basic-bridge <2571318a-2563-4fda-991d-5cde46f6649b> -- Channel SIP/6282223525-00000011 left 'simple_bridge' basic-bridge <2571318a-2563-4fda-991d-5cde46f6649b> == Spawn extension (dial-extension, s, 3) exited non-zero on 'SIP/10100-00000010' == MixMonitor close filestream (mixed) == End MixMonitor Recording SIP/10100-00000010

prathibhacdac commented 1 year ago

Closing Line: 3 phone.js:8320:13 Selecting previously selected buddy... 16648662586892347 phone.js:8302:21 Selecting Buddy: 6282223525 phone.js:9295:13 Selecting Line : 4 phone.js:8003:13 INVITE (video): 6282223525@bp.erss.in phone.js:4879:13 Tue Oct 04 2022 12:23:44 GMT+0530 (India Standard Time) | sip.Inviter | Inviter.invite sip-0.20.0.min.js:2:127164 Tue Oct 04 2022 12:23:45 GMT+0530 (India Standard Time) | sip.Inviter | Session s2rtn2igdgo4kgkg3f135nj5qrdncm transitioned to state Establishing sip-0.20.0.min.js:2:127164 Tue Oct 04 2022 12:23:45 GMT+0530 (India Standard Time) | sip.Inviter | Inviter.onTrying sip-0.20.0.min.js:2:127164 Tue Oct 04 2022 12:23:45 GMT+0530 (India Standard Time) | sip.invite-dialog | INVITE dialog s2rtn2igdgo4kgkg3f135nj5qrdncmas6b34b535 constructed sip-0.20.0.min.js:2:127164 Tue Oct 04 2022 12:23:45 GMT+0530 (India Standard Time) | sip.Inviter | Inviter.onProgress sip-0.20.0.min.js:2:127164 Call Progress: 180 phone.js:2383:13 Audio: media/Tone_EarlyMedia-US.mp3 phone.js:2397:17 Tue Oct 04 2022 12:23:49 GMT+0530 (India Standard Time) | sip.Inviter | Inviter.onAccept sip-0.20.0.min.js:2:127164 Adding Remote Audio Track phone.js:2651:25 Adding Remote Video Track - live MID: 1 phone.js:2657:29 Added Video Element MID: 1 phone.js:2735:25 Adding Remote Audio Track phone.js:2651:25 Adding Remote Video Track - live MID: 1 phone.js:2657:29 Added Video Element MID: 1 phone.js:2735:25 Tue Oct 04 2022 12:23:49 GMT+0530 (India Standard Time) | sip.invite-dialog | INVITE dialog s2rtn2igdgo4kgkg3f135nj5qrdncmas6b34b535 sending ACK request sip-0.20.0.min.js:2:127164 Tue Oct 04 2022 12:23:49 GMT+0530 (India Standard Time) | sip.Inviter | Session s2rtn2igdgo4kgkg3f135nj5qrdncm transitioned to state Established sip-0.20.0.min.js:2:127164 Applying limit for Bandwidth to: 2048kb per second phone.js:2293:29 Creating call recorder... phone.js:5221:13 Adding sender audio track to record: Microphone (B525 HD Webcam) phone.js:5227:21 Adding receiver audio track to record: remote audio phone.js:5233:21 Starting Call Recording 16648664290451E69 phone.js:5417:13 Creating LocalAudio AudioContext on line 4 phone.js:3150:13 Adding Track to Monitor: Microphone (B525 HD Webcam) phone.js:3166:25 SoundMeter connecting... phone.js:3358:17 SoundMeter for LocalAudio Connected, displaying levels for Line: 4 phone.js:3239:17 Creating RemoteAudio AudioContext on Line:4 phone.js:2894:13 SoundMeter connecting... phone.js:3358:17 SoundMeter for RemoteAudio Connected, displaying levels for Line: 4 phone.js:3038:17 Hide Video - live MID: 1

prathibhacdac commented 1 year ago

From my company network it is working, but not working from my mobile network.

prathibhacdac commented 1 year ago

From mobile n/w, Trickle ice is displaying the IP address.

prathibhacdac commented 1 year ago

What to do if video is not getting displayed? Unable to identify the reason for not getting video.

InnovateAsterisk commented 1 year ago

It looks like you are using chan_sip. I would consider using pjsip. Because chan_sip has not been developed in years, I'm not sure if chan_sip is as capable when it comes to addressing some of the features of WebRTC. What comes to mind with this case is bundle. You can read more there: https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/RTCPeerConnection When audio is working, but video is not, then it means that audio and video are not being sent over the same port. I would try to ensure that bundle is in place.

Another NAT feature of RTP is to use rtp_symmetric. Again, It's been many years since i have worked on chan_sip, but in pjsip, this is possible. What it basically does is use the same UDP port for both sending and receiving RTP packets.

To ensure that RTP audio and video works as expected, I generally use the following settings in pjsip: webrtc=yes (covers: rtcp_mux, use_avpf, ice_support, use_received_transport, media_encryption, dtls_auto_generate_cert, dtls_verify, dtls_setup, bundle) rtp_symmetric = yes force_rport = yes direct_media = no rewrite_contact = yes

Note, the documents don't specifically mention bundle = yes, but I believe this is enabled, otherwise just set it.