-
Notifications
You must be signed in to change notification settings - Fork 10
clarifying how to avoid Trickle ICE #600
Comments
Hello @dpocock! 👋 we're sorry you found a bug... so first of all, thank you very much for reporting it. To know about progress, check in Triage. All issues are considered Backlog Candidates until work priorities align and the issue is selected for development. It will then become part of our official Backlog. |
Check if it works if you call think of it this way: if candidate gathering took 20 seconds... is your code really waiting all those 20 seconds before calling |
reading the API docs, I had the impression that gatherCandidates() would return synchronously, after IceGatheringDone If that is not the case then I'll modify the code to wait for the event and it would be useful to emphasize this in the docs. Looking at the Kurento logs I notice that it says the candidates are added but it doesn't show IceGatheringDone in the log. When I run the hello-world Java demo then I do see the IceGatheringDone message in the server log. It looks like there is some subtle difference in how the demo sets up the pipeline. |
thanks for the suggestions; I've mostly rewritten the docs of the gatherCandidates method, to make it clearer and more useful for users |
@j1elo thanks, the documentation is helpful but the issue still appears to be a bug or maybe a regression. Can you please reopen the issue until we get to the bottom of this? Do you have any unit test that validates this behavior? If not, do you remember the last time it was tested? Here is what I observe, I have GST_DEBUG="7" for full logging. a) using
Running the tutorial, when I look at the Kurento log, I can see that it finds the local candidates and sends b) then I run my own code. Instead of using the events, I just created a 10 second sleep to test everything and I watch the log.
I grep the log and I can not find any events
Notice that I see lots of lines for When I did the test with hello-world, the c) I came up with a workaround, I do the following:
With this solution, I see the Can you please reopen the issue until we get to the bottom of this? |
You're right, I got confused because of the old comment in the documentation. Turns out that comment is wrong: it's not possible to call gatherCandidates before having processed an initial SDP. This is because all the internal structures, to handle connections and sessions, are created upon the first appearance of an SDP in the Endpoints. Web browsers have decoupled the act of setting an SDP Offer from the phase of explicitly setting a local or remote description. In Kurento, these two are merged into a single operation, which serves better the needs for 99% cases, but makes it more weird for the 1%. I believe the correct way to do it would be as you propose, with a slight change. Here's a more complete pseudocode, being more explicit about the signaling component, so it is clearer when each part would run:
|
Prerequisites
These are MANDATORY, otherwise the issue will be automatically closed.
Issue description
I followed the instructions here, in particular, I am calling gatherCandidates() before processOffer()
https://doc-kurento.readthedocs.io/en/stable/_static/client-javadoc/org/kurento/client/WebRtcEndpoint.html
processOffer() returns an SDP answer without any candidates
Are there any other steps, for example, does it not work properly if the event listeners are not configured? If there are any mandatory steps, can you please add that to the documentation?
Context
Trying to use JsSIP with Kurento.
JsSIP doesn't currently support Trickle ICE
versatica/JsSIP#716
How to reproduce?
create pipeline
create endpoint
add listeners (IceCandidateFound, IceGatheringDone)
generateCandidates()
processOffer
look at the SDP answer, does it only contain 0.0.0.0 or does it contain real candidates?
Expected & current behavior
If I call generateCandidates first then I would expect to see some candidates in the SDP answer
(Optional) Possible solution
Info about your environment
Development environment, adapting another free software product, the reSIProcate C++ SIP stack, to support Kurento
About Kurento Media Server
About your Application Server
About end-user clients
Run these commands
The text was updated successfully, but these errors were encountered: