Open oliverhausler opened 6 years ago
This may be related with https://github.com/jitsi/jitsi-videobridge/issues/73. I assume the conference doesn't expire immediately because the SctpConnection
is still up.
Am I doing this wrong? Is the logic for removing a different one for video/audio channels and sctpconnections?
What you describe you expect seems correct. The different behavior is probably a bug.
I found that the value of the "expire" attribute is not used when an SctpConnection is initially created. I'm not sure why you're seeing the seemingly correct response when you create one with expire=15, but I don't think it was being set (so it defaulted to 60).
Can you test with the changes in #539 ? Then use the "expire" attribute specified with the creation request, and they might also fix the problem with the expire=0 sctpconnection not being removed immediately.
I am definitely seeing 15 seconds when I create the channels. The fix seems to work. Will comment on your PR.
@bgrozev When created, "expire": 15
seems to be honored, try to POST the following JSON. Maybe insert happens somewhere else.
{
"contents": [{
"name": "audio",
"channels": [{
"expire": 15,
"initiator": true,
"endpoint": "NA-lTs2sSgimlkjgGybgXQ|||||APMUI_-LJEOiqKtXwQ19WoQ",
"direction": "sendrecv",
"channel-bundle-id": "NA-lTs2sSgimlkjgGybgXQ|||||APMUI_-LJEOiqKtXwQ19WoQ",
"rtp-level-relay-type": "translator",
"payload-types": [{
"id": 111,
"name": "opus",
"clockrate": 48000,
"channels": 2,
"parameters": {
"fmtp": ["minptime=10; useinbandfec=1"]
}
}, {
"id": 103,
"name": "ISAC",
"clockrate": 16000
}, {
"id": 104,
"name": "ISAC",
"clockrate": 32000
}, {
"id": 9,
"name": "G722",
"clockrate": 8000
}, {
"id": 102,
"name": "ILBC",
"clockrate": 8000
}, {
"id": 0,
"name": "PCMU",
"clockrate": 8000
}, {
"id": 8,
"name": "PCMA",
"clockrate": 8000
}, {
"id": 106,
"name": "CN",
"clockrate": 32000
}, {
"id": 105,
"name": "CN",
"clockrate": 16000
}, {
"id": 13,
"name": "CN",
"clockrate": 8000
}, {
"id": 127,
"name": "red",
"clockrate": 8000
}, {
"id": 126,
"name": "telephone-event",
"clockrate": 8000
}]
}, {
"expire": 15,
"initiator": true,
"endpoint": "NA-lTs2sSgimlkjgGybgXQ|||||C7Rj-qmEQBmWPHi6E33d-w",
"direction": "sendrecv",
"channel-bundle-id": "NA-lTs2sSgimlkjgGybgXQ|||||C7Rj-qmEQBmWPHi6E33d-w",
"rtp-level-relay-type": "translator",
"payload-types": [{
"id": 111,
"name": "opus",
"clockrate": 48000,
"channels": 2,
"parameters": {
"fmtp": ["minptime=10; useinbandfec=1"]
}
}, {
"id": 103,
"name": "ISAC",
"clockrate": 16000
}, {
"id": 104,
"name": "ISAC",
"clockrate": 32000
}, {
"id": 9,
"name": "G722",
"clockrate": 8000
}, {
"id": 102,
"name": "ILBC",
"clockrate": 8000
}, {
"id": 0,
"name": "PCMU",
"clockrate": 8000
}, {
"id": 8,
"name": "PCMA",
"clockrate": 8000
}, {
"id": 106,
"name": "CN",
"clockrate": 32000
}, {
"id": 105,
"name": "CN",
"clockrate": 16000
}, {
"id": 13,
"name": "CN",
"clockrate": 8000
}, {
"id": 127,
"name": "red",
"clockrate": 8000
}, {
"id": 126,
"name": "telephone-event",
"clockrate": 8000
}]
}, {
"expire": 15,
"initiator": true,
"endpoint": "NA-lTs2sSgimlkjgGybgXQ|||||APMP-UnhMUQPoQC9PeAJYA8",
"direction": "sendrecv",
"channel-bundle-id": "NA-lTs2sSgimlkjgGybgXQ|||||APMP-UnhMUQPoQC9PeAJYA8",
"rtp-level-relay-type": "translator",
"payload-types": [{
"id": 111,
"name": "opus",
"clockrate": 48000,
"channels": 2,
"parameters": {
"fmtp": ["minptime=10; useinbandfec=1"]
}
}, {
"id": 103,
"name": "ISAC",
"clockrate": 16000
}, {
"id": 104,
"name": "ISAC",
"clockrate": 32000
}, {
"id": 9,
"name": "G722",
"clockrate": 8000
}, {
"id": 102,
"name": "ILBC",
"clockrate": 8000
}, {
"id": 0,
"name": "PCMU",
"clockrate": 8000
}, {
"id": 8,
"name": "PCMA",
"clockrate": 8000
}, {
"id": 106,
"name": "CN",
"clockrate": 32000
}, {
"id": 105,
"name": "CN",
"clockrate": 16000
}, {
"id": 13,
"name": "CN",
"clockrate": 8000
}, {
"id": 127,
"name": "red",
"clockrate": 8000
}, {
"id": 126,
"name": "telephone-event",
"clockrate": 8000
}]
}],
"sctpconnections": []
}, {
"name": "video",
"channels": [{
"expire": 15,
"initiator": true,
"endpoint": "NA-lTs2sSgimlkjgGybgXQ|||||APMUI_-LJEOiqKtXwQ19WoQ",
"direction": "sendrecv",
"channel-bundle-id": "NA-lTs2sSgimlkjgGybgXQ|||||APMUI_-LJEOiqKtXwQ19WoQ",
"rtp-level-relay-type": "translator",
"last-n": 2,
"receive-simulcast-layer": 0,
"payload-types": [{
"id": 100,
"name": "VP8",
"clockrate": 90000,
"parameters": {
"fmtp": ["x-google-start-bitrate=550"],
"rtcp-fb": ["ccm fir", "nack", "nack pli", "goog-remb"]
}
}]
}, {
"expire": 15,
"initiator": true,
"endpoint": "NA-lTs2sSgimlkjgGybgXQ|||||C7Rj-qmEQBmWPHi6E33d-w",
"direction": "sendrecv",
"channel-bundle-id": "NA-lTs2sSgimlkjgGybgXQ|||||C7Rj-qmEQBmWPHi6E33d-w",
"rtp-level-relay-type": "translator",
"last-n": 2,
"receive-simulcast-layer": 0,
"payload-types": [{
"id": 100,
"name": "VP8",
"clockrate": 90000,
"parameters": {
"fmtp": ["x-google-start-bitrate=550"],
"rtcp-fb": ["ccm fir", "nack", "nack pli", "goog-remb"]
}
}]
}, {
"expire": 15,
"initiator": true,
"endpoint": "NA-lTs2sSgimlkjgGybgXQ|||||APMP-UnhMUQPoQC9PeAJYA8",
"direction": "sendrecv",
"channel-bundle-id": "NA-lTs2sSgimlkjgGybgXQ|||||APMP-UnhMUQPoQC9PeAJYA8",
"rtp-level-relay-type": "translator",
"last-n": 2,
"receive-simulcast-layer": 0,
"payload-types": [{
"id": 100,
"name": "VP8",
"clockrate": 90000,
"parameters": {
"fmtp": ["x-google-start-bitrate=550"],
"rtcp-fb": ["ccm fir", "nack", "nack pli", "goog-remb"]
}
}]
}],
"sctpconnections": []
}, {
"name": "data",
"channels": [],
"sctpconnections": [{
"expire": 15,
"initiator": true,
"endpoint": "NA-lTs2sSgimlkjgGybgXQ|||||APMUI_-LJEOiqKtXwQ19WoQ",
"port": 5000,
"channel-bundle-id": "NA-lTs2sSgimlkjgGybgXQ|||||APMUI_-LJEOiqKtXwQ19WoQ"
}, {
"expire": 15,
"initiator": true,
"endpoint": "NA-lTs2sSgimlkjgGybgXQ|||||C7Rj-qmEQBmWPHi6E33d-w",
"port": 5000,
"channel-bundle-id": "NA-lTs2sSgimlkjgGybgXQ|||||C7Rj-qmEQBmWPHi6E33d-w"
}, {
"expire": 15,
"initiator": true,
"endpoint": "NA-lTs2sSgimlkjgGybgXQ|||||APMP-UnhMUQPoQC9PeAJYA8",
"port": 5000,
"channel-bundle-id": "NA-lTs2sSgimlkjgGybgXQ|||||APMP-UnhMUQPoQC9PeAJYA8"
}]
}],
"channel-bundles": [{
"id": "NA-lTs2sSgimlkjgGybgXQ|||||APMUI_-LJEOiqKtXwQ19WoQ",
"transport": {
"xmlns": "urn:xmpp:jingle:transports:ice-udp:1",
"rtcp-mux": true
}
}, {
"id": "NA-lTs2sSgimlkjgGybgXQ|||||C7Rj-qmEQBmWPHi6E33d-w",
"transport": {
"xmlns": "urn:xmpp:jingle:transports:ice-udp:1",
"rtcp-mux": true
}
}, {
"id": "NA-lTs2sSgimlkjgGybgXQ|||||APMP-UnhMUQPoQC9PeAJYA8",
"transport": {
"xmlns": "urn:xmpp:jingle:transports:ice-udp:1",
"rtcp-mux": true
}
}]
}
When I create a new
SctpConnection
using REST, I can give it an expiration time, which is reflected in the response.But as soon as I modify an existing SctpConnection, "expire" is always set to 60.
This is especially bad, as I cannot set
in order to expire a channel immediately. That means, when I expire a complete conference,
sctpConnections
hang until they time out after 60 secs, which probably wastes resources.Look here:
I have 3 participants and I want to remove one:
See how I reset expire for the participant I want to remove. The response is this:
2 remaining audio channels (correct), 2 remaining video channels (correct), but 3 remaining sctpconnections, one where expire is 0, two where it's reset to 60 (all 3 wrong, one should be gone, the others should stay at their original value, was 15).
Am I doing this wrong? Is the logic for removing a different one for video/audio channels and sctpconnections?