Dialogic Dialogic Global Call IP IP Phone User Manual


 
with IPSET_MIME_200OK_TO_BYE and MIME information set with IPSET_MIME are kept
independent of each other on a given channel.
The data that is to be sent in the MIME part body is copied into the message MIME part from an
application buffer. The data in the buffer must match the data type that is specified by the
IPPARM_MIME_PART_TYPE parameter. The Dialogic
®
Global Call API library treats the buffer
as a continuous block of binary data of the length (in bytes) specified in
IPPARM_MIME_PART_BODY_SIZE; no type checking or formatting is performed. Note that a
MIME body part does not necessarily end with ‘\0’, and that a MIME body might contain ‘\0’ as
part of the body itself.
Constructing and setting a MIME message is a multi-part process that can be broken down into
several sub-processes:
1. Create and populate a separate GC_PARM_BLK structure for each MIME part to be sent in
the SIP message.
2. Create a top-level GC_PARM_BLK structure and populate it with IPPARM_MIME_PART
parameters that point to the GC_PARM_BLK structures created in the first step.
3. Set or send the message by calling the appropriate Global Call function.
4. Clean up the data structures after the function returns.
Create MIME part structures
The process of constructing an outgoing SIP MIME message begins by constructing a separate
GC_PARM_BLK structure for each MIME part to be sent in the message:
1. Create a GC_PARM_BLK structure.
2. Insert the required IPPARM_MIME_PART_TYPE parameter to identify the MIME part type
using the extended function because the type string may
exceed 255 bytes in length.
3. Insert any MIME part headers via one or more optional IPPARM_MIME_PART_HEADER
parameters, using the extended function because the headers
may exceed 255 bytes in length.
4. Insert the required IPPARM_MIME_PART_BODY_SIZE parameter to identify the actual
number of bytes to be copied from the application buffer to the MIME part body using the
function.
5. Insert the required IPPARM_MIME_PART_BODY parameter with a pointer to the application
buffer that contains the data for the MIME part body using the
function. Note that the Dialogic
®
Global Call API library treats the buffer as a continuous
block of binary data, and that the data must have the appropriate format for the MIME part
type specified in the IPPARM_MIME_PART_TYPE parameter.
Create top-level GC_PARM_BLK
After repeating the preceding procedure for each MIME part to be sent in the SIP message,
construct the top-level data structure that lists the MIME part structures:
1. Create a GC_PARM_BLK structure.