HP-UX C SIP Stack Programmer's Guide (Novembery 2007)

Working with SIP Messages 177
Working With Multipart MIME
Figure 9-7 is an example of a SIP message with a multipart MIME body. Each
of the message parts is related to its corresponding object.
Figure 9-7 Multipart SIP Message
CONTENT-TYPE
H
EADER
The Body object contains a Content-Type header object identified by
RvSipContentTypeHeaderHandle. The Content-Type header describes the
media type of the Body. This applies both to a Body object within a SIP
message and to a Body object within a Body Part object.
Sample Code
The following code demonstrates how to set a Content-Type header to a
message.
INVIT E sip:user@hp.com SIP/2.0
CSeq: 1 INVITE
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary=unique-boundary-1
--unique-boundary-1
Content-Length: 100
Content-Type: application/SDP
v=0
--unique-boundary-1
Content-Type: application/ISUP; version=nxv3
Content-Disposition: signal; handling=optional
01 00 49 00 00 03 02 00 07 04 10 00 33 63 21
--unique-boundary-1--
Body string
Message Headers
and Start Line
First Body Part
Identified by
RvSipBodyPartHandle
Second Body Part
Identified by
RvSipBodyPartHandle
Body Object of
Message
Identified by
RvSipBodyHandle
Body Object of
First Body Part
Identified by
RvSipBodyHandle