Dialogic Dialogic Global Call IP IP Phone User Manual


 
Dialogic
®
Global Call IP Technology Guide — November 2007 411
Dialogic Corporation
reject proposed modification of call attributes — gc_RejectModifyCall( )
// applicationModifyMedia is a user supplied function
// that analyzes the raw SDP; it starts the media and provides
// a raw sdp answer for the remote endpoint if the media offer
// is acceptable. This function is not supplied in this sample.
if (applicationModifyMedia(parm.pData, parm.data_size
sdpResponse, &sdpResponseSize) == SUCCESS)
{
frc = gc_util_insert_parm_ref_ex(&replyParmblkp,
IPSET_SDP,
IPPARM_SDP_ANSWER,
sdpResponse
sdpResponseSize);
if (frc != GC_SUCCESS)
{
// call application error handler to drop the call and log the error.
applicationHandleError(...);
break;
}
proposal_accepted = true;
}
}
else
{
// No SDP was present in re-Invite. This is a re-Invite delayed offer.
// This re-Invite will be rejected as this sample does not support
// delayed offer call scenario.
proposal_accepted = false;
}
/* if proposal is acceptable then accept the request. */
/* Format accepted attributes (i.e. raw sdp answer) in a parmblk */
/* (optional, NULL if none). */
if (proposal_accepted)
{
if (gc_AcceptModifyCall(crn, replyParmblkp, EV_ASYNC) < 0)
{
// Invoke the application error handler to drop the call
applicationHandleError(...);
}
gc_util_delete_parm_blk(replyParmblkp);
}
else
{
/* not acceptable so respond with SIP Client Error */
/* final response of 488 Not Acceptable Here */
if (gc_RejectModifyCall(crn,
IPEC_SIPReasonStatus488NotAcceptableHere,
EV_ASYNC) < 0)
{
// Invoke the application error handler to drop the call
applicationHandleError(...);
}
}
break;
}
case GCEV_ACCEPT_MODIFY_CALL:
.
.
.
/* notify user of changed attribute */
.
.
.
break;