2.17.1. ISDN Setup Messages
ISDN Setup messages vary in complexity depending on the calling scenarios and the network service selections. 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. More complex calling scenarios require the definition of additional information elements (IEs) in the SETUP message.
The GC_MAKECALL_BLK associated with the gc_MakeCall( ) function and the gc_SetInfoElem( ) function provide developers with the ability to set call IEs for both simple and complex calling scenarios.
Using the GC_MAKECALL_BLK Structure
The GC_MAKECALL_BLK structure contains two pointers to structures that can be used to define SETUP message information.
When using Springware boards, the following options are available:
- For simple call scenarios, you can set up information elements in gclib and set cclib to NULL.
- For more complicated call scenarios or network services, you can set up information elements in cclib and set gclib to NULL.
- Notes:
- 1. You can set IEs in gclib and set cclib to NULL or you can set IEs in cclib and set gclib to NULL.
2. When using DM3 boards, if both the cclib and gclib pointers are set, the gclib pointer is ignored.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 Section 5.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 Section 5.3, GC_MAKECALL_BLK.
Table 11 shows the parameters that can be included in the GC_MAKECALL_BLK associated with the gc_MakeCall( ) function.
The gc_SetParm( ) function can also be used to specify call setup parameters. See Section 2.32, gc_SetParm( ) for more information.
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); } . . . }The gc_SetParm( ) function can also be used to set call setup parameters. See for more information.
Click here to contact Telecom Support Resources
Copyright 2003, Intel Corporation