User`s guide

Dialogic
®
System Release 6.0 PCI for Windows
®
Release Update, Rev 62 — January 30, 2008 206
Dialogic Corporation
/* Invoke transfer */
rc = gc_InvokeXfer(session[primaryChannel].crn, session[secondaryChannel].crn,
0, 0, 0, EV_ASYNC);
if(GC_SUCCESS != rc)
{
printf("GC_APP : [%d] Invoke Xfer failed!!!\n",primaryChannel);
return GC_ERROR;
}
return GC_SUCCESS;
}
1.51.3.4 Processing Asynchronous Call Transfer Events
The following code snippets illustrate how to handle the asynchronous events that notify
applications of the call transfer status as a SIP call transfer proceeds.
INT32 processEvtHandler()
{
METAEVENT metaEvent;
GC_PARM_BLK *parmblkp = NULL;
:
int rc = gc_GetMetaEvent(&metaEvent);
if (GC_SUCCESS != rc)
{
printf("GC_APP : gc_GetMetaEvent() failed\n");
return rc;
}
long evtType = sr_getevttype();
long evtDev = sr_getevtdev();
int g_extIndex = g_lArray[g_evtdev];
switch (evtType)
{
///////////////////////////////////////////
// Party A events
///////////////////////////////////////////
case GCEV_INVOKE_XFER_ACCEPTED:
// remote party has accepted REFER by 2xx response
printf("Invoke Transfer Accepted By Remote\n");
break;
case GCEV_INVOKE_XFER:
// remote party has notified transfer success in NOTIFY
printf("Invoke Transfer Successful\n");
break;
case GCEV_INVOKE_XFER_FAIL:
// Invoke Transfer failed by remote NOTIFY or locally
PrintEventError(&metaEvent);
break;
case GCEV_INVOKE_XFER_REJ:
// Invoke Transfer Rejected by Remote party
PrintEventError(&metaEvent);
break;
/////////////////////////////////////////
// Party B events
/////////////////////////////////////////