Dialogic Dialogic Global Call IP IP Phone User Manual


 
348 Dialogic
®
Global Call IP Technology Guide — November 2007
Dialogic Corporation
Third Party Call Control (3PCC) Operations and Multimedia Support
IPSET_SDP Code Example
/* */
/* Description: Send a SIP re-INVITE containing an SDP offer */
/* for IP Address, RTP port, coder type. */
/* */
/* Assumes: 1) caller has verified call to be in connected state */
/* */
int sendOfferOnReinvite(CRN crn, long time, char *pIpAddr,
short rtpPort, short coderType)
{
int dataSize;
int rc;
GC_PARM_BLKP gcParmBlk = NULL;
char sdpMsg[512];
char sdpMsgFormat[] =
"v=0\r\n"
"o=Dialogic_IPCCLib %d %d IN IP4 %s\r\n"
"s=Dialogic_SIP_CCLIB\r\n"
"i=session information\r\n"
"c=IN IP4 %s\r\n"
"t=0 0\r\n"
"m=audio %d 2000 RTP/AVP %d\r\n";
/* initialize the SDP content */
sprintf(sdpMsg, sdpMsgFormat, time, time + 1,
pIpAddr, pIpAddr, rtpPort, coderType);
/* Add 1 to strlen for null termination */
data_size = strlen(sdpMsg) + 1;
GCEV_EXTENSION (IPEXTID_) BRD
CRN
SIP OPTIONS message (inbound request)
SIP OPTIONS message’s 200 OK reply (inbound response
success)
Note: This is for the IXPEXTID_RECEIVEMSG extension
event type only, with a parameter block containing
IPPARM_MSGTYPE parameter value of
IP_MSGTYPE_SIP_OPTIONS.
GCEV_MODIFY_CALL_ACK CRN 200 OK response to re-INVITE
GCEV_MODIFY_CALL_REJ CRN 3xx-6xx response to re-INVITE
GCEV_OFFERED LD INVITE
GCEV_PROCEEDING CRN 100 Trying
GCEV_REQ_MODIFY_CALL CRN re-INVITE
GCEV_SIP_ACK CRN ACK
Table 22. Summary of Events That Support Global Call SDP Parameter Sets (Continued)
Global Call Event with Possible
SDP Parameter Set Attached†
Device
Type
Inbound SIP Message with optional SDP
† The Global Call event may contain a pointer to an EXTENSIONEVENTBLK which contains a pointer to a parameter block.
This parameter block may contain SDP content as an IPSET_SDP parameter ID.