< 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


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)
{
    try
    {
        Mime type(YourCustomMimeType, YourCustomMimeSubType);
        OctetContents* contents = new OctetContents(txt, type);
        if(contents)
        {
            contents->header(h_ContentDisposition).value() = CSTAContentDisposition;
            contents->header(h_ContentDisposition).param( p_handling ) = CSTAContentDispositionHandling;
        }
        else
        {
            ErrLog(<< "Error creating body");
        }
        return contents;
    }
    catch(...)
    {
        ErrLog(<< "buildCSTAContents: Error creating body - exception");
    }
}

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

    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....


Scott

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.

Thanks,

Andriy

---------- 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
uasMasterProfile->addSupportedOptionTag(Token("siprec"));
// adds feature tag in Contact header
static const ExtensionParameter p_srs("+sip.srs");
NameAddr capabilities;
capabilities.param(p_srs);
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.

Thanks,

Andriy


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

To subscribe or unsubscribe via the World Wide Web, visit
        https://list.resiprocate.org/mailman/listinfo/resiprocate-users
or, via email, send a message with subject or body 'help' to
        resiprocate-users-request@xxxxxxxxxxxxxxx

You can reach the person managing the list at
        resiprocate-users-owner@xxxxxxxxxxxxxxx

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
Cc: 
Bcc: 
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,

Andriy



_______________________________________________
resiprocate-users mailing list
resiprocate-users@xxxxxxxxxxxxxxx
https://list.resiprocate.org/mailman/listinfo/resiprocate-users


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