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

RE: [reSIProcate] Sending INVITE with multiple MIME attachments


Thanks. Found it in makeSelCert.cxx.

This is the code that works for me -

auto_ptr<SipMessage> message(Helper::makeInvite(...));
auto_ptr<MultipartMixedContents> multipartContents(new
MultipartMixedContents());
PlainContents* plainContents = new
PlainContents("1^8002755336^BorApp02^-1^0\r\n", Mime("text", "plain"));
multipartContents->parts().push_back(sdpFromAsterisk);
multipartContents->parts().push_back(plainContents);
message->setContents(multipartContents); 
sipStack.send(*message); 


andy



-----Original Message-----
From: Fischl jason [mailto:jason.fischl@xxxxxxxxx] 
Sent: Monday, August 22, 2005 9:36 AM
To: Andy Agarwal
Cc: resiprocate-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [reSIProcate] Sending INVITE with multiple MIME attachments

In general, there are usually unit test cases in the test
subdirectories. Take a look at (in the new file organization):

main/resip/stack/test/testMultipartRelated.cxx
main/resip/stack/test/testMultipartMixedContents.cxx

In the old structure, they are in sip/resiprocate/test

On 8/22/05, Andy Agarwal <Andy@xxxxxxxxxxx> wrote:
> Hi,
> 
> I am trying to figure out a way to send an INVITE which includes an
SDP (mime type - application/sdp) and another mime attachement which is
plain text.
> 
> reSIP has two related classes - MultipartRelatedContents and
MultipartMixedContents. I was hoping to find some usage examples of it
in the resip/stack/test folder but could not find an example that shows
how to construct the message using one of these two classes.
> 
> There are a couple of test source files (e.g.
http://scm.sipfoundry.org/viewsvn/resiprocate/main/resip/stack/test/test
MultipartMixedContents.cxx?rev=5295&view=markup)  but they don't deal
with MultipartMixedContents at all and also they only use the
MultipartRelatedContents class to parse the body of a SIP message. The
sending part is done by building the body outside and then passing it
into the MultipartRelatedContents object.
> 
> Can someone show me an example of using one of these classes to build
the multipart MIME attachment ?
> 
> thanks,
> andy
> _______________________________________________
> resiprocate-devel mailing list
> resiprocate-devel@xxxxxxxxxxxxxxxxxxx
> https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel
>