Dialogic Global Call IP Benutzerhandbuch

Seite von 604
315
Dialogic Corporation
4.25.5
Call Transfer When Using SIP 
This section describes specific call transfer procedures when using SIP protocol. For complete SIP-
specific call transfer scenarios see 
page 74. The topics covered here include: 
4.25.5.1
Enabling GCEV_INVOKE_XFER_ACCEPTED Events
The following code snippet illustrates how to enable the GCEV_INVOKE_XFER_ACCEPTED 
event type, which is optionally used to notify the application at party A that party B has accepted a 
transfer request. This event type is disabled by default. This event can be enabled for an individual 
line device at any time after the line device is opened. The event is enabled in the party A 
(Transferor) application, and need only be enabled if the application wishes to receive the events. 
Note that there is no equivalent event in H.450.2.
//enable GCEV_INVOKE_XFER_ACCEPTED event
GC_PARM_BLK *t_pParmBlk = NULL;
long request_id;
gc_util_insert_parm_val(&t_pParmBlk, GCSET_CALLEVENT_MSK, GCACT_ADDMSK,  
                        sizeof(long), GCMSK_INVOKEXFER_ACCEPTED);
gc_SetConfigData(GCTGT_GCLIB_CHAN,ldev,t_pParmBlk, 0, GCUPDATE_IMMEDIATE, &request_id, EV_SYNC);
gc_util_delete_parm_blk(t_pParmBlk);
Disabling the event is done in exactly the same way except that the parameter ID that is set in the 
GC_PARM_BLK would be GCACT_SUBMSK instead of GCACT_ADDMSK.
4.25.5.2
Invoking an Unattended Call Transfer
The following code snippet illustrates how to invoke an unattended (blind) transfer on a channel 
that is in the connected state. In this example, the Refer-To header field of the REFER message that 
is sent is set to “sip:500@192.168.1.10”, while the Referred-By header field is automatically 
populated by Global Call. 
int Gc_InvokeXfer(int channel)
{
   INT32  rc;
   GCLIB_MAKECALL_BLK t_gclibmakecallblk;
   GC_MAKECALL_BLK    t_gcmakecallblk = {0};
   char invokeaddr[] = "192.168.1.10";  // party C (TRTSE)
   char phonelist[] = "500";