does the answer SDP have to contain the same ice-ufrag, ice-pwd, and fingerprint as the offer SDP?

318 views
Skip to first unread message

Andres Gonzalez

unread,
Jan 9, 2016, 6:41:32 PM1/9/16
to discuss-webrtc
Hi,

I am trying to connect a gstreamer video stream (on the same host as the http web server) to a webRTC web client. So I am only concerned with one RTCPeerConnection. The local side is typical of any WebRTC example but here the remote side is NOT a browser agent but instead a video stream generated by gstreamer from the node.js web server that is serving the web WebRTC client page (so there are no NATs involved here).  So I am trying to manually construct the answer SDP and use that in the setRemoteDescription() call.

The local web client ICE connection state change goes to 'checking' but then ultimately goes to 'failed'   so I obviously do not have the answer SDP correct yet.

Question 1: How do I find the reason the ICE verification failed?  Should I use the setRemoteDescription( description, successCB, errorCB) ?  The WebRTC documentation says that is a "Legacy" method so I am not sure if I should use it.  However, I did try it, but my error callback was never called when the ICE connection state went to 'failed'   

Question 2: ignoring the video codec related parameters for the moment, what SDP fields in the answer SDP need to match the offer SDP?  I think the session id (the 2nd attribute of 'o=') of the answer SDP must be the same as that in the answer SDP. But is the same true for the 'a=ice-ufrag' and the 'a=ice-pwd' and 'a=fingerprint'  attributes?

Thanks,

-Andres

Iñaki Baz Castillo

unread,
Jan 9, 2016, 8:31:38 PM1/9/16
to discuss...@googlegroups.com
2016-01-10 0:41 GMT+01:00 Andres Gonzalez <andres.a...@gmail.com>:
> I am trying to connect a gstreamer video stream (on the same host as the
> http web server) to a webRTC web client. So I am only concerned with one
> RTCPeerConnection. The local side is typical of any WebRTC example but here
> the remote side is NOT a browser agent but instead a video stream generated
> by gstreamer from the node.js web server that is serving the web WebRTC
> client page (so there are no NATs involved here). So I am trying to
> manually construct the answer SDP and use that in the setRemoteDescription()
> call.

You cannot "simplify" so much. Both WebRTC endpoints MUST talk proper
ICE and DTLS, regardless there is no NAT.


> The local web client ICE connection state change goes to 'checking' but then
> ultimately goes to 'failed' so I obviously do not have the answer SDP
> correct yet.

This is not just about a SDP answer.


> Question 1: How do I find the reason the ICE verification failed? Should I
> use the setRemoteDescription( description, successCB, errorCB) ? The WebRTC
> documentation says that is a "Legacy" method so I am not sure if I should
> use it. However, I did try it, but my error callback was never called when
> the ICE connection state went to 'failed'

If ICE state becomes "failed" it means that the SDP answer was "valid".


> Question 2: ignoring the video codec related parameters for the moment, what
> SDP fields in the answer SDP need to match the offer SDP? I think the
> session id (the 2nd attribute of 'o=') of the answer SDP must be the same as
> that in the answer SDP. But is the same true for the 'a=ice-ufrag' and the
> 'a=ice-pwd' and 'a=fingerprint' attributes?

None of them. As stated above, your "video server" MUST implement ICE,
DTLS and SRTP.



--
Iñaki Baz Castillo
<i...@aliax.net>
Reply all
Reply to author
Forward
0 new messages