Wowza Streaming Engine for WebRTC over AWS EC2

I did the set-up for WebRTC demo on my local machine and it worked fine.

Now trying to do the similar set-up on AWS EC2 instance with static IP. The publish seems to work fine but the play does not work. I do not see any new stream in the incoming streams section of the webrtc app.

Seems some issue with STUN server.

Please suggest what other configurations needs to be done to achieve this.

Posting the browser logs for publish -

startPublisher: wsURL:wss://5a942e304e860.streamlock.net/webrtc-session.json streamInfo:{“applicationName”:“webrtc”,“streamName”:“myStreamPub”,“sessionId”:"[empty]"} webrtc.js:176 wsConnection.onopen webrtc.js:574 Resuling SDP: v=0 o=- 5559670091385789145 2 IN IP4 127.0.0.1 s=- t=0 0 a=group:BUNDLE audio video a=msid-semantic: WMS 24gqivTUDfnNEEVh6mHlCuyVCDeCAO6Ipamv m=audio 9 UDP/TLS/RTP/SAVPF 111 c=IN IP4 0.0.0.0 a=rtcp:9 IN IP4 0.0.0.0 a=ice-ufrag:fQNx a=ice-pwd:fHBaWbUmQomRFHclCGDh08IF a=ice-options:trickle a=fingerprint:sha-256 17:2D:13:3B:C4:3C:73:6D:2A:70:17:50:E6:51:AD:AA:A3:3D:84:21:1C:DA:F3:8D:53:CF:20:B1:E2:7C:7F:9F a=setup:actpass a=mid:audio a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level a=sendrecv a=rtcp-mux a=rtpmap:111 opus/48000/2 a=fmtp:111 x-google-min-bitrate=64;x-google-max-bitrate=64 a=rtcp-fb:111 transport-cc a=fmtp:111 minptime=10;useinbandfec=1 a=rtpmap:111 opus/48000/2 a=fmtp:111 x-google-min-bitrate=64;x-google-max-bitrate=64 a=rtcp-fb:111 transport-cc a=fmtp:111 minptime=10;useinbandfec=1 a=rtpmap:111 opus/48000/2 a=fmtp:111 x-google-min-bitrate=64;x-google-max-bitrate=64 a=rtcp-fb:111 transport-cc a=fmtp:111 minptime=10;useinbandfec=1 a=rtpmap:111 opus/48000/2 a=fmtp:111 x-google-min-bitrate=64;x-google-max-bitrate=64 a=rtcp-fb:111 transport-cc a=fmtp:111 minptime=10;useinbandfec=1 a=ssrc:938907252 cname:GLT/pdXO7CvtnqEJ a=ssrc:938907252 msid:24gqivTUDfnNEEVh6mHlCuyVCDeCAO6Ipamv 830ed5f5-e16b-46f3-8f03-0968d812bcbe a=ssrc:938907252 mslabel:24gqivTUDfnNEEVh6mHlCuyVCDeCAO6Ipamv a=ssrc:938907252 label:830ed5f5-e16b-46f3-8f03-0968d812bcbe m=video 9 UDP/TLS/RTP/SAVPF 102 c=IN IP4 0.0.0.0 a=rtcp:9 IN IP4 0.0.0.0 a=ice-ufrag:fQNx a=ice-pwd:fHBaWbUmQomRFHclCGDh08IF a=ice-options:trickle a=fingerprint:sha-256 17:2D:13:3B:C4:3C:73:6D:2A:70:17:50:E6:51:AD:AA:A3:3D:84:21:1C:DA:F3:8D:53:CF:20:B1:E2:7C:7F:9F a=setup:actpass a=mid:video a=extmap:2 urn:ietf:params:rtp-hdrext:toffset a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time a=extmap:4 urn:3gpp:video-orientation a=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01 a=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay a=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type a=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/video-timing a=sendrecv a=rtcp-mux a=rtcp-rsize a=rtpmap:102 H264/90000 a=fmtp:102 x-google-min-bitrate=360;x-google-max-bitrate=360 a=rtcp-fb:102 goog-remb a=rtcp-fb:102 transport-cc a=rtcp-fb:102 ccm fir a=rtcp-fb:102 nack a=rtcp-fb:102 nack pli a=fmtp:102 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f a=rtpmap:102 H264/90000 a=fmtp:102 x-google-min-bitrate=360;x-google-max-bitrate=360 a=rtcp-fb:102 goog-remb a=rtcp-fb:102 transport-cc a=rtcp-fb:102 ccm fir a=rtcp-fb:102 nack a=rtcp-fb:102 nack pli a=fmtp:102 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f a=rtpmap:102 H264/90000 a=fmtp:102 x-google-min-bitrate=360;x-google-max-bitrate=360 a=rtcp-fb:102 goog-remb a=rtcp-fb:102 transport-cc a=rtcp-fb:102 ccm fir a=rtcp-fb:102 nack a=rtcp-fb:102 nack pli a=fmtp:102 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f a=rtpmap:102 H264/90000 a=fmtp:102 x-google-min-bitrate=360;x-google-max-bitrate=360 a=rtcp-fb:102 goog-remb a=rtcp-fb:102 transport-cc a=rtcp-fb:102 ccm fir a=rtcp-fb:102 nack a=rtcp-fb:102 nack pli a=fmtp:102 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f a=ssrc-group:FID 321842428 1779709374 a=ssrc:321842428 cname:GLT/pdXO7CvtnqEJ a=ssrc:321842428 msid:24gqivTUDfnNEEVh6mHlCuyVCDeCAO6Ipamv 56c72fe3-26da-4c2d-99b0-5c0984a4d8a4 a=ssrc:321842428 mslabel:24gqivTUDfnNEEVh6mHlCuyVCDeCAO6Ipamv a=ssrc:321842428 label:56c72fe3-26da-4c2d-99b0-5c0984a4d8a4 a=ssrc:1779709374 cname:GLT/pdXO7CvtnqEJ a=ssrc:1779709374 msid:24gqivTUDfnNEEVh6mHlCuyVCDeCAO6Ipamv 56c72fe3-26da-4c2d-99b0-5c0984a4d8a4 a=ssrc:1779709374 mslabel:24gqivTUDfnNEEVh6mHlCuyVCDeCAO6Ipamv a=ssrc:1779709374 label:56c72fe3-26da-4c2d-99b0-5c0984a4d8a4 webrtc.js:347 gotDescription: {“sdp”:{“type”:“offer”,“sdp”:“v=0\r\no=- 5559670091385789145 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE audio video\r\na=msid-semantic: WMS 24gqivTUDfnNEEVh6mHlCuyVCDeCAO6Ipamv\r\nm=audio 9 UDP/TLS/RTP/SAVPF 111\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:fQNx\r\na=ice-pwd:fHBaWbUmQomRFHclCGDh08IF\r\na=ice-options:trickle\r\na=fingerprint:sha-256 17:2D:13:3B:C4:3C:73:6D:2A:70:17:50:E6:51:AD:AA:A3:3D:84:21:1C:DA:F3:8D:53:CF:20:B1:E2:7C:7F:9F\r\na=setup:actpass\r\na=mid:audio\r\na=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\na=sendrecv\r\na=rtcp-mux\r\na=rtpmap:111 opus/48000/2\r\na=fmtp:111 x-google-min-bitrate=64;x-google-max-bitrate=64\r\na=rtcp-fb:111 transport-cc\r\na=fmtp:111 minptime=10;useinbandfec=1\r\na=rtpmap:111 opus/48000/2\r\na=fmtp:111 x-google-min-bitrate=64;x-google-max-bitrate=64\r\na=rtcp-fb:111 transport-cc\r\na=fmtp:111 minptime=10;useinbandfec=1\r\na=rtpmap:111 opus/48000/2\r\na=fmtp:111 x-google-min-bitrate=64;x-google-max-bitrate=64\r\na=rtcp-fb:111 transport-cc\r\na=fmtp:111 minptime=10;useinbandfec=1\r\na=rtpmap:111 opus/48000/2\r\na=fmtp:111 x-google-min-bitrate=64;x-google-max-bitrate=64\r\na=rtcp-fb:111 transport-cc\r\na=fmtp:111 minptime=10;useinbandfec=1\r\na=ssrc:938907252 cname:GLT/pdXO7CvtnqEJ\r\na=ssrc:938907252 msid:24gqivTUDfnNEEVh6mHlCuyVCDeCAO6Ipamv 830ed5f5-e16b-46f3-8f03-0968d812bcbe\r\na=ssrc:938907252 mslabel:24gqivTUDfnNEEVh6mHlCuyVCDeCAO6Ipamv\r\na=ssrc:938907252 label:830ed5f5-e16b-46f3-8f03-0968d812bcbe\r\nm=video 9 UDP/TLS/RTP/SAVPF 102\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:fQNx\r\na=ice-pwd:fHBaWbUmQomRFHclCGDh08IF\r\na=ice-options:trickle\r\na=fingerprint:sha-256 17:2D:13:3B:C4:3C:73:6D:2A:70:17:50:E6:51:AD:AA:A3:3D:84:21:1C:DA:F3:8D:53:CF:20:B1:E2:7C:7F:9F\r\na=setup:actpass\r\na=mid:video\r\na=extmap:2 urn:ietf:params:rtp-hdrext:toffset\r\na=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=extmap:4 urn:3gpp:video-orientation\r\na=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay\r\na=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type\r\na=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/video-timing\r\na=sendrecv\r\na=rtcp-mux\r\na=rtcp-rsize\r\na=rtpmap:102 H264/90000\r\na=fmtp:102 x-google-min-bitrate=360;x-google-max-bitrate=360\r\na=rtcp-fb:102 goog-remb\r\na=rtcp-fb:102 transport-cc\r\na=rtcp-fb:102 ccm fir\r\na=rtcp-fb:102 nack\r\na=rtcp-fb:102 nack pli\r\na=fmtp:102 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f\r\na=rtpmap:102 H264/90000\r\na=fmtp:102 x-google-min-bitrate=360;x-google-max-bitrate=360\r\na=rtcp-fb:102 goog-remb\r\na=rtcp-fb:102 transport-cc\r\na=rtcp-fb:102 ccm fir\r\na=rtcp-fb:102 nack\r\na=rtcp-fb:102 nack pli\r\na=fmtp:102 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f\r\na=rtpmap:102 H264/90000\r\na=fmtp:102 x-google-min-bitrate=360;x-google-max-bitrate=360\r\na=rtcp-fb:102 goog-remb\r\na=rtcp-fb:102 transport-cc\r\na=rtcp-fb:102 ccm fir\r\na=rtcp-fb:102 nack\r\na=rtcp-fb:102 nack pli\r\na=fmtp:102 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f\r\na=rtpmap:102 H264/90000\r\na=fmtp:102 x-google-min-bitrate=360;x-google-max-bitrate=360\r\na=rtcp-fb:102 goog-remb\r\na=rtcp-fb:102 transport-cc\r\na=rtcp-fb:102 ccm fir\r\na=rtcp-fb:102 nack\r\na=rtcp-fb:102 nack pli\r\na=fmtp:102 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f\r\na=ssrc-group:FID 321842428 1779709374\r\na=ssrc:321842428 cname:GLT/pdXO7CvtnqEJ\r\na=ssrc:321842428 msid:24gqivTUDfnNEEVh6mHlCuyVCDeCAO6Ipamv 56c72fe3-26da-4c2d-99b0-5c0984a4d8a4\r\na=ssrc:321842428 mslabel:24gqivTUDfnNEEVh6mHlCuyVCDeCAO6Ipamv\r\na=ssrc:321842428 label:56c72fe3-26da-4c2d-99b0-5c0984a4d8a4\r\na=ssrc:1779709374 cname:GLT/pdXO7CvtnqEJ\r\na=ssrc:1779709374 msid:24gqivTUDfnNEEVh6mHlCuyVCDeCAO6Ipamv 56c72fe3-26da-4c2d-99b0-5c0984a4d8a4\r\na=ssrc:1779709374 mslabel:24gqivTUDfnNEEVh6mHlCuyVCDeCAO6Ipamv\r\na=ssrc:1779709374 label:56c72fe3-26da-4c2d-99b0-5c0984a4d8a4\r\n”}} webrtc.js:329 gotIceCandidate: {“ice”:{“candidate”:“candidate:1409416106 1 udp 2122260223 192.168.10.83 61565 typ host generation 0 ufrag fQNx network-id 1 network-cost 10”,“sdpMid”:“audio”,“sdpMLineIndex”:0}} webrtc.js:329 gotIceCandidate: {“ice”:{“candidate”:“candidate:1409416106 1 udp 2122260223 192.168.10.83 63399 typ host generation 0 ufrag fQNx network-id 1 network-cost 10”,“sdpMid”:“video”,“sdpMLineIndex”:1}} webrtc.js:210 wsConnection.onmessage: {“status”:200,“statusDescription”:“OK”,“direction”:“publish”,“command”:“sendOffer”,“streamInfo”:{“applicationName”:“webrtc/definst”,“streamName”:“myStreamPub”,“sessionId”:“1685970707”},“sdp”:{“type”:“answer”,“sdp”:“v=0\r\no=WowzaStreamingEngine-next 1796651848 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE audio video\r\na=msid-semantic: WMS *\r\nm=audio 9 UDP/TLS/RTP/SAVPF 111 111 111 111\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:2e03fd7e\r\na=ice-pwd:a381c5dd877640f00838732d6583c0aa\r\na=ice-options:trickle\r\na=fingerprint:sha-256 84:ED:3A:46:78:5E:87:C7:BD:20:1D:5C:75:D3:E7:08:8C:5E:48:B0:94:66:71:FC:6C:F4:07:D4:58:16:93:E4\r\na=setup:passive\r\na=mid:audio\r\na=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\na=recvonly\r\na=rtcp-mux\r\na=rtpmap:111 opus/48000/2\r\na=fmtp:111 x-google-min-bitrate=64;x-google-max-bitrate=64\r\na=rtcp-fb:111 transport-cc\r\na=fmtp:111 minptime=10;useinbandfec=1\r\na=rtpmap:111 opus/48000/2\r\na=fmtp:111 x-google-min-bitrate=64;x-google-max-bitrate=64\r\na=rtcp-fb:111 transport-cc\r\na=fmtp:111 minptime=10;useinbandfec=1\r\na=rtpmap:111 opus/48000/2\r\na=fmtp:111 x-google-min-bitrate=64;x-google-max-bitrate=64\r\na=rtcp-fb:111 transport-cc\r\na=fmtp:111 minptime=10;useinbandfec=1\r\na=rtpmap:111 opus/48000/2\r\na=fmtp:111 x-google-min-bitrate=64;x-google-max-bitrate=64\r\na=rtcp-fb:111 transport-cc\r\na=fmtp:111 minptime=10;useinbandfec=1\r\nm=video 9 UDP/TLS/RTP/SAVPF 102 102 102 102\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:2e03fd7e\r\na=ice-pwd:a381c5dd877640f00838732d6583c0aa\r\na=ice-options:trickle\r\na=fingerprint:sha-256 84:ED:3A:46:78:5E:87:C7:BD:20:1D:5C:75:D3:E7:08:8C:5E:48:B0:94:66:71:FC:6C:F4:07:D4:58:16:93:E4\r\na=setup:passive\r\na=mid:video\r\na=extmap:2 urn:ietf:params:rtp-hdrext:toffset\r\na=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=extmap:4 urn:3gpp:video-orientation\r\na=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay\r\na=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type\r\na=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/video-timing\r\na=recvonly\r\na=rtcp-mux\r\na=rtcp-rsize\r\na=rtpmap:102 H264/90000\r\na=fmtp:102 x-google-min-bitrate=360;x-google-max-bitrate=360\r\na=rtcp-fb:102 goog-remb\r\na=rtcp-fb:102 transport-cc\r\na=rtcp-fb:102 ccm fir\r\na=rtcp-fb:102 nack\r\na=rtcp-fb:102 nack pli\r\na=fmtp:102 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f\r\na=rtpmap:102 H264/90000\r\na=fmtp:102 x-google-min-bitrate=360;x-google-max-bitrate=360\r\na=rtcp-fb:102 goog-remb\r\na=rtcp-fb:102 transport-cc\r\na=rtcp-fb:102 ccm fir\r\na=rtcp-fb:102 nack\r\na=rtcp-fb:102 nack pli\r\na=fmtp:102 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f\r\na=rtpmap:102 H264/90000\r\na=fmtp:102 x-google-min-bitrate=360;x-google-max-bitrate=360\r\na=rtcp-fb:102 goog-remb\r\na=rtcp-fb:102 transport-cc\r\na=rtcp-fb:102 ccm fir\r\na=rtcp-fb:102 nack\r\na=rtcp-fb:102 nack pli\r\na=fmtp:102 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f\r\na=rtpmap:102 H264/90000\r\na=fmtp:102 x-google-min-bitrate=360;x-google-max-bitrate=360\r\na=rtcp-fb:102 goog-remb\r\na=rtcp-fb:102 transport-cc\r\na=rtcp-fb:102 ccm fir\r\na=rtcp-fb:102 nack\r\na=rtcp-fb:102 nack pli\r\na=fmtp:102 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f\r\n”},“iceCandidates”:[{“candidate”:“candidate:0 1 TCP 50 13.127.167.54 1935 typ host generation 0”,“sdpMid”:"",“sdpMLineIndex”:0}]} webrtc.js:229 sdp: [object Object] webrtc.js:241 iceCandidates: [object Object] webrtc.js:255 wsConnection.onclose webrtc.js:329 gotIceCandidate: {“ice”:{“candidate”:“candidate:444729178 1 tcp 1518280447 192.168.10.83 9 typ host tcptype active generation 0 ufrag fQNx network-id 1 network-cost 10”,“sdpMid”:“audio”,“sdpMLineIndex”:0}}

Hello @Saurabh Hote

I would recommend having the below ports open in your AWS EC2 security groups:

TCP: 1935, 443, 9443 (if using sample web server)

UDP: 6970 - 9999 and sometimes up to 65535

Also you will need to make sure that you webrtcIceCandidateIpAddresses in your Application.xml matches the external IP address of your EC2 instance.

If further assistance is needed, here’s a link to open a support ticket:

and these are the following folders needed for review:

[install-dir]/conf
[install-dir]/logs (only latest logs are needed showing a Wowza Server restart and WebRTC connection attempts)

If you are not sure how to get this information please see the following tutorial.https://www.wowza.com/docs/how-to-create-a-compressed-zip-file-in-windows-os-x-and-linux

Regards,

JasonT