[jitsi-users] How to patch ssrc-groups into Colibri using REST?


#1

https://github.com/jitsi/jitsi-videobridge/blob/master/doc/rest-videobridge.md does not explain how to patch an ssrc group for a Jitsi channel. In the response, it shows "ssrc-groups" empty:

          "ssrc-groups": [

          ],

From http://xmpp.org/extensions/xep-0339.html I can see the mapping for Jingle. Can I assume the following to be correct when patching Colibri from sdp?

          "ssrc-groups": [
                  "semantics": "FID",
                 "sources": [
                          {
                                  "ssrc": "7099443",
                                  "cname": "B5orU/clZKrZ1+t5",
                                  "msid": "ARDAMS ARDAMSv0",
                                  "mslabel": "ARDAMS",
                                  "label": "ARDAMSv0"
                          },
                          {
                                  "ssrc": "838446579",
                                  "cname": "B5orU/clZKrZ1+t5",
                                  "msid": "ARDAMS ARDAMSv0",
                                  "mslabel": "ARDAMS",
                                  "label": "ARDAMSv0"
                          }
                  ]
          ],

for the following sample sdp:

a=ssrc-group:FID 7099443 838446579

a=ssrc:7099443 cname:B5orU/clZKrZ1+t5

a=ssrc:7099443 msid:ARDAMS ARDAMSv0

a=ssrc:7099443 mslabel:ARDAMS

a=ssrc:7099443 label:ARDAMSv0

a=ssrc:838446579 cname:B5orU/clZKrZ1+t5

a=ssrc:838446579 msid:ARDAMS ARDAMSv0

a=ssrc:838446579 mslabel:ARDAMS

a=ssrc:838446579 label:ARDAMSv0

Will I need to specify such ssrcs in duplicate, either in "sources" or "ssrcs", or does it suffice to add it within a group?


#2

Hi Oliver,

https://github.com/jitsi/jitsi-videobridge/blob/master/doc/rest-videobridge.md
does not explain how to patch an ssrc group for a Jitsi channel. In the
response, it shows "ssrc-groups" empty:

          "ssrc-groups": [

          ],

I think this is "normal", in the sense that the bridge will not return the ssrc-groups that were set on a channel. I guess that it should, like it does with the other elements. Please open a bug if that matters to you.

From http://xmpp.org/extensions/xep-0339.html I can see the mapping for
Jingle. Can I assume the following to be correct when patching Colibri
from sdp?

          "ssrc-groups": [

                  "semantics": "FID",

                 "sources": [

                          {

                                  "ssrc": "7099443",

                                  "cname": "B5orU/clZKrZ1+t5",

                                  "msid": "ARDAMS ARDAMSv0",

                                  "mslabel": "ARDAMS",

                                  "label": "ARDAMSv0"

                          },

                          {

                                  "ssrc": "838446579",

                                  "cname": "B5orU/clZKrZ1+t5",

                                  "msid": "ARDAMS ARDAMSv0",

                                  "mslabel": "ARDAMS",

                                  "label": "ARDAMSv0"

                          }

                  ]

          ],

No, this doesn't look right.

for the following sample sdp:

a=ssrc-group:FID 7099443 838446579

In the XML version this would go in an ssrc-group element:
<ssrc-group xmlns="urn:xmpp:jingle:apps:rtp:ssma:0" semantics="SIM">
   <source ssrc="3605889917"/>
   <source ssrc="2403374270"/>
   <source ssrc="2995672991"/>
</ssrc-group>

a=ssrc:7099443 cname:B5orU/clZKrZ1+t5

a=ssrc:7099443 msid:ARDAMS ARDAMSv0

a=ssrc:7099443 mslabel:ARDAMS

a=ssrc:7099443 label:ARDAMSv0

a=ssrc:838446579 cname:B5orU/clZKrZ1+t5

a=ssrc:838446579 msid:ARDAMS ARDAMSv0

a=ssrc:838446579 mslabel:ARDAMS

a=ssrc:838446579 label:ARDAMSv0

In the XML version these would go in a source elements:
<source xmlns="urn:xmpp:jingle:apps:rtp:ssma:0" ssrc="3605889917">
   <parameter value="1a7UataTOc1Evi8H" name="cname"/>
   <parameter value="labIpzeeqtM9xRC8EpEQZDSRYfj02Pu8eE0H 7dd1c530-b4b8-4ef9-b727-8b0b1c27ee01" name="msid"/>
   <parameter value="labIpzeeqtM9xRC8EpEQZDSRYfj02Pu8eE0H" name="mslabel"/>
   <parameter value="7dd1c530-b4b8-4ef9-b727-8b0b1c27ee01" name="label"/>
</source>

This *should* translate to the following JSON:

ssrc-groups: [
   {
      semantics: "SIM",
      sources: [3605889917, 2403374270, 2995672991]
   }
],
sources: [3605889917]

Note that this is based on reading the code and I haven't verified it. The parameters are missing for the "source" elements since they are not currently used. The example I used uses SIM semantics, but the syntax is the same for FID.

Regards,
Boris

···

On 19/07/16 17:35, Oliver Hausler wrote:


#3

Hi Boris, thanks for the clarification.

I have 2 devices sending RTP streams to jitsi, but jitsi won't forward these streams. So something is still wrong, probably when patching back ssrcs into the conference. [When I connect the devices p2p all works fine, so I guess I need to search on the jitsi side.]

As you said, I can see the server wouldn't replay the "ssrc-group" in the answer. I don't think that I need it, but it makes it hard to debug, as I can't be sure jitsi accepted my JSON.

1. What I can see is "sources" outside "ssrc-group" only contains outgoing ssrcs. Is this correct, or should it contain incoming ssrcs as well, after the patch?
2. In your example below, you included "3605889917" in the "ssrc-group". I assume I should only patch in incoming ssrcs here and you just grabbed this example from somewhere. Am I correct?
3. How do I patch an incoming ssrc if there is no group in the sdp? I tried patching it to "ssrcs": [], which I think was accepted but jitsi then would include it inside "sources".

ssrc-groups: [
   {
      semantics: "SIM",
      sources: [3605889917, 2403374270, 2995672991]
   }
],
sources: [3605889917]

Cheers,
Oliver.

···

-----Original Message-----
From: users [mailto:users-bounces@jitsi.org] On Behalf Of Boris Grozev
Sent: Tuesday, July 19, 2016 20:10
To: Jitsi Users <users@jitsi.org>
Subject: Re: [jitsi-users] How to patch ssrc-groups into Colibri using REST?

Hi Oliver,

On 19/07/16 17:35, Oliver Hausler wrote:

https://github.com/jitsi/jitsi-videobridge/blob/master/doc/rest-videob
ridge.md does not explain how to patch an ssrc group for a Jitsi
channel. In the response, it shows "ssrc-groups" empty:

          "ssrc-groups": [

          ],

I think this is "normal", in the sense that the bridge will not return the ssrc-groups that were set on a channel. I guess that it should, like it does with the other elements. Please open a bug if that matters to you.

From http://xmpp.org/extensions/xep-0339.html I can see the mapping for
Jingle. Can I assume the following to be correct when patching Colibri
from sdp?

          "ssrc-groups": [

                  "semantics": "FID",

                 "sources": [

                          {

                                  "ssrc": "7099443",

                                  "cname": "B5orU/clZKrZ1+t5",

                                  "msid": "ARDAMS ARDAMSv0",

                                  "mslabel": "ARDAMS",

                                  "label": "ARDAMSv0"

                          },

                          {

                                  "ssrc": "838446579",

                                  "cname": "B5orU/clZKrZ1+t5",

                                  "msid": "ARDAMS ARDAMSv0",

                                  "mslabel": "ARDAMS",

                                  "label": "ARDAMSv0"

                          }

                  ]

          ],

No, this doesn't look right.

for the following sample sdp:

a=ssrc-group:FID 7099443 838446579

In the XML version this would go in an ssrc-group element:
<ssrc-group xmlns="urn:xmpp:jingle:apps:rtp:ssma:0" semantics="SIM">
   <source ssrc="3605889917"/>
   <source ssrc="2403374270"/>
   <source ssrc="2995672991"/>
</ssrc-group>

a=ssrc:7099443 cname:B5orU/clZKrZ1+t5

a=ssrc:7099443 msid:ARDAMS ARDAMSv0

a=ssrc:7099443 mslabel:ARDAMS

a=ssrc:7099443 label:ARDAMSv0

a=ssrc:838446579 cname:B5orU/clZKrZ1+t5

a=ssrc:838446579 msid:ARDAMS ARDAMSv0

a=ssrc:838446579 mslabel:ARDAMS

a=ssrc:838446579 label:ARDAMSv0

In the XML version these would go in a source elements:
<source xmlns="urn:xmpp:jingle:apps:rtp:ssma:0" ssrc="3605889917">
   <parameter value="1a7UataTOc1Evi8H" name="cname"/>
   <parameter value="labIpzeeqtM9xRC8EpEQZDSRYfj02Pu8eE0H
7dd1c530-b4b8-4ef9-b727-8b0b1c27ee01" name="msid"/>
   <parameter value="labIpzeeqtM9xRC8EpEQZDSRYfj02Pu8eE0H" name="mslabel"/>
   <parameter value="7dd1c530-b4b8-4ef9-b727-8b0b1c27ee01" name="label"/>
</source>

This *should* translate to the following JSON:

ssrc-groups: [
   {
      semantics: "SIM",
      sources: [3605889917, 2403374270, 2995672991]
   }
],
sources: [3605889917]

Note that this is based on reading the code and I haven't verified it.
The parameters are missing for the "source" elements since they are not
currently used. The example I used uses SIM semantics, but the syntax is
the same for FID.

Regards,
Boris

_______________________________________________
users mailing list
users@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/users


#4

Hi Boris,

Sorry for the late response, but one of my devices died and I had to get another.

I believe all ssrcs are properly set, streams are ready to be sent, and then libjingle withholds and discards packets to jitsi because jitsi doesn't answer to TLS ClientHello. As this is something completely different, I posted a new question:

"TLS Configuration in Jitsi?"

Thank you for your help, the information that client-ssrcs need to be patched into [Sources] was very valuable.
Oliver.

···

-----Original Message-----
From: users [mailto:users-bounces@jitsi.org] On Behalf Of Boris Grozev
Sent: Tuesday, July 19, 2016 20:10
To: Jitsi Users <users@jitsi.org>
Subject: Re: [jitsi-users] How to patch ssrc-groups into Colibri using REST?

Hi Oliver,

On 19/07/16 17:35, Oliver Hausler wrote:

https://github.com/jitsi/jitsi-videobridge/blob/master/doc/rest-videob
ridge.md does not explain how to patch an ssrc group for a Jitsi
channel. In the response, it shows "ssrc-groups" empty:

          "ssrc-groups": [

          ],

I think this is "normal", in the sense that the bridge will not return the ssrc-groups that were set on a channel. I guess that it should, like it does with the other elements. Please open a bug if that matters to you.

From http://xmpp.org/extensions/xep-0339.html I can see the mapping for
Jingle. Can I assume the following to be correct when patching Colibri
from sdp?

          "ssrc-groups": [

                  "semantics": "FID",

                 "sources": [

                          {

                                  "ssrc": "7099443",

                                  "cname": "B5orU/clZKrZ1+t5",

                                  "msid": "ARDAMS ARDAMSv0",

                                  "mslabel": "ARDAMS",

                                  "label": "ARDAMSv0"

                          },

                          {

                                  "ssrc": "838446579",

                                  "cname": "B5orU/clZKrZ1+t5",

                                  "msid": "ARDAMS ARDAMSv0",

                                  "mslabel": "ARDAMS",

                                  "label": "ARDAMSv0"

                          }

                  ]

          ],

No, this doesn't look right.

for the following sample sdp:

a=ssrc-group:FID 7099443 838446579

In the XML version this would go in an ssrc-group element:
<ssrc-group xmlns="urn:xmpp:jingle:apps:rtp:ssma:0" semantics="SIM">
   <source ssrc="3605889917"/>
   <source ssrc="2403374270"/>
   <source ssrc="2995672991"/>
</ssrc-group>

a=ssrc:7099443 cname:B5orU/clZKrZ1+t5

a=ssrc:7099443 msid:ARDAMS ARDAMSv0

a=ssrc:7099443 mslabel:ARDAMS

a=ssrc:7099443 label:ARDAMSv0

a=ssrc:838446579 cname:B5orU/clZKrZ1+t5

a=ssrc:838446579 msid:ARDAMS ARDAMSv0

a=ssrc:838446579 mslabel:ARDAMS

a=ssrc:838446579 label:ARDAMSv0

In the XML version these would go in a source elements:
<source xmlns="urn:xmpp:jingle:apps:rtp:ssma:0" ssrc="3605889917">
   <parameter value="1a7UataTOc1Evi8H" name="cname"/>
   <parameter value="labIpzeeqtM9xRC8EpEQZDSRYfj02Pu8eE0H
7dd1c530-b4b8-4ef9-b727-8b0b1c27ee01" name="msid"/>
   <parameter value="labIpzeeqtM9xRC8EpEQZDSRYfj02Pu8eE0H" name="mslabel"/>
   <parameter value="7dd1c530-b4b8-4ef9-b727-8b0b1c27ee01" name="label"/>
</source>

This *should* translate to the following JSON:

ssrc-groups: [
   {
      semantics: "SIM",
      sources: [3605889917, 2403374270, 2995672991]
   }
],
sources: [3605889917]

Note that this is based on reading the code and I haven't verified it.
The parameters are missing for the "source" elements since they are not
currently used. The example I used uses SIM semantics, but the syntax is
the same for FID.

Regards,
Boris

_______________________________________________
users mailing list
users@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/users


#5

Hi,

Hi Boris, thanks for the clarification.

I have 2 devices sending RTP streams to jitsi, but jitsi won't
forward these streams. So something is still wrong, probably when
patching back ssrcs into the conference. [When I connect the devices
p2p all works fine, so I guess I need to search on the jitsi side.]

As you said, I can see the server wouldn't replay the "ssrc-group" in
the answer. I don't think that I need it, but it makes it hard to
debug, as I can't be sure jitsi accepted my JSON.

Yes, I understand that. FWIW I don't see how ant problem with ssrc-groups will cause a stream to be not forwarded.

1. What I can see is "sources" outside "ssrc-group" only contains
outgoing ssrcs. Is this correct, or should it contain incoming ssrcs
as well, after the patch?

This is not the first time this has caused confusion :frowning:

"sources" when sent from the client to the bridge contains SSRCs used by the client.

"sources" when sent from the bridge to the client contains SSRCs used by the bridge

"ssrcs" is only used from the bridge to the client. It contains a list of SSRCs that jitsi-videobridge expects to receive on this channel. They come from two places: from signalling through "sources", and from RTP packets.

2. In your example below, you included
"3605889917" in the "ssrc-group". I assume I should only patch in
incoming ssrcs here and you just grabbed this example from somewhere.
Am I correct?

Yes, I grabbed it from some logs. In this case 3605889917 is an SSRC

3. How do I patch an incoming ssrc if there is no group
in the sdp? I tried patching it to "ssrcs": [], which I think was
accepted but jitsi then would include it inside "sources". >

Unless I got confused somewhere along the way, you should patch it via "sources" and expect it to appear in "ssrcs".

Regards,
Boris

···

On 20/07/16 22:11, Oliver Hausler wrote: