TBCT enables an ISDN PRI user to request the switch to connect together two independent calls on the user's interface. The two calls can be served by the same PRI trunk or by two different PRI trunks that both serve the user.
If the switch accepts the request, the user is released from the calls and the two other users are connected directly. Billing for the two original calls continues in the same manner as if the transfer had not occurred. As an option, TBCT also allows for transfer notification to the transferred users.
TBCT works only when all of the following conditions are met:
The TBCT feature is invoked by sending a FACILITY message to the Network containing, among other things, the Call Reference Values (CRVs) of the two calls to be transferred. The cc_GetNetCRV( ) function allows applications to query the Dialogic firmware directly for the Network Call Reference Value. (See the cc_GetNetCRV( ) function description in Chapter 5. ISDN Function Reference for more information.)
When a transferred call is disconnected, the network informs the TBCT controller by sending a NOTIFY message with the Network Call Reference Value. The application receives the GCEV_EXTENSION event (with ext_id = GCIS_EXEV_NOTIFY) event.
The following figures provide line diagrams that illustrate the operation of this feature. Figure 7 shows the invocation of TBCT with notification in which both calls answered.
Figure 7. TBCT Invocation with Notification (Both Calls Answered)

Figure 8 shows the invocation of TBCT with notification where one call is answered and the other call is alerting.
Figure 8. TBCT Invocation with Notification (Call 1 Answered/Call 2 Alerting)

The following call scenario describes the procedures for initiating a TBCT. The scenario is followed by code samples that demonstrate the use of Dialogic API in initiating a TBCT.
Synchronous Programming: Initiating TBCT
Application |
Device Driver |
State |
Firmware |
Network |
cc_Open( ) |
NULL |
|||
Return with board level device <-- |
||||
cc_Open( ) |
NULL |
|||
Return with line device <-- |
||||
Users A & B connected | ||||
cc_GetNetCRV |
ISDN_GETNETCRV --> |
CONNECTED (Calls #1 and #2) |
||
ISDN_GETNETCRV <-- |
||||
Return with network CRV <-- |
||||
cc_SndMsg |
||||
CALL_FACILITY (Call #1) --> |
Facility --> |
|||
CCEV_FACILITY (Call #1) <-- |
Facility <-- | |||
cc_GetCallInfo( ) |
||||
DISCONNECTED (Call #1) |
CALL_DISC (Call #1) <-- |
Disconnect (Call #1) <-- | ||
CCEV_DISCONNECT (Call #1) <-- |
Release (Call #1) --> |
|||
cc_DropCall( ) |
CALL_DISCONNECTED (Call #1) --> |
IDLE (Call #1) |
Rel_Comp (Call #1) <-- | |
CCEV_DROPCALL (Call #1) <-- |
CALL_CLEARED (Call #1) <-- |
|||
cc_ReleaseCall( ) |
CALL_DEALLOC (Call #1) --> |
|||
Driver releases CRN return |
NULL (Call #1) |
CALL_DEALLOC_ACK (Call #1) <-- |
||
DISCONNECTED (Call #2) |
CALL_DISC (Call #2) <-- |
Disconnect (Call #2) <-- | ||
CCEV_DISCONNECT (Call #2) <-- |
Release (Call #2) --> |
|||
cc_DropCall( ) |
CALL_DISCONNECTED (Call #2) --> |
IDLE (Call #2) |
Rel_Comp (Call #2) <-- | |
CCEV_DROPCALL (Call #2) <-- |
CALL_CLEARED (Call #2) <-- |
|||
cc_ReleaseCall( ) (Call #2) --> |
CALL_DEALLOC (Call #2) |
|||
Driver releases CRN return |
NULL (Call #2) |
CALL_DEALLOC_ACK (Call #2) <-- |
||
Users A & B disconnected | ||||
Notify (CRV = 0) <-- | ||||
CALL_NOTIFY (boarddev = dtiB#, CRN = 0) <-- |
||||
CCEV_NOTIFYNULL (boarddev = dtiB#, CRN = 0) <-- |
||||
cc_GetNonCallMsg( ) |
||||
Return with NOTIFY message <-- |
||||
The following code samples demonstrate the use of the Dialogic API at various stages of the TBCT call scenario.
1. Opening a board level device:
LINEDEV dti_dev1_hdl;
.
.
rc = cc_Open( &dti_bd_hdl, "dtiB1", 0);
.
.
2. Retrieving the Network's Call Reference Value:
CRN crn1=0;
unsigned short crn1_crv=0;
.
.
rc = cc_GetNetCRV ( crn1, &crn1_crv );
.
.
3. Building and sending the Facility message to initiate the TBCT for ISDN NI2 protocols on a DMS switch:
typedef union {
struct {
unsigned char ie_id; // Byte 1
unsigned char length; // Byte 2
unsigned char prot_profile :5; // Byte 3, Intel Layout
unsigned char spare :2;
unsigned char extension_1 :1;
unsigned char comp_type; // Byte 4
unsigned char comp_length; // Byte 5
unsigned char comp_data[249]; // Bytes 6 to 254
.
.
// Preparing the Facility IE Element
tbct_ie.bits.ie_id = 0x1C;
tbct_ie.bits.length = 21;
tbct_ie.bits.extension_1 = 1;
tbct_ie.bits.spare = 0x00;
tbct_ie.bits.prot_profile = 0x11; // Supplementary Service (ROSE)
tbct_ie.bits.comp_type = 0xA1; // Invoke
tbct_ie.bits.comp_length = 18; // Component Length (Data Only)
tbct_ie.bits.comp_data[0] = 0x02; // Invoke Identifier, tag
tbct_ie.bits.comp_data[1] = 0x01; // Invoke Identifier, length
tbct_ie.bits.comp_data[2] = 0x2E; // Invoke Identifier, invoke ie (varies)
tbct_ie.bits.comp_data[3] = 0x06; // Operation Object, tag
tbct_ie.bits.comp_data[4] = 0x07; // Operation Object, length
tbct_ie.bits.comp_data[5] = 0x2A; // Operation Object, Operation Value
tbct_ie.bits.comp_data[6] = 0x86; // Operation Object, Operation Value
tbct_ie.bits.comp_data[7] = 0x48; // Operation Object, Operation Value
tbct_ie.bits.comp_data[8] = 0xCE; // Operation Object, Operation Value
tbct_ie.bits.comp_data[9] = 0x15; // Operation Object, Operation Value
tbct_ie.bits.comp_data[10] = 0x00; // Operation Object, Operation Value
tbct_ie.bits.comp_data[11] = 0x08; // Operation Object, Operation Value
tbct_ie.bits.comp_data[12] = 0x30; // Sequence, tag
tbct_ie.bits.comp_data[13] = 0x04; // Sequence, length (varies, combined length of Link & D Channel ID )
tbct_ie.bits.comp_data[14] = 0x02; // Link ID, tag
tbct_ie.bits.comp_data[15] = 0x02; // Link ID, length (varies)
tbct_ie.bits.comp_data[16] = (unsigned char) ((crn2_crv>>8)&0xFF);
// Link ID, linkid value (varies)
tbct_ie.bits.comp_data[17] = (unsigned char) (crn2_crv&0xFF);
// Link ID, inkid value (varies)
// The D Channel Identifier is Optional
// tbct_ie.bits.comp_data[18] = 0x04; // D Channel ID, tag
// tbct_ie.bits.comp_data[19] = 0x04; // D Channel ID, length
// tbct_ie.bits.comp_data[20] = 0x00; // D Channel ID, dchid (varies)
// tbct_ie.bits.comp_data[21] = 0x00; // D Channel ID, dchid (varies)
// tbct_ie.bits.comp_data[22] = 0x00; // D Channel ID, dchid (varies)
// tbct_ie.bits.comp_data[23] = 0x00; // D Channel ID, dchid (varies)
/*
** Load all the IEs into a single IE block
** !!NOTE!! - IE must be added in IE ID order!
*/
ie_blk.length = (5 + 18);
for ( ctr = 0; ctr < ie_blk.length; ctr++ ) {
ie_blk.data[ctr] = tbct_ie.bytes[ctr];
} /* end if */
/*
** Send out a facility message that will execute the transfer
*/
rc = cc_SndMsg( crn2, SndMsg_Facility, &ie_blk );
4. Processing the Network response to TBCT request:
typedef union {
struct {
unsigned char ie_id; // Byte 1
unsigned char length; // Byte 2
unsigned char prot_profile :5; // Byte 3, Intel Layout
unsigned char spare :2;
unsigned char extension_1 :1;
unsigned char comp_type; // Byte 4
unsigned char comp_length; // Byte 5
unsigned char comp_data[249]; // Bytes 6 to 254
} bits;
unsigned char bytes[254];
} FACILITY_IE_LAYOUT;
.
FACILITY_IE_LAYOUT *tbct_ie;
.
IE_BLK ie_list;
ext_id = (EXTENSIONEVTBLK*) (metaevt.extevtdatap);
/*assumes 'metaevt' is filled by gc_GetMetaEvent */
switch ( event )
{
.
.
case GCEV_EXTENSION:
switch (ext_id)
{
.
.
.
// retrieve facility IE
for (ie_len = 2; ie_len < ie_list.length;)
{
if (ie_list[ie_len] == FACILITY_IE)
// found the facility IE
{
tbct_ie = &ie_list[ie_len]; // process the Facility IE
tbct_ie_len = tbct_id->length;
#define FACILITY_IE 0x1C
#define RETURN_RESULT 0xA2
#define RETURN_ERROR 0xA3
#define REJECT 0xA4
#define INVOKE_IDEN_TAG 0x02
if (tbct_ie->bits.comp_type == RETURN_RESULT)
// network accepted TBCT request{
.
.
// if subscribed to Notification to Controller, check for Invoke component //
if (tbct_ie->bits.comp_data[0] == INVOKE_IDEN_TAG)
{
invoke_iden = tbct_ie->bits.comp_data[2];
// get invoke identifier
}}
else if (tbct_ie->bits.comp_type == RETURN_RESULT)
// network accepted TBCT request
}
else
{
/* if it is not facility IE, go to the next IE */
/* if this is single byte IE */
if (ie_list[ie_len] & 0x80)
/* increment by one byte */
ie_len = ie_len + 1;
else/* otherwise increment by length of the IE */
ie_len = ie_len + ie_list[ie_len + 1];
}
}
break;
.
.
5. Processing the Network notification for disconnecting transferred calls:
ext_id = (EXTENSIONEVTBLK*) (metaevt.extevtdatap);
/*assumes 'metaevt' is filled by gc_GetMetaEvent */ switch ( event ) { . . . case GCEV_EXTENSION: switch (ext_id); . . . case GCIS_EXEV_NOTIFY: gc_GetInfoElem( boarddev, &ie_list ); . . . // retrieve Notification IE for (ie_len = 2; ie_len < ie_list.length;) { if (ie_list[ie_len] == NOTIFICATION_IE) // found the Notification IE { } else { /* if it is not facility IE, go to the next IE */ /* if this is single byte IE */ if (ie_list[ie_len] & 0x80) /* increment by one byte */ ie_len = ie_len + 1; else /* otherwise increment by length of the IE */ ie_len = ie_len + ie_list[ie_len + 1]; } } break; . . . }
Click here to contact Dialogic Customer Engineering
Copyright 2001, Dialogic Corporation