< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index Next in Thread >

Re: [reSIProcate-users] Fwd: Implementing DUM UAS for Session Recording Protocol RFC 7866 with resiprocate

Hello Scott,

Thank you very much for your help!

I implemented the first approach, it works.

I have a question please. If there are two similar contents types, application/rs-metadata and application/rs-metadata+xml, is it possible to register them with the same class, RsMetadataContents. I found myself duplicating the whole class and ended up with 2 classes:  RsMetadataContents and  RsMetadataXmlContents

Thank you very much in advance,


On Thu, Jun 28, 2018 at 5:13 PM Scott Godin <sgodin@xxxxxxxxxxxxxxx> wrote:
Hi Andriy,

It's odd, that I haven't seen any of your previous posts on this topic.  My apologies.

I'm not familiar with that RFC, and don't really have the time to read through it, but perhaps these pointers will help for the message body stuff.
You have two options for the message body:
1.  Create your own custom message body class, modeling after the existing classes should help you understand how to implement it (perhaps look at GenericPidfContents).  
2.  Use the OctetContents class and provide message body assembly and parsing outside of the class.  For example:

OctetContents* buildYourCustomBody(const Data& txt)
        Mime type(YourCustomMimeType, YourCustomMimeSubType);
        OctetContents* contents = new OctetContents(txt, type);
            contents->header(h_ContentDisposition).value() = CSTAContentDisposition;
            contents->header(h_ContentDisposition).param( p_handling ) = CSTAContentDispositionHandling;
            ErrLog(<< "Error creating body");
        return contents;
        ErrLog(<< "buildCSTAContents: Error creating body - exception");

Parsing example (unrecognized mime-types get created in resip as OctetContents):
MyUserAgent::onOffer(InviteSessionHandle h, const SipMessage& msg, const Contents& offer)
    OctetContents* contents = dynamic_cast<OctetContents*>((Contents*)&offer);
        h->reject(415 /* Unsupported Media Type */);

    Data body = contents->getBodyData();
    ParseBuffer pb(body);
    XMLCursor xml(pb);  // Assuming body has XML data - but use whatever parsing makes sense for you from here on....


On Thu, Jun 28, 2018 at 8:31 AM Andriy Brozgol <andrebroz@xxxxxxxxx> wrote:
Hello All,

Additionally I found the following:

// adds support for the message body
uasMasterProfile->addSupportedMimeType(INVITE, MultipartMixedContents::getStaticType());
uasMasterProfile->addSupportedMimeType(UPDATE, MultipartMixedContents::getStaticType());
uasMasterProfile->addSupportedMimeType(INVITE, RsMetadataContents::getStaticType());
uasMasterProfile->addSupportedMimeType(UPDATE, RsMetadataContents::getStaticType());

I haven't yet figured out how to extract the content from the message. If anybody can give me a clue I would be very grateful.



---------- Forwarded message ---------
From: Andriy Brozgol <andrebroz@xxxxxxxxx>
Date: Tue, Jun 12, 2018 at 4:21 PM
Subject: Re: Implementing DUM UAS for Session Recording Protocol RFC 7866 with resiprocate
To: <resiprocate-users@xxxxxxxxxxxxxxx>

Hello All,

So far I found the following:
// adds option tag in Supported header
// adds feature tag in Contact header
static const ExtensionParameter p_srs("+sip.srs");
NameAddr capabilities;
uasMasterProfile-> setUserAgentCapabilities(capabilities);

As far as I understand I need to create RsMetadataContents class which would register with the contents factory (similar to OctetContents for example)

I hope this will help somebody.



On Mon, Jun 11, 2018 at 7:00 PM, <resiprocate-users-request@xxxxxxxxxxxxxxx> wrote:
Send resiprocate-users mailing list submissions to

To subscribe or unsubscribe via the World Wide Web, visit
or, via email, send a message with subject or body 'help' to

You can reach the person managing the list at

When replying, please edit your Subject line so it is more specific
than "Re: Contents of resiprocate-users digest..."

[please change the subject line when replying]

Today's Topics:

   1. Implementing DUM UAS for Session Recording Protocol RFC 7866
      with resiprocate (Andriy Brozgol)

---------- Forwarded message ----------
From: Andriy Brozgol <andrebroz@xxxxxxxxx>
To: resiprocate-users@xxxxxxxxxxxxxxx
Date: Mon, 11 Jun 2018 14:47:28 +0300
Subject: [reSIProcate-users] Implementing DUM UAS for Session Recording Protocol RFC 7866 with resiprocate
Hello All,

I am trying to use resiprocate DUM for implementing UAS of recording server.

I have not much experience with resiprocate. If someone could help me in suggesting how to implement or at least pointing to some examples the following:

+sip.src feature tag in Contact header field
siprec option tag in Require header
multipart/mixed  content with application/rs-metadata content type and recording-session content disposition

I also ran into difficulty of accessing the API Docs for resiprocate. The link https://svn.resiprocate.org/dox/ seems broken.

Thank you very much in advance,


resiprocate-users mailing list

resiprocate-users mailing list
List Archive: http://list.resiprocate.org/archive/resiprocate-users/