When using Global Call and the host based stack implementation, IP address and port information is configurable in the IPCCLIB_START_DATA structure used by the gc_Start( ) function. Each NIC or NIC address (if a NIC supports multiple addresses) corresponds to a IPT board device. For each IPT board device, a IP_VIRTBOARD structure contains the address and port variables. The local IP address for each IPT board device is a parameter of type IPADDR in the IP_VIRTBOARD structure. The signaling ports used for H.323 and SIP are also parameters in the IP_VIRTBOARD structure.
Caution:
In H.323, by default, the RAS signaling port is assigned to be one less than the H.323 signaling port. Consequently, to avoid a port conflict when configuring multiple boards, do not assign consecutive H.323 signaling port numbers to boards.
The following code example shows how to specify address and port information for a NIC with one address. The bold text shows the most relevant lines of code:
#define BOARDS_NUM 1
/* initialize start parameters */
IPCCLIB_START_DATA cclibStartData;
memset(&cclibStartData,0,sizeof(IPCCLIB_START_DATA));
IP_VIRTBOARD virtBoards[BOARDS_NUM];
memset(virtBoards,0,sizeof(IP_VIRTBOARD)*BOARDS_NUM);
cclibStartData.version = 0x0100; // must be set to 0x0100
cclibStartData.delimiter = ',';
cclibStartData.num_boards = BOARDS_NUM;
cclibStartData.board_list = virtBoards;
virtBoards[0].total_max_calls = IP_CFG_MAX_AVAILABLE_CALLS;
virtBoards[0].h323_max_calls = IP_CFG_MAX_AVAILABLE_CALLS;
virtBoards[0].sip_max_calls = IP_CFG_MAX_AVAILABLE_CALLS;
virtBoards[0].localIP.ip_ver = IPVER4; // must be set to IPVER4
virtBoards[0].localIP.u_ipaddr.ipv4 = IP_CFG_DEFAULT;
virtBoards[0].h323_signaling_port = IP_CFG_DEFAULT;
virtBoards[0].sip_signaling_port = IP_CFG_DEFAULT;
virtBoards[0].reserved = NULL; // must be set to NULL
CCLIB_START_STRUCT cclibStartStruct[] = {
{"GC_IPM_LIB", NULL},
{"GC_H3R_LIB", &cclibStartData}
};
GC_START_STRUCT gcStartStruct;
gcStartStruct.cclib_list = cclibStartStruct;
gcStartStruct.num_cclibs = 2;
int rc = gc_Start(&gcStartStruct);
if(GC_SUCCESS != rc)
{
// handle the error
}
If two Global Call IP applications are required to be running on the same machine (using same stack), the second application must modify the IPCCLIB_START_DATA structure to have a different h323_signaling_port value so that there is no conflict. If there is a conflict, the IP call control library will fail to load.
Click here to contact Telecom Support Resources
Copyright 2002, Intel Corporation