[jitsi-dev] Design question on MSRP integration.


#1

Hi all,

I'm currently investigating the possibility of integrating MSRP in the Jitsi
client.

Am I correct in assuming that this actually needs to be done as a
MediaStream in libjitsi?

And if so, what's the URL of the source-repo?

Any other hints on possible integration are more than welcome.

Thanks in advance,
    Tom Uijldert.


#2

Hey

I'm currently investigating the possibility of integrating MSRP in the
Jitsi client.

Thanks, would certainly be nice to have!

Am I correct in assuming that this actually needs to be done as a
MediaStream in libjitsi?

I don't know MSRP, but the RFC abstract kind of sounds like that.

And if so, what's the URL of the source-repo?

https://svn.java.net/svn/jitsi~svn/libjitsi/

Any other hints on possible integration are more than welcome.

The classes OperationSetBasicInstantMessagingSipImpl and
OperationSetBasicTelephonySipImpl (telephony because of the stream setup)
would probably be your starting points. But maybe someone else has some more
comments.

Thanks in advance,
    Tom Uijldert.

Regards,
Ingo


#3

Hey Tom,

Hey

I'm currently investigating the possibility of integrating MSRP in the
Jitsi client.

Thanks, would certainly be nice to have!

Indeed! It would be great!

File transfer is one of the major advantages of XMPP over SIP in Jitsi
so adding MSRP would put both protocols on almost the same plane.

I really hope this works out!

Am I correct in assuming that this actually needs to be done as a
MediaStream in libjitsi?

I don't know MSRP, but the RFC abstract kind of sounds like that.

Well ... I don't know about that. I don't think an MSRP integration
would need to use anything in libjitsi, nor I see anything in libjitsi
that would require msrp.

Given that SIP is the only protocol that would use it, I think we can do
all the integration there.

Some of us have been chatting about creating a libjitsi-protocols at
some point and MSRP could get into there together with SIP.

And if so, what's the URL of the source-repo?

https://svn.java.net/svn/jitsi~svn/libjitsi/

Any other hints on possible integration are more than welcome.

The classes OperationSetBasicInstantMessagingSipImpl and
OperationSetBasicTelephonySipImpl (telephony because of the stream setup)
would probably be your starting points. But maybe someone else has some more
comments.

Ultimately we'd have to provide a SIP implementation for
OperationSetFileTransfer too. As mentioned above I see this as the main
incentive for MSRP support in Jitsi (obviously MSRP chats would also be
nice but I possibly a somewhat lesser priority)

I am not sure if OpSetBasicTelephony would be the best place for MSRP
session establishment to live. We'd probably like to move some of the
code into a parent level class and have the op sets for Telephony, Basic
IM, and File Transfer, descend from it.

But! I am perfectly happy for us to do that _after_ we have a first
implementation.

Good luck with your work Tom! Let us know if you need help at any point.

Cheers,
Emil

···

On 06.02.13, 09:42, Ingo Bauersachs wrote:

Thanks in advance,
    Tom Uijldert.

Regards,
Ingo

--
https://jitsi.org


#4

From: Emil Ivov [mailto:emcho@jitsi.org]

Hey Tom,

> Hey
>
>> I'm currently investigating the possibility of integrating MSRP in
>> the Jitsi client.
>
> Thanks, would certainly be nice to have!

Indeed! It would be great!

File transfer is one of the major advantages of XMPP over SIP in Jitsi
so adding MSRP would put both protocols on almost the same plane.

I really hope this works out!

Sorry, my primary goal is to have chat first so I can use it to test a
server implementation...

>> Am I correct in assuming that this actually needs to be done as a
>> MediaStream in libjitsi?
>
> I don't know MSRP, but the RFC abstract kind of sounds like that.

Well ... I don't know about that. I don't think an MSRP integration
would need to use anything in libjitsi, nor I see anything in libjitsi
that would require msrp.

net.java.sip.communicator.impl.protocol.sip.sdp.SdpUtils.getMediaType() uses
org.jitsi.service.neomedia.MediaType.parseString(), presumably to find out
what media is requested (audio, video).
This needs the addition of mediatype "message" in order to detect MSRP
requests.
Ergo, changes in libjitsi.
Btw., the jsip sdp parser couldn't handle that either
(http://java.net/jira/browse/JSIP-406)
Is this patch already included in Jitsi?

Given that SIP is the only protocol that would use it, I think we can
do all the integration there.

Some of us have been chatting about creating a libjitsi-protocols at
some point and MSRP could get into there together with SIP.

>> And if so, what's the URL of the source-repo?
>
> https://svn.java.net/svn/jitsi~svn/libjitsi/

Yeah, I figured that one out myself finally.
The reason I missed it is because I normally look into "trunk", assuming
anything beside that level is a parallel branch or tag.
Is this setup intentional? Do you not plan to have parallel development in
libjitsi?
Btw.: https://jitsi.org/Documentation/CommittingCode still mentions "cvs",
isn't that a bit outdated? Other than that, kudos on documentation :slight_smile:

>> Any other hints on possible integration are more than welcome.
>
> The classes OperationSetBasicInstantMessagingSipImpl and
> OperationSetBasicTelephonySipImpl (telephony because of the stream
> setup) would probably be your starting points. But maybe someone else
> has some more comments.

Ultimately we'd have to provide a SIP implementation for
OperationSetFileTransfer too. As mentioned above I see this as the main
incentive for MSRP support in Jitsi (obviously MSRP chats would also be
nice but I possibly a somewhat lesser priority)

I am not sure if OpSetBasicTelephony would be the best place for MSRP
session establishment to live. We'd probably like to move some of the
code into a parent level class and have the op sets for Telephony,
Basic IM, and File Transfer, descend from it.

But! I am perfectly happy for us to do that _after_ we have a first
implementation.

Good luck with your work Tom! Let us know if you need help at any
point.

So, to design a bit more:
- msrp should be handled as a mediastream under SIP control.
- on a "go to chatroom" action or "send a message" to a SIP contact or
receiving a SIP INVITE with SDP "m=message", a chat-window needs to be
opened.
- SIP/SDP provides additional info on participants etc., while msrp handles
the actual messaging itself.

Telephony and basic chat are remarkably similar btw., not sure about the
need for a parent level.

What classes/bundles should I investigate a bit more with the above 'design'
in mind?

···

-----Original Message-----
On 06.02.13, 09:42, Ingo Bauersachs wrote:


#5

Hey Tom,

From: Emil Ivov [mailto:emcho@jitsi.org]

Hey Tom,

Hey

I'm currently investigating the possibility of integrating MSRP in
the Jitsi client.

Thanks, would certainly be nice to have!

Indeed! It would be great!

File transfer is one of the major advantages of XMPP over SIP in Jitsi
so adding MSRP would put both protocols on almost the same plane.

I really hope this works out!

Sorry, my primary goal is to have chat first so I can use it to test a
server implementation...

OK. Do you plan on doing file transfer after that?

Am I correct in assuming that this actually needs to be done as a
MediaStream in libjitsi?

I don't know MSRP, but the RFC abstract kind of sounds like that.

Well ... I don't know about that. I don't think an MSRP integration
would need to use anything in libjitsi, nor I see anything in libjitsi
that would require msrp.

net.java.sip.communicator.impl.protocol.sip.sdp.SdpUtils.getMediaType() uses
org.jitsi.service.neomedia.MediaType.parseString(), presumably to find out
what media is requested (audio, video).
This needs the addition of mediatype "message" in order to detect MSRP
requests.

We can add both message and application to the MediaType enum, but I
still think it would be better to keep MSRP out of it.

Ergo, changes in libjitsi.
Btw., the jsip sdp parser couldn't handle that either
(http://java.net/jira/browse/JSIP-406)
Is this patch already included in Jitsi?

I am not sure. I don't think so.

Given that SIP is the only protocol that would use it, I think we can
do all the integration there.

Some of us have been chatting about creating a libjitsi-protocols at
some point and MSRP could get into there together with SIP.

And if so, what's the URL of the source-repo?

https://svn.java.net/svn/jitsi~svn/libjitsi/

Yeah, I figured that one out myself finally.
The reason I missed it is because I normally look into "trunk", assuming
anything beside that level is a parallel branch or tag.
Is this setup intentional? Do you not plan to have parallel development in
libjitsi?

We keep branches in the "branches" directory. We otherwise use the root
for projects that we need to sync with Jitsi and/or those that we want
to have the same root permissions.

We'll soon be moving all this to github though and I expect the
structure to change there.

Btw.: https://jitsi.org/Documentation/CommittingCode still mentions "cvs",
isn't that a bit outdated?

Oh right! Thanks! I just changed those.

Other than that, kudos on documentation :slight_smile:

Thanks :).

Any other hints on possible integration are more than welcome.

The classes OperationSetBasicInstantMessagingSipImpl and
OperationSetBasicTelephonySipImpl (telephony because of the stream
setup) would probably be your starting points. But maybe someone else
has some more comments.

Ultimately we'd have to provide a SIP implementation for
OperationSetFileTransfer too. As mentioned above I see this as the main
incentive for MSRP support in Jitsi (obviously MSRP chats would also be
nice but I possibly a somewhat lesser priority)

I am not sure if OpSetBasicTelephony would be the best place for MSRP
session establishment to live. We'd probably like to move some of the
code into a parent level class and have the op sets for Telephony,
Basic IM, and File Transfer, descend from it.

But! I am perfectly happy for us to do that _after_ we have a first
implementation.

Good luck with your work Tom! Let us know if you need help at any
point.

So, to design a bit more:
- msrp should be handled as a mediastream under SIP control.

Yes, although I am not sure exactly what you mean by this in terms of
classes and packages.

- on a "go to chatroom" action or "send a message" to a SIP contact or
receiving a SIP INVITE with SDP "m=message", a chat-window needs to be
opened.

The former two will be taken care of by existing GUI code. You would
however need to make sure that when a message is actually sent, or a
chat room joined, we continue with MSRP rather than existing code. We
can implement this with account properties for starters and choose one
of the options (MESSAGE/MSRP) through the account wizard.

You also need to make sure you fire the corresponding message events for
the third one.

- SIP/SDP provides additional info on participants etc., while msrp handles
the actual messaging itself.

If you also mean to use this for group chats then you'd have to
implement one of our multi user chat op sets:

OperationSetMultiUserChat
OperationSetAdHocMultiUserChat

I don't know that much about MSRP MUCs but I believe the first one would
probably fit better.

Telephony and basic chat are remarkably similar btw., not sure about the
need for a parent level.

OpSetBasicTelephony is 2000+ LOC already and I really wouldn't want to
add the MSRP cases in there. You can extend it directly if you wish
(rather than extracting a parent from it), and we'll decide whether or
not this is OK on a later stage. At that point it would mostly be a
matter of moving code around.

What classes/bundles should I investigate a bit more with the above 'design'
in mind?

Everything should be within the SIP provider bundle, other than the
MediaType extension in libjitsi.

Cheers,
Emil

···

On 07.02.13, 05:38, Tom Uijldert wrote:

-----Original Message-----
On 06.02.13, 09:42, Ingo Bauersachs wrote:

--
https://jitsi.org


#6

> Ergo, changes in libjitsi.
> Btw., the jsip sdp parser couldn't handle that either
> (http://java.net/jira/browse/JSIP-406)
> Is this patch already included in Jitsi?

I am not sure. I don't think so.

It is (I don't get parsing errors on such sdp).
Puzzles me a bit as jain-sdp.jar/manifest says V1.2.159, thought patch was
later...

Anyway, nice.

Cheers,
    Tom.