2.16.1. ISDN Setup Messages
A minimum requirement for an ISDN setup message is three mandatory call information elements (IE): channel number (time slot number), destination number (digits), and bearer capability (characteristics of the channel). The first two elements tell the network which channel to use and the destination of the call. The third element tells the network the path for routing the call. The user can include optional elements in the setup message by using the cclib element of the MAKECALL_BLK data structure in the gc_MakeCall( ) function.
The cclib field of GC_MAKECALL_BLK must be NULL. The gclib field of GC_MAKECALL_BLK must be set; for details, see Section4.3, GC_MAKECALL_BLK.
The call IEs needed in a setup message are determined by the type and complexity of the application and how calls are made. GlobalCall provides developers the ability to set these parameters using GC_MAKECALL_BLK and the gc_SetInfoElem( ) function. See the following section for a description of each of these choices.
Using the GC_MAKECALL_BLK Structure
The GC_MAKECALL_BLK structure (that is, the cclib element of the gc_MakeCall( ) function's makecallp parameter) is used to set up complicated calling situations or network service selections. Certain information required to fill in the GC_MAKECALL_BLK structure can only be provided by your ISDN service provider. When using the GC_MAKECALL_BLK structure, all entries must be initialized. See Section4.3, GC_MAKECALL_BLK.
- Note: Because ISDN services vary with switches and provisioning plans, a set of default standards cannot be set for the GC_MAKECALL_BLK structure. Therefore, it is up to the application to fill in the applicable MAKECALL_BLK values that apply to the particular provisioning. See Section4.3, GC_MAKECALL_BLK.
Using the gc_SetInfoElem( ) Function
Not all optional IEs can be set using the GC_MAKECALL_BLK structure. When additional IEs are to be added to the setup message (or to other messages), then the gc_SetInfoElem( ) function is used in combination with the GC_MAKECALL_BLK structure.
The format used in the gc_SetInfoElem( ) function must conform to CCITT IE defined formats. The following example illustrates using the gc_SetInfoElem( ) function in this manner.
#include <windows.h> /* For Windows applications only */ #include <stdio.h> #include <errno.h> #include <signal.h> #include "srllib.h" #include "dtilib.h" #include "gcisdn.h" /* Global variables */ LINEDEV lbuf; CRN crn_buf; unsigned long mode = EV_ASYNC; /* Mode = Asynchronous */ void InitIEBlk (IE_BLK *ie_blk_ptr) { IE_BLK_PTR -> length = 6; /* 6 bytes of data */ /* The first IE */ ie_blk_ptr -> data [0]= 0x78; /* IE type=78(TRANSIT NETWORK SELECTION) */ ie_blk_ptr -> data [1]= 0x04; /* the length of NOTIFY */ ie_blk_ptr -> data [2]= 0xA1; /* National network & carrier ID */ /* The second IE */ ie_blk_ptr -> data [3]= 0x32; /* IE type=28 (DISPLAY) */ ie_blk_ptr -> data [4]= 0x38; /* length of DISPLAY */ ie_blk_ptr -> data [5]= 0x38; /* caller name displayed */ }; void main() { int rc; char *devname = ":N_dtiB1T1:P_isdn"; IE_BLK ie_blk; /* open the device */ if (( rc = gc_Open(&lbuf, devname, 0)) < 0) { printf("%s: ERROR %d: Unable to open\n",devname,rc); exit(1); } . . . /* Application set up `TRANSIT NETWORK SELECTION' by using gc_SetInfoElem() function call. Initialize TNS IE first. */ /* setting up the TNS IE */ InitIEBlk(&ie_blk); if ((rc = gc_SetInfoElem(lbuf, &ie_blk)) < 0) { printf("%s: ERROR %d: Unable to set info element\n",devname,rc); exit (1); } if (rc = gc_MakeCall(lbuf, &crn_buf, "1234567", NULL, 0, EV_ASYNC) == -1) { printf("%s: ERROR %d: Unable to make call\n",devname,rc); exit (1); } . . . }Table26 lists the parameter selections set by the gc_SetParm( ) function. All valid values are defined in the isdncmd.h header file. The default values appear in bold. If no default value is indicated, you need to set the parameter using the gc_SetParm( ) function or specify the parameter in the MAKECALL_BLK data structure. Unspecified parameters that do not have default values are not included in the setup message.
Click here to contact Dialogic Customer Engineering
Copyright 2001, Dialogic Corporation