App Note h323 To Host Based v2
App Note h323 To Host Based v2
323
Applications
from Embedded Stack
to Host-Based Stack
Application Note
05-1857-002
INFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH INTEL®
PRODUCTS. NO LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, TO ANY
INTELLECTUAL PROPERTY RIGHTS IS GRANTED BY THIS DOCUMENT. EXCEPT AS
PROVIDED IN INTEL'S TERMS AND CONDITIONS OF SALE FOR SUCH PRODUCTS, INTEL
ASSUMES NO LIABILITY WHATSOEVER, AND INTEL DISCLAIMS ANY EXPRESS OR
IMPLIED WARRANTY, RELATING TO SALE AND/OR USE OF INTEL PRODUCTS
INCLUDING LIABILITY OR WARRANTIES RELATING TO FITNESS FOR A PARTICULAR
PURPOSE, MERCHANTABILITY, OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR
OTHER INTELLECTUAL PROPERTY RIGHT. Intel products are not intended for use in medical,
life saving, or life sustaining applications.
Intel may make changes to specifications and product descriptions at any time, without notice.
This document as well as the software described in it is furnished under license and may only be used
or copied in accordance with the terms of the license. The information in this manual is furnished for
informational use only, is subject to change without notice, and should not be construed as a
commitment by Intel Corporation. Intel Corporation assumes no responsibility or liability for any
errors or inaccuracies that may appear in this document or any software that may be provided in
association with this document. Except as permitted by such license, no part of this document may be
reproduced, stored in a retrieval system, or transmitted in any form or by any means without express
written consent of Intel Corporation.
iii
Porting Global Call H.323 Applications from Embedded Stack to Host-Based
Stack Application Note
iv
1. Introduction
This technical note provides information for application developers on porting
existing Global Call applications that use the embedded H.323 IP stack provided
in System Release 5.x to Global Call applications that use the host-based H.323
stack provided in System Release 6.0 and later. Topics include:
• Deprecated Global Call functions and the preferred equivalents
• Run time configuration
• The relevant Global Call API functions that replace the config.val file
• Compatibility issues to be fixed in future system releases
• Compatibility issues
• Enhanced functionality available in the System Release 6.0
1
Porting Global Call H.323 Applications from Embedded Stack to Host-Based
Stack Application Note
2
2. Deprecated Global Call Functions
The following Global Call functions, which may have been used in applications
developed using the NetTSC embedded stack implementation are deprecated in
System Release 6.0. The preferred equivalent for each deprecated function is
given in Table 1.
See the Global Call API Library Reference for generic information about these
functions and the Global Call IP Technology User’s Guide for technology-
specific information.
3
Porting Global Call H.323 Applications from Embedded Stack to Host-Based
Stack Application Note
4
3. Run Time Configuration
The following features, which in System Release 5.x were configurable at
download time, are now configurable at run time using the Global Call API.
• IP Address and Port Specification
• DTMF Transfer Mode Configuration
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
IP_VIRTBOARD virtBoards[BOARDS_NUM];
memset(virtBoards,0,sizeof(IP_VIRTBOARD)*BOARDS_NUM);
5
Porting Global Call H.323 Applications from Embedded Stack to Host-Based
Stack Application Note
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
}
NOTE: The IP_CFG_DEFAULT define indicates to the call control library that
it should determine and fill in the correct values. IP_CFG_DEFAULT
values can be replaced by discrete values.
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.
6
3. Run Time Configuration
See the Global Call IP Technology User’s Guide for more detail.
7
Porting Global Call H.323 Applications from Embedded Stack to Host-Based
Stack Application Note
8
4. config.val File Redundancy
In System Release 5.x, the config.val file contained the following configurable
information:
• Stack allocation parameters
• Address string delimiter
• Vendor information
• Registration, Admission and Status (RAS) information
• Coder information
In System Release 6.0, the config.val file is not used. The following sections
describe how Global Call API functions provide the configuration functionality
previously available in the config.val file.
9
Porting Global Call H.323 Applications from Embedded Stack to Host-Based
Stack Application Note
#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);
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
}
The delimiter that separates different parts of the address in composite address
strings can be set in the IPCCLIB_START_DATA structure used by the
gc_Start( ) function. The parameter is configurable on a system-wide basis. The
following code segment shows how to set the delimiter to be a comma (,).
#define BOARDS_NUM 1
10
4. config.val File Redundancy
In System Release 5.x with the NetTSC embedded stack, registration functionality
was configurable by setting parameter values in the config.val file. Functionality
was provided in stages as described below:
• A setting determined if working with RAS protocol was enabled or disabled
11
Porting Global Call H.323 Applications from Embedded Stack to Host-Based
Stack Application Note
• If working with the RAS protocol was enabled, then another setting
determined if automatic registration at initialization time was enabled or
disabled.
• If automatic registration at initialization time was enabled, then other settings
determined:
• Whether working with multicast or unicast is required and the respective
address
• The terminal alias, supported prefixes and time-to-live information
(optional)
In System Release 6.0 with the host-based stack, registration is achieved using the
gc_ReqService( ) function. The following rules apply:
• The application must use a valid board device handle that was previously
obtained using the gc_OpenEx( ) function, for example,
gc_OpenEx(&boardDevice,”:N_iptB1:P_IP”,EV_ASYNC, NULL) .
• The application must perform initial discovery and registration before
handling any calls.
• When the application is registered and has active calls, any deregistration or
switching to a different gatekeeper must be done when all line devices in the
system are in the Idle state.
The gc_ReqService( ) function is used for both registration and deregistration and
includes a GC_PARM_BLK that can be populated with parameters that determine
the following:
• The operation to be performed (register or deregister)
• The sub-operation to be performed (set registration information, add to
registration information, delete one component of registration information by
value, delete all registeration information)
• Registration address information
• Any local aliases to be included in the registration (when the registration
target is H.323 only)
• Any supported prefixes to be included in the registration (when the
registration target is H.323 only)
12
4. config.val File Redundancy
4.4.1. Registration
typedef struct
{
char reg_client[IP_REG_CLIENT_ADDR_LENGTH];
char reg_server[IP_REG_SERVER_ADDR_LENGTH];
int time_to_live;
int max_hops;
}IP_REGISTER_ADDRESS;
13
Porting Global Call H.323 Applications from Embedded Stack to Host-Based
Stack Application Note
frc = gc_util_insert_parm_val(&pParmBlock,
GCSET_SERVREQ,
PARM_ACK,
sizeof(char),
1);
2. Since Global Call in System Release 6.0 supports both H.323 and SIP
protocols, the protocol must be specified. This is achieved by including the
following set ID and parameter ID in the GC_PARM_BLK:
frc = gc_util_insert_parm_ref(&pParmBlock,
IPSET_REG_INFO,
IPPARM_REG_ADDRESS,
(UINT8)sizeof(IP_REGISTER_ADDRESS),
®isterAddress);
14
4. config.val File Redundancy
7. Once the GC_PARM_BLK has been set up, the gc_ReqService( ) function
can be used to send the request to the gatekeeper.
15
Porting Global Call H.323 Applications from Embedded Stack to Host-Based
Stack Application Note
if (rc != GC_SUCCESS)
{
printf("failed in gc_ReqService\n");
return GC_ERROR;
}
When using the Global Call API, getting notification of registration status is a two
step process:
• Detecting a registration event on the board device
• Extracting the status from the GC_PARM_BLK associated with the event
The following code demonstrates how to detect the event on the board device.
gcParmBlk = (&(pextensionBlk->parmblk));
rc = getExtension(gcParmBlk);
if (FUNCSUCCESS != rc)
{
printf("rasProcessEvent: No InfoElement on Extension Buffer\n");
return FUNCFAIL;
}
}
return FUNCSUCCESS;
}
The following code shows how to extract registration status (accepted or rejected)
from the GC_PARM_BLK associated with the event.
16
4. config.val File Redundancy
if (!parmp)
{
return FUNCFAIL;
}
parmp = gc_util_next_parm(parm_blk,parmp);
}
return FUNCSUCCESS;
}
17
Porting Global Call H.323 Applications from Embedded Stack to Host-Based
Stack Application Note
frc = gc_util_insert_parm_val(&gcParmBlk,
IPSET_MSG_REGISTRATION,
IPPARM_MSGTYPE,
sizeof(int),
IP_MSGTYPE_REG_NONSTD);
frc = gc_util_insert_parm_ref(&gcParmBlk,
IPSET_NONSTANDARDDATA,
IPPARM_NONSTANDARDDATA_OBJID,
(unsigned char)(strlen(Boards[1].RegData.NonStdObjID) +1),
(void*)Boards[1].RegData.NonStdObjID);
frc = gc_util_insert_parm_ref(&gcParmBlk,
IPSET_NONSTANDARDDATA,
IPPARM_NONSTANDARDDATA_DATA,
(unsigned
char)(strlen(Boards[1].RegData.NonStdCmd)+1),
(void*)(Boards[1].RegData.NonStdCmd) );
if (gc_Extension(GCTGT_CCLIB_NETIF,
Boards[1].device,
IPEXTID_SENDMSG,
gcParmBlk,
NULL,
EV_ASYNC)<0)
{
printf("gc_Extention failed");
}
gc_util_delete_parm_blk(gcParmBlk);
return FUNCSUCCESS;
}
18
4. config.val File Redundancy
4.4.4. Deregistration
The following code example shows how to deregister from a gatekeeper and
discard the registration information stored locally.
int unregister()
{
GC_PARM_BLKP pParmBlock = NULL;
unsigned long serviceID = 1;
int rc;
rc = gc_util_insert_parm_val(&pParmBlock,
IPSET_REG_INFO,
IPPARM_OPERATION_DEREGISTER,
sizeof(char),
IP_REG_DELETE_ALL);
rc = gc_ReqService(GCTGT_CCLIB_NETIF,
Boards[1].device,
&serviceID,
pParmBlock,
NULL,
EV_ASYNC);
if ( GC_SUCCESS != rc)
{
printf("gc_ReqService failed while unregestering\n");
gc_util_delete_parm_blk(pParmBlock);
return FUNCFAIL;
}
g_waitForCmplt = UNREGESTER;
printf("Unregester request to the GK was sent ...\n");
printf("the application will not be able to make calls !!! so it will EXIT\n");
gc_util_delete_parm_blk(pParmBlock);
return FUNCSUCCESS;
}
19
Porting Global Call H.323 Applications from Embedded Stack to Host-Based
Stack Application Note
In System Release 5.x, coder information could be specified in the config.val file.
In System Release 6.0, coder information can only be set at run time using the
Global Call API. Coder information can be set:
• On a system-wide basis using gc_SetConfigData( )
• On a per line device basis using gc_SetUserInfo( )
• On a per call device using gc_MakeCall( )
See the Global Call IP Technology User’s Guide for information on the supported
coders and how to set them.
20
5. Compatibility Issues to be Fixed in
Future Releases
The following are known compatibility issues that are expected to be fixed in
future releases:
• In the host-based stack implementation, gc_OpenEx( ) and
gc_ReleaseCallEx( ) are supported in both synchronous and asynchronous
mode. All other functions are supported in asynchronous mode only.
• The host-based stack implementation does not currently support RTCP
Reports.
• The gc_GetCTInfo( ) function, which is supported in the NetTSC embedded
stack implementation is not currently supported in the host-based stack
implementation.
21
Porting Global Call H.323 Applications from Embedded Stack to Host-Based
Stack Application Note
22
6. Compatibility Issues
The following compatibility issues necessitate changes to applications developed
using the NetTSC embedded stack implementation in order to run on the host-
based stack implementation in System Release 6.0:
• The config.val file is no longer being used. Parameters previously
configurable in config.val are now configurable using Global Call API
functions. See Chapter 4. config.val File Redundancy for more information.
• In the embedded stack implementation, when using gc_OpenEx( ), the
protocol identifier in the numberstr parameter is P_H323_R and each IP
Media device (ipmBxCy) is bound to the corresponding IP network device
(iptBxTy), that is BxCy = BxTy. In the host-based stack implementation, the
protocol identifier is P_H323 and the IP Media device is not bound to a
corresponding IP network device.
• The gc_SetConfigData( ) function uses different target types and target IDs
in the different implementations as follows:
• In the NetTSC embedded stack implementation, the target type is
GCTGT_PROTOCOL_SYSTEM and the target ID (protocol ID) had to
be retrieved using the gc_QueryConfigData( ) function.
• In the host-based stack implementation, the target type is
GCTGT_CCLIB_NETIF and the target ID is the board device ID.
In addition, parameter settings apply not only to newly opened devices but
also to devices already opened. See the Global Call IP Technology User’s
Guide for more information.
• In the NetTSC embedded stack implementation, the GCEV_EXTENSION
event had a dual role acting as the completion event for the gc_Extension( )
function and as an unsolicited event. In the host-based stack implementation,
the completion event for gc_Extension( ) is GCEV_EXTENSIONCMPLT.
The GCEV_EXTENSION event is reserved for unsolicited events only.
• In the NetTSC embedded stack implementation, the number of IP network
devices allocated depended on the number and type of Intel NetStructure
DM/IP boards in the system. In the host-based stack implementation, the
number of IP network devices that will be allocated is configurable using the
23
Porting Global Call H.323 Applications from Embedded Stack to Host-Based
Stack Application Note
24
6. Compatibility Issues
25
Porting Global Call H.323 Applications from Embedded Stack to Host-Based
Stack Application Note
26
6. Compatibility Issues
In the host-based stack implementation, the .config file is not used. DTMF and
application data transfer is achieved as follows:
• The application uses IPSET_DTMF with
IPPARM_DTMF_ALPHANUMERIC (which is the same value as
IPPARM_UII_ALPHANUMERIC) to send DTMF.
• The application can use User Input Indication (UII) non-standard, or Q931
User-to-User Information (UUI) to send information to an application at the
remote end.
See the Global Call IP Technology User’s Guide for more information.
27
Porting Global Call H.323 Applications from Embedded Stack to Host-Based
Stack Application Note
28
7. Enhanced Functionality
The host-based stack implementation in System Release 6.0 includes the following
enhancements over the NetTSC embedded stack implementation:
• Support for both H.323 and SIP protocols
• Support for RFC2833.
• Support for T.38 fax.
• In the host-based stack implementation, both Transmit and Receive coders
can be specified. In the NetTSC embedded stack implementation, only
Transmit coders could be specified.
• The behavior of the gc_SetUserInfo( ) with the GC_SINGLECALL (per call
basis) and GC_ALLCALLS (per device basis) options is different as follows:
• In the NetTSC embedded stack implementation, only coder information
could be set using GC_ALLCALLS (per line device basis); all other
information could be set using GC_SINGLECALL only (per call basis).
• In the host-based stack implementation, all parameters (coder info,
conference goal, connection method, display information, nonstandard
data, nonstandard control, phone list, tunneling, and user-to-user
information) can be set using both GC_SINGLECALL and
GC_ALLCALLS.
• In the NetTSC embedded stack implementation, the Proceeding message was
sent automatically by the stack. In the host-based stack implementation, the
application can determine if the Proceeding message should be sent manually
or automatically by the stack. See Section 7.1. Specifying Automatic or
Manual Sending of the Proceeding Message below for more detail.
• In the NetTSC embedded stack implementation, routing using gc_Listen( ),
gc_UnListen( ) had to be done in synchronous mode, but these functions
were non-blocking. In the host-based stack implementation, it is
recommended to use gc_Listen( ) and gc_Unlisten( ) in asynchronous mode.
Using gc_Listen( ) and gc_UnListen( ) in synchronous mode is supported,
but these functions are blocking in the host-based implementation.
29
Porting Global Call H.323 Applications from Embedded Stack to Host-Based
Stack Application Note
In the NetTSC embedded stack implementation, during call setup, the Proceeding
message was sent automatically. In the host based stack implementation, the
application can configure if the Proceeding message should be sent manually by
the application (using the gc_CallAck( ) function) or automatically by the stack.
The default is that the Proceeding message is sent manually by the application by
issuing gc_CallAck( ). If the automatic option is selected, there may be
performance issues at the receiving side.
30