User`s guide

Dialogic
®
System Release 6.0 PCI for Windows
®
Release Update, Rev 62 — January 30, 2008 132
Dialogic Corporation
Specifying the Protocol for a Trunk
The protocol used by a trunk can be dynamically configured after devices have been
opened using the gc_SetConfigData( ) function. All channels on the affected trunk inherit
the newly selected protocol.
The gc_SetConfigData( ) function uses a GC_PARM_BLK structure that contains the
configuration information. The GC_PARM_BLK is populated using the
gc_util_insert_parm_ref( ) function.
To configure the protocol, use the gc_util_insert_parm_ref( ) function with the following
parameter values:
parm_blkpp = pointer to the address of a valid GC_PARM_BLK structure where the
parameter and value are to be inserted
setID = GCSET_PROTOCOL
parmID = GCPARM_PROTOCOL_NAME
data_size = strlen(“<protocol_name>”), for example, strlen(“4ESS”)
data = “<protocol_name>”, for example, “4ESS” (a null-terminated string). For ISDN
protocols, the protocol name must be one of the supported protocols listed in the
CONFIG file that corresponds to the PCD/FCD file that is downloaded. Only protocols
of the same line type can be selected, that is, if the trunk is of line type E1, then only a
protocol variant that is valid for E1 can be selected.
Once the GC_PARM_BLK has been populated with the desired values, the
gc_SetConfigData( ) function can be issued to perform the configuration. The parameter
values for the gc_SetConfigData( ) function are as follows:
target_type = GCTGT_CCLIB_NETIF
target_id = the trunk line device handle, as obtained from gc_OpenEx( ) with a
devicename string of “:N_dtiBx:P...”.
target_datap = GC_PARM_BLKP parameter pointer, as constructed by the utility
function gc_util_insert_parm_ref( )
time_out = time interval (in seconds) during which the target object must be updated
with the data. If the interval is exceeded, the update request is ignored. This
parameter is supported in synchronous mode only, and it is ignored when set to 0.
update_cond = GCUPDATE_IMMEDIATE
request_idp = pointer to the location for storing the request ID
mode = EV_ASYNC for asynchronous execution or EV_SYNC for synchronous
execution
The application receives one of the following events:
GCEV_SETCONFIGDATA to indicate that the request to dynamically change the
protocol has been successfully initiated.
GCEV_SETCONFIGDATA_FAIL to indicate that the request to change the protocol
has failed. More information is available from the GC_RTCM_EVTDATA structure
associated with the event.