This project is read-only.

Establish MSRP channel

May 14, 2013 at 7:03 PM

First wanted to say this project looks awesome - great work!

I'd like to use SIP in order to establish a MSRP channel for chat, file transfer etc.
This is done over an INVITE request as described:

An INVITE will look like this:
Call-ID: 3413an89KU
Content-Type: application/sdp

c=IN IP4
m=message 7654 TCP/MSRP *

Is there a way to add the payload to the INVITE using this project?
It seem there is no sendInvite method that expects additional arguments.

I'd love to get your thoughts and ideas on how this is possible.

May 15, 2013 at 11:33 AM
You can create a SIPCallDescriptor with a custom SDP payload as the content, and call SIPClientUserAgent.Call method to create an INVITE transaction.
Check out the SoftPhone application if you haven't done already ;)

string sdp = 
    "c=IN IP4" + "\n" +
    "m=message 7654 TCP/MSRP *" + "\n" +
    "a=accept-types:text/plain" + "\n" +

SIPCallDescriptor callDescriptor = new SIPCallDescriptor(sipUsername, sipPassword, callURI.ToString(), fromHeader, null, null, null, null, SIPCallDirection.Out, SDP.SDP_MIME_CONTENTTYPE, sdp, null);

var m_uac = new SIPClientUserAgent(m_sipTransport, null, null, null, null);
May 15, 2013 at 11:54 AM
It should be straight forward to send a custom SDP payload, such as the MSRP one, within an INVITE transaction. The SIP stack in this project largely ignores the body of a the INVITE request (the softphone project is an exception since it needs to parse the SDP to set up the RTP) apart from a few places where NAT handling is invoked to replace private IP addresses.

As tacnayn has pointed out the softphone project is the best starting point for a client that wants to use MSRP. The quickest and dirtiest way would be to rip all the RTP and Audio handling out of the softphone and replace it with the MSRP handling code. The clean way would be to add some logic that checked the protocol specified in the SDP and handle it with the RTP or MSRP logic appropriately.
May 15, 2013 at 4:50 PM
Thanks so much for the information!
I'll try it out and let you guys know how it went.

Thank you!