WebRTC no video input in echo test

Hello, The Asterisk server is displaying the following message:

[Apr 20 11:15:45] DEBUG [8254] [C-00000001]: res_rtp_asterisk.c: 5374 ast_rtcp_interpret: 0x7f8a5402cb50 - RTCP from 10.100.35.32:64290: Skipping record, received SSRC ‘2586354464’! = Expected '1230805524 ’

When I make a video call via WebRTC. The stream of audio and video are being sent, as I monitored via chrome://webrtc-internals, but only the audio stream is being received. By the debug message, the browser is sending the wrong SSRC number, but the question is this: Has the SDP negotiation protocol changed? Has the browser changed the way you multiplex your streams? Has the way of bundle the flows changed? Does any configuration change the way Asterisk receives SSRC? Any other explanation?

I use PJSIP channel

Was this previously working and now is not? What version of Asterisk is in use? Have you looked at the output of “rtp set debug on”? What is the console output?

Version 15.2.0

RTP output when Playback(demo-echotest):
Sent RTP packet to 10.100.35.32:56158 (via ICE) (type 00, seq 024116, ts 174400, len 000170)
Got RTP packet from 10.100.35.32:56158 (type 00, seq 012101, ts 548897533, len 000160)
Sent RTP packet to 10.100.35.32:56158 (via ICE) (type 00, seq 024117, ts 174560, len 000170)
Got RTP packet from 10.100.35.32:56158 (type 00, seq 012102, ts 548897693, len 000160)
Sent RTP packet to 10.100.35.32:56158 (via ICE) (type 00, seq 024118, ts 174720, len 000170)
Got RTP packet from 10.100.35.32:56158 (type 00, seq 012103, ts 548897853, len 000160)
Sent RTP packet to 10.100.35.32:56158 (via ICE) (type 00, seq 024119, ts 174880, len 000170)
Got RTP packet from 10.100.35.32:56158 (type 00, seq 012104, ts 548898013, len 000160)
Sent RTP packet to 10.100.35.32:56158 (via ICE) (type 00, seq 024120, ts 175040, len 000170)
Sent RTP packet to 10.100.35.32:56158 (via ICE) (type 00, seq 024121, ts 175200, len 000170)
Got RTP packet from 10.100.35.32:56158 (type 00, seq 012105, ts 548898173, len 000160)
Got RTP packet from 10.100.35.32:56158 (type 00, seq 012106, ts 548898333, len 000160)
Sent RTP packet to 10.100.35.32:56158 (via ICE) (type 00, seq 024122, ts 175360, len 000170)
Got RTP packet from 10.100.35.32:56158 (type 00, seq 012107, ts 548898493, len 000160)
Sent RTP packet to 10.100.35.32:56158 (via ICE) (type 00, seq 024123, ts 175520, len 000170)
Got RTP packet from 10.100.35.32:56158 (type 00, seq 012108, ts 548898653, len 000160)
Sent RTP packet to 10.100.35.32:56158 (via ICE) (type 00, seq 024124, ts 175680, len 000170)
Got RTP packet from 10.100.35.32:56158 (type 00, seq 012109, ts 548898813, len 000160)
Sent RTP packet to 10.100.35.32:56158 (via ICE) (type 00, seq 024125, ts 175840, len 000170)
Got RTP packet from 10.100.35.32:56158 (type 00, seq 012110, ts 548898973, len 000160)
Sent RTP packet to 10.100.35.32:56158 (via ICE) (type 00, seq 024126, ts 176000, len 000170)

RTP when Echo()
Sent RTP packet to 10.100.35.32:56158 (via ICE) (type 00, seq 024127, ts 548899128, len 000170)
Got RTP packet from 10.100.35.32:56158 (type 00, seq 012112, ts 548899293, len 000160)
Sent RTP packet to 10.100.35.32:56158 (via ICE) (type 00, seq 024128, ts 548899288, len 000170)
Got RTP packet from 10.100.35.32:56158 (type 00, seq 012113, ts 548899453, len 000160)
Sent RTP packet to 10.100.35.32:56158 (via ICE) (type 00, seq 024129, ts 548899448, len 000170)
Got RTP packet from 10.100.35.32:56158 (type 00, seq 012114, ts 548899613, len 000160)
Sent RTP packet to 10.100.35.32:56158 (via ICE) (type 00, seq 024130, ts 548899608, len 000170)
Got RTP packet from 10.100.35.32:56158 (type 00, seq 012115, ts 548899773, len 000160)
Sent RTP packet to 10.100.35.32:56158 (via ICE) (type 00, seq 024131, ts 548899768, len 000170)
Got RTP packet from 10.100.35.32:56158 (type 00, seq 012116, ts 548899933, len 000160)
Sent RTP packet to 10.100.35.32:56158 (via ICE) (type 00, seq 024132, ts 548899928, len 000170)
Got RTP packet from 10.100.35.32:56158 (type 00, seq 012117, ts 548900093, len 000160)
Sent RTP packet to 10.100.35.32:56158 (via ICE) (type 00, seq 024133, ts 548900088, len 000170)
Got RTP packet from 10.100.35.32:56158 (type 00, seq 012118, ts 548900253, len 000160)
Sent RTP packet to 10.100.35.32:56158 (via ICE) (type 00, seq 024134, ts 548900248, len 000170)
Got RTP packet from 10.100.35.32:56158 (type 00, seq 012119, ts 548900413, len 000160)
Sent RTP packet to 10.100.35.32:56158 (via ICE) (type 00, seq 024135, ts 548900408, len 000170)
Got RTP packet from 10.100.35.32:56158 (type 00, seq 012120, ts 548900573, len 000160)
Sent RTP packet to 10.100.35.32:56158 (via ICE) (type 00, seq 024136, ts 548900568, len 000170)
Got RTP packet from 10.100.35.32:56158 (type 00, seq 012121, ts 548900733, len 000160)
Sent RTP packet to 10.100.35.32:56158 (via ICE) (type 00, seq 024137, ts 548900728, len 000170)
Got RTP packet from 10.100.35.32:56158 (type 00, seq 012122, ts 548900893, len 000160)
Sent RTP packet to 10.100.35.32:56158 (via ICE) (type 00, seq 024138, ts 548900888, len 000170)
Got RTP packet from 10.100.35.32:56158 (type 00, seq 012123, ts 548901053, len 000160)
Sent RTP packet to 10.100.35.32:56158 (via ICE) (type 00, seq 024139, ts 548901048, len 000170)
Got RTP packet from 10.100.35.32:56158 (type 00, seq 012124, ts 548901213, len 000160)
Sent RTP packet to 10.100.35.32:56158 (via ICE) (type 00, seq 024140, ts 548901208, len 000170)
Got RTP packet from 10.100.35.32:56158 (type 00, seq 012125, ts 548901373, len 000160)

There is no video flowing to echo back. What is the configuration as well? Have you confirmed that things are correct in the Javascript to actually have a video source?

pjsip.conf:
[10]
type=endpoint
callerid=TEST
context=voipuema
disallow=all
allow=ulaw
allow=alaw
allow=opus
allow=VP8
allow=VP9
allow=h264
auth=10
aors=10
dtls_private_key=/etc/asterisk/keys/asterisk.key
dtls_cert_file=/etc/asterisk/keys/asterisk.crt
webrtc=yes
use_avpf=yes
media_encryption=dtls
dtls_verify=fingerprint
dtls_setup=actpass
ice_support=yes
media_use_received_transport=yes
rtcp_mux=yes

[10]
type=auth
auth_type=userpass
password=pass
username=10

[10]
type=aor
max_contacts=1

Send audio:
Statistics ssrc_401172860_send
timestamp 20/04/2018 14:32:57
aecDivergentFilterFraction 0.03999999910593033
audioInputLevel 1141
bytesSent 216720
mediaType audio
packetsLost 0
packetsSent 1260
ssrc 401172860
totalAudioEnergy 0
totalSamplesDuration 0
transportId Channel-audio-1
googCodecName PCMU
googEchoCancellationEchoDelayStdDev 4
googJitterReceived 2
googResidualEchoLikelihood 0.1280982941389084
googResidualEchoLikelihoodRecentMax 0.16651341319084167
googRtt 1
googTrackId c4c57cc1-c480-43ea-9adb-44c7ceae8571
googTypingNoiseState false

Send vídeo:
Statistics ssrc_2166588779_send
timestamp 20/04/2018 14:33:18
bytesSent 1737449
codecImplementationName libvpx
framesEncoded 1380
mediaType video
packetsLost 0
packetsSent 2187
qpSum 56627
ssrc 2166588779
transportId Channel-audio-1
googAdaptationChanges 0
googAvgEncodeMs 3
googBandwidthLimitedResolution false
googCodecName VP8
googContentType realtime
googCpuLimitedResolution false
googEncodeUsagePercent 10
googFirsReceived 0
googFrameHeightSent 480
googFrameRateInput 30
googFrameRateSent 30
googFrameWidthSent 640
googHasEnteredLowResolution false
hugeFramesSent 1
googNacksReceived 0
googPlisReceived 0
googRtt 0
googTrackId 78587f40-16cb-4ebc-bd92-79d2856ecec8

Receive audio:
Statistics ssrc_297062477_recv
timestamp 20/04/2018 14:33:39
audioOutputLevel 780
bytesReceived 577748
mediaType audio
packetsLost 0
packetsReceived 3359
ssrc 297062477
totalAudioEnergy 3.158535957336426
totalSamplesDuration 67.30000305175781
transportId Channel-audio-1
googAccelerateRate 0
googCodecName PCMU
googCurrentDelayMs 74
googDecodingCNG 0
googDecodingCTN 6730
googDecodingCTSG 0
googDecodingMuted 7
googDecodingNormal 6717
googDecodingPLC 5
googDecodingPLCCNG 8
googExpandRate 0
googJitterBufferMs 25
googJitterReceived 2
googPreemptiveExpandRate 0
googPreferredJitterBufferMs 20
googSecondaryDecodedRate 0
googSecondaryDiscardedRate 0
googSpeechExpandRate 0
googTrackId 55d67b1c-b653-4f99-9f77-d468f5977e29
googCaptureStartNtpTimeMs 3733262466590

Receive vídeo:
Statistics ssrc_63637378_recv
timestamp 20/04/2018 14:34:08
bytesReceived 0
codecImplementationName unknown
framesDecoded 0
mediaType video
packetsLost 0
packetsReceived 0
ssrc 63637378
transportId Channel-audio-1
googCaptureStartNtpTimeMs 0
googCodecName
googContentType realtime
googCurrentDelayMs 0
googDecodeMs 0
googFirsSent 0
googFrameHeightReceived 0
googFrameRateDecoded 0
googFrameRateOutput 0
googFrameRateReceived 0
googFrameWidthReceived 0
googInterframeDelayMax -1
googJitterBufferMs 0
googMaxDecodeMs 0
googMinPlayoutDelayMs 0
googNacksSent 0
googPlisSent 0
googRenderDelayMs 10
googTargetDelayMs 0
googTrackId f09e90ee-3acb-4ba9-970f-12c5e972e356

I’d suggest digging in deeper then, looking at the ICE negotiation and other aspects.

By using other peer to call (with Grandstream Wave app Android), I can see vídeo from app Android in my browser, but no vídeo from browser to app Android

Debugging WebRTC problems like this isn’t something that can really be done in a community forum like this. There are too many variables and you basically have to isolate and identify where things are failing. In this case the video isn’t even reaching Asterisk it appears so you have to figure out why.

Thanks a lot Joshua, i will keep debugging

Apparently, the browser is sending two streams with 2 different SSRC’s when Asterisk is expecting the same SSRC for both. Asterisk ignores one of them, which is the video.

Asterisk isn’t expecting the same for both. Each is different. It should bundle the streams together over the same transport, using different SSRCs. The original message you provided isn’t about RTP either - it’s about RTCP, and is a bug that will be fixed in the next release.

Thanks again, I’m waiting for the new version so I can update my server