Dialogic Dialogic Global Call IP IP Phone User Manual


 
Dialogic
®
Global Call IP Technology Guide — November 2007 403
Dialogic Corporation
accept proposed modification of call characteristics — gc_AcceptModifyCall( )
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;
case GCEV_ACCEPT_MODIFY_CALL_FAIL:
/* process failure to change attribute */
if (gc_ResultInfo(&metaevent, &t_info) < 0)
{
/* failure logic here */
}
/* process information contained in t_info */